Changeset 12520 for trunk/sources/HeuristicLab.Services.WebApp/3.3
- Timestamp:
- 06/26/15 10:30:43 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Services.WebApp/3.3/WebApp/shared/menu/menuCtrl.js
r12435 r12520 7 7 $scope.menuEntries = app.getMenu().getMenuEntries(); 8 8 $scope.isActive = function (viewLocation) { 9 var loc = viewLocation.toUpperCase().substr(1); 10 var actualLocation = $location.path().toUpperCase(); 11 var splitLoc = loc.split("/"); 12 if (splitLoc.length <= 2) { 13 var actualLocationSplit = actualLocation.split("/"); 14 if (actualLocationSplit.length > 1) { 15 if (splitLoc[1] == actualLocationSplit[1]) { 16 return true; 9 var linkLocation = viewLocation.toUpperCase().substr(1); 10 var currentLocation = $location.path().toUpperCase(); 11 if (linkLocation == currentLocation) { 12 return true; 13 } 14 var linkLocationParts = linkLocation.split("/"); 15 var currentLocationParts = currentLocation.split("/"); 16 var linkLocationPartsLength = linkLocationParts.length; 17 if (linkLocationPartsLength < currentLocationParts.length) { 18 for (var i = 0; i < linkLocationPartsLength; ++i) { 19 if (linkLocationParts[i] !== currentLocationParts[i]) { 20 return false; 17 21 } 18 22 } 23 return true; 19 24 } 20 return $location.path().toUpperCase() == loc;25 return false; 21 26 }; 22 27 23 $scope.logout = function () {24 authService.logout({}, function () {28 $scope.logout = function () { 29 authService.logout({}, function () { 25 30 $window.location.hash = ""; 26 31 $window.location.reload(); … … 28 33 }; 29 34 30 $scope.hideMenu = function () {35 $scope.hideMenu = function () { 31 36 $(".navbar-collapse").collapse('hide'); 32 37 };
Note: See TracChangeset
for help on using the changeset viewer.