diff --git a/client.js b/client.js index 377090b8..23dbfa90 100644 --- a/client.js +++ b/client.js @@ -406,8 +406,9 @@ function initModules(){ } function baseInit(){ - if(applicationCache){ + if(applicationCache){ var lFunc = applicationCache.onupdateready; + applicationCache.onupdateready = function(){ console.log('app cacheed'); location.reload(); @@ -466,7 +467,6 @@ function baseInit(){ cloudcmd.HEIGHT = lHeight; DOM.cssSet({id:'cloudcmd', - element:document.head, inner: '.panel{' + 'height:' + lHeight +'px;' + diff --git a/lib/client/dom.js b/lib/client/dom.js index c4997093..4b70e0ab 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -751,6 +751,21 @@ var CloudCommander, $, Util, DOM; }; + /** + * function gets time + */ + DOM.getTime = function(){ + var date = new Date(), + hours = date.getHours(), + minutes = date.getMinutes(), + seconds = date.getSeconds(); + + minutes = minutes < 10 ? '0' + minutes : minutes; + seconds = seconds < 10 ? '0' + seconds : seconds; + + return hours + ":" + minutes + ":" + seconds; + }; + DOM.CloudStatus = []; DOM.addCloudStatus = function(pStatus){ diff --git a/lib/client/google_analytics.js b/lib/client/google_analytics.js index 12c8b1cd..82396855 100644 --- a/lib/client/google_analytics.js +++ b/lib/client/google_analytics.js @@ -1,4 +1,4 @@ -var CloudCommander, _gaq; +var CloudCommander, DOM, _gaq; (function(){ "use strict"; @@ -19,5 +19,5 @@ var CloudCommander, _gaq; return preventErrorAlert; }; - CloudCommander.Util.jsload('http://google-analytics.com/ga.js'); + DOM.jsload('http://google-analytics.com/ga.js'); })(); \ No newline at end of file diff --git a/lib/client/ie.js b/lib/client/ie.js index 48e2b37e..8d956b5b 100644 --- a/lib/client/ie.js +++ b/lib/client/ie.js @@ -1,5 +1,5 @@ /* script, fixes ie */ -var CloudCommander, $; +var CloudCommander, DOM, $; (function(){ "use strict"; @@ -12,7 +12,7 @@ var CloudCommander, $; {name: '', src: ' ',func: '', style: '', id: '', parent: '', async: false, inner: 'id{color:red, }, class:'', not_append: false} */ - lUtil.cssSet = function(pParams_o){ + DOM.cssSet = function(pParams_o){ var lElement = '