Last change
on this file since 12435 was
12435,
checked in by dglaser, 9 years ago
|
#2394: Improved PluginManager and updated hive status monitor.
|
File size:
1.4 KB
|
Line | |
---|
1 | (function () {
|
---|
2 | var module = appMainPlugin.getAngularModule();
|
---|
3 | module.controller('app.menu.ctrl',
|
---|
4 | ['$scope', '$timeout', '$location', '$window', 'app.authentication.service',
|
---|
5 | function ($scope, $timeout, $location, $window, authService) {
|
---|
6 | $scope.modules = app.modules;
|
---|
7 | $scope.menuEntries = app.getMenu().getMenuEntries();
|
---|
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;
|
---|
17 | }
|
---|
18 | }
|
---|
19 | }
|
---|
20 | return $location.path().toUpperCase() == loc;
|
---|
21 | };
|
---|
22 |
|
---|
23 | $scope.logout = function() {
|
---|
24 | authService.logout({}, function() {
|
---|
25 | $window.location.hash = "";
|
---|
26 | $window.location.reload();
|
---|
27 | });
|
---|
28 | };
|
---|
29 |
|
---|
30 | $scope.hideMenu = function() {
|
---|
31 | $(".navbar-collapse").collapse('hide');
|
---|
32 | };
|
---|
33 | }]
|
---|
34 | );
|
---|
35 | })(); |
---|
Note: See
TracBrowser
for help on using the repository browser.