diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/umbsections.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/umbsections.directive.js index 0b91cff44e..b98d0db49c 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/umbsections.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/umbsections.directive.js @@ -22,6 +22,9 @@ function sectionsDirective($timeout, $window, navigationService, treeService, se if (scope.showTray) { return 'slide'; } + else if (scope.showTray === false) { + return 'slide'; + } else { return ''; } @@ -83,6 +86,13 @@ function sectionsDirective($timeout, $window, navigationService, treeService, se }; scope.sectionClick = function (section) { + if (navigationService.userDialog) { + navigationService.userDialog.close(); + } + if (navigationService.helpDialog) { + navigationService.helpDialog.close(); + } + navigationService.hideSearch(); navigationService.showTree(section.alias); $location.path("/" + section.alias); @@ -92,8 +102,20 @@ function sectionsDirective($timeout, $window, navigationService, treeService, se navigationService.reloadSection(section.alias); }; - scope.trayClick = function(){ - navigationService.showTray(); + scope.trayClick = function () { + // close dialogs + if (navigationService.userDialog) { + navigationService.userDialog.close(); + } + if (navigationService.helpDialog) { + navigationService.helpDialog.close(); + } + + if (appState.getGlobalState("showTray") === true) { + navigationService.hideTray(); + } else { + navigationService.showTray(); + } }; loadSections(); diff --git a/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js b/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js index 4cfba513e5..ba4a4b1488 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js @@ -513,23 +513,26 @@ function navigationService($rootScope, $routeParams, $log, $location, $q, $timeo * Opens the user dialog, next to the sections navigation * template is located in views/common/dialogs/user.html */ - showUserDialog: function() { + showUserDialog: function () { + // hide tray and close help dialog + if (service.helpDialog) { + service.helpDialog.close(); + } + service.hideTray(); - if(userDialog){ - userDialog.close(); - userDialog = null; + if (service.userDialog) { + service.userDialog.close(); + service.userDialog = undefined; } - userDialog = dialogService.open( - { - template: "views/common/dialogs/user.html", - modalClass: "umb-modal-left", - show: true - }); - - + service.userDialog = dialogService.open( + { + template: "views/common/dialogs/user.html", + modalClass: "umb-modal-left", + show: true + }); - return userDialog; + return service.userDialog; }, /** @@ -541,7 +544,13 @@ function navigationService($rootScope, $routeParams, $log, $location, $q, $timeo * Opens the user dialog, next to the sections navigation * template is located in views/common/dialogs/user.html */ - showHelpDialog: function() { + showHelpDialog: function () { + // hide tray and close user dialog + service.hideTray(); + if (service.userDialog) { + service.userDialog.close(); + } + if(service.helpDialog){ service.helpDialog.close(); service.helpDialog = undefined; diff --git a/src/Umbraco.Web.UI.Client/src/less/sections.less b/src/Umbraco.Web.UI.Client/src/less/sections.less index f487165e98..795808f941 100644 --- a/src/Umbraco.Web.UI.Client/src/less/sections.less +++ b/src/Umbraco.Web.UI.Client/src/less/sections.less @@ -7,6 +7,7 @@ ul.sections { background: @blackLight; height: 100%; width: 80px; + border-right: 1px solid @grayDark; } ul.sections li { @@ -63,7 +64,7 @@ ul.sections:hover a span { // ------------------------- ul.sections li.avatar { - height: 69px; + height: 67px; padding: 30px 0 2px 0; text-align: center; margin: 0 0 0 -4px; @@ -116,7 +117,38 @@ ul.sections li.help a { // ------------------------- li.expand a, li.expand{border: none !Important;} -ul.sections-tray { - padding-top: 102px; - width: 80px; +li.expand { + + &.open > a > i.icon { + -webkit-transition: all 1s !important; + -o-transition: all 1s !important; + -moz-transition: all 1s !important; + transition: all 1s !important; + + &:before { + -ms-transform: rotate(180deg) !important; /* IE 9 */ + -webkit-transform: rotate(180deg) !important; /* Chrome, Safari, Opera */ + -o-transform: rotate(180deg) !important; + -moz-transform: rotate(180deg) !important; + transform: rotate(180deg) !important; + } + } +} + +ul.sections-tray { + padding-top: 99px; + width: 80px; + + & > li:first-child > a { + border-top: 1px solid #343434; + } + + & > li { + // 5px (instead of 4px) because of vertical border + border-left-width: 5px; + + &.current, &:hover { + border-left-width: 5px; + } + } } diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/help.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/help.controller.js index ae40a9a05d..95b7b8bbe5 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/help.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/help.controller.js @@ -35,7 +35,11 @@ angular.module("umbraco") }); helpService.findVideos(rq).then(function(videos){ - $scope.videos = videos; + $scope.videos = videos; + + angular.forEach($scope.videos, function (obj) { + obj.thumbnail = obj.thumbnail.replace(/(\.[\w\d_-]+)$/i, '_thumb$1'); + }); }); }); diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/help.html b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/help.html index ef759c8b06..80ce8f80c0 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/help.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/help.html @@ -37,7 +37,7 @@