Project

General

Profile

1
var module = angular.module('indexInspector', ['ngRoute', 'indexInspectorControllers']);
2

    
3
module.config([
4
	'$routeProvider',
5
	function($routeProvider) {
6
		$routeProvider
7
			.when('/query',		                                    { templateUrl: '../resources/html/index/indexQuery.html', controller: 'indexQueryController' })
8
			.when('/query/:mdformat/:backend/:index/:start/:query', { templateUrl: '../resources/html/index/indexQuery.html', controller: 'indexQueryController' })
9
			.when('/browse',	{ templateUrl: '../resources/html/index/browse.html', controller: 'indexBrowseController' })
10
			.when('/manage',	{ templateUrl: '../resources/html/index/indexManage.html', controller: 'indexmanageController' })
11
			.when('/deletebyquery',	{ templateUrl: '../resources/html/index/deletebyquery.html', controller: 'indexdbqController' })
12
			.otherwise({ redirectTo: '/query' });
13
	}
14
]);
15

    
16

    
17
module.controller('moduleMenuCtrl', [ '$scope', '$location',
18
	function ($scope, $location) {
19
		$scope.isActive = function(regex) {
20
			var re = new RegExp(regex);
21
			return re.test($location.path());
22
		}
23
	}
24
]);
25

    
26
module.filter('encodeURIComponent', function() {
27
	return window.encodeURIComponent;
28
});
(1-1/2)