From e3093d26d6974c8399dbfab31e08c57697fd76b7 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Wed, 21 Sep 2016 14:22:08 +0200 Subject: [PATCH] Fix website errors when Mono-built --- Site5/Controls/v5/Base/AjaxTextBox.ascx | 3 +++ Site5/Master-v5.master | 7 ------- Site5/Pages/v5/Financial/AttestCosts.aspx.cs | 2 -- Site5/Pages/v5/Financial/Donate.aspx.cs | 1 - Site5/Pages/v5/Ledgers/BudgetActual.aspx.cs | 12 +++++------- Site5/Pages/v5/Ledgers/ProfitLossStatement.aspx.cs | 13 ++++++------- Site5/Pages/v5/Swarm/ListFindPeople.aspx.cs | 8 ++++---- 7 files changed, 18 insertions(+), 28 deletions(-) diff --git a/Site5/Controls/v5/Base/AjaxTextBox.ascx b/Site5/Controls/v5/Base/AjaxTextBox.ascx index 45c99ba5..4c2437c2 100644 --- a/Site5/Controls/v5/Base/AjaxTextBox.ascx +++ b/Site5/Controls/v5/Base/AjaxTextBox.ascx @@ -10,6 +10,8 @@ var currentValue = $('#<%=this.TextInput.ClientID%>').val(); + alert(currentValue + "\r\n" + _initVal_<%=this.TextInput.ClientID%>); + if (currentValue != _initVal_<%=this.TextInput.ClientID%>) { var jsonData = {}; jsonData.newValue = currentValue; @@ -116,6 +118,7 @@ function <%=this.ClientID%>_initialize(initValue) { _initVal_<%=this.TextInput.ClientID%> = initValue; + alert(initValue); <%=this.ClientID%>_setValue(initValue); <%=this.ClientID%>_enable(); } diff --git a/Site5/Master-v5.master b/Site5/Master-v5.master index 252b9380..7304a107 100644 --- a/Site5/Master-v5.master +++ b/Site5/Master-v5.master @@ -368,13 +368,6 @@ _master_PersonEditLoading = false; - // TEST CODE BELOW - - - masterPersonEditorOnFieldChange("YAY1", "Name", '<%=this.MasterEditPersonName.ClientID%>'); - masterPersonEditorOnFieldChange("YAY2", "Mail", '<%=this.MasterEditPersonMail.ClientID%>'); - masterPersonEditorOnFieldChange("YAY3", "Phone", '<%=this.MasterEditPersonPhone.ClientID%>'); - } else { alert('Server error: Call to SwarmFunctions.aspx failed'); } diff --git a/Site5/Pages/v5/Financial/AttestCosts.aspx.cs b/Site5/Pages/v5/Financial/AttestCosts.aspx.cs index d65ed179..aaac4d60 100644 --- a/Site5/Pages/v5/Financial/AttestCosts.aspx.cs +++ b/Site5/Pages/v5/Financial/AttestCosts.aspx.cs @@ -1,5 +1,4 @@ using System; -using System.Activities.Expressions; using System.Collections.Generic; using System.Globalization; using System.Linq; @@ -9,7 +8,6 @@ using System.Threading; using System.Web; using System.Web.Services; using System.Web.UI; -using Resources; using Swarmops.Common.Enums; using Swarmops.Logic.Financial; using Swarmops.Logic.Security; diff --git a/Site5/Pages/v5/Financial/Donate.aspx.cs b/Site5/Pages/v5/Financial/Donate.aspx.cs index 1e107467..c5cdfc23 100644 --- a/Site5/Pages/v5/Financial/Donate.aspx.cs +++ b/Site5/Pages/v5/Financial/Donate.aspx.cs @@ -1,5 +1,4 @@ using System; -using System.Activities.Validation; using System.Collections.Generic; using System.Diagnostics; using System.Linq; diff --git a/Site5/Pages/v5/Ledgers/BudgetActual.aspx.cs b/Site5/Pages/v5/Ledgers/BudgetActual.aspx.cs index 2ac23538..e64c15c6 100644 --- a/Site5/Pages/v5/Ledgers/BudgetActual.aspx.cs +++ b/Site5/Pages/v5/Ledgers/BudgetActual.aspx.cs @@ -1,7 +1,5 @@ using System; using System.Globalization; -using Resources; -using Resources.Pages; using Swarmops.Logic.Security; public partial class Pages_v5_Ledgers_BudgetActual : PageV5Base @@ -15,8 +13,8 @@ public partial class Pages_v5_Ledgers_BudgetActual : PageV5Base } PageIcon = "iconshock-abacus"; - PageTitle = Ledgers.BudgetActual_PageTitle; - InfoBoxLiteral = Ledgers.BudgetActual_Info; + PageTitle = Resources.Pages.Ledgers.BudgetActual_PageTitle; + InfoBoxLiteral = Resources.Pages.Ledgers.BudgetActual_Info; // Security: If the org has open ledgers, then anyone may read. Otherwise, Financials.Read. @@ -51,15 +49,15 @@ public partial class Pages_v5_Ledgers_BudgetActual : PageV5Base { int year = DateTime.UtcNow.Year; - this.LabelContentHeader.Text = string.Format (Ledgers.BudgetActual_ContentHeader, + this.LabelContentHeader.Text = string.Format (Resources.Pages.Ledgers.BudgetActual_ContentHeader, CurrentOrganization.Name); this.LiteralHeaderLastYearActual.Text = Global.Financial_Actuals + @" " + (year - 1).ToString(CultureInfo.InvariantCulture); this.LiteralHeaderBudget.Text = Global.Financial_Budget + @" " + year.ToString(CultureInfo.InvariantCulture); ; this.LiteralHeaderActual.Text = Global.Financial_Actuals + @" " + Global.Financial_YTD; - this.LiteralHeaderExpected.Text = Ledgers.BudgetActual_ExpectedYtd; + this.LiteralHeaderExpected.Text = Resources.Pages.Ledgers.BudgetActual_ExpectedYtd; this.LiteralActual.Text = Global.Financial_Actuals; this.LiteralBudget.Text = Global.Financial_Budget; - this.LiteralHeaderAccountName.Text = Ledgers.ProfitLossStatement_AccountName; + this.LiteralHeaderAccountName.Text = Resources.Pages.Ledgers.ProfitLossStatement_AccountName; this.LiteralHeaderFlags.Text = Global.Global_Flags; } } \ No newline at end of file diff --git a/Site5/Pages/v5/Ledgers/ProfitLossStatement.aspx.cs b/Site5/Pages/v5/Ledgers/ProfitLossStatement.aspx.cs index c4ec8715..ca2b00eb 100644 --- a/Site5/Pages/v5/Ledgers/ProfitLossStatement.aspx.cs +++ b/Site5/Pages/v5/Ledgers/ProfitLossStatement.aspx.cs @@ -1,7 +1,6 @@ using System; using System.Globalization; using Resources; -using Resources.Pages; using Swarmops.Logic.Security; public partial class Pages_v5_Ledgers_ProfitLossStatement : PageV5Base @@ -15,8 +14,8 @@ public partial class Pages_v5_Ledgers_ProfitLossStatement : PageV5Base } PageIcon = "iconshock-abacus"; - PageTitle = Ledgers.ProfitLossStatement_PageTitle; - InfoBoxLiteral = Ledgers.ProfitLossStatement_Info; + PageTitle = Resources.Pages.Ledgers.ProfitLossStatement_PageTitle; + InfoBoxLiteral = Resources.Pages.Ledgers.ProfitLossStatement_Info; // Security: If the org has open ledgers, then anyone may read. Otherwise, Financials.Read. @@ -49,14 +48,14 @@ public partial class Pages_v5_Ledgers_ProfitLossStatement : PageV5Base private void Localize() { - this.LabelContentHeader.Text = string.Format (Ledgers.ProfitLossStatement_ContentHeader, + this.LabelContentHeader.Text = string.Format (Resources.Pages.Ledgers.ProfitLossStatement_ContentHeader, CurrentOrganization.Name); - this.LiteralHeaderLastYear.Text = Ledgers.ProfitLossStatement_LastYear; + this.LiteralHeaderLastYear.Text = Resources.Pages.Ledgers.ProfitLossStatement_LastYear; this.LiteralHeaderQ1.Text = Global.Global_Q1; this.LiteralHeaderQ2.Text = Global.Global_Q2; this.LiteralHeaderQ3.Text = Global.Global_Q3; this.LiteralHeaderQ4.Text = Global.Global_Q4; - this.LiteralHeaderYtd.Text = Ledgers.ProfitLossStatement_Ytd; - this.LiteralHeaderAccountName.Text = Ledgers.ProfitLossStatement_AccountName; + this.LiteralHeaderYtd.Text = Resources.Pages.Ledgers.ProfitLossStatement_Ytd; + this.LiteralHeaderAccountName.Text = Resources.Pages.Ledgers.ProfitLossStatement_AccountName; } } \ No newline at end of file diff --git a/Site5/Pages/v5/Swarm/ListFindPeople.aspx.cs b/Site5/Pages/v5/Swarm/ListFindPeople.aspx.cs index 05bd4543..dd3b05c5 100644 --- a/Site5/Pages/v5/Swarm/ListFindPeople.aspx.cs +++ b/Site5/Pages/v5/Swarm/ListFindPeople.aspx.cs @@ -3,7 +3,7 @@ using System.ServiceModel.Security; using System.Web; using System.Web.Services; using Resources; -using Resources.Pages; + using Swarmops.Common.Enums; using Swarmops.Logic.Financial; using Swarmops.Logic.Security; @@ -67,7 +67,7 @@ namespace Swarmops.Frontend.Pages.Swarm // Create result and return it result.AssignedId = payout.Identity; - result.DisplayMessage = String.Format (Financial.PayOutMoney_PayoutCreated, payout.Identity, + result.DisplayMessage = String.Format (Resources.Pages.Financial.PayOutMoney_PayoutCreated, payout.Identity, payout.Recipient); result.DisplayMessage = HttpUtility.UrlEncode (result.DisplayMessage).Replace ("+", "%20"); @@ -88,7 +88,7 @@ namespace Swarmops.Frontend.Pages.Swarm // this payout has already been settled, or picked up for settling result.Success = false; - result.DisplayMessage = String.Format (Financial.PayOutMoney_PayoutCannotUndo, + result.DisplayMessage = String.Format (Resources.Pages.Financial.PayOutMoney_PayoutCannotUndo, databaseId); return result; @@ -97,7 +97,7 @@ namespace Swarmops.Frontend.Pages.Swarm payout.UndoPayout(); result.DisplayMessage = - HttpUtility.UrlEncode (String.Format (Financial.PayOutMoney_PayoutUndone, databaseId)) + HttpUtility.UrlEncode (String.Format (Resources.Pages.Financial.PayOutMoney_PayoutUndone, databaseId)) .Replace ("+", "%20"); result.Success = true; return result;