Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/gui
In directory usw-pr-cvs1:/tmp/cvs-serv14210
Modified Files:
loadpanel.js
Log Message:
Added initial support for Mozilla/Netscape6.
Index: loadpanel.js
===================================================================
RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/gui/loadpanel.js,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** loadpanel.js 2001/01/26 23:31:20 1.8
--- loadpanel.js 2001/03/01 11:21:19 1.9
***************
*** 56,71 ****
LoadPanel.prototype.insertInlineElements = function() {
if (is.ns4 && this.isILayer) {
! this.setHTML('<ilayer></ilayer>');
}
! else {
! if (is.ie5) this.setHTML('<DIV ID="'+this.id+'loadElement"
STYLE="behavior:url(#default#download)" style="display: none;"></DIV>');
! if (is.ie4) {
! if (this.useBuffer) {
! this.setHTML('<IFRAME ID="'+this.id+'loadElement"
STYLE="visibility: hidden; display: none;"
onLoad="LoadQueue.loadHandler()"></IFRAME>');
! }
! else {
! this.setHTML('<IFRAME ID="'+this.id+'loadElement"
WIDTH="+this.getWidth()+" HEIGHT="+this.getHeight()+" STYLE="visibility: hidden;
display: none;" onLoad="LoadQueue.loadHandler()"></IFRAME>');
! }
}
}
};
--- 56,72 ----
LoadPanel.prototype.insertInlineElements = function() {
if (is.ns4 && this.isILayer) {
! this.setHTML('<ilayer></ilayer>',false);
}
! else if (is.ns6) {
! this.setHTML('<IFRAME ID="'+this.id+'loadElement" STYLE="visibility:
hidden;"></IFRAME>',false);
! }
! else if (is.ie5) this.setHTML('<DIV ID="'+this.id+'loadElement"
STYLE="behavior:url(#default#download)" style="display: none;"></DIV>',false);
! else if (is.ie4) {
! if (this.useBuffer) {
! this.setHTML('<IFRAME ID="'+this.id+'loadElement"
STYLE="visibility: hidden; display: none;"
onLoad="LoadQueue.loadHandler()"></IFRAME>',false);
}
+ else {
+ this.setHTML('<IFRAME ID="'+this.id+'loadElement"
+WIDTH="+this.getWidth()+" HEIGHT="+this.getHeight()+" STYLE="visibility: hidden;
+display: none;" onLoad="LoadQueue.loadHandler()"></IFRAME>',false);
+ }
}
};
***************
*** 79,82 ****
--- 80,86 ----
}
}
+ else if (is.ns6) {
+ this.loadElement = document.getElementById(this.id+'loadElement');
+ }
else if (is.ie) {
if (this.isIFrame) {
***************
*** 109,113 ****
else LoadPanel.queue.add(url,this);
};
! LoadPanel.prototype.reload = function() {
this.isReloading = true;
var url = this.url;
--- 113,117 ----
else LoadPanel.queue.add(url,this);
};
! LoadPanel.prototype.reload = function() {
this.isReloading = true;
var url = this.url;
***************
*** 124,127 ****
--- 128,135 ----
var h = this.loadElement.document.height;
}
+ else if (is.ns6) {
+ var w = this.loadElement.offsetWidth;
+ var h = this.loadElement.offsetHeight;
+ }
else {
var w = this.getContentWidth();
***************
*** 158,161 ****
--- 166,177 ----
lpanel.loadElement.src=url;
}
+ else if (is.ns6) {
+ if (!document.getElementById(lpanel.id+"loadElement")) {
+ lpanel.insertInlineElements();
+ lpanel.findInlineElements();
+ }
+ lpanel.timerID=setInterval(this.toString() +
+'.loadTimer()',250);
+ lpanel.loadElement.src=url;
+ }
else if (is.ie5) {
lpanel.loadElement.startDownload(url,LoadQueue.loadHandler);
***************
*** 169,172 ****
--- 185,200 ----
}
};
+ // This function checks the LoadPanel has not been destroyed while the document was
+still loading. Should be used for IE4 also.
+ LoadQueue.prototype.loadTimer = function() {
+ var lpanel = this.currentLoadPanel;
+ if (!document.getElementById(lpanel.id+'loadElement')) {
+ clearInterval(lpanel.timerID);
+ LoadQueue.continueLoad();
+ }
+ else if (lpanel.loadElement.contentDocument &&
+lpanel.loadElement.contentDocument.body.innerHTML != document.body.innerHTML) {
+ clearInterval(lpanel.timerID);
+ LoadQueue.loadHandler(lpanel.loadElement.contentDocument);
+ }
+ }
LoadQueue.loadHandler = function(e) {
var q = LoadPanel.queue;
***************
*** 177,181 ****
lyr.innerHTML=e;
}
! if (is.ns4) {
var lyr = lp.elm;
while(lyr.parentLayer != window) lyr = lyr.parentLayer;
--- 205,217 ----
lyr.innerHTML=e;
}
! else if (is.ns6) {
! var html = e.body.innerHTML;
! var buffer = document.createElement("DIV");
! buffer.innerHTML = html;
! while (lp.elm.hasChildNodes())
lp.elm.removeChild(lp.elm.firstChild);
! lp.elm.appendChild(buffer);
! lp.loadElement = buffer;
! }
! else if (is.ns4) {
var lyr = lp.elm;
while(lyr.parentLayer != window) lyr = lyr.parentLayer;
***************
*** 190,196 ****
q.currentLoadPanel.loadHandler(q.currentURL);
q.busy=false;
! if (is.ns4) window.stop();
if (q.queue[q.index]) q.loadNext();
else DynAPI.document.captureMouseEvents();
};
! LoadPanel.queue = new LoadQueue();
--- 226,233 ----
q.currentLoadPanel.loadHandler(q.currentURL);
q.busy=false;
! // CAM 2001-01-15 The line below breaks netscape when loading large pages
! //if (is.ns4) window.stop();
if (q.queue[q.index]) q.loadNext();
else DynAPI.document.captureMouseEvents();
};
! LoadPanel.queue = new LoadQueue();
\ No newline at end of file
_______________________________________________
Dynapi-CVS mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-cvs