mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
added ability removed from DOM not loaded scripts
This commit is contained in:
parent
f7d77430db
commit
8fa79c47eb
1 changed files with 3 additions and 26 deletions
|
|
@ -51,12 +51,7 @@ CloudCommander.Viewer.FancyBox = {
|
|||
CloudCommander.jsload(lSrc,{
|
||||
onload: pCallBack,
|
||||
|
||||
onerror: (function(){
|
||||
pParent.removeNotLoaded({src: lSrc,
|
||||
parent : pParent,
|
||||
from : document.body
|
||||
});
|
||||
|
||||
onerror: (function() {
|
||||
CloudCommander.jsload(pParent.dir +
|
||||
'jquery.fancybox.pack.js', {onload: pCallBack});
|
||||
})
|
||||
|
|
@ -69,12 +64,7 @@ CloudCommander.Viewer.FancyBox = {
|
|||
src : lSrc,
|
||||
func : {
|
||||
onload: ljsLoad_f,
|
||||
onerror: (function(){
|
||||
//pParent.removeNotLoaded({src: lSrc,
|
||||
// parent : pParent,
|
||||
// from : document.head
|
||||
//});
|
||||
|
||||
onerror: (function() {
|
||||
CloudCommander.cssLoad({
|
||||
src : pParent.dir +'jquery.fancybox.css',
|
||||
func : ljsLoad_f
|
||||
|
|
@ -116,20 +106,7 @@ CloudCommander.Viewer.FancyBox = {
|
|||
|
||||
getByClass : function(pClass){
|
||||
return document.getElementsByClassName(pClass);
|
||||
},
|
||||
|
||||
/* @pParams_o - information for deletion
|
||||
* {src: 1.js, from:document.body, parent:this
|
||||
*/
|
||||
removeNotLoaded : function(pParams_o){
|
||||
/* removing already loaded element
|
||||
* with same id
|
||||
*/
|
||||
var lId = CloudCommander._getIdBySrc(pParams_o.src);
|
||||
lId = pParams_o.parent.getById(lId);
|
||||
lId &&
|
||||
pParams_o.from.removeChild(lId);
|
||||
}
|
||||
}
|
||||
};
|
||||
CloudCommander.Viewer.Keys = (function(){
|
||||
"use strict";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue