js: compatible with angular 1.6
This commit is contained in:
parent
d965aab14a
commit
6047dcd6a9
3 changed files with 45 additions and 39 deletions
|
@ -362,10 +362,10 @@ angular.module("FICApp")
|
|||
}
|
||||
$scope.reset = function(type) {
|
||||
if (confirm("Êtes-vous sûr ?")) {
|
||||
$http.post("/api/reset", {"type": type}).success(function(time) {
|
||||
$http.post("/api/reset", {"type": type}).then(function(time) {
|
||||
$rootScope.newBox('success', type + 'reseted');
|
||||
$location.url("/");
|
||||
}).error(function(repsonse) {
|
||||
}, function(response) {
|
||||
$rootScope.newBox('danger', 'An error occurs when reseting ' + type + ':', response.data);
|
||||
});
|
||||
}
|
||||
|
@ -910,7 +910,7 @@ angular.module("FICApp")
|
|||
}
|
||||
}
|
||||
|
||||
$http.get("/time.json").success(function(time) {
|
||||
$http.get("/time.json").then(function(time) {
|
||||
time.he = (new Date()).getTime();
|
||||
sessionStorage.userService = angular.toJson(time);
|
||||
updTime();
|
||||
|
|
Reference in a new issue