From f38d2a15dbd2881605a7467ca3e198fdaebd1f81 Mon Sep 17 00:00:00 2001 From: Shandem Date: Fri, 19 Jun 2009 09:32:18 +0000 Subject: [PATCH] DO NOT DOWNLOAD. DOWNLOAD LATEST STABLE FROM RELEASE TAB Merged new tree & ClientDependency changes to 4.1 branch [TFS Changeset #55087] --- .../ClientDependencyAttribute.cs | 40 +++-- .../ClientDependencyHelper.cs | 38 +++-- .../ClientDependencyInclude.cs | 24 ++- .../ClientDependencyLoader.cs | 11 +- .../CompositeDependencyHandler.cs | 2 +- .../IClientDependencyFile.cs | 3 +- .../Providers/ClientDependencyProvider.cs | 69 ++++++--- ...resentation.ClientDependency.csproj.vspscc | 10 ++ .../umbraco/ClientDependencyTest.aspx | 2 +- .../ClientDependencyTest.aspx.designer.cs | 2 +- .../umbraco/dashboard/quickEdit.ascx | 3 + .../umbraco/dashboard/quickEdit.ascx.cs | 2 +- .../dashboard/quickEdit.ascx.designer.cs | 11 +- umbraco/presentation/umbraco/umbraco.aspx | 50 +++--- .../umbraco/umbraco.aspx.designer.cs | 146 +++++++++++++++++- .../umbraco_client/Tree/UmbracoTree.js | 6 +- 16 files changed, 337 insertions(+), 82 deletions(-) create mode 100644 umbraco/presentation.ClientDependency/umbraco.presentation.ClientDependency.csproj.vspscc diff --git a/umbraco/presentation.ClientDependency/ClientDependencyAttribute.cs b/umbraco/presentation.ClientDependency/ClientDependencyAttribute.cs index 6285e66828..c085959750 100644 --- a/umbraco/presentation.ClientDependency/ClientDependencyAttribute.cs +++ b/umbraco/presentation.ClientDependency/ClientDependencyAttribute.cs @@ -12,6 +12,20 @@ namespace umbraco.presentation.ClientDependency [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] public class ClientDependencyAttribute : Attribute, IClientDependencyFile { + public ClientDependencyAttribute() + { + Priority = DefaultPriority; + } + + /// + /// If a priority is not set, the default will be 100. + /// + /// + /// This will generally mean that if a developer doesn't specify a priority it will come after all other dependencies that + /// have unless the priority is explicitly set above 100. + /// + protected const int DefaultPriority = 100; + /// /// If dependencies have a composite group name specified, the system will combine all dependency /// file contents under the one group name and GZIP the output to output cache. @@ -87,21 +101,25 @@ namespace umbraco.presentation.ClientDependency /// The file path to the dependency. /// if set to true the current umbraco path will be prefixed to the filePath. /// The name of the Javascript method to invoke when the dependency is loaded. - public ClientDependencyAttribute(int priority, ClientDependencyType dependencyType, string fileName, string pathNameAlias, string invokeJavascriptMethodOnLoad) - { - if (String.IsNullOrEmpty(fileName)) - throw new ArgumentNullException("fileName"); + public ClientDependencyAttribute(int priority, ClientDependencyType dependencyType, string fileName, string pathNameAlias, string invokeJavascriptMethodOnLoad) + : this(priority, dependencyType, fileName, pathNameAlias, invokeJavascriptMethodOnLoad, string.Empty) + { } - Priority = priority; + public ClientDependencyAttribute(int priority, ClientDependencyType dependencyType, string fileName, string pathNameAlias, string invokeJavascriptMethodOnLoad, string compositeGroupName) + { + if (String.IsNullOrEmpty(fileName)) + throw new ArgumentNullException("fileName"); + + Priority = priority; - FilePath = fileName; - PathNameAlias = pathNameAlias; + FilePath = fileName; + PathNameAlias = pathNameAlias; + CompositeGroupName = compositeGroupName; - - DependencyType = dependencyType; - InvokeJavascriptMethodOnLoad = invokeJavascriptMethodOnLoad ?? string.Empty; - } + DependencyType = dependencyType; + InvokeJavascriptMethodOnLoad = invokeJavascriptMethodOnLoad ?? string.Empty; + } } diff --git a/umbraco/presentation.ClientDependency/ClientDependencyHelper.cs b/umbraco/presentation.ClientDependency/ClientDependencyHelper.cs index 6cbfc2d088..2193503aef 100644 --- a/umbraco/presentation.ClientDependency/ClientDependencyHelper.cs +++ b/umbraco/presentation.ClientDependency/ClientDependencyHelper.cs @@ -17,17 +17,23 @@ namespace umbraco.presentation.ClientDependency private static ClientDependencyProviderCollection m_Providers = null; private static object m_Lock = new object(); - public ClientDependencyProvider DefaultProvider + public static ClientDependencyProvider DefaultProvider { - get { return m_Provider; } + get + { + LoadProviders(); + return m_Provider; + } } - public ClientDependencyProviderCollection ProviderCollection + public static ClientDependencyProviderCollection ProviderCollection { - get { return m_Providers; } + get + { + LoadProviders(); + return m_Providers; + } } - private const int StartingIncludeControlPriority = 5000; - private static void LoadProviders() { if (m_Provider == null) @@ -113,6 +119,13 @@ namespace umbraco.presentation.ClientDependency ClientDependencyRegistrationService service = new ClientDependencyRegistrationService(control, paths, found); service.ProcessDependencies(); } + + public static void RegisterClientDependencies(ClientDependencyProvider provider, Control control, ClientDependencyPathCollection paths) + { + LoadProviders(); + ClientDependencyRegistrationService service = new ClientDependencyRegistrationService(control, paths, provider); + service.ProcessDependencies(); + } internal class ClientDependencyRegistrationService { @@ -125,7 +138,7 @@ namespace umbraco.presentation.ClientDependency } private Control m_RenderingControl; - private List m_Dependencies = new List(); + private List m_Dependencies = new List(); private ClientDependencyPathCollection m_Paths; private ClientDependencyProvider m_Provider; @@ -134,11 +147,11 @@ namespace umbraco.presentation.ClientDependency /// /// /// - private List FindDependencies(Control control) + private List FindDependencies(Control control) { // find dependencies Type controlType = control.GetType(); - List dependencies = new List(); + List dependencies = new List(); foreach (Attribute attribute in Attribute.GetCustomAttributes(controlType)) { if (attribute is ClientDependencyAttribute) @@ -148,18 +161,17 @@ namespace umbraco.presentation.ClientDependency } // add child dependencies - int i = StartingIncludeControlPriority; foreach (Control child in control.Controls) { if (child.GetType().Equals(typeof(ClientDependencyInclude))) { ClientDependencyInclude include = (ClientDependencyInclude)child; - dependencies.Add(new ClientDependencyAttribute(i, include.Type, include.File)); - i++; + //dependencies.Add(new ClientDependencyAttribute(include.Priority, include.DependencyType, include.FilePath, include.PathName, include.InvokeJavascriptMethodOnLoad, include.CompositeGroupName)); + dependencies.Add(include); } else if (child.HasControls()) { - m_Dependencies.AddRange(FindDependencies(child)); + dependencies.AddRange(FindDependencies(child)); } } diff --git a/umbraco/presentation.ClientDependency/ClientDependencyInclude.cs b/umbraco/presentation.ClientDependency/ClientDependencyInclude.cs index 40e2ece7d2..f3b6fd948a 100644 --- a/umbraco/presentation.ClientDependency/ClientDependencyInclude.cs +++ b/umbraco/presentation.ClientDependency/ClientDependencyInclude.cs @@ -5,21 +5,35 @@ using System.Web.UI; namespace umbraco.presentation.ClientDependency { - public class ClientDependencyInclude : Control + public class ClientDependencyInclude : Control, IClientDependencyFile { public ClientDependencyInclude() { - Type = ClientDependencyType.Javascript; + DependencyType = ClientDependencyType.Javascript; + Priority = DefaultPriority; } - public ClientDependencyType Type { get; set; } - public string File { get; set; } + /// + /// If a priority is not set, the default will be 100. + /// + /// + /// This will generally mean that if a developer doesn't specify a priority it will come after all other dependencies that + /// have unless the priority is explicitly set above 100. + /// + protected const int DefaultPriority = 100; + + public ClientDependencyType DependencyType { get; set; } + public string FilePath { get; set; } + public string PathNameAlias { get; set; } + public string CompositeGroupName { get; set; } + public int Priority { get; set; } + public string InvokeJavascriptMethodOnLoad { get; set; } protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); - if (string.IsNullOrEmpty(File)) + if (string.IsNullOrEmpty(FilePath)) throw new NullReferenceException("Both File and Type properties must be set"); } diff --git a/umbraco/presentation.ClientDependency/ClientDependencyLoader.cs b/umbraco/presentation.ClientDependency/ClientDependencyLoader.cs index dc31bcd859..1f7f7bf2c5 100644 --- a/umbraco/presentation.ClientDependency/ClientDependencyLoader.cs +++ b/umbraco/presentation.ClientDependency/ClientDependencyLoader.cs @@ -17,6 +17,7 @@ namespace umbraco.presentation.ClientDependency { Paths = new ClientDependencyPathCollection(); EmbedType = ClientDependencyEmbedType.Header; + IsDebugMode = false; } protected override void OnInit(EventArgs e) @@ -64,13 +65,18 @@ namespace umbraco.presentation.ClientDependency { Page.Trace.Write("ClientDependency", string.Format("Path loaded: {0}", path.Path)); } + ClientDependencyProvider provider = null; switch (EmbedType) { case ClientDependencyEmbedType.Header: - ClientDependencyHelper.RegisterClientDependencies(this.Page, Paths); + provider = ClientDependencyHelper.ProviderCollection[PageHeaderProvider.DefaultName]; + provider.IsDebugMode = IsDebugMode; + ClientDependencyHelper.RegisterClientDependencies(provider, this.Page, Paths); break; case ClientDependencyEmbedType.ClientSideRegistration: - ClientDependencyHelper.RegisterClientDependencies(this.Page, Paths); + provider = ClientDependencyHelper.ProviderCollection[ClientSideRegistrationProvider.DefaultName]; + provider.IsDebugMode = IsDebugMode; + ClientDependencyHelper.RegisterClientDependencies(provider, this.Page, Paths); break; } @@ -80,6 +86,7 @@ namespace umbraco.presentation.ClientDependency [PersistenceMode(PersistenceMode.InnerProperty)] public ClientDependencyPathCollection Paths { get; private set; } public ClientDependencyEmbedType EmbedType { get; set; } + public bool IsDebugMode { get; set; } private List m_Dependencies = new List(); diff --git a/umbraco/presentation.ClientDependency/CompositeDependencyHandler.cs b/umbraco/presentation.ClientDependency/CompositeDependencyHandler.cs index 81da095ebc..d3772a857b 100644 --- a/umbraco/presentation.ClientDependency/CompositeDependencyHandler.cs +++ b/umbraco/presentation.ClientDependency/CompositeDependencyHandler.cs @@ -64,7 +64,7 @@ namespace umbraco.presentation.ClientDependency throw new ArgumentException("Must specify a fileset in the request"); byte[] fileBytes = CombineFiles(fileset, context); - byte[] outputBytes = fileBytes;//CompressBytes(context, fileBytes); + byte[] outputBytes = CompressBytes(context, fileBytes); SetCaching(context); context.Response.ContentType = type == ClientDependencyType.Javascript ? "text/javascript" : "text/css"; diff --git a/umbraco/presentation.ClientDependency/IClientDependencyFile.cs b/umbraco/presentation.ClientDependency/IClientDependencyFile.cs index f548d808d5..7cb04ab08e 100644 --- a/umbraco/presentation.ClientDependency/IClientDependencyFile.cs +++ b/umbraco/presentation.ClientDependency/IClientDependencyFile.cs @@ -10,6 +10,7 @@ namespace umbraco.presentation.ClientDependency ClientDependencyType DependencyType { get; set; } string InvokeJavascriptMethodOnLoad { get; set; } int Priority { get; set; } - + string CompositeGroupName { get; set; } + string PathNameAlias { get; set; } } } diff --git a/umbraco/presentation.ClientDependency/Providers/ClientDependencyProvider.cs b/umbraco/presentation.ClientDependency/Providers/ClientDependencyProvider.cs index 59659feaa8..812ca577c4 100644 --- a/umbraco/presentation.ClientDependency/Providers/ClientDependencyProvider.cs +++ b/umbraco/presentation.ClientDependency/Providers/ClientDependencyProvider.cs @@ -11,12 +11,30 @@ namespace umbraco.presentation.ClientDependency.Providers { protected Control DependantControl { get; private set; } protected ClientDependencyPathCollection FolderPaths { get; private set; } - protected List AllDependencies { get; private set; } + protected List AllDependencies { get; private set; } + + /// + /// Set to true to disable composite scripts so all scripts/css comes through as individual files. + /// + public bool IsDebugMode { get; set; } protected abstract void RegisterJsFiles(List jsDependencies); protected abstract void RegisterCssFiles(List cssDependencies); - public void RegisterDependencies(Control dependantControl, List dependencies, ClientDependencyPathCollection paths) + public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config) + { + IsDebugMode = false; + if (config != null && config["isDebug"] != null) + { + bool isDebug; + if (bool.TryParse(config["isDebug"], out isDebug)) + IsDebugMode = isDebug; + } + + base.Initialize(name, config); + } + + public void RegisterDependencies(Control dependantControl, List dependencies, ClientDependencyPathCollection paths) { DependantControl = dependantControl; AllDependencies = dependencies; @@ -25,16 +43,22 @@ namespace umbraco.presentation.ClientDependency.Providers UpdateFilePaths(); //seperate the types into 2 lists for all dependencies without composite groups - List jsDependencies = AllDependencies.FindAll( - delegate(ClientDependencyAttribute a) + List jsDependencies = AllDependencies.FindAll( + delegate(IClientDependencyFile a) { - return a.DependencyType == ClientDependencyType.Javascript && string.IsNullOrEmpty(a.CompositeGroupName); + if (!IsDebugMode) + return a.DependencyType == ClientDependencyType.Javascript && string.IsNullOrEmpty(a.CompositeGroupName); + else + return a.DependencyType == ClientDependencyType.Javascript; } ); - List cssDependencies = AllDependencies.FindAll( - delegate(ClientDependencyAttribute a) + List cssDependencies = AllDependencies.FindAll( + delegate(IClientDependencyFile a) { - return a.DependencyType == ClientDependencyType.Css && string.IsNullOrEmpty(a.CompositeGroupName); + if (!IsDebugMode) + return a.DependencyType == ClientDependencyType.Css && string.IsNullOrEmpty(a.CompositeGroupName); + else + return a.DependencyType == ClientDependencyType.Css; } ); @@ -42,23 +66,25 @@ namespace umbraco.presentation.ClientDependency.Providers jsDependencies.Sort((a, b) => a.Priority.CompareTo(b.Priority)); cssDependencies.Sort((a, b) => a.Priority.CompareTo(b.Priority)); - RegisterCssFiles(cssDependencies.ConvertAll(a => { return (IClientDependencyFile)a; })); - RegisterCssFiles(ProcessCompositeGroups(ClientDependencyType.Css)); + if (!IsDebugMode) RegisterCssFiles(ProcessCompositeGroups(ClientDependencyType.Css)); + RegisterCssFiles(cssDependencies.ConvertAll(a => { return (IClientDependencyFile)a; })); + if (!IsDebugMode) RegisterJsFiles(ProcessCompositeGroups(ClientDependencyType.Javascript)); RegisterJsFiles(jsDependencies.ConvertAll(a => { return (IClientDependencyFile)a; })); - RegisterJsFiles(ProcessCompositeGroups(ClientDependencyType.Javascript)); + } private List ProcessCompositeGroups(ClientDependencyType type) { - List dependencies = AllDependencies.FindAll( - delegate(ClientDependencyAttribute a) + List dependencies = AllDependencies.FindAll( + delegate(IClientDependencyFile a) { return a.DependencyType == type && !string.IsNullOrEmpty(a.CompositeGroupName); } - ); + ); + List groups = new List(); List files = new List(); - foreach (ClientDependencyAttribute a in dependencies) + foreach (IClientDependencyFile a in dependencies) { if (!groups.Contains(a.CompositeGroupName)) { @@ -77,17 +103,18 @@ namespace umbraco.presentation.ClientDependency.Providers /// /// /// - private string ProcessCompositeGroup(List dependencies, string groupName, ClientDependencyType type) + private string ProcessCompositeGroup(List dependencies, string groupName, ClientDependencyType type) { string handler = "{0}?s={1}&t={2}"; StringBuilder files = new StringBuilder(); - List byGroup = AllDependencies.FindAll( - delegate(ClientDependencyAttribute a) + List byGroup = dependencies.FindAll( + delegate(IClientDependencyFile a) { return a.CompositeGroupName == groupName; } ); - foreach (ClientDependencyAttribute a in dependencies) + byGroup.Sort((a, b) => a.Priority.CompareTo(b.Priority)); + foreach (IClientDependencyFile a in byGroup) { files.Append(a.FilePath + ";"); } @@ -113,7 +140,7 @@ namespace umbraco.presentation.ClientDependency.Providers /// private void UpdateFilePaths() { - foreach (ClientDependencyAttribute dependency in AllDependencies) + foreach (IClientDependencyFile dependency in AllDependencies) { if (!string.IsNullOrEmpty(dependency.PathNameAlias)) { @@ -149,6 +176,8 @@ namespace umbraco.presentation.ClientDependency.Providers public ClientDependencyType DependencyType { get; set; } public string InvokeJavascriptMethodOnLoad { get; set; } public int Priority { get; set; } + public string CompositeGroupName { get; set; } + public string PathNameAlias { get; set; } } } diff --git a/umbraco/presentation.ClientDependency/umbraco.presentation.ClientDependency.csproj.vspscc b/umbraco/presentation.ClientDependency/umbraco.presentation.ClientDependency.csproj.vspscc new file mode 100644 index 0000000000..feffdecaa4 --- /dev/null +++ b/umbraco/presentation.ClientDependency/umbraco.presentation.ClientDependency.csproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" +} diff --git a/umbraco/presentation/umbraco/ClientDependencyTest.aspx b/umbraco/presentation/umbraco/ClientDependencyTest.aspx index 4354fd8698..f3ae66f02e 100644 --- a/umbraco/presentation/umbraco/ClientDependencyTest.aspx +++ b/umbraco/presentation/umbraco/ClientDependencyTest.aspx @@ -7,7 +7,7 @@ - + diff --git a/umbraco/presentation/umbraco/ClientDependencyTest.aspx.designer.cs b/umbraco/presentation/umbraco/ClientDependencyTest.aspx.designer.cs index 715b9dd71a..33bc810996 100644 --- a/umbraco/presentation/umbraco/ClientDependencyTest.aspx.designer.cs +++ b/umbraco/presentation/umbraco/ClientDependencyTest.aspx.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.1433 +// Runtime Version:2.0.50727.3074 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/umbraco/presentation/umbraco/dashboard/quickEdit.ascx b/umbraco/presentation/umbraco/dashboard/quickEdit.ascx index eab669bc9f..47a12c7a22 100644 --- a/umbraco/presentation/umbraco/dashboard/quickEdit.ascx +++ b/umbraco/presentation/umbraco/dashboard/quickEdit.ascx @@ -1,4 +1,7 @@ <%@ Control Language="c#" AutoEventWireup="True" Codebehind="quickEdit.ascx.cs" Inherits="umbraco.presentation.dashboard.quickEdit" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %> +<%@ Register TagPrefix="umb" Namespace="umbraco.presentation.ClientDependency" Assembly="umbraco.presentation.ClientDependency" %> + +
" /> diff --git a/umbraco/presentation/umbraco/dashboard/quickEdit.ascx.cs b/umbraco/presentation/umbraco/dashboard/quickEdit.ascx.cs index e5b2e966e6..db4282577a 100644 --- a/umbraco/presentation/umbraco/dashboard/quickEdit.ascx.cs +++ b/umbraco/presentation/umbraco/dashboard/quickEdit.ascx.cs @@ -17,7 +17,7 @@ namespace umbraco.presentation.dashboard { //uses the library function instead, to load the script in the head.. - library.RegisterJavaScriptFile("jqueryAutocomplete", GlobalSettings.Path + "/js/autocomplete/jquery.autocomplete.js"); + //library.RegisterJavaScriptFile("jqueryAutocomplete", GlobalSettings.Path + "/js/autocomplete/jquery.autocomplete.js"); //library.RegisterJavaScriptFile("jqueryAutocompleteImplementation", GlobalSettings.Path + "/js/autocomplete/jquery.autocomplete.implementation.js"); /* diff --git a/umbraco/presentation/umbraco/dashboard/quickEdit.ascx.designer.cs b/umbraco/presentation/umbraco/dashboard/quickEdit.ascx.designer.cs index 1d88455a20..0153c9bfa0 100644 --- a/umbraco/presentation/umbraco/dashboard/quickEdit.ascx.designer.cs +++ b/umbraco/presentation/umbraco/dashboard/quickEdit.ascx.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3053 +// Runtime Version:2.0.50727.3074 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -12,5 +12,14 @@ namespace umbraco.presentation.dashboard { public partial class quickEdit { + + /// + /// ClientDependencyInclude3 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.presentation.ClientDependency.ClientDependencyInclude ClientDependencyInclude3; } } diff --git a/umbraco/presentation/umbraco/umbraco.aspx b/umbraco/presentation/umbraco/umbraco.aspx index 2cf9b4eb09..037946e19c 100644 --- a/umbraco/presentation/umbraco/umbraco.aspx +++ b/umbraco/presentation/umbraco/umbraco.aspx @@ -10,35 +10,39 @@ Umbraco CMS - <%=Request.Url.Host.ToLower().Replace("www.", "") %> - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/umbraco/presentation/umbraco/umbraco.aspx.designer.cs b/umbraco/presentation/umbraco/umbraco.aspx.designer.cs index 132247354d..1c5bcc5854 100644 --- a/umbraco/presentation/umbraco/umbraco.aspx.designer.cs +++ b/umbraco/presentation/umbraco/umbraco.aspx.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.1433 +// Runtime Version:2.0.50727.3074 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -22,6 +22,150 @@ namespace umbraco.cms.presentation { /// protected global::System.Web.UI.WebControls.PlaceHolder IActionJSFileRef; + /// + /// ClientLoader control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.presentation.ClientDependency.ClientDependencyLoader ClientLoader; + + /// + /// ClientDependencyInclude3 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.presentation.ClientDependency.ClientDependencyInclude ClientDependencyInclude3; + + /// + /// ClientDependencyInclude1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.presentation.ClientDependency.ClientDependencyInclude ClientDependencyInclude1; + + /// + /// ClientDependencyInclude2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.presentation.ClientDependency.ClientDependencyInclude ClientDependencyInclude2; + + /// + /// ClientDependencyInclude4 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.presentation.ClientDependency.ClientDependencyInclude ClientDependencyInclude4; + + /// + /// ClientDependencyInclude5 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.presentation.ClientDependency.ClientDependencyInclude ClientDependencyInclude5; + + /// + /// ClientDependencyInclude6 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.presentation.ClientDependency.ClientDependencyInclude ClientDependencyInclude6; + + /// + /// ClientDependencyInclude8 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.presentation.ClientDependency.ClientDependencyInclude ClientDependencyInclude8; + + /// + /// ClientDependencyInclude7 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.presentation.ClientDependency.ClientDependencyInclude ClientDependencyInclude7; + + /// + /// ClientDependencyInclude11 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.presentation.ClientDependency.ClientDependencyInclude ClientDependencyInclude11; + + /// + /// ClientDependencyInclude12 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.presentation.ClientDependency.ClientDependencyInclude ClientDependencyInclude12; + + /// + /// ClientDependencyInclude13 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.presentation.ClientDependency.ClientDependencyInclude ClientDependencyInclude13; + + /// + /// ClientDependencyInclude14 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.presentation.ClientDependency.ClientDependencyInclude ClientDependencyInclude14; + + /// + /// ClientDependencyInclude15 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.presentation.ClientDependency.ClientDependencyInclude ClientDependencyInclude15; + + /// + /// ClientDependencyInclude9 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.presentation.ClientDependency.ClientDependencyInclude ClientDependencyInclude9; + + /// + /// ClientDependencyInclude10 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.presentation.ClientDependency.ClientDependencyInclude ClientDependencyInclude10; + /// /// Form1 control. /// diff --git a/umbraco/presentation/umbraco_client/Tree/UmbracoTree.js b/umbraco/presentation/umbraco_client/Tree/UmbracoTree.js index 977336b72f..03e5f43462 100644 --- a/umbraco/presentation/umbraco_client/Tree/UmbracoTree.js +++ b/umbraco/presentation/umbraco_client/Tree/UmbracoTree.js @@ -281,7 +281,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); this._debug("reloadActionNode: loading ajax for node: " + nodeDef.nodeId); var _this = this; //replace the node to refresh with loading and return the new loading element - var toReplace = $("
  • " + (this._tree.settings.lang.loading || "Loading ...") + "
  • ").replaceAll(this._actionNode.jsNode); + var toReplace = $("
  • " + (this._tree.settings.lang.loading || "Loading ...") + "
  • ").replaceAll(this._actionNode.jsNode); $.get(this._getUrl(nodeDef.sourceUrl), null, function(msg) { if (!msg || msg.length == 0) { @@ -741,6 +741,10 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); theme_name: "umbraco", context: null //no context menu by default }, + lang : { + new_node : "New folder", + loading : "
    " + (this._tree.settings.lang.loading || "Loading ...") + "
    " + }, rules: { metadata: "umb:nodedata", creatable: "none"