settings: new option to postpone the activation of the given settings file
This commit is contained in:
parent
8e6b8829ea
commit
9be56fb9a2
5 changed files with 47 additions and 16 deletions
|
@ -144,15 +144,16 @@ angular.module("FICApp")
|
|||
"he": (new Date()).getTime(),
|
||||
};
|
||||
sessionStorage.userService = angular.toJson(time);
|
||||
return time;
|
||||
}
|
||||
|
||||
function updTime() {
|
||||
if (time && $rootScope.settings) {
|
||||
var srv_cur = new Date(Date.now() + (time.cu - time.he));
|
||||
|
||||
// Refresh on start time reached
|
||||
if (Math.floor($rootScope.settings.start / 1000) == Math.floor(srv_cur / 1000))
|
||||
$rootScope.refresh(true);
|
||||
// Refresh on start/activate time reached
|
||||
if (Math.floor($rootScope.settings.start / 1000) == Math.floor(srv_cur / 1000) ||Math.floor($rootScope.settings.activateTime / 1000) == Math.floor(srv_cur / 1000))
|
||||
$rootScope.refresh(true, true);
|
||||
|
||||
var remain = 0;
|
||||
if ($rootScope.settings.start == 0) {
|
||||
|
|
Reference in a new issue