Welcome to mirror list, hosted at ThFree Co, Russian Federation.

app.js « scripts « ngax « webroot « Server « Duplicati - github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6f6a05cb0d319f36a9c8c464a59d0cbff1b9dcd3 (plain)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
var backupApp = angular.module(
    'backupApp', 
    [
        'ngRoute', 
        'dotjem.angular.tree',
        'ngCookies',
        'ngSanitize',
        'gettext',
        'ngclipboard'
    ]
);

backupApp.constant('appConfig', {
    login_url: '/login.html'
});

backupApp.config(['$routeProvider',
    function($routeProvider) {
        $routeProvider.
            when('/home', {
                templateUrl: 'templates/home.html'
            }).
            when('/add', {
                templateUrl: 'templates/addoredit.html'
            }).
            when('/add-import', {
                templateUrl: 'templates/addoredit.html'
            }).
            when('/restorestart', {
                templateUrl: 'templates/restorewizard.html'
            }).
            when('/addstart', {
                templateUrl: 'templates/addwizard.html'
            }).
            when('/edit/:backupid', {
                templateUrl: 'templates/addoredit.html'
            }).
            when('/restoredirect', {
                templateUrl: 'templates/restoredirect.html'
            }).
            when('/restoredirect-import', {
                templateUrl: 'templates/restoredirect.html'
            }).
            when('/restore/:backupid', {
                templateUrl: 'templates/restore.html'
            }).
            when('/settings', {
                templateUrl: 'templates/settings.html'
            }).
            when('/about', {
                templateUrl: 'templates/about.html'
            }).
            when('/delete/:backupid', {
                templateUrl: 'templates/delete.html'
            }).
            when('/log/:backupid', {
                templateUrl: 'templates/log.html'
            }).
            when('/log', {
                templateUrl: 'templates/log.html'
            }).
            when('/updatechangelog', {
                templateUrl: 'templates/updatechangelog.html'
            }).
            when('/export/:backupid', {
                templateUrl: 'templates/export.html'
            }).
            when('/import', {
                templateUrl: 'templates/import.html'
            }).
            when('/restore-import', {
                templateUrl: 'templates/import.html'
            }).
            when('/localdb/:backupid', {
                templateUrl: 'templates/localdatabase.html'
            }).
            when('/commandline', {
                templateUrl: 'templates/commandline.html'
            }).
            when('/commandline/:backupid', {
                templateUrl: 'templates/commandline.html'
            }).
            when('/commandline/view/:viewid', {
                templateUrl: 'templates/commandline.html'
            }).
            otherwise({
                templateUrl: 'templates/home.html'
                //redirectTo: '/home'
        });
}]);

backupApp.run(function($injector) {
    try {
        $injector.get('OEMService');
    } catch(e) {}
    try {
        $injector.get('CustomService');
    } catch(e) {}
    try {
        $injector.get('ProxyService');
    } catch(e) {}
});

// Registers a global parseInt function
angular.module('backupApp').run(function($rootScope){
    $rootScope.parseInt = function(str) {
        return parseInt(str);
    };  
});

// Register a global back function
/*backupApp.run(function ($rootScope, $location) {

    var history = [];
    $rootScope.$on('$routeChangeSuccess', function() {
        history.push($location.$$path);
    });

    $rootScope.back = function () {
        var prevUrl = history.length > 1 ? history.splice(-2)[0] : "/home";
        $location.path(prevUrl);
    };

});*/