1
|
var module = angular.module('isManager', ['ngRoute', 'isManagerControllers']);
|
2
|
|
3
|
module.config([
|
4
|
'$routeProvider',
|
5
|
function($routeProvider) {
|
6
|
$routeProvider
|
7
|
.when('/list', { templateUrl: '../resources/html/is/list.html', controller: 'listCollectionsCtrl' })
|
8
|
.when('/profiles/:kind/:type', { templateUrl: '../resources/html/is/profiles.html', controller: 'profilesCtrl' })
|
9
|
.when('/profile/:id', { templateUrl: '../resources/html/is/profile.html', controller: 'profileCtrl' })
|
10
|
.when('/schemas', { templateUrl: '../resources/html/is/schemas.html', controller: 'schemasCtrl' })
|
11
|
.when('/schema/:name', { templateUrl: '../resources/html/is/schema.html', controller: 'schemaCtrl' })
|
12
|
.when('/services', { templateUrl: '../resources/html/is/services.html', controller: 'servicesCtrl' })
|
13
|
.when('/q', { templateUrl: '../resources/html/is/isQuery.html', controller: 'isQueryCtrl' })
|
14
|
.when('/register', { templateUrl: '../resources/html/is/register.html', controller: 'registerProfileCtrl' })
|
15
|
.when('/bulk', { templateUrl: '../resources/html/is/bulk.html', controller: 'bulkImporterCtrl' })
|
16
|
.when('/verify', { templateUrl: '../resources/html/is/verify.html', controller: 'validateProvilesCtrl' })
|
17
|
.when('/blackboard', { templateUrl: '../resources/html/is/blackboard.html', controller: 'blackboardCtrl' })
|
18
|
.when('/backup', { templateUrl: '../resources/html/is/backup.html', controller: 'backupCtrl' })
|
19
|
.otherwise({ redirectTo: '/list' });
|
20
|
}
|
21
|
]);
|
22
|
|
23
|
|
24
|
module.controller('moduleMenuCtrl', [ '$scope', '$location',
|
25
|
function ($scope, $location) {
|
26
|
$scope.isActive = function(regex) {
|
27
|
var re = new RegExp(regex);
|
28
|
return re.test($location.path());
|
29
|
}
|
30
|
}
|
31
|
]);
|
32
|
|
33
|
module.filter('encodeURIComponent', function() {
|
34
|
return window.encodeURIComponent;
|
35
|
});
|
36
|
|
37
|
module.filter('reverse', function () {
|
38
|
return function(items) {
|
39
|
return items.slice().reverse();
|
40
|
}
|
41
|
});
|