diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/_module.js b/src/Umbraco.Web.UI.Client/src/common/directives/_module.js index 4d6d0ecfe6..823c324641 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/_module.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/_module.js @@ -1,4 +1,4 @@ -angular.module("umbraco.directives", ["umbraco.directives.editors", "umbraco.directives.html", "umbraco.directives.validation"]); +angular.module("umbraco.directives", ["umbraco.directives.editors", "umbraco.directives.html", "umbraco.directives.validation", "ui.sortable"]); angular.module("umbraco.directives.editors", []); angular.module("umbraco.directives.html", []); angular.module("umbraco.directives.validation", []); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/loader.js b/src/Umbraco.Web.UI.Client/src/loader.js index 43e740cb48..81d5fe66be 100644 --- a/src/Umbraco.Web.UI.Client/src/loader.js +++ b/src/Umbraco.Web.UI.Client/src/loader.js @@ -8,8 +8,10 @@ yepnope({ 'lib/jquery/jquery.ui.core.min.js', 'lib/jquery/jquery.ui.widget.min.js', - /*'lib/jquery/jquery.ui.mouse.min.js', + 'lib/jquery/jquery.ui.mouse.min.js', 'lib/jquery/jquery.ui.sortable.min.js', + + /* 'lib/jquery/jquery.ui.effect.min.js', 'lib/jquery/jquery.ui.effect-highlight.min.js', 'lib/jquery/jquery.ui.draggable.js',*/ @@ -31,9 +33,8 @@ yepnope({ 'lib/angular/1.2/angular-sanitize.min.js', */ - /* temporary sorter lib, should be updated */ - /*'lib/angular/angular-ui-sortable.js',*/ - 'lib/jquery/jquery.sortable/jquery.sortable.js', + 'lib/angular/angular-ui-sortable.js', + /* App-wide file-upload helper */ 'lib/jquery/jquery.upload/js/jquery.fileupload.js', diff --git a/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js index fcfd724214..7e59f1bef2 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js @@ -23,7 +23,8 @@ function ContentEditController($scope, $routeParams, $q, $timeout, $window, cont $scope.loaded = true; $scope.content = data; - navigationService.syncPath(data.path.split(",")); + //just get the cached version, no need to force a reload + navigationService.syncPath(data.path.split(","), false); //in one particular special case, after we've created a new item we redirect back to the edit // route but there might be server validation errors in the collection which we need to display @@ -48,7 +49,7 @@ function ContentEditController($scope, $routeParams, $q, $timeout, $window, cont rebindCallback: contentEditingHelper.reBindChangedProperties($scope.content, data) }); - navigationService.syncPath(data.path.split(",")); + navigationService.syncPath(data.path.split(","), true); }); } @@ -69,7 +70,7 @@ function ContentEditController($scope, $routeParams, $q, $timeout, $window, cont rebindCallback: contentEditingHelper.reBindChangedProperties($scope.content, data) }); - navigationService.syncPath(data.path.split(",")); + navigationService.syncPath(data.path.split(","), true); }, function(err) { @@ -110,7 +111,8 @@ function ContentEditController($scope, $routeParams, $q, $timeout, $window, cont rebindCallback: contentEditingHelper.reBindChangedProperties($scope.content, data) }); - navigationService.syncPath(data.path.split(",")); + //fetch tree + navigationService.syncPath(data.path.split(","), true); deferred.resolve(data); }, function(err) { diff --git a/src/Umbraco.Web.UI.Client/test/config/karma.conf.js b/src/Umbraco.Web.UI.Client/test/config/karma.conf.js index 1f77aa6c56..c3f4777ccb 100644 --- a/src/Umbraco.Web.UI.Client/test/config/karma.conf.js +++ b/src/Umbraco.Web.UI.Client/test/config/karma.conf.js @@ -11,7 +11,8 @@ module.exports = function(karma) { 'lib/angular/1.1.5/angular.js', 'lib/angular/1.1.5/angular-cookies.min.js', 'lib/angular/1.1.5/angular-mocks.js', - + 'lib/angular/angular-ui-sortable.js', + /* For angular 1.2: 'lib/angular/1.2/angular.js', @@ -26,6 +27,7 @@ module.exports = function(karma) { 'lib/umbraco/Extensions.js', 'lib/yepnope/yepnope.min.js', + 'test/config/app.unit.js', 'src/common/mocks/umbraco.servervariables.js', diff --git a/src/Umbraco.Web/UI/JavaScript/JsInitialize.js b/src/Umbraco.Web/UI/JavaScript/JsInitialize.js index f45e92a66f..164af40506 100644 --- a/src/Umbraco.Web/UI/JavaScript/JsInitialize.js +++ b/src/Umbraco.Web/UI/JavaScript/JsInitialize.js @@ -1,13 +1,12 @@ [ - /* the jquery ui elements we need */ - /* NOTE: I've opted not to use the full lib, just the parts we need to save on DL */ 'lib/jquery/jquery.ui.core.min.js', 'lib/jquery/jquery.ui.widget.min.js', - /* 'lib/jquery/jquery.ui.mouse.min.js', 'lib/jquery/jquery.ui.sortable.min.js', + + /* 'lib/jquery/jquery.ui.effect.min.js', 'lib/jquery/jquery.ui.effect-highlight.min.js',*/ @@ -25,9 +24,8 @@ 'lib/angular/1.2/angular-sanitize.min.js', */ - /* temporary sorter lib, should be updated + /* temporary sorter lib, should be updated*/ 'lib/angular/angular-ui-sortable.js', - 'lib/jquery/jquery.sortable/jquery.sortable.js',*/ /* App-wide file-upload helper */ 'lib/jquery/jquery.upload/js/jquery.fileupload.js',