From b56aa3a87d008c004016ce9d2f61c0caf60b436a Mon Sep 17 00:00:00 2001
From: Rick Falkvinge
Date: Wed, 18 Mar 2015 20:23:23 +0100
Subject: [PATCH] Checkpoint commit: upgrading EasyUI to 1.4.2. Much breakage.
So ouch. (not finished)
---
Site5/.gitignore | 5 +
Site5/Controls/v5/Base/ComboGeographies.ascx | 37 +--
Site5/Controls/v5/Base/DropDown.ascx | 7 +-
Site5/Controls/v5/Financial/ComboBudgets.ascx | 12 +-
.../v5/Financial/ComboBudgets.ascx.cs | 2 +-
Site5/Controls/v5/Swarm/ComboPeople.ascx | 7 +-
Site5/Controls/v5/UI/ExternalScripts.ascx.cs | 29 ++-
Site5/Master-v5.master | 4 +-
Site5/Master-v5.master.cs | 2 +-
Site5/Pages/v5/Ledgers/AccountPlan.aspx | 4 +-
.../v5/Ledgers/Json-AccountPlanData.aspx.cs | 14 +-
Site5/Style/style-v5.css | 14 +-
Site5/Style/v5-easyui-overrides.css | 211 ++++++++++++++++++
13 files changed, 305 insertions(+), 43 deletions(-)
create mode 100644 Site5/Style/v5-easyui-overrides.css
diff --git a/Site5/.gitignore b/Site5/.gitignore
index 1146a1ab..b83e765a 100644
--- a/Site5/.gitignore
+++ b/Site5/.gitignore
@@ -9,3 +9,8 @@ database.config*
Database.config*
Database.Config*
database.Config*
+
+
+# Ignore Experimental scripts (used to evaluate/debug new versions of script packages)
+
+Scripts/Experimental/*
diff --git a/Site5/Controls/v5/Base/ComboGeographies.ascx b/Site5/Controls/v5/Base/ComboGeographies.ascx
index 641b4e9e..36d25435 100644
--- a/Site5/Controls/v5/Base/ComboGeographies.ascx
+++ b/Site5/Controls/v5/Base/ComboGeographies.ascx
@@ -1,25 +1,28 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ComboGeographies.ascx.cs" Inherits="Swarmops.Controls.Base.ComboGeographies" %>
+<%@ Import Namespace="System.Threading" %>
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/Site5/Controls/v5/Financial/ComboBudgets.ascx.cs b/Site5/Controls/v5/Financial/ComboBudgets.ascx.cs
index 59c0a471..a37456f3 100644
--- a/Site5/Controls/v5/Financial/ComboBudgets.ascx.cs
+++ b/Site5/Controls/v5/Financial/ComboBudgets.ascx.cs
@@ -40,7 +40,7 @@ namespace Swarmops.Controls.Financial
protected void Page_Init (object sender, EventArgs e)
{
- ((PageV5Base) this.Page).RegisterControl (EasyUIControl.Tree);
+ ((PageV5Base) this.Page).RegisterControl (EasyUIControl.Tree | EasyUIControl.Combo | EasyUIControl.ComboBox);
}
protected void Page_Load (object sender, EventArgs e)
diff --git a/Site5/Controls/v5/Swarm/ComboPeople.ascx b/Site5/Controls/v5/Swarm/ComboPeople.ascx
index eb478a93..12138132 100644
--- a/Site5/Controls/v5/Swarm/ComboPeople.ascx
+++ b/Site5/Controls/v5/Swarm/ComboPeople.ascx
@@ -1,10 +1,13 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ComboPeople.ascx.cs" Inherits="Swarmops.Controls.Financial.ComboPeople" %>
+<%@ Import Namespace="System.Threading" %>
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/Site5/Controls/v5/UI/ExternalScripts.ascx.cs b/Site5/Controls/v5/UI/ExternalScripts.ascx.cs
index 39b5e3e6..ae45c1b9 100644
--- a/Site5/Controls/v5/UI/ExternalScripts.ascx.cs
+++ b/Site5/Controls/v5/UI/ExternalScripts.ascx.cs
@@ -2,6 +2,7 @@
using System.Diagnostics;
using System.IO;
using System.Text;
+using System.Threading;
using System.Web.UI;
using Swarmops.Logic.Support;
@@ -28,15 +29,35 @@ namespace Swarmops.Frontend.Controls.v5.UI
// use staging area for new script versions on Sandbox and for all debugging
}
+ // If we're debugging a seriously experimental new version of JEasyUI, look for it in /Scripts/Experimental
+ // (a folder which doesn't commit to the github repo)
+
+ if (File.Exists (Server.MapPath ("~/Scripts/Experimental/easyui/jquery.easyui.min.js")))
+ {
+ externalScriptUrl = "/Scripts/Experimental";
+ }
+
if (Package == "easyui")
{
StringBuilder scriptRef = new StringBuilder();
- scriptRef.Append ("\r\n");
- scriptRef.Append ("\r\n");
- string[] controlNames = Controls.Split (',');
+ scriptRef.Append("\r\n"); // Supposed to contain all CSS
+
+ if (Thread.CurrentThread.CurrentCulture.TextInfo.IsRightToLeft)
+ {
+ scriptRef.Append("\r\n");
+ scriptRef.Append("\r\n");
+ }
+
+ /* -- with the inclusion of the catchall CSS file, this code _should_ no longer be necessary...
+ string[] controlNames = Controls.Split(',');
foreach (string controlName in controlNames)
{
string controlNameLower = controlName.Trim().ToLowerInvariant();
@@ -47,7 +68,7 @@ namespace Swarmops.Frontend.Controls.v5.UI
"/easyui/themes/default/{0}.css\" />\r\n",
controlNameLower);
}
- }
+ }*/
this.LiteralReference.Text = scriptRef.ToString();
}
diff --git a/Site5/Master-v5.master b/Site5/Master-v5.master
index 0b9efec0..1068491c 100644
--- a/Site5/Master-v5.master
+++ b/Site5/Master-v5.master
@@ -41,7 +41,7 @@
-
+
@@ -118,7 +118,7 @@
-
+ >