refactored

This commit is contained in:
coderaiser 2013-01-22 06:38:31 -05:00
parent 8ac0feb065
commit 13aa3f769f
6 changed files with 20 additions and 19 deletions

View file

@ -36,11 +36,11 @@
</div>
<script src=/lib/util.js></script>
<script src=/lib/client/dom.js></script>
<script src=/lib/client.js></script>
<!--[if lt IE 9]>
<script src="//ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js" async></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" id=jquery_min_js ></script>
<!--[if lt IE]>
<script src=//ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js></script>
<script src=//code.jquery.com/jquery-1.9.0.min.js id=jquery-1_9_0_min_js ></script>
<script src=/lib/client/ie.js id=ie_js ></script>
<![endif]-->
<script src=/lib/client.js></script>
</body>
</html>

View file

@ -324,7 +324,7 @@ function initKeysPanel(pCallBack){
}
function baseInit(pCallBack){
if(applicationCache){
if(window.applicationCache){
var lFunc = applicationCache.onupdateready;
applicationCache.onupdateready = function(){
@ -760,8 +760,7 @@ return CloudCmd;
})();
DOM.addOneTimeListener('load', function cloudcmdLoad(){
DOM.removeListener('load', cloudcmdLoad);
DOM.addOneTimeListener('load', function(){
/* базовая инициализация*/
CloudCommander.init();

View file

@ -3,7 +3,7 @@ var CloudCommander, Util,
CloudFunc;
(function(Util, DOM){
"use strict";
'use strict';
/* PRIVATE */

View file

@ -1,9 +1,12 @@
/* script, fixes ie */
var Util, DOM, $;
//var Util, DOM, jQuery;
(function(Util, DOM, $){
"use strict";
'use strict';
if(!window.XMLHttpRequest || !document.head)
DOM.ajax = $.ajax;
/* setting head ie6 - ie8 */
if(!document.head){
document.head = $('head')[0];
@ -49,7 +52,7 @@ var Util, DOM, $;
return $(pElement || window).bind(pType, null, pListener);
};
if(document.removeEventListener){
if(!document.removeEventListener){
DOM.removeListener = function(pType, pListener, pCapture, pElement){
return $(pElement || window).unbind(pType, pListener);
};
@ -70,6 +73,8 @@ var Util, DOM, $;
/* function polyfill webkit standart function */
DOM.scrollIntoViewIfNeeded = function(pElement, centerIfNeeded){
if(!window.getComputedStyle)
return;
/*
https://gist.github.com/2581101
*/
@ -146,9 +151,6 @@ var Util, DOM, $;
};
}
if(!window.XMLHttpRequest)
DOM.ajax = $.ajax;
if(!window.JSON){
Util.parseJSON = $.parseJSON;
@ -249,4 +251,4 @@ var Util, DOM, $;
}
})(Util, DOM, $);
})(Util, DOM, jQuery);

View file

@ -132,10 +132,10 @@
* @param pGzip - данные сжаты gzip'ом
*/
function generateHeaders(pName, pGzip, pQuery){
var lType = '',
lCacheControl = 0,
var lRet,
lType = '',
lContentEncoding = '',
lRet,
lCacheControl = 0,
lDot = pName.lastIndexOf('.'),
lExt = pName.substr(lDot);

View file

@ -6,7 +6,7 @@ var Util, exports;
Util = exports || {};
(function(Util){
"use strict";
'use strict';
var Scope = exports ? global : window;