From 229b770447cefc013ae7911c0fa9705fc44c34fb Mon Sep 17 00:00:00 2001 From: perploug Date: Tue, 1 Oct 2013 11:40:56 +0200 Subject: [PATCH] fixes: U4-2854 Re-adds actions on root tree nodes --- .../lib/umbraco/LegacyUmbClientMgr.js | 12 ++++++++++-- .../src/common/services/tree.service.js | 9 +++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/lib/umbraco/LegacyUmbClientMgr.js b/src/Umbraco.Web.UI.Client/lib/umbraco/LegacyUmbClientMgr.js index ab0458ed46..4ed722053d 100644 --- a/src/Umbraco.Web.UI.Client/lib/umbraco/LegacyUmbClientMgr.js +++ b/src/Umbraco.Web.UI.Client/lib/umbraco/LegacyUmbClientMgr.js @@ -99,8 +99,16 @@ Umbraco.Sys.registerNamespace("Umbraco.Application"); //return this._mainTree; }, appActions: function() { - - throw "Not implemented!"; + var injector = getRootInjector(); + var navService = injector.get("navigationService"); + + var _actions = {}; + _actions.openDashboard = function(section){ + navService.changeSection(section); + }; + + return _actions; + //throw "Not implemented!"; ////if the main window has no actions, we'll create some //if (this._appActions == null) { diff --git a/src/Umbraco.Web.UI.Client/src/common/services/tree.service.js b/src/Umbraco.Web.UI.Client/src/common/services/tree.service.js index a2b8961879..5a44c6429f 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/tree.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/tree.service.js @@ -31,8 +31,9 @@ function treeService($q, treeResource, iconHelper, notificationsService, $rootSc if (treeNodes[i].metaData && treeNodes[i].metaData["treeAlias"]) { //this is a root node treeNodes[i].routePath = section; + //we're going to remove any js callbacks from legacy tree nodes here! - treeNodes[i].metaData["jsClickCallback"] = null; + //treeNodes[i].metaData["jsClickCallback"] = null; } else { var treeAlias = this.getTreeAlias(treeNodes[i]); @@ -200,9 +201,9 @@ function treeService($q, treeResource, iconHelper, notificationsService, $rootSc cacheKey += "_" + section; //return the cache if it exists - if (treeArray[cacheKey] !== undefined){ - return treeArray[cacheKey]; - } + //if (treeArray[cacheKey] !== undefined){ + // return treeArray[cacheKey]; + // } var self = this;