diff --git a/platform/commonUI/browse/bundle.json b/platform/commonUI/browse/bundle.json index 1e41b57c7a..6852c3e8e6 100644 --- a/platform/commonUI/browse/bundle.json +++ b/platform/commonUI/browse/bundle.json @@ -85,6 +85,7 @@ }, { "key": "back-arrow", + "uses": [ "type", "action" ], "templateUrl": "templates/back-arrow.html" } ], diff --git a/platform/commonUI/browse/res/templates/back-arrow.html b/platform/commonUI/browse/res/templates/back-arrow.html index 5e54b06185..ceb3df0ef2 100644 --- a/platform/commonUI/browse/res/templates/back-arrow.html +++ b/platform/commonUI/browse/res/templates/back-arrow.html @@ -22,6 +22,6 @@ + ng-click='backArrow()'> < diff --git a/platform/commonUI/browse/res/templates/browse/object-header.html b/platform/commonUI/browse/res/templates/browse/object-header.html index 8687646271..884f4fa888 100644 --- a/platform/commonUI/browse/res/templates/browse/object-header.html +++ b/platform/commonUI/browse/res/templates/browse/object-header.html @@ -21,7 +21,7 @@ -->
- + {{type.getGlyph()}} {{parameters.mode}} {{type.getName()}} diff --git a/platform/commonUI/browse/src/BrowseController.js b/platform/commonUI/browse/src/BrowseController.js index b7e8e796ff..cc4f06b243 100644 --- a/platform/commonUI/browse/src/BrowseController.js +++ b/platform/commonUI/browse/src/BrowseController.js @@ -126,8 +126,16 @@ define( } } - function updateRouteBackArrow() { -// console.log("Back Arrow"); + // Uses the current navigation to get the + // current ContextCapability, then the + // parent is gotten from that. If the parent + // is not the root, then user is navigated to + // parent + function navigateToParent() { + var parent = navigationService.getNavigation().getCapability('context').getParent(); + if (parent.getId() !== ROOT_ID) { + navigateTo(parent); + } } // Load the root object, put it in the scope. @@ -144,10 +152,12 @@ define( selectedObject: navigationService.getNavigation() }; + // SlideMenu boolean used to hide and show + // tree menu $scope.treeSlide = function () { $scope.treeClass = !$scope.treeClass; }; - + // Listen for changes in navigation state. navigationService.addListener(setNavigation); @@ -159,7 +169,7 @@ define( navigationService.removeListener(setNavigation); }); - $scope.backArrow = updateRouteBackArrow; + $scope.backArrow = navigateToParent; } diff --git a/platform/commonUI/general/res/css/theme-espresso.css b/platform/commonUI/general/res/css/theme-espresso.css index 4cb2a1336b..f0109afbbf 100644 --- a/platform/commonUI/general/res/css/theme-espresso.css +++ b/platform/commonUI/general/res/css/theme-espresso.css @@ -900,13 +900,18 @@ mct-container { .mobile-hide { display: none; } } -@media screen and (orientation: portrait) and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (max-height: 514px) and (max-width: 740px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (max-height: 514px) and (max-width: 740px) and (max-device-width: 1024px) and (max-device-height: 799px) { +@media screen and (orientation: portrait) and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (max-height: 514px) and (max-width: 740px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (max-height: 514px) and (max-width: 740px) and (max-device-width: 1024px) and (max-device-height: 799px), screen and (orientation: portrait) and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 1024px) and (max-device-height: 799px) { /* line 190, ../sass/mobile/_layout.scss */ + .mobile-unhide { + display: inline-block; } } + +@media screen and (orientation: portrait) and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (max-height: 514px) and (max-width: 740px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (max-height: 514px) and (max-width: 740px) and (max-device-width: 1024px) and (max-device-height: 799px) { + /* line 197, ../sass/mobile/_layout.scss */ .phone-hide { display: none; } } @media screen and (orientation: portrait) and (max-width: 514px) and (max-height: 740px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (max-height: 514px) and (max-width: 740px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (max-height: 514px) and (max-width: 740px) and (max-device-width: 1024px) and (max-device-height: 799px), screen and (orientation: portrait) and (min-width: 515px) and (max-width: 799px) and (min-height: 741px) and (max-height: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 799px) and (max-device-height: 1024px), screen and (orientation: landscape) and (min-height: 515px) and (max-height: 799px) and (min-width: 741px) and (max-width: 1024px) and (max-device-width: 1024px) and (max-device-height: 799px) { - /* line 196, ../sass/mobile/_layout.scss */ + /* line 203, ../sass/mobile/_layout.scss */ .tree-holder { overflow-x: hidden !important; } } diff --git a/platform/commonUI/general/res/sass/mobile/_layout.scss b/platform/commonUI/general/res/sass/mobile/_layout.scss index b7704681e7..c36d513671 100644 --- a/platform/commonUI/general/res/sass/mobile/_layout.scss +++ b/platform/commonUI/general/res/sass/mobile/_layout.scss @@ -186,6 +186,13 @@ } } +// Hides objects on phone and tablet +.mobile-unhide { + @include phoneandtablet { + display: inline-block; + } +} + // Hides objects only on the phone .phone-hide { @include phone { diff --git a/platform/commonUI/general/src/services/UrlService.js b/platform/commonUI/general/src/services/UrlService.js index 3363dc1d49..edb5f6235b 100644 --- a/platform/commonUI/general/src/services/UrlService.js +++ b/platform/commonUI/general/src/services/UrlService.js @@ -55,14 +55,6 @@ define( return path; } -// function idForLevelArrow(domainObject) { -// var context = domainObject && -// domainObject.getCapability('context'), -// objectPath = context ? context.getPath() : [], -// id = objectPath[objectPath.length - 2]; -// return id; -// } - // Uses the Url for the current location // from the urlForLocation function and // includes the view and the index path @@ -93,8 +85,6 @@ define( * to get the path of */ urlForLocation: urlForLocation - -// idForLevelArrow: idForLevelArrow }; }