-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
78 lines (61 loc) · 2 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
(function (window, angular, undefined) {
'use strict';
angular.module('mgApp', ['ui.bootstrap', 'google-maps'])
.config(function ($routeProvider, $compileProvider) {
// Allow tel: links
$compileProvider.urlSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|tel):/);
$routeProvider
.when('/Login', {
templateUrl: 'views/Login.html',
controller: 'Login'
})
.when('/WorkOrderList', {
templateUrl: 'views/WorkOrderList.html',
controller: 'WorkOrderList'
})
.when('/USRN/:WONUM', {
templateUrl: 'views/USRN.html',
controller: 'USRN'
})
.when('/Summary/:WONUM/:USRN', {
templateUrl: 'views/USRNSummary.html',
controller: 'USRNSummary'
})
.when('/Photo/:WONUM/:USRN', {
templateUrl: 'views/Photo.html',
controller: 'PhotoCtrl'
})
.when('/Location/:WONUM/:USRN', {
templateUrl: 'views/Location.html',
controller: 'Location'
})
.when('/Location/:WONUM/:USRN/Map', {
templateUrl: 'views/LocationMap.html',
controller: 'LocationMap'
})
.when('/DefectType/:WONUM/:USRN', {
templateUrl: 'views/DefectType.html',
controller: 'DefectType'
})
.when('/DefectDetails/:WONUM/:USRN', {
templateUrl: 'views/DefectDetails.html',
controller: 'DefectDetails'
})
.when('/RaiseDefect/:WONUM/:USRN', {
templateUrl: 'views/RaiseDefect.html',
controller: 'RaiseDefect'
})
.otherwise({
redirectTo: '/Login'
});
}).run(function (navigation, syncManager, $rootScope) {
window.$rootScope = $rootScope;
document.addEventListener("deviceready", function () {
document.addEventListener("backbutton", function (e) {
e.preventDefault();
window.$rootScope.$broadcast("Evt.backbutton");
}, false);
}, false);
navigation.restore();
});
})(window, window.angular);