1
|
var module = angular.module('isManager', ['ngRoute', 'isManagerControllers']);
|
2
|
|
3
|
module.config([
|
4
|
'$routeProvider',
|
5
|
function($routeProvider) {
|
6
|
$routeProvider
|
7
|
.when('/services', { templateUrl: '../resources/html/is_templates/services.html', controller: 'servicesCtrl' })
|
8
|
.when('/service/:id', { templateUrl: '../resources/html/is_templates/service.html', controller: 'serviceCtrl' })
|
9
|
.when('/types', { templateUrl: '../resources/html/is_templates/types.html', controller: 'typesCtrl' })
|
10
|
.when('/dsList/:type/:format', { templateUrl: '../resources/html/is_templates/dsList.html', controller: 'dsListCtrl' })
|
11
|
.when('/ds/:id/:format', { templateUrl: '../resources/html/is_templates/ds.html', controller: 'dsCtrl' })
|
12
|
.when('/q', { templateUrl: '../resources/html/is_templates/isQuery.html', controller: 'isQueryCtrl' })
|
13
|
.when('/bulk', { templateUrl: '../resources/html/is_templates/bulk.html', controller: 'bulkImporterCtrl' })
|
14
|
.when('/blackboard', { templateUrl: '../resources/html/is_templates/blackboard.html', controller: 'blackboardCtrl' })
|
15
|
.when('/backup', { templateUrl: '../resources/html/is_templates/backup.html', controller: 'backupCtrl' })
|
16
|
.otherwise({ redirectTo: '/services' });
|
17
|
}
|
18
|
]);
|
19
|
|
20
|
module.controller('moduleMenuCtrl', [ '$scope', '$location',
|
21
|
function ($scope, $location) {
|
22
|
$scope.isActive = function(regex) {
|
23
|
var re = new RegExp(regex);
|
24
|
return re.test($location.path());
|
25
|
}
|
26
|
}
|
27
|
]);
|
28
|
|
29
|
module.filter('encodeURIComponent', function() {
|
30
|
return window.encodeURIComponent;
|
31
|
});
|
32
|
|
33
|
module.filter('reverse', function () {
|
34
|
return function(items) {
|
35
|
return items.slice().reverse();
|
36
|
}
|
37
|
});
|