Fixed JS loadFinished notification on IE

This commit is contained in:
Andreas Stöckel 2010-07-21 10:26:54 +00:00
parent 4da973400c
commit 9615c33fe8

View File

@ -432,17 +432,28 @@ egw_json_request.prototype.handleResponse = function(data, textStatus, XMLHttpRe
}; };
//IE //IE
scriptnode.onreadystatechange = function() { if (typeof scriptnode.readyState != 'undefined')
var node = window.event.srcElement; {
if (node.readyState == 'complete') { if (scriptnode.readyState != 'complete' &&
var file = node._originalSrc; scriptnode.readyState != 'loaded')
if (typeof console != 'undefined' && typeof console.log != 'undefined') {
console.log("Retrieved JS file '%s' from server", [file]); scriptnode.onreadystatechange = function() {
var node = window.event.srcElement;
if (node.readyState == 'complete' || node.readState == 'loaded') {
var file = node._originalSrc;
if (typeof console != 'undefined' && typeof console.log != 'undefined')
console.log("Retrieved JS file '%s' from server", [file]);
self.loadedJSFiles[file] = true; self.loadedJSFiles[file] = true;
self.checkLoadFinish(); self.checkLoadFinish();
}
};
} }
}; else
{
this.loadedJSFiles[res.data] = true;
}
}
} }
hasResponse = true; hasResponse = true;
} else } else