From cd52464910063be676802d5cad7109cf33864807 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Tue, 24 Mar 2015 01:05:07 +0100 Subject: [PATCH] Last minute bugfixes for sprint release --- Site5/Controls/v5/Base/DropDown.ascx | 39 ++++++++++--------- Site5/Controls/v5/Base/DropDown.ascx.cs | 11 +++++- .../Pages/v5/Admin/CreateOrganization.aspx.cs | 5 ++- .../Pages/v5/Ledgers/BalanceTransactions.aspx | 14 +++---- 4 files changed, 40 insertions(+), 29 deletions(-) diff --git a/Site5/Controls/v5/Base/DropDown.ascx b/Site5/Controls/v5/Base/DropDown.ascx index 5b24adaa..1705dfe8 100644 --- a/Site5/Controls/v5/Base/DropDown.ascx +++ b/Site5/Controls/v5/Base/DropDown.ascx @@ -3,9 +3,10 @@ - + diff --git a/Site5/Controls/v5/Base/DropDown.ascx.cs b/Site5/Controls/v5/Base/DropDown.ascx.cs index 58df8b5b..d8bd08af 100644 --- a/Site5/Controls/v5/Base/DropDown.ascx.cs +++ b/Site5/Controls/v5/Base/DropDown.ascx.cs @@ -5,14 +5,23 @@ namespace Swarmops.Frontend.Controls.v5.Base { public partial class DropDown : ControlV5Base { + public ListItemCollection Items + { + get { return this.DropControl.Items; } + } + public string SelectedValue + { + get { return this.DropControl.SelectedValue; } + set { this.DropControl.SelectedValue = value; } + } public string OnClientChange { get; set; } public string DataUrl { get; set; } public string ClientControlID { - get { return this.ClientID + "_DropDown"; } + get { return this.ClientID + "_DropControl"; } } protected void Page_Load (object sender, EventArgs e) diff --git a/Site5/Pages/v5/Admin/CreateOrganization.aspx.cs b/Site5/Pages/v5/Admin/CreateOrganization.aspx.cs index 63b8c282..13dcefc0 100644 --- a/Site5/Pages/v5/Admin/CreateOrganization.aspx.cs +++ b/Site5/Pages/v5/Admin/CreateOrganization.aspx.cs @@ -39,6 +39,7 @@ namespace Swarmops.Frontend.Pages.v5.Admin this.ButtonCreate.Text = Global.Global_Create; + this.DropPersonLabel.Items.Clear(); this.DropActivistLabel.Items.Clear(); this.DropCurrencies.Items.Clear(); @@ -65,14 +66,14 @@ namespace Swarmops.Frontend.Pages.v5.Admin } localizedPersonLabels.Sort(); // Sorts _localized_ - + foreach (string localizedPersonLabel in localizedPersonLabels) { string[] parts = localizedPersonLabel.Split ('|'); this.DropPersonLabel.Items.Add (new ListItem (parts[0], parts[1])); this.DropActivistLabel.Items.Add (new ListItem (parts[0], parts[1])); } - + Currencies currencies = Currencies.GetAll(); List currencyStrings = new List(); diff --git a/Site5/Pages/v5/Ledgers/BalanceTransactions.aspx b/Site5/Pages/v5/Ledgers/BalanceTransactions.aspx index d28378b8..42f7d3ab 100644 --- a/Site5/Pages/v5/Ledgers/BalanceTransactions.aspx +++ b/Site5/Pages/v5/Ledgers/BalanceTransactions.aspx @@ -39,8 +39,8 @@ $('#spanTransactionUnbalancedBy').text('[...]'); $('span#spanModalTransactionDate').text('[...]'); - <%=this.DropOpenPayouts.ClientControlID%>_loadData([{ id: 0, text: "<%=Resources.Global.Global_LoadingPlaceholder%>" }]); - <%=this.DropOpenPayouts.ClientControlID%>_val('0'); + <%=this.DropOpenPayouts.ClientID%>_loadData([{ id: 0, text: "<%=Resources.Global.Global_LoadingPlaceholder%>" }]); + <%=this.DropOpenPayouts.ClientID%>_val('0'); SwarmopsJS.ajaxCall( "/Pages/v5/Ledgers/BalanceTransactions.aspx/GetTransactionMatchability", @@ -50,11 +50,11 @@ $('span#spanModalTransactionDate').text(data.TransactionDate); if (data.OpenPayoutData.length > 0) { - <%=this.DropOpenPayouts.ClientControlID%>_loadData(data.OpenPayoutData); - <%=this.DropOpenPayouts.ClientControlID%>_text("<%=Resources.Global.Global_SelectOne%>"); + <%=this.DropOpenPayouts.ClientID%>_loadData(data.OpenPayoutData); + <%=this.DropOpenPayouts.ClientID%>_text("<%=Resources.Global.Global_SelectOne%>"); } else { - <%=this.DropOpenPayouts.ClientControlID%>_loadData({}); - <%=this.DropOpenPayouts.ClientControlID%>_text("<%=Resources.Global.Global_NoMatch%>"); + <%=this.DropOpenPayouts.ClientID%>_loadData({}); + <%=this.DropOpenPayouts.ClientID%>_text("<%=Resources.Global.Global_NoMatch%>"); } }); @@ -78,7 +78,7 @@ } function onMatchOpenPayout() { - var payoutId = <%=this.DropOpenPayouts.ClientControlID%>_val(); + var payoutId = <%=this.DropOpenPayouts.ClientID%>_val(); if (payoutId > 0) { <%= this.DialogTx.ClientID %>_close();