Project

General

Profile

1
var module = angular.module('reposUI', ['ngGrid', 'ngRoute', 'repoControllers']);
2

    
3
addCommonDirectives(module);
4

    
5
module.config([
6
	'$routeProvider',
7
	function($routeProvider) {
8
		$routeProvider
9
		.when('/browse',                           { templateUrl: '../resources/html/repoBrowse.html', controller: 'repoBrowseCtrl' })
10
		.when('/list/:param/:value',               { templateUrl: '../resources/html/repoList.html',   controller: 'repoListCtrl'   })
11
		.when('/api/:repoId/:ifaceId/:metawf/:wf', { templateUrl: './repos/repoApi.html',    controller: 'repoApiCtrl'    })
12
		.otherwise({ redirectTo: '/browse' });
13
	}
14
]);
15

    
16
module.directive('ngApiMdstoreInfo', function() {
17
	return {
18
		restrict: 'E',
19
		scope: {
20
			'label' : '@',
21
			'date'  : '=',
22
			'total' : '=',
23
			'id'    : '='
24
		},
25
		templateUrl: '../resources/html/ngApiMdstoreInfo.html'
26
	}
27
});
28

    
29
module.directive('ngApiObjectstoreInfo', function() {
30
    return {
31
        restrict: 'E',
32
        scope: {
33
            'label' : '@',
34
            'date'  : '=',
35
            'total' : '=',
36
            'id'    : '='
37
        },
38
        templateUrl: '../resources/html/ngApiObjectstoreInfo.html'
39
    }
40
});
41

    
42
module.directive('ngRepoCountryCell', function() {
43
	return {
44
		restrict: 'E',
45
		templateUrl: '../resources/html/ngRepoCountryCell.html'
46
	}
47
});
48

    
49
module.directive('ngReponameCell', function() {
50
	return {
51
		restrict: 'E',
52
		templateUrl: '../resources/html/ngRepoNameCell.html',
53
		link: function(scope, elem, attrs) {
54
			var n = scope.row.getProperty('id').lastIndexOf('::');
55
			scope.shortId = scope.row.getProperty('id').substring(n + 2);
56
		}
57
	}
58
});
59

    
60
module.directive('ngAggrDateCell', function() {
61
	return {
62
		restrict: 'E',
63
		templateUrl: '../resources/html/ngAggrDateCell.html'
64
	}
65
});
66

    
67
module.directive('ngAggrTotalCell', function() {
68
	return {
69
		restrict: 'E',
70
		templateUrl: '../resources/html/ngAggrTotalCell.html'
71
	}
72
});
(5-5/7)