fixed bug in not fully functional browsers, jquery loaded after ie.js, should be before

This commit is contained in:
coderaiser 2012-12-17 06:27:12 -05:00
parent f7f78c77ff
commit 8be405dfe0
5 changed files with 25 additions and 10 deletions

View file

@ -19,6 +19,9 @@ and Util.setTimeout(pFunction [, pCallBack, pTime])
* If choosen upload to -> Gist, and file in json have
not '.json' extension, it's added to the and of filename.
* Fixed bug in not fully functional browsers,
jquery loaded after ie.js, should be before.
2012.12.12, Version 0.1.8

View file

@ -238,10 +238,11 @@ CloudClient.init = function(){
if(!document.body.scrollIntoViewIfNeeded){
this.OLD_BROWSER = true;
DOM.jsload(CloudClient.LIBDIRCLIENT + 'ie.js',
function(){
DOM.jqueryLoad( lFunc );
});
var lSrc = CloudClient.LIBDIRCLIENT + 'ie.js';
DOM.jqueryLoad(
DOM.retJSLoad(lSrc, lFunc)
);
}else
lFunc();
};

View file

@ -535,7 +535,7 @@ var CloudCommander, Util, DOM, CloudFunc;
* @param pFunc
*/
DOM.jsload = function(pSrc, pFunc){
if(pSrc instanceof Array){
if( Util.isArray(pSrc) ){
for(var i=0; i < pSrc.length; i++)
pSrc[i].name = 'script';
@ -549,6 +549,17 @@ var CloudCommander, Util, DOM, CloudFunc;
});
},
/**
* returns jsload functions
*/
DOM.retJSLoad = function(pSrc, pFunc){
var lRet = function(){
return DOM.jsload(pSrc, pFunc);
};
return lRet;
},
/**
* Функция создаёт елемент style и записывает туда стили
* @param pParams_o - структура параметров, заполняеться таким
@ -559,7 +570,7 @@ var CloudCommander, Util, DOM, CloudFunc;
pParams_o.name = 'style';
pParams_o.parent = pParams_o.parent || document.head;
return DOM.anyload(pParams_o);
return DOM.anyload(pParams_o);
},
/**

View file

@ -77,14 +77,14 @@ var Util, DOM, $;
https://gist.github.com/2581101
*/
centerIfNeeded = arguments.length === 0 ? true : !!centerIfNeeded;
var parent = pElement.parentNode,
parentComputedStyle = window.getComputedStyle(parent, null),
parentBorderTopWidth =
parseInt(parentComputedStyle.getPropertyValue('border-top-width')),
parseInt(parentComputedStyle.getPropertyValue('border-top-width'), 10),
parentBorderLeftWidth =
parseInt(parentComputedStyle.getPropertyValue('border-left-width')),
parseInt(parentComputedStyle.getPropertyValue('border-left-width'), 10),
overTop = pElement.offsetTop - parent.offsetTop < parent.scrollTop,
overBottom =

View file

@ -6,7 +6,7 @@
"es5" : true,
"forin" : true,
"globalstrict" : true,
"jquery" : true,
"jquery" : false,
"newcap" : true,
"noarg" : true,
"node" : true,