diff --git a/Site5/App_Code/CommonV5Base.cs b/Site5/App_Code/CommonV5Base.cs
index 93a43594..d5d1d05a 100644
--- a/Site5/App_Code/CommonV5Base.cs
+++ b/Site5/App_Code/CommonV5Base.cs
@@ -108,4 +108,39 @@ public class CommonV5Base
return result;
}
-}
\ No newline at end of file
+}
+
+[Flags]
+// ReSharper disable once InconsistentNaming
+public enum EasyUIControl
+{
+ Unknown = 0,
+ Accordion = 0x0000001,
+ Calendar = 0x0000002,
+ Combo = 0x0000004,
+ ComboBox = 0x0000008,
+ DataGrid = 0x0000010,
+ DateBox = 0x0000020,
+ Dialog = 0x0000040,
+ FileBox = 0x0000080,
+ Layout = 0x0000100,
+ LinkButton = 0x0000200,
+ Menu = 0x0000400,
+ MenuButton = 0x0000800,
+ Messager = 0x0001000,
+ NumberBox = 0x0002000,
+ Pagination = 0x0004000,
+ Panel = 0x0008000,
+ ProgressBar = 0x0010000,
+ PropertyGrid = 0x0020000,
+ SearchBox = 0x0040000,
+ Slider = 0x0080000,
+ Spinner = 0x0100000,
+ SplitButton = 0x0200000,
+ Tabs = 0x0400000,
+ TextBox = 0x0800000,
+ ToolTip = 0x1000000,
+ Tree = 0x2000000,
+ ValidateBox = 0x4000000,
+ Window = 0x8000000
+};
diff --git a/Site5/App_Code/MasterV5Base.cs b/Site5/App_Code/MasterV5Base.cs
index 85fd83e0..72bebfa2 100644
--- a/Site5/App_Code/MasterV5Base.cs
+++ b/Site5/App_Code/MasterV5Base.cs
@@ -18,10 +18,14 @@ public class MasterV5Base : System.Web.UI.MasterPage
public string CurrentPageInfoBoxLiteral = string.Empty;
+ // ReSharper disable InconsistentNaming
protected Person _currentUser = null; // These are set in Master-v5.master.cs
protected Authority _authority = null;
protected Organization _currentOrganization = null;
+ public EasyUIControl EasyUIControlsUsed { get; set; } // these are set by each page, and called by Master to render in ExternalScripts control
+ // ReSharper restore InconsistentNaming
+
public DateTime PermissionCacheTimestamp
{
get
diff --git a/Site5/App_Code/PageV5Base.cs b/Site5/App_Code/PageV5Base.cs
index 94882a67..0742849a 100644
--- a/Site5/App_Code/PageV5Base.cs
+++ b/Site5/App_Code/PageV5Base.cs
@@ -44,6 +44,13 @@ public class PageV5Base : System.Web.UI.Page
set { this.Master.CurrentPageInfoBoxLiteral = value; }
}
+ // ReSharper disable once InconsistentNaming
+ protected EasyUIControl EasyUIControlsUsed
+ {
+ get { return this.Master.EasyUIControlsUsed; }
+ set { this.Master.EasyUIControlsUsed = value; }
+ }
+
protected Person CurrentUser
{
get { return this.Master.CurrentUser; }
diff --git a/Site5/Controls/v5/UI/ExternalScripts.ascx b/Site5/Controls/v5/UI/ExternalScripts.ascx
index bec34ea5..88f6117c 100644
--- a/Site5/Controls/v5/UI/ExternalScripts.ascx
+++ b/Site5/Controls/v5/UI/ExternalScripts.ascx
@@ -1,9 +1,5 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ExternalScripts.ascx.cs" Inherits="Swarmops.Frontend.Controls.v5.UI.ExternalScripts" %>
-
-
-
-
-
+
diff --git a/Site5/Controls/v5/UI/ExternalScripts.ascx.cs b/Site5/Controls/v5/UI/ExternalScripts.ascx.cs
index 6ea7e74d..ddbc6574 100644
--- a/Site5/Controls/v5/UI/ExternalScripts.ascx.cs
+++ b/Site5/Controls/v5/UI/ExternalScripts.ascx.cs
@@ -1,5 +1,8 @@
using System;
using System.IO;
+using System.Text;
+using NBitcoin;
+using Swarmops.Logic.Support;
namespace Swarmops.Frontend.Controls.v5.UI
{
@@ -14,23 +17,31 @@ namespace Swarmops.Frontend.Controls.v5.UI
{
externalScriptUrl = "/Scripts/ExternalScripts";
}
+ else if (PilotInstallationIds.IsPilot(PilotInstallationIds.DevelopmentSandbox))
+ {
+ externalScriptUrl += "/staging"; // use staging area for new script versions on Sandbox
+ }
if (Package == "easyui")
{
- this.LiteralReference1.Text = "";
- this.LiteralReference2.Text = "";
- this.LiteralReference3.Text = "";
- this.LiteralReference4.Text = "";
- this.LiteralReference5.Text = "";
+ StringBuilder scriptRef = new StringBuilder();
+
+ scriptRef.Append("\r\n");
+ scriptRef.Append("\r\n");
+ string[] controlNames = Controls.Split(',');
+ foreach (string controlName in controlNames)
+ {
+ scriptRef.AppendFormat("\r\n", controlName.Trim().ToLowerInvariant());
+ }
+
+ this.LiteralReference.Text = scriptRef.ToString();
}
}
public string Package { get; set; }
- public string Control { get; set; }
+ public string Controls { get; set; }
}
}
\ No newline at end of file
diff --git a/Site5/Master-v5.master b/Site5/Master-v5.master
index c6cd7cbd..1af19fd6 100644
--- a/Site5/Master-v5.master
+++ b/Site5/Master-v5.master
@@ -35,7 +35,7 @@
-
+
diff --git a/Site5/Master-v5.master.cs b/Site5/Master-v5.master.cs
index 3588bbb8..58b4a1da 100644
--- a/Site5/Master-v5.master.cs
+++ b/Site5/Master-v5.master.cs
@@ -47,6 +47,8 @@ namespace Swarmops
this.LabelPageTitle.Text = this.CurrentPageTitle;
this.Page.Title = "Swarmops - " + this.CurrentPageTitle;
+ this.ExternalScriptEasyUI.Controls = EasyUIControlsUsed.ToString();
+
this.LiteralSidebarInfo.Text = this.CurrentPageInfoBoxLiteral;
// Set logo image. If custom image is installed, use it instead.
diff --git a/Site5/Pages/v5/Financial/AttestCosts.aspx.cs b/Site5/Pages/v5/Financial/AttestCosts.aspx.cs
index b31231c3..73e7ccc6 100644
--- a/Site5/Pages/v5/Financial/AttestCosts.aspx.cs
+++ b/Site5/Pages/v5/Financial/AttestCosts.aspx.cs
@@ -34,6 +34,8 @@ namespace Swarmops.Frontend.Pages.v5.Financial
PopulateExpenses();
// PopulateSalaries();
+ this.EasyUIControlsUsed = EasyUIControl.DataGrid;
+
this.RepeaterLightboxItems.DataSource = _documentList;
this.RepeaterLightboxItems.DataBind();
diff --git a/Site5/Pages/v5/Financial/PayOutMoney.aspx.cs b/Site5/Pages/v5/Financial/PayOutMoney.aspx.cs
index 7f01df38..007c0cfa 100644
--- a/Site5/Pages/v5/Financial/PayOutMoney.aspx.cs
+++ b/Site5/Pages/v5/Financial/PayOutMoney.aspx.cs
@@ -25,7 +25,8 @@ namespace Swarmops.Frontend.Pages.Financial
Localize();
}
-
+ this.EasyUIControlsUsed = EasyUIControl.DataGrid;
+
}
private void Localize()
diff --git a/Site5/Pages/v5/Financial/ValidateReceipts.aspx.cs b/Site5/Pages/v5/Financial/ValidateReceipts.aspx.cs
index 7364af26..200fae7c 100644
--- a/Site5/Pages/v5/Financial/ValidateReceipts.aspx.cs
+++ b/Site5/Pages/v5/Financial/ValidateReceipts.aspx.cs
@@ -35,6 +35,8 @@ namespace Swarmops.Frontend.Pages.v5.Financial
_documentList = new List();
PopulateExpenses();
+ this.EasyUIControlsUsed = EasyUIControl.DataGrid;
+
this.RepeaterLightboxItems.DataSource = _documentList;
this.RepeaterLightboxItems.DataBind();
diff --git a/Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs b/Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs
index 034b8f6a..1c2d51a0 100644
--- a/Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs
+++ b/Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs
@@ -56,6 +56,9 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
}
this.PageAccessRequired = new Access(this.CurrentOrganization, AccessAspect.Bookkeeping, AccessType.Write);
this.DbVersionRequired = 2; // Account reparenting
+
+ this.EasyUIControlsUsed = EasyUIControl.DataGrid | EasyUIControl.Tree;
+
}
diff --git a/Site5/Pages/v5/Ledgers/BalanceSheet.aspx.cs b/Site5/Pages/v5/Ledgers/BalanceSheet.aspx.cs
index 8c3cf3cf..b2c835fe 100644
--- a/Site5/Pages/v5/Ledgers/BalanceSheet.aspx.cs
+++ b/Site5/Pages/v5/Ledgers/BalanceSheet.aspx.cs
@@ -30,6 +30,8 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
Localize();
}
+
+ this.EasyUIControlsUsed = EasyUIControl.DataGrid;
}
diff --git a/Site5/Pages/v5/Ledgers/InspectLedgers.aspx.cs b/Site5/Pages/v5/Ledgers/InspectLedgers.aspx.cs
index 6bbb544b..c9cab827 100644
--- a/Site5/Pages/v5/Ledgers/InspectLedgers.aspx.cs
+++ b/Site5/Pages/v5/Ledgers/InspectLedgers.aspx.cs
@@ -52,6 +52,8 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
this.DropMonths.SelectedValue = today.Month.ToString(CultureInfo.InvariantCulture);
}
+ this.EasyUIControlsUsed = EasyUIControl.DataGrid | EasyUIControl.Tree;
+
Localize();
}
diff --git a/Site5/Pages/v5/Ledgers/ProfitLossStatement.aspx.cs b/Site5/Pages/v5/Ledgers/ProfitLossStatement.aspx.cs
index bc06e5bc..3cac7b49 100644
--- a/Site5/Pages/v5/Ledgers/ProfitLossStatement.aspx.cs
+++ b/Site5/Pages/v5/Ledgers/ProfitLossStatement.aspx.cs
@@ -28,6 +28,8 @@ public partial class Pages_v5_Ledgers_ProfitLossStatement : PageV5Base
Localize();
}
+
+ this.EasyUIControlsUsed = EasyUIControl.DataGrid;
}
private void Localize()
diff --git a/Site5/Pages/v5/Ledgers/ResyncExternalAccount.aspx.cs b/Site5/Pages/v5/Ledgers/ResyncExternalAccount.aspx.cs
index 60d3ecb1..b959d6ca 100644
--- a/Site5/Pages/v5/Ledgers/ResyncExternalAccount.aspx.cs
+++ b/Site5/Pages/v5/Ledgers/ResyncExternalAccount.aspx.cs
@@ -72,6 +72,8 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
Localize();
}
+
+ this.EasyUIControlsUsed = EasyUIControl.DataGrid | EasyUIControl.Tree;
}
diff --git a/Site5/Pages/v5/Ledgers/ViewOutstandingAccounts.aspx.cs b/Site5/Pages/v5/Ledgers/ViewOutstandingAccounts.aspx.cs
index c3e1c19a..db68eb85 100644
--- a/Site5/Pages/v5/Ledgers/ViewOutstandingAccounts.aspx.cs
+++ b/Site5/Pages/v5/Ledgers/ViewOutstandingAccounts.aspx.cs
@@ -40,6 +40,8 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
}
}
+ this.EasyUIControlsUsed = EasyUIControl.DataGrid;
+
}
private void Localize()
diff --git a/Site5/Pages/v5/Swarm/ListFindPeople.aspx.cs b/Site5/Pages/v5/Swarm/ListFindPeople.aspx.cs
index effc88cb..f525a073 100644
--- a/Site5/Pages/v5/Swarm/ListFindPeople.aspx.cs
+++ b/Site5/Pages/v5/Swarm/ListFindPeople.aspx.cs
@@ -19,7 +19,7 @@ namespace Swarmops.Frontend.Pages.Swarm
Localize();
}
-
+ this.EasyUIControlsUsed = EasyUIControl.Tree;
}
private void Localize()