Compare commits

...

2 Commits

Author SHA1 Message Date
Sebastiaan Janssen 927b8ac6d4 Remove debug alert 2018-09-30 13:36:12 +02:00
Mark Drake 2a60dad15e added an active css class for umbraco tree items 2018-09-30 13:32:23 +02:00
3 changed files with 15 additions and 4 deletions
@@ -18,7 +18,7 @@
</example>
*/
angular.module("umbraco.directives")
.directive('umbTreeItem', function ($compile, $http, $templateCache, $interpolate, $log, $location, $rootScope, $window, treeService, $timeout, localizationService) {
.directive('umbTreeItem', function ($compile, $http, $templateCache, $interpolate, $log, $location, $rootScope, $window, treeService, $timeout, localizationService, appState) {
return {
restrict: 'E',
replace: true,
@@ -132,7 +132,15 @@ angular.module("umbraco.directives")
}
if (node.selected) {
css.push("umb-tree-node-checked");
}
}
//is this the current action node (this is not the same as the current selected node!)
var actionNode = appState.getMenuState("currentNode");
if(actionNode) {
if(actionNode.id === node.id) {
css.push("active");
}
}
return css.join(" ");
};
@@ -73,6 +73,7 @@ function navigationService($rootScope, $routeParams, $log, $location, $q, $timeo
appState.setSectionState("showSearchResults", false);
appState.setGlobalState("stickyNavigation", false);
appState.setGlobalState("showTray", false);
appState.setMenuState("currentNode", null);
if (appState.getGlobalState("isTablet") === true) {
appState.setGlobalState("showNavigation", false);
@@ -347,7 +348,8 @@ function navigationService($rootScope, $routeParams, $log, $location, $q, $timeo
if (appState.getGlobalState("isTablet") === true && !appState.getGlobalState("stickyNavigation")) {
//reset it to whatever is in the url
appState.setSectionState("currentSection", $routeParams.section);
appState.setSectionState("currentSection", $routeParams.section);
setMode("default-hidesectiontree");
}
+2 -1
View File
@@ -185,7 +185,8 @@
line-height: 16px;
}
.umb-tree div:hover {
.umb-tree div:hover,
.umb-tree div.active {
background: @gray-10;
}