-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsettings.js
More file actions
67 lines (57 loc) · 2.48 KB
/
settings.js
File metadata and controls
67 lines (57 loc) · 2.48 KB
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
'use strict';
require(SIMRacingAppsRequireConfig,
['angular','angular-sanitize'],
function( angular,angularSanitize ) {
angular.element(document).ready(function() {
var module = angular.module('SIMRacingApps',['ngSanitize']);
//call modules configuration function
module.config(
['$locationProvider',
function($locationProvider) {
$locationProvider.html5Mode(true); //this is for the $location service to work right.
}]);
module.controller("SIMRacingApps-Controller",
['$scope', '$http', '$window', '$location',
function($scope,$http,$window,$location) {
$scope.headers = {};
$scope.listings = {};
$scope.version = {};
$scope.versionString = "";
// sraDispatcher.loadTranslations("/SIMRacingApps","text",function(path) {
// $scope.translations = sraDispatcher.getTranslation(path,"auto");
// });
var request = {
method: 'GET',
url: '/SIMRacingApps/listings',
cache: false,
timeout: 5000
};
$http(request)
.success(function(data, status, headers, config) {
$scope.version = data.version;
$scope.headers = data.headers;
})
.error(function(data, status, headers, config) {
// called asynchronously if an error occurs
// or server returns response with an error status.
console.log("error - "+status);
});
$http({
method: 'GET',
url: '/SIMRacingApps/settings',
cache: false,
timeout: 5000
})
.success(function(data, status, headers, config) {
console.log("SIMRacingApps.com/settings: success");
$scope.settings = data;
})
.error(function(data, status, headers, config) {
// called asynchronously if an error occurs
// or server returns response with an error status.
console.log("SIMRacingApps.com/settings: error - "+status);
});
}]);
angular.bootstrap(document.body,['SIMRacingApps']);
});
});