dashboard: Allow countdown to be hidden
This commit is contained in:
parent
17d140d7cc
commit
11662d8c5e
1 changed files with 11 additions and 8 deletions
|
@ -240,6 +240,17 @@ angular.module("FICApp")
|
||||||
});
|
});
|
||||||
|
|
||||||
angular.module("FICApp")
|
angular.module("FICApp")
|
||||||
|
.run(function($rootScope) {
|
||||||
|
$rootScope.recvTime = function(response) {
|
||||||
|
time = {
|
||||||
|
"cu": Math.floor(response.headers("x-fic-time") * 1000),
|
||||||
|
"he": (new Date()).getTime(),
|
||||||
|
};
|
||||||
|
sessionStorage.time = angular.toJson(time);
|
||||||
|
return time;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
.controller("CountdownController", function($scope, $rootScope, $interval) {
|
.controller("CountdownController", function($scope, $rootScope, $interval) {
|
||||||
var time;
|
var time;
|
||||||
if (sessionStorage.time)
|
if (sessionStorage.time)
|
||||||
|
@ -253,14 +264,6 @@ angular.module("FICApp")
|
||||||
else
|
else
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
$rootScope.recvTime = function(response) {
|
|
||||||
time = {
|
|
||||||
"cu": Math.floor(response.headers("x-fic-time") * 1000),
|
|
||||||
"he": (new Date()).getTime(),
|
|
||||||
};
|
|
||||||
sessionStorage.time = angular.toJson(time);
|
|
||||||
return time;
|
|
||||||
}
|
|
||||||
|
|
||||||
function updTime() {
|
function updTime() {
|
||||||
if (time && $rootScope.settings && $rootScope.settings.end) {
|
if (time && $rootScope.settings && $rootScope.settings.end) {
|
||||||
|
|
Reference in a new issue