diff --git a/src/Umbraco.Web.UI.Client/src/common/filters/timespan.filter.js b/src/Umbraco.Web.UI.Client/src/common/filters/timespan.filter.js new file mode 100644 index 0000000000..f12aa4054a --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/filters/timespan.filter.js @@ -0,0 +1,15 @@ +angular.module("umbraco.filters").filter('timespan', function() { + return function(input) { + var sec_num = parseInt(input, 10); + var hours = Math.floor(sec_num / 3600); + var minutes = Math.floor((sec_num - (hours * 3600)) / 60); + var seconds = sec_num - (hours * 3600) - (minutes * 60); + + if (hours < 10) {hours = "0"+hours;} + if (minutes < 10) {minutes = "0"+minutes;} + if (seconds < 10) {seconds = "0"+seconds;} + var time = hours+':'+minutes+':'+seconds; + return time; + }; + }); + \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/panel.less b/src/Umbraco.Web.UI.Client/src/less/panel.less index 2eeeca65e3..7522f97c43 100644 --- a/src/Umbraco.Web.UI.Client/src/less/panel.less +++ b/src/Umbraco.Web.UI.Client/src/less/panel.less @@ -5,7 +5,7 @@ position: absolute; top: 0px; bottom: 0px; left: 0px; right: 0px;} -.umb-panel-nobody{padding-top: 100px;} +.umb-panel-nobody{padding-top: 100px; overflow: auto;} .umb-panel-header { background: @grayLighter; border-bottom: 1px solid @grayLight; diff --git a/src/Umbraco.Web.UI.Client/src/views/common/main.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/main.controller.js index 5a0347254d..068bc7baab 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/main.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/main.controller.js @@ -14,6 +14,7 @@ function MainController($scope, $location, $routeParams, $rootScope, $timeout, $ //detect if the current device is touch-enabled $scope.touchDevice = ("ontouchstart" in window || window.touch || window.navigator.msMaxTouchPoints===5 || window.DocumentTouch && document instanceof DocumentTouch); + //$scope.touchDevice = true; navigationService.touchDevice = $scope.touchDevice; //the null is important because we do an explicit bool check on this in the view diff --git a/src/Umbraco.Web.UI.Client/src/views/common/navigation.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/navigation.controller.js index 2c27650873..ed8fa32a3d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/navigation.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/navigation.controller.js @@ -59,6 +59,18 @@ function NavigationController($scope,$rootScope, $location, $log, $routeParams, navigationService.showMenu(ev, args); }); + $scope.treeEventHandler.bind("treeNodeAltSelect", function (ev, args) { + ev.stopPropagation(); + ev.preventDefault(); + + $scope.currentNode = args.node; + args.scope = $scope; + + args.skipDefault = true; + navigationService.showMenu(ev, args); + }); + + //this reacts to the options item in the tree $scope.searchShowMenu = function (ev, args) { @@ -79,7 +91,10 @@ function NavigationController($scope,$rootScope, $location, $log, $routeParams, var n = args.node; - //here we need to check for some legacy tree code + /*if(n.metaData && n.metaData.application){ + $location.path(n.metaData.application).search(""); + }else*/ + if (n.metaData && n.metaData["jsClickCallback"] && angular.isString(n.metaData["jsClickCallback"]) && n.metaData["jsClickCallback"] !== "") { //this is a legacy tree node! var jsPrefix = "javascript:"; @@ -106,10 +121,13 @@ function NavigationController($scope,$rootScope, $location, $log, $routeParams, historyService.add({ name: n.name, link: n.routePath, icon: n.icon }); //not legacy, lets just set the route value and clear the query string if there is one. $location.path(n.routePath).search(""); + }else if(n.metaData && n.metaData.application){ + $location.path("#/" + n.metaData.application); } navigationService.hideNavigation(); }); + /** Opens a dialog but passes in this scope instance to be used for the dialog */ $scope.openDialog = function (currentNode, action, currentSection) { diff --git a/src/Umbraco.Web.UI.Client/src/views/content/create.html b/src/Umbraco.Web.UI.Client/src/views/content/create.html index 5778bde399..37f532cd65 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/create.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/create.html @@ -1,7 +1,7 @@