From 3fe99a402e2e03f7648b1153b2de53193014f152 Mon Sep 17 00:00:00 2001 From: Lars-Erik Aabech Date: Wed, 16 Oct 2013 15:45:39 +0200 Subject: [PATCH 1/7] Should make the PublishedContentExtensionTests green when ran together with everything else in TeamCity --- .../PublishedContentExtensionTests.cs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentExtensionTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentExtensionTests.cs index 98ee00c2cd..93502f288d 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentExtensionTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentExtensionTests.cs @@ -18,19 +18,7 @@ namespace Umbraco.Tests.PublishedContent protected override DatabaseBehavior DatabaseTestBehavior { - get { return DatabaseBehavior.NewDbFileAndSchemaPerFixture; } - } - - [SetUp] - public override void Initialize() - { - base.Initialize(); - } - - [TearDown] - public override void TearDown() - { - base.TearDown(); + get { return DatabaseBehavior.NewSchemaPerFixture; } } protected override string GetXmlContent(int templateId) From e0da5a9cb29dcae56f51cdc96504ed132e7511a3 Mon Sep 17 00:00:00 2001 From: Simon Dingley Date: Thu, 7 Nov 2013 12:45:35 +0000 Subject: [PATCH 2/7] Groups jQuery dependencies using the ClientDependency Group property --- src/Umbraco.Web.UI/umbraco/umbraco.aspx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI/umbraco/umbraco.aspx b/src/Umbraco.Web.UI/umbraco/umbraco.aspx index 348a5a9143..9e2f51aa73 100644 --- a/src/Umbraco.Web.UI/umbraco/umbraco.aspx +++ b/src/Umbraco.Web.UI/umbraco/umbraco.aspx @@ -25,11 +25,11 @@ + Priority="0" Group="0" /> + Priority="1" Group="0" /> + PathNameAlias="UmbracoClient" Priority="2" Group="0" /> - + + PathNameAlias="UmbracoClient" Priority="10" Group="0" /> + PathNameAlias="UmbracoClient" Priority="1" Group="0" /> From a0106ff8111053b41c7dd89ea7f657b029030296 Mon Sep 17 00:00:00 2001 From: Craig Cronin Date: Thu, 7 Nov 2013 12:50:26 +0000 Subject: [PATCH 3/7] Fixed as per issue comments, but also implemented for another 3 overloads --- src/Umbraco.Web/HtmlHelperRenderExtensions.cs | 8 ++++---- src/umbraco.sln | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs index 2a009dfaa2..f434b70656 100644 --- a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs +++ b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs @@ -296,7 +296,7 @@ namespace Umbraco.Web object htmlAttributes, FormMethod method) { - return html.BeginUmbracoForm(action, controllerName, additionalRouteVals, htmlAttributes.ToDictionary(), method); + return html.BeginUmbracoForm(action, controllerName, additionalRouteVals, HtmlHelper.AnonymousObjectToHtmlAttributes(htmlAttributes), method); } /// @@ -312,7 +312,7 @@ namespace Umbraco.Web object additionalRouteVals, object htmlAttributes) { - return html.BeginUmbracoForm(action, controllerName, additionalRouteVals, htmlAttributes.ToDictionary()); + return html.BeginUmbracoForm(action, controllerName, additionalRouteVals, HtmlHelper.AnonymousObjectToHtmlAttributes(htmlAttributes)); } /// @@ -480,7 +480,7 @@ namespace Umbraco.Web object htmlAttributes, FormMethod method) { - return html.BeginUmbracoForm(action, surfaceType, additionalRouteVals, htmlAttributes.ToDictionary(), method); + return html.BeginUmbracoForm(action, surfaceType, additionalRouteVals, HtmlHelper.AnonymousObjectToHtmlAttributes(htmlAttributes), method); } /// @@ -496,7 +496,7 @@ namespace Umbraco.Web object additionalRouteVals, object htmlAttributes) { - return html.BeginUmbracoForm(action, surfaceType, additionalRouteVals, htmlAttributes.ToDictionary()); + return html.BeginUmbracoForm(action, surfaceType, additionalRouteVals, HtmlHelper.AnonymousObjectToHtmlAttributes(htmlAttributes)); } /// diff --git a/src/umbraco.sln b/src/umbraco.sln index 0b7902d964..ba7a350194 100644 --- a/src/umbraco.sln +++ b/src/umbraco.sln @@ -157,7 +157,4 @@ Global {73529637-28F5-419C-A6BB-D094E39DE614} = {DD32977B-EF54-475B-9A1B-B97A502C6E58} {B555AAE6-0F56-442F-AC9F-EF497DB38DE7} = {DD32977B-EF54-475B-9A1B-B97A502C6E58} EndGlobalSection - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection EndGlobal From baed01518cbc2e7fa4791a0d2aaccfee348882a7 Mon Sep 17 00:00:00 2001 From: Simon Dingley Date: Thu, 7 Nov 2013 13:21:01 +0000 Subject: [PATCH 4/7] Group jQueryTree script files --- .../umbraco/controls/Tree/TreeControl.ascx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web.UI/umbraco/controls/Tree/TreeControl.ascx b/src/Umbraco.Web.UI/umbraco/controls/Tree/TreeControl.ascx index 41ac545d6f..fddfefe8c2 100644 --- a/src/Umbraco.Web.UI/umbraco/controls/Tree/TreeControl.ascx +++ b/src/Umbraco.Web.UI/umbraco/controls/Tree/TreeControl.ascx @@ -9,12 +9,12 @@ - - - + + + - - + + From e9d12ae0d8b8457f97e7989e14e7e7fe4070dcc3 Mon Sep 17 00:00:00 2001 From: Simon Dingley Date: Thu, 7 Nov 2013 14:23:53 +0000 Subject: [PATCH 5/7] Revert "Group jQueryTree script files" This reverts commit baed01518cbc2e7fa4791a0d2aaccfee348882a7. --- .../umbraco/controls/Tree/TreeControl.ascx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web.UI/umbraco/controls/Tree/TreeControl.ascx b/src/Umbraco.Web.UI/umbraco/controls/Tree/TreeControl.ascx index fddfefe8c2..41ac545d6f 100644 --- a/src/Umbraco.Web.UI/umbraco/controls/Tree/TreeControl.ascx +++ b/src/Umbraco.Web.UI/umbraco/controls/Tree/TreeControl.ascx @@ -9,12 +9,12 @@ - - - + + + - - + + From 6b810c89f6cf9fed9ab1c1c16a5717d84b7a1a55 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 19 Dec 2013 13:28:17 +1100 Subject: [PATCH 6/7] un-ignores PublishedContentExtensionTests --- .gitignore | 1 + .../PublishedContent/PublishedContentExtensionTests.cs | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index b6839b4e04..3faaa25539 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,4 @@ NDependOut/* *.ndproj QueryResult.htm *.ndproj +src/Umbraco.Tests/Views/web.config diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentExtensionTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentExtensionTests.cs index 9b2ddf736e..2134bec0ce 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentExtensionTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentExtensionTests.cs @@ -26,7 +26,6 @@ namespace Umbraco.Tests.PublishedContent return xmlContent; } - [Ignore] [Test] public void IsDocumentType_NonRecursive_ActualType_ReturnsTrue() { @@ -36,7 +35,6 @@ namespace Umbraco.Tests.PublishedContent Assert.That(publishedContent.IsDocumentType("inherited", false)); } - [Ignore] [Test] public void IsDocumentType_NonRecursive_BaseType_ReturnsFalse() { @@ -46,7 +44,6 @@ namespace Umbraco.Tests.PublishedContent Assert.That(publishedContent.IsDocumentType("base", false), Is.False); } - [Ignore] [Test] public void IsDocumentType_Recursive_ActualType_ReturnsTrue() { @@ -56,7 +53,6 @@ namespace Umbraco.Tests.PublishedContent Assert.That(publishedContent.IsDocumentType("inherited", true)); } - [Ignore] [Test] public void IsDocumentType_Recursive_BaseType_ReturnsTrue() { @@ -66,7 +62,6 @@ namespace Umbraco.Tests.PublishedContent Assert.That(publishedContent.IsDocumentType("base", true)); } - [Ignore] [Test] public void IsDocumentType_Recursive_InvalidBaseType_ReturnsFalse() { From a43f4b7b7fdb98303b881e15ec0c279d1638dfe6 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 19 Dec 2013 15:05:05 +1100 Subject: [PATCH 7/7] Completes: U4-1521 Updated back office to use ClientDependency bundles for common files --- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 1 + .../config/ClientDependency.config | 2 +- .../umbraco/Umbraco.aspx.designer.cs | 160 +----------------- .../umbraco/controls/Tree/TreeControl.ascx | 18 +- src/Umbraco.Web.UI/umbraco/editContent.aspx | 9 +- src/Umbraco.Web.UI/umbraco/login.aspx | 9 +- .../UmbracoDialog.master.designer.cs | 18 -- .../UmbracoPage.master.designer.cs | 27 --- .../umbraco/masterpages/umbracoDialog.Master | 13 +- .../umbraco/masterpages/umbracoPage.Master | 17 +- src/Umbraco.Web.UI/umbraco/umbraco.aspx | 50 ++---- .../Application/HistoryManager.js | 6 +- .../Application/UmbracoUtils.js | 8 +- .../UI/Bundles/JsApplicationLib.cs | 22 +++ src/Umbraco.Web/UI/Bundles/JsJQueryCore.cs | 14 ++ src/Umbraco.Web/UI/Bundles/JsJQueryPlugins.cs | 18 ++ .../UI/Bundles/JsUmbracoApplicationCore.cs | 16 ++ .../UI/Bundles/JsUmbracoApplicationUI.cs | 17 ++ src/Umbraco.Web/UI/Bundles/JsUmbracoTree.cs | 18 ++ src/Umbraco.Web/UI/Controls/FolderBrowser.cs | 11 +- src/Umbraco.Web/Umbraco.Web.csproj | 6 + 21 files changed, 171 insertions(+), 289 deletions(-) create mode 100644 src/Umbraco.Web/UI/Bundles/JsApplicationLib.cs create mode 100644 src/Umbraco.Web/UI/Bundles/JsJQueryCore.cs create mode 100644 src/Umbraco.Web/UI/Bundles/JsJQueryPlugins.cs create mode 100644 src/Umbraco.Web/UI/Bundles/JsUmbracoApplicationCore.cs create mode 100644 src/Umbraco.Web/UI/Bundles/JsUmbracoApplicationUI.cs create mode 100644 src/Umbraco.Web/UI/Bundles/JsUmbracoTree.cs diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 83884f6950..36d53f4a8e 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -728,6 +728,7 @@ + diff --git a/src/Umbraco.Web.UI/config/ClientDependency.config b/src/Umbraco.Web.UI/config/ClientDependency.config index e4b2a98f77..acd5d07260 100644 --- a/src/Umbraco.Web.UI/config/ClientDependency.config +++ b/src/Umbraco.Web.UI/config/ClientDependency.config @@ -10,7 +10,7 @@ NOTES: * Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config * A new version will invalidate both client and server cache and create new persisted files --> - + - - - - - - - + + + + + diff --git a/src/Umbraco.Web.UI/umbraco/masterpages/umbracoPage.Master b/src/Umbraco.Web.UI/umbraco/masterpages/umbracoPage.Master index caa5370259..828df214b4 100644 --- a/src/Umbraco.Web.UI/umbraco/masterpages/umbracoPage.Master +++ b/src/Umbraco.Web.UI/umbraco/masterpages/umbracoPage.Master @@ -3,6 +3,7 @@ <%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> <%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> +<%@ Register TagPrefix="umbClient" Namespace="Umbraco.Web.UI.Bundles" Assembly="umbraco" %> @@ -10,16 +11,12 @@ - - - - - - - - - - + + + + + + diff --git a/src/Umbraco.Web.UI/umbraco/umbraco.aspx b/src/Umbraco.Web.UI/umbraco/umbraco.aspx index 649ac15855..efe4aa628f 100644 --- a/src/Umbraco.Web.UI/umbraco/umbraco.aspx +++ b/src/Umbraco.Web.UI/umbraco/umbraco.aspx @@ -9,7 +9,8 @@ <%@ Import Namespace="Umbraco.Web" %> <%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> <%@ Register TagPrefix="uc1" TagName="quickSearch" Src="Search/QuickSearch.ascx" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> +<%@ Register TagPrefix="cdf" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> +<%@ Register TagPrefix="umbClient" Namespace="Umbraco.Web.UI.Bundles" Assembly="umbraco" %> @@ -18,41 +19,18 @@ " /> - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/src/Umbraco.Web.UI/umbraco_client/Application/HistoryManager.js b/src/Umbraco.Web.UI/umbraco_client/Application/HistoryManager.js index bed8630cf5..5bab77a931 100644 --- a/src/Umbraco.Web.UI/umbraco_client/Application/HistoryManager.js +++ b/src/Umbraco.Web.UI/umbraco_client/Application/HistoryManager.js @@ -23,7 +23,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); onNavigate: function(e) { var fragment = getHashFragment($.param.fragment()); if (fragment != "") { - jQuery(window.top).trigger("navigating", [fragment]); //raise event! + $(window.top).trigger("navigating", [fragment]); //raise event! } }, @@ -43,11 +43,11 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); addEventHandler: function(fnName, fn) { /// Adds an event listener to the event name event - if (typeof (jQuery) != "undefined") jQuery(window.top).bind(fnName, fn); //if there's no jQuery, there is no events + if (typeof ($) != "undefined") $(window.top).bind(fnName, fn); //if there's no jQuery, there is no events }, removeEventHandler: function(fnName, fn) { /// Removes an event listener to the event name event - if (typeof (jQuery) != "undefined") jQuery(window.top).unbind(fnName, fn); //if there's no jQuery, there is no events + if (typeof ($) != "undefined") $(window.top).unbind(fnName, fn); //if there's no jQuery, there is no events } }; diff --git a/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoUtils.js b/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoUtils.js index e5dc8b96b5..3752d2e24e 100644 --- a/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoUtils.js +++ b/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoUtils.js @@ -4,8 +4,8 @@ Umbraco.Sys.registerNamespace("Umbraco.Utils"); Umbraco.Utils.generateRandom = function() { /// Returns a random integer for use with URLs - day = new Date() - z = day.getTime() - y = (z - (parseInt(z / 1000, 10) * 1000)) / 10 - return y + var day = new Date(); + var z = day.getTime(); + var y = (z - (parseInt(z / 1000, 10) * 1000)) / 10; + return y; } \ No newline at end of file diff --git a/src/Umbraco.Web/UI/Bundles/JsApplicationLib.cs b/src/Umbraco.Web/UI/Bundles/JsApplicationLib.cs new file mode 100644 index 0000000000..afe70ad4d1 --- /dev/null +++ b/src/Umbraco.Web/UI/Bundles/JsApplicationLib.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Web.UI; +using ClientDependency.Core; + +namespace Umbraco.Web.UI.Bundles +{ + /// + /// The core libs that have no dependencies + /// + [ClientDependency(ClientDependencyType.Javascript, "Application/NamespaceManager.js", "UmbracoClient", Priority = 0, Group = 0)] + [ClientDependency(ClientDependencyType.Javascript, "Application/UmbracoUtils.js", "UmbracoClient", Priority = 1, Group = 0)] + [ClientDependency(ClientDependencyType.Javascript, "ui/json2.js", "UmbracoClient", Priority = 2, Group = 0)] + [ClientDependency(ClientDependencyType.Javascript, "ui/base2.js", "UmbracoClient", Priority = 3, Group = 0)] + [ClientDependency(ClientDependencyType.Javascript, "UI/knockout.js", "UmbracoClient", Priority = 4, Group = 0)] + [ClientDependency(ClientDependencyType.Javascript, "UI/knockout.mapping.js", "UmbracoClient", Priority = 5, Group = 0)] + public class JsApplicationLib : Control + { + } +} diff --git a/src/Umbraco.Web/UI/Bundles/JsJQueryCore.cs b/src/Umbraco.Web/UI/Bundles/JsJQueryCore.cs new file mode 100644 index 0000000000..621ecd214c --- /dev/null +++ b/src/Umbraco.Web/UI/Bundles/JsJQueryCore.cs @@ -0,0 +1,14 @@ +using System.Web.UI; +using ClientDependency.Core; + +namespace Umbraco.Web.UI.Bundles +{ + /// + /// The core Jquery libs + /// + [ClientDependency(ClientDependencyType.Javascript, "ui/jquery.js", "UmbracoClient", Priority = 0, Group = 1)] + [ClientDependency(ClientDependencyType.Javascript, "ui/jqueryui.js", "UmbracoClient", Priority = 1, Group = 1)] + public class JsJQueryCore : Control + { + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/UI/Bundles/JsJQueryPlugins.cs b/src/Umbraco.Web/UI/Bundles/JsJQueryPlugins.cs new file mode 100644 index 0000000000..48ff2f38dc --- /dev/null +++ b/src/Umbraco.Web/UI/Bundles/JsJQueryPlugins.cs @@ -0,0 +1,18 @@ +using System.Web.UI; +using ClientDependency.Core; + +namespace Umbraco.Web.UI.Bundles +{ + /// + /// The core Jquery libs + /// + [ClientDependency(ClientDependencyType.Javascript, "Application/jQuery/jquery.ba-bbq.min.js", "UmbracoClient", Priority = 0, Group = 4)] + [ClientDependency(ClientDependencyType.Javascript, "ui/jQueryWresize.js", "UmbracoClient", Priority = 1, Group = 4)] + [ClientDependency(ClientDependencyType.Javascript, "modal/jquery.simplemodal.1.4.1.custom.js", "UmbracoClient", Priority = 2, Group = 4)] + [ClientDependency(ClientDependencyType.Javascript, "Application/jQuery/jquery.cookie.js", "UmbracoClient", Priority = 3, Group = 4)] + [ClientDependency(ClientDependencyType.Javascript, "Application/JQuery/jquery.metadata.min.js", "UmbracoClient", Priority = 4, Group = 4)] + [ClientDependency(ClientDependencyType.Javascript, "Application/jQuery/jquery.hotkeys.js", "UmbracoClient", Priority = 5, Group = 4)] + public class JsJQueryPlugins : Control + { + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/UI/Bundles/JsUmbracoApplicationCore.cs b/src/Umbraco.Web/UI/Bundles/JsUmbracoApplicationCore.cs new file mode 100644 index 0000000000..17ae644c81 --- /dev/null +++ b/src/Umbraco.Web/UI/Bundles/JsUmbracoApplicationCore.cs @@ -0,0 +1,16 @@ +using System.Web.UI; +using ClientDependency.Core; + +namespace Umbraco.Web.UI.Bundles +{ + /// + /// The core libs that require JQuery to be loaded + /// + [ClientDependency(ClientDependencyType.Javascript, "Application/Extensions.js", "UmbracoClient", Priority = 0, Group = 2)] + [ClientDependency(ClientDependencyType.Javascript, "Application/UmbracoApplicationActions.js", "UmbracoClient", Priority = 1, Group = 2)] + [ClientDependency(ClientDependencyType.Javascript, "Application/HistoryManager.js", "UmbracoClient", Priority = 2, Group = 2)] + [ClientDependency(ClientDependencyType.Javascript, "Application/UmbracoClientManager.js", "UmbracoClient", Priority = 3, Group = 3)] + public class JsUmbracoApplicationCore : Control + { + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/UI/Bundles/JsUmbracoApplicationUI.cs b/src/Umbraco.Web/UI/Bundles/JsUmbracoApplicationUI.cs new file mode 100644 index 0000000000..c8bce7694a --- /dev/null +++ b/src/Umbraco.Web/UI/Bundles/JsUmbracoApplicationUI.cs @@ -0,0 +1,17 @@ +using System.Web.UI; +using ClientDependency.Core; + +namespace Umbraco.Web.UI.Bundles +{ + /// + /// The UI Umbraco libs + /// + [ClientDependency(ClientDependencyType.Javascript, "ui/default.js", "UmbracoClient", Priority = 0, Group = 5)] + [ClientDependency(ClientDependencyType.Javascript, "js/guiFunctions.js", "UmbracoRoot", Priority = 1, Group = 5)] + [ClientDependency(ClientDependencyType.Javascript, "modal/modal.js", "UmbracoClient", Priority = 2, Group = 5)] + [ClientDependency(ClientDependencyType.Javascript, "js/UmbracoSpeechBubbleBackend.js", "UmbracoRoot", Priority = 3, Group = 5)] + [ClientDependency(ClientDependencyType.Javascript, "modal/modal.js", "UmbracoClient", Priority = 2, Group = 5)] + public class JsUmbracoApplicationUI : Control + { + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/UI/Bundles/JsUmbracoTree.cs b/src/Umbraco.Web/UI/Bundles/JsUmbracoTree.cs new file mode 100644 index 0000000000..7af2046991 --- /dev/null +++ b/src/Umbraco.Web/UI/Bundles/JsUmbracoTree.cs @@ -0,0 +1,18 @@ +using System.Web.UI; +using ClientDependency.Core; + +namespace Umbraco.Web.UI.Bundles +{ + /// + /// The umb tree libs + /// + [ClientDependency(ClientDependencyType.Javascript, "Tree/jquery.tree.js", "UmbracoClient", Priority = 0, Group = 10)] + [ClientDependency(ClientDependencyType.Javascript, "Tree/UmbracoContext.js", "UmbracoClient", Priority = 1, Group = 10)] + [ClientDependency(ClientDependencyType.Javascript, "Tree/jquery.tree.contextmenu.js", "UmbracoClient", Priority = 2, Group = 10)] + [ClientDependency(ClientDependencyType.Javascript, "Tree/jquery.tree.checkbox.js", "UmbracoClient", Priority = 3, Group = 10)] + [ClientDependency(ClientDependencyType.Javascript, "Tree/NodeDefinition.js", "UmbracoClient", Priority = 4, Group = 10)] + [ClientDependency(ClientDependencyType.Javascript, "Tree/UmbracoTree.js", "UmbracoClient", Priority = 5, Group = 10)] + public class JsUmbracoTree : Control + { + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/UI/Controls/FolderBrowser.cs b/src/Umbraco.Web/UI/Controls/FolderBrowser.cs index 305cc702db..f662bd507e 100644 --- a/src/Umbraco.Web/UI/Controls/FolderBrowser.cs +++ b/src/Umbraco.Web/UI/Controls/FolderBrowser.cs @@ -4,17 +4,14 @@ using System.Text; using System.Web.UI; using System.Web.UI.WebControls; using ClientDependency.Core; +using Umbraco.Web.UI.Bundles; using umbraco.BasePages; using Umbraco.Core.IO; namespace Umbraco.Web.UI.Controls { [ClientDependency(ClientDependencyType.Css, "ContextMenu/Css/jquery.contextMenu.css", "UmbracoClient")] - [ClientDependency(ClientDependencyType.Css, "FolderBrowser/Css/folderbrowser.css", "UmbracoClient")] - [ClientDependency(ClientDependencyType.Javascript, "ui/jquery.js", "UmbracoClient", Priority = 1)] - [ClientDependency(ClientDependencyType.Javascript, "ui/base2.js", "UmbracoClient", Priority = 1)] - [ClientDependency(ClientDependencyType.Javascript, "ui/knockout.js", "UmbracoClient", Priority = 3)] - [ClientDependency(ClientDependencyType.Javascript, "ui/knockout.mapping.js", "UmbracoClient", Priority = 4)] + [ClientDependency(ClientDependencyType.Css, "FolderBrowser/Css/folderbrowser.css", "UmbracoClient")] [ClientDependency(ClientDependencyType.Javascript, "ContextMenu/Js/jquery.contextMenu.js", "UmbracoClient", Priority = 5)] [ClientDependency(ClientDependencyType.Javascript, "FileUploader/js/jquery.fileUploader.js", "UmbracoClient", Priority = 6)] [ClientDependency(ClientDependencyType.Javascript, "FolderBrowser/js/folderbrowser.js", "UmbracoClient", Priority = 10)] @@ -68,6 +65,10 @@ namespace Umbraco.Web.UI.Controls /// protected override void CreateChildControls() { + //Ensure the bundles are added + Controls.Add(new JsApplicationLib()); + Controls.Add(new JsJQueryCore()); + // Create the panel surround Panel = new Panel { diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index c4a714687f..89fac8613b 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -393,6 +393,12 @@ + + + + + +