You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(17) |
Nov
(47) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(44) |
Feb
(8) |
Mar
|
Apr
(26) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2003 |
Jan
|
Feb
(1) |
Mar
(44) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(13) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Robert R. <rai...@us...> - 2002-01-11 20:49:17
|
Update of /cvsroot/dynapi/dynapi2x/src/dynapi/fx In directory usw-pr-cvs1:/tmp/cvs-serv14881/fx Log Message: Directory /cvsroot/dynapi/dynapi2x/src/dynapi/fx added to the repository |
From: Robert R. <rai...@us...> - 2002-01-11 20:49:09
|
Update of /cvsroot/dynapi/dynapi2x/src/dynapi In directory usw-pr-cvs1:/tmp/cvs-serv14833/dynapi Log Message: Directory /cvsroot/dynapi/dynapi2x/src/dynapi added to the repository |
From: Robert R. <rai...@us...> - 2002-01-11 20:48:56
|
Update of /cvsroot/dynapi/dynapi2x/examples/mypackage In directory usw-pr-cvs1:/tmp/cvs-serv14750/mypackage Log Message: Directory /cvsroot/dynapi/dynapi2x/examples/mypackage added to the repository |
From: Robert R. <rai...@us...> - 2002-01-11 20:48:50
|
Update of /cvsroot/dynapi/dynapi2x/examples In directory usw-pr-cvs1:/tmp/cvs-serv14710/examples Log Message: Directory /cvsroot/dynapi/dynapi2x/examples added to the repository |
From: Robert R. <rai...@us...> - 2002-01-11 20:48:50
|
Update of /cvsroot/dynapi/dynapi2x/src In directory usw-pr-cvs1:/tmp/cvs-serv14710/src Log Message: Directory /cvsroot/dynapi/dynapi2x/src added to the repository |
From: Robert R. <rai...@us...> - 2002-01-11 20:48:05
|
Update of /cvsroot/dynapi/dynapi2x In directory usw-pr-cvs1:/tmp/cvs-serv14575 Log Message: Status: Vendor Tag: tcvs-vendor Release Tags: tcvs-release No conflicts created by this import ***** Bogus filespec: - ***** Bogus filespec: Imported ***** Bogus filespec: sources |
From: Jordi M. <do...@us...> - 2002-01-04 14:25:24
|
Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/util In directory usw-pr-cvs1:/tmp/cvs-serv19253/src/lib/dynapi/util Modified Files: pathanim.js Log Message: Many bugfixes and improvements. Index: pathanim.js =================================================================== RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/util/pathanim.js,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** pathanim.js 2001/08/14 21:35:48 1.13 --- pathanim.js 2002/01/04 14:25:18 1.14 *************** *** 64,68 **** anim.frame += 1; } ! if (anim.frame>=anim.length/2) { if (anim.loops) { anim.frame = 0; --- 64,68 ---- anim.frame += 1; } ! if (anim.frame>anim.length/2) { if (anim.loops) { anim.frame = 0; |
From: Jordi M. <do...@us...> - 2002-01-04 14:25:24
|
Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/event In directory usw-pr-cvs1:/tmp/cvs-serv19253/src/lib/dynapi/event Modified Files: dragevent.js keyboard.js listeners.js mouse.js Log Message: Many bugfixes and improvements. Index: dragevent.js =================================================================== RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/event/dragevent.js,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** dragevent.js 2001/11/24 23:26:32 1.14 --- dragevent.js 2002/01/04 14:25:18 1.15 *************** *** 23,27 **** DragEvent.lyrListener=new EventListener(); DragEvent.lyrListener.onmousedown=function(e) { - //fix to allow forms in draggable layers to select text. if (is.def&&e.orig) { --- 23,26 ---- *************** *** 50,54 **** de.parentPageY=lyr.parent.getPageY(); }; - DragEvent.docListener=new EventListener(); DragEvent.docListener.onmousemove=function(e) { --- 49,52 ---- *************** *** 127,135 **** //refresh screen to display form objects in draggable layers if(lyr.doc.forms.length>0){ ! if (is.ie && is.platform=="mac") { ! document.body.className = document.body.className; ! }else if (is.ns4 && is.platform=="win32") { ! document.bgColor = document.bgColor; ! } } --- 125,130 ---- //refresh screen to display form objects in draggable layers if(lyr.doc.forms.length>0){ ! if (is.ie && is.platform=="mac") document.body.className = document.body.className; ! else if (is.ns4 && is.platform=="win32") document.bgColor = document.bgColor; } *************** *** 157,161 **** dlyr.addEventListener(DragEvent.lyrListener); var dyndoc=doc||DynAPI.document; ! if (dlyr.frame) dyndoc=dlyr.frame.lyrobj; dyndoc.addEventListener(DragEvent.docListener); dyndoc.dragEnabled=true; --- 152,156 ---- dlyr.addEventListener(DragEvent.lyrListener); var dyndoc=doc||DynAPI.document; ! if (dlyr.frame) dyndoc=dlyr.frame.lyrobj; dyndoc.addEventListener(DragEvent.docListener); dyndoc.dragEnabled=true; Index: keyboard.js =================================================================== RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/event/keyboard.js,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** keyboard.js 2001/10/28 21:29:33 1.12 --- keyboard.js 2002/01/04 14:25:18 1.13 *************** *** 29,37 **** if (is.ie) var e=dynobject.frame.event; else if (e.eventPhase!=3) return false; ! e.cancelBubble=true; } if(is.def) var realsrc = Methods.getContainerLayerOf(is.ie?e.srcElement:e.target)||dynobject; ! else if(is.ns4) var realsrc=e.target.lyrobj; ! if (!realsrc) return true; var evt=DynKeyEvent._e; evt.type=e.type; --- 29,39 ---- if (is.ie) var e=dynobject.frame.event; else if (e.eventPhase!=3) return false; ! e.cancelBubble=true; } if(is.def) var realsrc = Methods.getContainerLayerOf(is.ie?e.srcElement:e.target)||dynobject; ! else if(is.ns4) var realsrc=e.target.lyrobj||dynobject; ! ! if (!realsrc) { alert('Error in MouseEvents'); return true; } ! var evt=DynKeyEvent._e; evt.type=e.type; *************** *** 41,49 **** --- 43,54 ---- evt.which=(is.ns4)?e.which:e.keyCode; var curKey = String.fromCharCode(evt.which).toLowerCase(); + if (((curKey>='a')&&(curKey<='z'))||((curKey>='0')&&(curKey<='9'))) evt.charKey=curKey; else evt.charKey=null; + evt.ctrlKey=(is.ns4)?(e.modifiers & Event.CONTROL_MASK):(e.ctrlKey||e.ctrlLeft||e.keyCode==17); evt.shiftKey=(is.ns4)?(e.modifiers & Event.SHIFT_MASK):(e.shiftKey||e.shiftLeft||e.keyCode==16); evt.orig=e; + realsrc.invokeEvent(evt.type,evt); evt.bubbleEvent(); *************** *** 73,135 **** }; }; - DynLayer.prototype.captureKeyEvents=function() { - if(!this.elm) return; - if(is.def&&!is.ie) { - this.elm.addEventListener("keydown",DynKeyEvent.EventMethod,false) - this.elm.addEventListener("keyup",DynKeyEvent.EventMethod,false) - this.elm.addEventListener("keypress",DynKeyEvent.EventMethod,false) - } - else { - if (is.ns4) this.elm.captureEvents(Event.KEYPRESS | Event.KEYDOWN | Event.KEYUP); - this.elm.onkeypress=this.elm.onkeydown=this.elm.onkeyup=DynKeyEvent.EventMethod; - }; - }; - DynLayer.prototype.releaseKeyEvents=function() { - if(!this.elm) return; - if(is.def&&!is.ie) { - this.elm.removeEventListener("keydown",DynKeyEvent.EventMethod,false) - this.elm.removeEventListener("keyup",DynKeyEvent.EventMethod,false) - this.elm.removeEventListener("keypress",DynKeyEvent.EventMethod,false) - } - else { - if (is.ns4) this.elm.releaseEvents(Event.KEYPRESS | Event.KEYDOWN | Event.KEYUP); - this.elm.onkeypress=this.elm.onkeydown=this.elm.onkeyup=null; - }; - }; - - /* Overwrite methods to support key events. */ - DynObject.prototype.assignKeyEvents = function() { - if (this.hasEventListeners) this.captureKeyEvents(); - var l=this.children.length; - for (var i=0; i<l; i++) this.children[i].assignKeyEvents(); - }; - DynObject.prototype._OldK_addEventListener = DynObject.prototype.addEventListener; - DynObject.prototype.addEventListener = function(l) { - var r = this._OldK_addEventListener(l); - if(this.hasEventListeners && this.created) this.captureKeyEvents(); - return r; - }; - DynObject.prototype._OldK_removeEventListener = DynObject.prototype.removeEventListener; - DynObject.prototype.removeEventListener = function(l) { - var r = this._OldK_removeEventListener(l); - if(!this.hasEventListeners) this.releaseKeyEvents(); - return r; - }; - DynObject.prototype._OldK_removeAllEventListeners = DynObject.prototype.removeAllEventListeners; - DynObject.prototype.removeAllEventListeners = function() { - var r = this._OldK_removeAllEventListeners(); - this.releaseKeyEvents(); - return r; - }; - // DynLayer Specific - DynLayer.prototype._OldK_specificCreate = DynLayer.prototype.specificCreate; - DynLayer.prototype.specificCreate = function() { - this._OldK_specificCreate(); - this.assignKeyEvents(); - }; // DynDocument specific DynDocument.prototype._OldK_specificCreate = DynDocument.prototype.specificCreate; DynDocument.prototype.specificCreate = function() { this._OldK_specificCreate(); - this.assignKeyEvents(); }; --- 78,90 ---- }; }; // DynDocument specific DynDocument.prototype._OldK_specificCreate = DynDocument.prototype.specificCreate; DynDocument.prototype.specificCreate = function() { + this._OldK_specificCreate(); + this.captureKeyEvents(); + }; + DynDocument.prototype._OldK_specificRemove = DynDocument.prototype.specificRemove; + DynDocument.prototype.specificRemove = function() { + this.releaseKeyEvents(); this._OldK_specificCreate(); }; Index: listeners.js =================================================================== RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/event/listeners.js,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** listeners.js 2001/11/05 16:45:49 1.7 --- listeners.js 2002/01/04 14:25:18 1.8 *************** *** 5,9 **** The DynAPI Distribution is distributed under the terms of the GNU LGPL license. */ - DynEvent=function(type,src,target) { this.type=type; --- 5,8 ---- Index: mouse.js =================================================================== RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/event/mouse.js,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** mouse.js 2001/12/22 17:17:41 1.23 --- mouse.js 2002/01/04 14:25:18 1.24 *************** *** 55,59 **** // Get the real source for the event if(is.def) var realsrc = Methods.getContainerLayerOf(is.ie?e.srcElement:e.target) || dynobject ! else if(is.ns4) var realsrc=e.target.lyrobj||dynobject // Now 'realsrc' should point to the DynLayer object where the event initially was triggered --- 55,59 ---- // Get the real source for the event if(is.def) var realsrc = Methods.getContainerLayerOf(is.ie?e.srcElement:e.target) || dynobject ! else if(is.ns4) var realsrc=e.target.lyrobj || dynobject // Now 'realsrc' should point to the DynLayer object where the event initially was triggered *************** *** 74,91 **** // Step two: mouse coordinate properties if (is.ns4 && type=='mouseover') { ! // debugging for NS4 mouseover event ! evt.pageX=evt.pageX; ! evt.pageY=evt.pageY; ! evt.x=evt.pageX-evt.src.getPageX() ! evt.y=evt.pageY-evt.src.getPageY() } else { ! // standard DynAPI coordinate calculation ! evt.pageX=is.ie?e.x+document.body.scrollLeft:e.pageX; ! evt.pageY=is.ie?e.y+document.body.scrollTop:e.pageY; ! evt.x=is.ie?evt.pageX-evt.src.getPageX():e.layerX ! evt.y=is.ie?evt.pageY-evt.src.getPageY():e.layerY } - // Step three: mouse buttons var b=is.ie?e.button:e.which; --- 74,90 ---- // Step two: mouse coordinate properties if (is.ns4 && type=='mouseover') { ! // debugging for NS4 mouseover event ! evt.pageX=evt.pageX; ! evt.pageY=evt.pageY; ! evt.x=evt.pageX-evt.src.getPageX() ! evt.y=evt.pageY-evt.src.getPageY() } else { ! // standard DynAPI coordinate calculation ! evt.pageX=is.ie?e.x+document.body.scrollLeft:e.pageX; ! evt.pageY=is.ie?e.y+document.body.scrollTop:e.pageY; ! evt.x=is.ie?evt.pageX-evt.src.getPageX():e.layerX ! evt.y=is.ie?evt.pageY-evt.src.getPageY():e.layerY } // Step three: mouse buttons var b=is.ie?e.button:e.which; *************** *** 159,162 **** --- 158,163 ---- else { if(e.preventDefault && !evt.browserReturn) e.preventDefault(); + if (evt.type=='rtmouseup') document.oncontextmenu=evt.browserReturn ? null : DynAPI.FalseFunction; + else if (evt.type=='mousedown') document.onselectstart=evt.browserReturn ? null : DynAPI.FalseFunction; } // If Internet Explorer AND evt.browserReturn is false, *************** *** 168,173 **** if(!is.ie || evt.browserReturn==false) return evt.browserReturn; } ! ! // Extend DynDocument to capture its events DynDocument.prototype.captureMouseEvents = function() { --- 169,173 ---- if(!is.ie || evt.browserReturn==false) return evt.browserReturn; } ! DynAPI.FalseFunction = function() { return false } // Extend DynDocument to capture its events DynDocument.prototype.captureMouseEvents = function() { *************** *** 182,187 **** } else { ! if (is.ns4) this.doc.captureEvents(Event.MOUSEMOVE | Event.MOUSEDOWN | Event.MOUSEUP | Event.CLICK | Event.DBLCLICK); ! this.doc.onmousemove=this.doc.onmousedown=this.doc.onmouseup=this.doc.onclick=this.doc.ondblclick=DynMouseEvent.EventMethod; } } --- 182,187 ---- } else { ! if (is.ns4) this.doc.captureEvents(Event.MOUSEMOVE | Event.MOUSEOVER | Event.MOUSEOUT | Event.MOUSEDOWN | Event.MOUSEUP | Event.CLICK | Event.DBLCLICK); ! this.doc.onmouseover=this.doc.onmouseout=this.doc.onmousemove=this.doc.onmousedown=this.doc.onmouseup=this.doc.onclick=this.doc.ondblclick=DynMouseEvent.EventMethod; } } *************** *** 196,279 **** this.doc.removeEventListener("dblclick",DynMouseEvent.EventMethod,false) } - else { - if (is.ns4) this.doc.releaseEvents(Event.MOUSEMOVE | Event.MOUSEDOWN | Event.MOUSEUP | Event.CLICK | Event.DBLCLICK); - this.doc.onmousemove=this.doc.onmousedown=this.doc.onmouseup=this.doc.onclick=this.doc.ondblclick=null - } - } - /* Extend DynLayer to capture mouse events upon layer creation (if needed) */ - DynLayer.prototype.captureMouseEvents = function() { - var elm=this.elm - if(!elm) return - if(is.def&&!is.ie) { - elm.addEventListener("mousemove",DynMouseEvent.EventMethod,false) - elm.addEventListener("mousedown",DynMouseEvent.EventMethod,false) - elm.addEventListener("mouseup",DynMouseEvent.EventMethod,false) - elm.addEventListener("mouseover",DynMouseEvent.EventMethod,false) - elm.addEventListener("mouseout",DynMouseEvent.EventMethod,false) - elm.addEventListener("click",DynMouseEvent.EventMethod,false) - elm.addEventListener("dblclick",DynMouseEvent.EventMethod,false) - } else { ! if (is.ns4) elm.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP | Event.CLICK | Event.DBLCLICK | Event.MOUSEMOVE); ! elm.onmousemove=elm.onmousedown=elm.onmouseup=elm.onmouseover=elm.onmouseout=elm.onclick=elm.ondblclick=DynMouseEvent.EventMethod } } - DynLayer.prototype.releaseMouseEvents=function() { - var elm=this.elm - if(!elm) return - if(is.def&&!is.ie) { - elm.removeEventListener("mousemove",DynMouseEvent.EventMethod,false) - elm.removeEventListener("mousedown",DynMouseEvent.EventMethod,false) - elm.removeEventListener("mouseup",DynMouseEvent.EventMethod,false) - elm.removeEventListener("mouseover",DynMouseEvent.EventMethod,false) - elm.removeEventListener("mouseout",DynMouseEvent.EventMethod,false) - elm.removeEventListener("click",DynMouseEvent.EventMethod,false) - elm.removeEventListener("dblclick",DynMouseEvent.EventMethod,false) - } - else { - if (is.ns4) elm.releaseEvents(Event.MOUSEDOWN | Event.MOUSEUP | Event.CLICK | Event.DBLCLICK | Event.MOUSEMOVE); - elm.onmousemove=elm.onmousedown=elm.onmouseup=elm.onclick=elm.ondblclick=null - } - } - - DynObject.prototype.assignMouseEvents = function() { - if (this.hasEventListeners) this.captureMouseEvents() - var l=this.children.length; - for (var i=0; i<l; i++) this.children[i].assignMouseEvents() - } - DynObject.prototype._OldM_addEventListener = DynObject.prototype.addEventListener - DynObject.prototype.addEventListener = function(l) { - var r = this._OldM_addEventListener(l) - if(this.hasEventListeners && this.created) this.captureMouseEvents() - return r - } - DynObject.prototype._OldM_removeEventListener = DynObject.prototype.removeEventListener - DynObject.prototype.removeEventListener = function(l) { - var r = this._OldM_removeEventListener(l) - if(!this.hasEventListeners) this.releaseMouseEvents() - return r - } - DynObject.prototype._OldM_removeAllEventListeners = DynObject.prototype.removeAllEventListeners - DynObject.prototype.removeAllEventListeners = function() { - var r = this._OldM_removeAllEventListeners() - this.releaseMouseEvents() - return r - } - // DynLayer Specific - DynLayer.prototype._OldM_specificCreate = DynLayer.prototype.specificCreate - DynLayer.prototype.specificCreate = function() { - this._OldM_specificCreate() - this.assignMouseEvents() - } // DynDocument Specific DynDocument.prototype._OldM_specificCreate = DynDocument.prototype.specificCreate DynDocument.prototype.specificCreate = function() { this._OldM_specificCreate() ! this.assignMouseEvents() } - // DynLayer Specific - DynLayer.prototype._mouse_setHTML=DynLayer.prototype.setHTML; - DynLayer.prototype.setHTML = function(s,noevt) { - this._mouse_setHTML(s,noevt); - if (is.ns4&&this.doc) this.captureMouseEvents(); - } \ No newline at end of file --- 196,213 ---- this.doc.removeEventListener("dblclick",DynMouseEvent.EventMethod,false) } else { ! if (is.ns4) this.doc.releaseEvents(Event.MOUSEMOVE | Event.MOUSEOVER | Event.MOUSEOUT | Event.MOUSEDOWN | Event.MOUSEUP | Event.CLICK | Event.DBLCLICK); ! this.doc.onmouseover=this.doc.onmouseout=this.doc.onmousemove=this.doc.onmousedown=this.doc.onmouseup=this.doc.onclick=this.doc.ondblclick=null } } // DynDocument Specific DynDocument.prototype._OldM_specificCreate = DynDocument.prototype.specificCreate DynDocument.prototype.specificCreate = function() { this._OldM_specificCreate() ! this.captureMouseEvents() ! } ! DynDocument.prototype._OldM_specificRemove = DynDocument.prototype.specificRemove ! DynDocument.prototype.specificRemove = function() { ! this.releaseMouseEvents() ! this._OldM_specificRemove() } |
Update of /cvsroot/dynapi/dynapi/examples In directory usw-pr-cvs1:/tmp/cvs-serv19253/examples Modified Files: dynapi.event.mouseevents.htm dynapi.ext.inline.htm dynapi.gui.button.html dynapi.gui.buttonimage.html Added Files: dynapi.api.inflow.htm dynapi.event.nocontextual.htm Log Message: Many bugfixes and improvements. --- NEW FILE --- <html> <head> <title>DynAPI Distribution: MouseEvents Example</title> <script language="Javascript" src="../src/dynapi.js"></script> <script language="Javascript"> DynAPI.setLibraryPath('../src/lib/'); DynAPI.include('dynapi.api.*'); DynAPI.include('dynapi.event.*') </script> <script language="Javascript"> myLayer = new DynLayer() myLayer.moveTo(30,30) myLayer.setSize(100,100) myLayer.setBgColor('#c0c0c0') myLayer.setHTML('<table border="0" width="100" height="100" cellpadding="5" cellspacing="5"><tr><td height="100%" width="100%"><table border="2" width="100%" height="100%" align="center" valign="middle"><tr><td align="center"><a href="#">Link</a></td></tr></table></td></tr></table>') myLayer.addChild(new DynLayer(null,10,10,20,20,'red')) myListener = new EventListener(DynAPI.document) myListener.onmouseover=function(e) { myLayer.setBgColor('#ffc000') } myListener.onmousemove=function(e) { myLayer.setBgColor('#ffc000') } myListener.onmouseout=function(e) { myLayer.setBgColor('#c0c0c0') } myListener.onmousedown=function(e) { myLayer.setBgColor('#0000c0') } myListener.onmouseup=function(e) { myLayer.setBgColor('#ffc000') } myListener.onrtmouseup=function(e) { myLayer.setBgColor('#ffcc00') } myListener.onrtmousedown=function(e) { myLayer.setBgColor('#00cc00') } myListener.onmdmousedown=function(e) { myLayer.setBgColor('#11cc00') } myListener.onmdmouseup=function(e) { myLayer.setBgColor('#ffcc00') } myListener.ondblclick=function(e) { alert('double-click') } myLayer.addEventListener(myListener) function cool() { myLayer.setSize(200,200) } </script> </head> <body bgcolor="#ffffff"> This is a small sample of embedding DYNAPI stuff inside the HTMl flow. Notice that you can do it at load time instead of waiting until the unLoad event is executed. This is not as flexible as we'd all want ( at the time being NS4 fails to resize but, well, it is a start.).<br> Consider this an alpha. In any case, you can now add layers to the document before the page has finished loading, and those will behave as expected. <script>DynAPI.document.addInflowChild(myLayer)</script> <p> <a href='javascript:cool()'>Make it bigger</a> <br> Note: it is IMPOSSIBLE to have NS4 reflow page contents after page load. The text going down to accomodate the layer's new size is a cool trick but it will never work in NS4, so don't bother trying. </body> </html> --- NEW FILE --- <html> <head> <title>DynAPI Distribution: Disabling contextual menu - Example</title> <script language="Javascript" src="../src/dynapi.js"></script> <script language="Javascript"> DynAPI.setLibraryPath('../src/lib/'); DynAPI.include('dynapi.api.*'); DynAPI.include('dynapi.event.*') </script> <script language="Javascript"> DynAPI.onLoad=function() { myLayer = new DynLayer() myLayer.setSize(100,100) myLayer.setBgColor('#c0c0c0') myLayer.moveTo(200,280) myLayer2 = new DynLayer() myLayer2.setSize(100,100) myLayer2.setBgColor('#c0c0c0') myLayer2.moveTo(400,280) myListener = new EventListener() myListener.onrtmouseup=function(e) { e.cancelBrowserEvent() } myListener.onrtmousedown=function(e) { e.cancelBrowserEvent() } myLayer.addEventListener(myListener) DynAPI.document.addChild(myLayer) DynAPI.document.addChild(myLayer2) } </script> </head> Left layer does not allow contextual menu to pop. Right one does. When a contextual menu is shown and without hiding it you rightclick on the layer to the left, the contextual menu shows anyway in NS4. This behaviour is to be studied but it may not be solvable.<p> <pre> myListener = new EventListener() myListener.onrtmouseup=function(e) { e.cancelBrowserEvent() } myListener.onrtmousedown=function(e) { e.cancelBrowserEvent() } </pre> <p> Notice that this can easily be made into an extension with DynObject.prototype.allowContextuals(true/false) that would add/remove the above listener to the layer calling the method. This is some easy homework for those who want to starting getting their hands dirty. <body bgcolor="#ffffff"> </body> </html> Index: dynapi.event.mouseevents.htm =================================================================== RCS file: /cvsroot/dynapi/dynapi/examples/dynapi.event.mouseevents.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** dynapi.event.mouseevents.htm 2001/03/25 06:04:16 1.1 --- dynapi.event.mouseevents.htm 2002/01/04 14:25:18 1.2 *************** *** 87,91 **** <tr><td valign="middle" align="right"><b>pageY: </b></td><td valign="middle"><input type="text" name="pagey" size="3"></td></tr> <tr><td valign="middle" align="right"><b>type: </b></td><td valign="middle"><input type="text" name="type" size="23"></td></tr> ! <tr><td valign="middle" align="right"><b>src: </b></td><td valign="middle"><input type="text" name="src" size="23"></td></tr> </table> </form> --- 87,91 ---- <tr><td valign="middle" align="right"><b>pageY: </b></td><td valign="middle"><input type="text" name="pagey" size="3"></td></tr> <tr><td valign="middle" align="right"><b>type: </b></td><td valign="middle"><input type="text" name="type" size="23"></td></tr> ! <tr><td valign="middle" align="right"><b>src: </b></td><td valign="middle"><input type="text" name="src" size="30"></td></tr> </table> </form> Index: dynapi.ext.inline.htm =================================================================== RCS file: /cvsroot/dynapi/dynapi/examples/dynapi.ext.inline.htm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** dynapi.ext.inline.htm 2001/03/25 06:04:16 1.7 --- dynapi.ext.inline.htm 2002/01/04 14:25:18 1.8 *************** *** 44,48 **** <body> <br><br> ! <div id="layer1" style="position:absolute; visibility:hidden"> <div id="clayer1" style="position:absolute; visibility:hidden; left:0px; top:0px; width:200px; height:20px;">Child Layer 1 (Click Me)</div><br> <div id="clayer2" style="position:absolute; visibility:hidden; left:0px; top:20px; width:200px; height:20px;">Child Layer 2 (Click Me)</div> --- 44,52 ---- <body> <br><br> ! sasa ! <br> ! <br> ! a ! <div id="layer1" style="position:relative; visibility:hidden"> <div id="clayer1" style="position:absolute; visibility:hidden; left:0px; top:0px; width:200px; height:20px;">Child Layer 1 (Click Me)</div><br> <div id="clayer2" style="position:absolute; visibility:hidden; left:0px; top:20px; width:200px; height:20px;">Child Layer 2 (Click Me)</div> Index: dynapi.gui.button.html =================================================================== RCS file: /cvsroot/dynapi/dynapi/examples/dynapi.gui.button.html,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** dynapi.gui.button.html 2001/03/25 06:04:16 1.8 --- dynapi.gui.button.html 2002/01/04 14:25:18 1.9 *************** *** 63,67 **** o.setSize(o.w+10,o.h+10); } ! text3button.addEventListener(l); DynAPI.document.addChild(d); --- 63,67 ---- o.setSize(o.w+10,o.h+10); } ! text3button.addEventListener(l); DynAPI.document.addChild(d); Index: dynapi.gui.buttonimage.html =================================================================== RCS file: /cvsroot/dynapi/dynapi/examples/dynapi.gui.buttonimage.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** dynapi.gui.buttonimage.html 2001/03/25 06:04:16 1.1 --- dynapi.gui.buttonimage.html 2002/01/04 14:25:18 1.2 *************** *** 16,20 **** <script language="Javascript"> - DynAPI.onLoad = function() { --- 16,19 ---- |
From: Jordi M. <do...@us...> - 2002-01-04 14:25:24
|
Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/api In directory usw-pr-cvs1:/tmp/cvs-serv19253/src/lib/dynapi/api Modified Files: dyndocument.js dynlayer.js Log Message: Many bugfixes and improvements. Index: dyndocument.js =================================================================== RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/api/dyndocument.js,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** dyndocument.js 2001/11/01 10:40:42 1.19 --- dyndocument.js 2002/01/04 14:25:18 1.20 *************** *** 15,19 **** this.elm.lyrobj=this; this.doc.lyrobj=this; - this.findDimensions(); } DynDocument.prototype = new DynObject(); --- 15,18 ---- *************** *** 23,28 **** --- 22,40 ---- }; DynDocument.prototype.specificCreate=function() { + this.findDimensions(); + // Following Silly Patch allows sharing of assignChildren() between DynDocument and DynLayer (IE only) + if(is.ie) this.elm.all = this.doc.all + this.assignChildren(); DynAPI.addResizeFunction(this+".resizeHandler()"); }; + DynDocument.prototype._Old_addChild=DynDocument.prototype.addChild; + DynDocument.prototype.addChild=function(c) { + if(!this.created) this.doc.write(c.getOuterHTML()); + return this._Old_addChild(c); + }; + DynDocument.prototype.addInflowChild=function(c) { + if(!this.created) this.doc.write(c.getOuterHTML(true)); + return this._Old_addChild(c); + }; DynDocument.prototype.specificRemove=function() { this.elm=null; *************** *** 49,53 **** else this.h=this.h-2; }; - return; }; DynDocument.prototype.setBgColor = function(color) { --- 61,64 ---- *************** *** 77,79 **** } }; ! DynAPI.addLoadFunction("DynAPI.document = DynAPI.addChild(new DynDocument(self));DynAPI.document.all = DynObject.all;") --- 88,94 ---- } }; ! //If DynLayer was included before DynDocument ! if(DynLayer)DynDocument.prototype.assignChildren=DynLayer.prototype.assignChildren; ! ! DynAPI.document = DynAPI.addChild(new DynDocument(self)); ! DynAPI.document.all = DynObject.all; Index: dynlayer.js =================================================================== RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/api/dynlayer.js,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -r1.71 -r1.72 *** dynlayer.js 2001/11/11 16:25:18 1.71 --- dynlayer.js 2002/01/04 14:25:18 1.72 *************** *** 28,32 **** DynLayer.prototype.isDynLayer = true; DynLayer.prototype.specificCreate=function() { ! if (!this.parent||this.elm) return; if (is.ns6) { var parentElement=(this.parent.isDynLayer)?this.parent.elm:this.parent.doc.body; --- 28,33 ---- DynLayer.prototype.isDynLayer = true; DynLayer.prototype.specificCreate=function() { ! // Check for this.wasBuiltInline allows inflow layers to skip recreation onResize (NS4) ! if (!this.parent||this.elm||this.wasBuiltInline) return; if (is.ns6) { var parentElement=(this.parent.isDynLayer)?this.parent.elm:this.parent.doc.body; *************** *** 94,102 **** child.assignChildren(); if (child.z) child.css.zIndex=child.z; } } else if(is.ns4) { for (var i=0; i<l; i++) { var child=this.children[i]; ! var elm=this.doc.layers[child.id]; child.elm=elm; child.css=elm; --- 95,106 ---- child.assignChildren(); if (child.z) child.css.zIndex=child.z; + if (child.w==null && child.getContentWidth()>0) child.setWidth(child.getContentWidth(), false); + if (child.h==null && child.getContentHeight()>0) child.setHeight(child.getContentHeight(), false); } } else if(is.ns4) { for (var i=0; i<l; i++) { var child=this.children[i]; ! // In order to allow inline dynlayers, which are wrapped by a ILAYER. See getOuterHTML() ! var elm=this.doc.layers[child.id]||this.doc.layers[child.id+"C"].document.layers[child.id]; child.elm=elm; child.css=elm; *************** *** 108,114 **** --- 112,123 ---- child.assignChildren(); if (child.z) child.css.zIndex=child.z; + if (child.w==null && child.getContentWidth()>0) child.setWidth(child.getContentWidth(), false); + if (child.h==null && child.getContentHeight()>0) child.setHeight(child.getContentHeight(), false); } } }; + //If DynDocument was included before DynLayer + if(DynDocument)DynDocument.prototype.assignChildren=DynLayer.prototype.assignChildren; + DynLayer.prototype.specificRemove=function() { if (is.def && this.elm) { *************** *** 118,132 **** } else if (is.ns4 && this.elm) { ! if (!this.parent.doc.recycled) this.parent.doc.recycled=[]; ! this.parent.doc.recycled[this.parent.doc.recycled.length]=this.elm; this.elm.visibility="hide"; } this.frame = null; - this.bgImage = null; - this.bgColor = null; - this.html = null; - this.z = null; - this.w = null; - this.h = null; this.elm = null; this.doc = null; --- 127,139 ---- } else if (is.ns4 && this.elm) { ! if(!this.wasBuiltInline) { ! // These can't be reused ! if (!this.parent.doc.recycled) this.parent.doc.recycled=[]; ! this.parent.doc.recycled[this.parent.doc.recycled.length]=this.elm; ! } ! this.wasBuiltInline = false this.elm.visibility="hide"; } this.frame = null; this.elm = null; this.doc = null; *************** *** 141,158 **** }; if (is.def) { ! DynLayer.prototype.getOuterHTML=function() { var s='<div id="'+this.id+'" style="'; if (this.visible==false) s+=' visibility:hidden;'; ! if (this.x!=null) s+=' left:'+this.x+'px;'; ! if (this.y!=null) s+=' top:'+this.y+'px;'; if (this.w!=null) s+=' width:'+this.w+'px;'; if (this.h!=null) s+=' height:'+this.h+'px;'; if (this.clip) s+=' clip:rect('+this.clip[0]+'px '+this.clip[1]+'px '+this.clip[2]+'px '+this.clip[3]+'px);'; else if (this.w!=null && this.h!=null) s+=' clip:rect(0px '+this.w+'px '+this.h+'px 0px);'; ! if (this.z) s+=' z-index='+this.z+';'; if (this.bgImage!=null) s+=' background-image:url('+this.bgImage+');'; if (this.bgColor!=null) s+=' background-color:'+this.bgColor+';'; if (is.ie55 && this.bgImage==null && this.html==null) s+=' background-image:url('+DynAPI.librarypath+'dynapi/images/common/transparent.gif);'; ! s+=' position:absolute;">'; if (this.html!=null) s+=this.html; for (var i=0; i<this.children.length; i++) s+=this.children[i].getOuterHTML(); --- 148,166 ---- }; if (is.def) { ! DynLayer.prototype.getOuterHTML=function(inflow) { var s='<div id="'+this.id+'" style="'; if (this.visible==false) s+=' visibility:hidden;'; ! if (!inflow && this.x!=null) s+=' left:'+this.x+'px;'; ! if (!inflow && this.y!=null) s+=' top:'+this.y+'px;'; if (this.w!=null) s+=' width:'+this.w+'px;'; if (this.h!=null) s+=' height:'+this.h+'px;'; if (this.clip) s+=' clip:rect('+this.clip[0]+'px '+this.clip[1]+'px '+this.clip[2]+'px '+this.clip[3]+'px);'; else if (this.w!=null && this.h!=null) s+=' clip:rect(0px '+this.w+'px '+this.h+'px 0px);'; ! if (this.z!=null) s+=' z-index='+this.z+';'; if (this.bgImage!=null) s+=' background-image:url('+this.bgImage+');'; if (this.bgColor!=null) s+=' background-color:'+this.bgColor+';'; if (is.ie55 && this.bgImage==null && this.html==null) s+=' background-image:url('+DynAPI.librarypath+'dynapi/images/common/transparent.gif);'; ! if(!inflow) s+=' position:absolute;'; else s+=' position:relative;'; ! s+=' overflow:hidden">'; if (this.html!=null) s+=this.html; for (var i=0; i<this.children.length; i++) s+=this.children[i].getOuterHTML(); *************** *** 162,175 **** }; } else if (is.ns4) { ! DynLayer.prototype.getOuterHTML=function() { ! var s='\n<layer id="'+this.id+'"'; if (this.visible==false) s+=' visibility="hide"'; ! if (this.x!=null) s+=' left='+this.x; ! if (this.y!=null) s+=' top='+this.y; if (this.w!=null) s+=' width='+this.w; if (this.h!=null) s+=' height='+this.h; if (this.clip) s+=' clip="'+this.clip[3]+','+this.clip[0]+','+this.clip[1]+','+this.clip[2]+'"'; else if (this.w!=null && this.h!=null) s+=' clip="0,0,'+this.w+','+this.h+'"'; ! if (this.z) s+=' zIndex='+this.z; if (this.bgImage!=null) s+=' background="'+this.bgImage+'"'; if (this.bgColor!=null) s+=' bgcolor="'+this.bgColor+'"'; --- 170,194 ---- }; } else if (is.ns4) { ! DynLayer.prototype.getOuterHTML=function(inflow) { ! var s='\n' ! if(inflow) { ! // These should not be recreated on resize ! this.wasBuiltInline = true ! ! s+= '<ilayer id="'+this.id+'C"' ! if (this.w!=null) s+=' width='+this.w+''; ! if (this.h!=null) s+=' height='+this.h+''; ! s+= '">' ! } ! ! s+='<layer id="'+this.id+'"'; if (this.visible==false) s+=' visibility="hide"'; ! if (!inflow && this.x!=null) s+=' left='+this.x; ! if (!inflow && this.y!=null) s+=' top='+this.y; if (this.w!=null) s+=' width='+this.w; if (this.h!=null) s+=' height='+this.h; if (this.clip) s+=' clip="'+this.clip[3]+','+this.clip[0]+','+this.clip[1]+','+this.clip[2]+'"'; else if (this.w!=null && this.h!=null) s+=' clip="0,0,'+this.w+','+this.h+'"'; ! if (this.z!=null) s+=' zIndex='+this.z; if (this.bgImage!=null) s+=' background="'+this.bgImage+'"'; if (this.bgColor!=null) s+=' bgcolor="'+this.bgColor+'"'; *************** *** 178,181 **** --- 197,202 ---- for (var i=0; i<this.children.length; i++) s+=this.children[i].getOuterHTML(); s+='</layer>'; + + if(inflow) s+="</ilayer>\n" return s; }; *************** *** 222,226 **** if (is.ns4) this.css.pageX=x; if (is.ie) { ! if (this.isChild) this.setX(this.parent.getPageX()-x); else this.setX(x); } --- 243,247 ---- if (is.ns4) this.css.pageX=x; if (is.ie) { ! if (this.isChild) this.setX(x-this.parent.getPageX()); else this.setX(x); } *************** *** 232,236 **** if (is.ns4) this.css.pageY=y; if (is.ie) { ! if (this.isChild) this.setY(this.parent.getPageY()-y); else this.setY(y); } --- 253,257 ---- if (is.ns4) this.css.pageY=y; if (is.ie) { ! if (this.isChild) this.setY(y-this.parent.getPageY()); else this.setY(y); } *************** *** 369,381 **** //if this.elm.offsetWidth/Height is not accessed, then ie5mac will return NaN. else if (is.ie) { ! if (is.platform=="mac") this.elm.offsetWidth=this.elm.offsetWidth; ! return parseInt(this.elm.scrollWidth); } else { var tw = this.elm.style.width; ! this.elm.style.width = "auto"; ! var w = this.elm.offsetWidth; ! this.elm.style.width = tw; ! return w; } }; --- 390,402 ---- //if this.elm.offsetWidth/Height is not accessed, then ie5mac will return NaN. else if (is.ie) { ! if (is.platform=="mac") this.elm.offsetWidth=this.elm.offsetWidth; ! return parseInt(this.elm.scrollWidth); } else { var tw = this.elm.style.width; ! this.elm.style.width = "auto"; ! var w = this.elm.offsetWidth; ! this.elm.style.width = tw; ! return w; } }; *************** *** 393,399 **** var th = this.elm.style.height; this.elm.style.height = "auto"; ! var h = this.elm.offsetHeight; ! this.elm.style.height = th; ! return h; } } --- 414,420 ---- var th = this.elm.style.height; this.elm.style.height = "auto"; ! var h = this.elm.offsetHeight; ! this.elm.style.height = th; ! return h; } } |
From: Jordi M. <do...@us...> - 2002-01-04 14:25:24
|
Update of /cvsroot/dynapi/dynapi/tests In directory usw-pr-cvs1:/tmp/cvs-serv19253/tests Added Files: inflow_scrollbar.html Log Message: Many bugfixes and improvements. --- NEW FILE --- <html> <head> <title>DynAPI Examples - Inflow ScrollBars</title> <script language="JavaScript" src="../src/dynapi.js"></script> <script language="Javascript"> DynAPI.setLibraryPath('../src/lib/'); DynAPI.include('dynapi.api.browser.js'); DynAPI.include('dynapi.api.dynlayer.js'); DynAPI.include('dynapi.api.dyndocument.js'); DynAPI.include('dynapi.event.*') DynAPI.include('dynapi.event.dragevent.js'); DynAPI.include('dynapi.util.thread.js'); DynAPI.include('dynapi.util.pathanim.js'); DynAPI.include('dynapi.gui.scrollbar.js'); DynAPI.include('dynapi.gui.dynimage.js'); </script> <script language="Javascript"> vbar = new ScrollBar(ScrollBar.VERTICAL); // vetical vbar.moveTo(250,50); vbar.setHeight(150); var vlistener = new EventListener() vlistener.onscroll = function(e) { var src = e.getSource(); document.scrollbar.vratiox.value = src.getRatioX(); document.scrollbar.vratioy.value = src.getRatioY(); } vbar.addEventListener(vlistener); hbar = new ScrollBar(ScrollBar.HORIZONTAL); // horizontal hbar.moveTo(300,50); hbar.setWidth(150); var hlistener = new EventListener() hlistener.onscroll = function(e) { var src = e.getSource(); document.scrollbar.hratiox.value = src.getRatioX(); document.scrollbar.hratioy.value = src.getRatioY(); } hbar.addEventListener(hlistener); box = new ScrollBar(1,false); // both horizontal and vertical (manually customized) box.moveTo(310,110); box.setSize(150,150); box.setBgColor('#c0c0c0'); box.knob.setSize(37,37); box.knob.setBgColor('black'); var blistener = new EventListener(); blistener.onscroll = function(e) { var src = e.getSource(); document.scrollbar.bratiox.value = src.getRatioX(); document.scrollbar.bratioy.value = src.getRatioY(); } box.addEventListener(blistener); </script> </head> <body bgcolor="#ffffff"> This is some test of widgets added during page loading rather than on page load. The two scrollbars are added with position absolute ( normal addChild), while the third one is added using addInflowChild() and thus follows the page content flow. <hr> <form name="scrollbar"> Vertical: <br>ratioX <input type="text" name="vratiox" size=5> <br>ratioY <input type="text" name="vratioy" size=5> <br>set height: <a href="javascript:vbar.setHeight(50)">50</a>, <a href="javascript:vbar.setHeight(100)">100</a>, <a href="javascript:vbar.setHeight(150)">150</a>, <a href="javascript:vbar.setHeight(200)">200</a> <br>set ratioY: <a href="javascript:vbar.setRatioY(0)">0</a>, <a href="javascript:vbar.setRatioY(0.5)">0.5</a>, <a href="javascript:vbar.setRatioY(1)">1</a> <p>Horizontal: <br>ratioX <input type="text" name="hratiox" size=5> <br>ratioY <input type="text" name="hratioy" size=5> <br>set width: <a href="javascript:hbar.setWidth(50)">50</a>, <a href="javascript:hbar.setWidth(100)">100</a>, <a href="javascript:hbar.setWidth(150)">150</a>, <a href="javascript:hbar.setWidth(200)">200</a> <br>set ratioX: <a href="javascript:hbar.setRatioX(0)">0</a>, <a href="javascript:hbar.setRatioX(0.5)">0.5</a>, <a href="javascript:hbar.setRatioX(1)">1</a> <hr> Here goes a table. Amazing. <table width=500 bgcolor=red border=1> <tr> <td bgcolor=white> Box: <br>ratioX <input type="text" name="bratiox" size=5> <br>ratioY <input type="text" name="bratioy" size=5> <br>set size: <a href="javascript:box.setSize(50,50)">50</a>, <a href="javascript:box.setSize(100,100)">100</a>, <a href="javascript:box.setWidth(150)">150</a>, <a href="javascript:box.setSize(200,200)">200</a> <br>set ratioX: <a href="javascript:box.setRatioX(0)">0</a>, <a href="javascript:box.setRatioX(0.5)">0.5</a>, <a href="javascript:box.setRatioX(1)">1</a> <br>set ratioY: <a href="javascript:box.setRatioY(0)">0</a>, <a href="javascript:box.setRatioY(0.5)">0.5</a>, <a href="javascript:box.setRatioY(1)">1</a> </td> <td bgcolor=green align=center> <script> DynAPI.document.addChild(vbar); DynAPI.document.addChild(hbar); DynAPI.document.addInflowChild(box) </script> </td> </tr> </table> </form> <p> End of page. wow <p> Note: some problems while sliding the knob in the inline scrollbar, but must be something about the event coordinate calculation. Mozilla resizes the table cell while dragging the knob. Oh my. Anyway. </body> </html> |
From: Jordi M. <do...@us...> - 2002-01-04 14:25:23
|
Update of /cvsroot/dynapi/dynapi/src In directory usw-pr-cvs1:/tmp/cvs-serv19253/src Modified Files: dynapi.js Log Message: Many bugfixes and improvements. Index: dynapi.js =================================================================== RCS file: /cvsroot/dynapi/dynapi/src/dynapi.js,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -r1.45 -r1.46 *** dynapi.js 2001/11/06 10:17:02 1.45 --- dynapi.js 2002/01/04 14:25:18 1.46 *************** *** 119,124 **** DynObject.Count = 0; DynObject.all = []; - - Methods = { removeFromArray : function(array, index, id) { --- 119,122 ---- *************** *** 141,146 **** } }; - - DynAPIObject = function() { this.DynObject = DynObject; --- 139,142 ---- *************** *** 198,202 **** lno-=1; alert("DynAPI reported an error\n\nError in project: '" + url + "'.\nLine number: " + lno + ".\n\nMessage: " + msg); ! } else if (is.ns4) { alert("DynAPI reported an error\n\nError in file: '" + url + "'.\nLine number: " + lno + ".\n\nMessage: " + msg); } else return false; --- 194,198 ---- lno-=1; alert("DynAPI reported an error\n\nError in project: '" + url + "'.\nLine number: " + lno + ".\n\nMessage: " + msg); ! } else if (is.ns) { alert("DynAPI reported an error\n\nError in file: '" + url + "'.\nLine number: " + lno + ".\n\nMessage: " + msg); } else return false; *************** *** 213,217 **** } DynAPIObject.prototype.loadHandler = function() { ! this.created = true; eval(this.onLoadCodes.join(";")); if (this.onLoad) this.onLoad(); --- 209,213 ---- } DynAPIObject.prototype.loadHandler = function() { ! this.create(); eval(this.onLoadCodes.join(";")); if (this.onLoad) this.onLoad(); *************** *** 227,231 **** --- 223,232 ---- if (this.onResize) this.onResize(); } + + // Create base objects DynAPI = new DynAPIObject(); + DynLayer=DynDocument=null + + // Native events onload = function() { DynAPI.loadHandler(); } onunload = function() { DynAPI.unloadHandler(); } *************** *** 233,238 **** onresize = function() { DynAPI.resizeHandler(); } DynAPI.addPackage('dynapi'); ! DynAPI.addLibrary('dynapi.api' ,["browser","dynlayer","dyndocument"]); DynAPI.addLibrary('dynapi.event',["listeners","mouse","dragevent","keyboard"]); DynAPI.addLibrary('dynapi.ext' ,["inline","layer","dragdrop","functions"]); --- 234,240 ---- onresize = function() { DynAPI.resizeHandler(); } + // Add base packages DynAPI.addPackage('dynapi'); ! DynAPI.addLibrary('dynapi.api' ,["browser","dyndocument","dynlayer"]); DynAPI.addLibrary('dynapi.event',["listeners","mouse","dragevent","keyboard"]); DynAPI.addLibrary('dynapi.ext' ,["inline","layer","dragdrop","functions"]); |
From: Jordi M. <do...@us...> - 2002-01-04 14:25:23
|
Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/gui In directory usw-pr-cvs1:/tmp/cvs-serv19253/src/lib/dynapi/gui Modified Files: button.js buttonimage.js label.js Log Message: Many bugfixes and improvements. Index: button.js =================================================================== RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/gui/button.js,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** button.js 2001/03/26 16:57:00 1.9 --- button.js 2002/01/04 14:25:18 1.10 *************** *** 38,47 **** listener.oncreate = function(e) { var o = e.getTarget(); - //alert(o.w+' '+o.h); if (o.label) o.setText(o.text) if (o.w==null && o.h==null) { if (o.label) { o.setSize(o.label.w+4,o.label.h+4); - //alert(o.label.w) } else if (o.imglyr) o.setSize(o.imglyr.w+4,o.imglyr.h+4); --- 38,45 ---- Index: buttonimage.js =================================================================== RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/gui/buttonimage.js,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** buttonimage.js 2001/10/31 10:06:35 1.6 --- buttonimage.js 2002/01/04 14:25:18 1.7 *************** *** 52,59 **** this.setImage(this.defaultImage); //Hack so NS6/Mozilla show button on first load ! setTimeout(this+".setSize("+this+".defaultImage.width,"+this+".defaultImage.height);",0); }; ButtonImage.prototype.setSelected = function(b) { ! this.selected=b if (b) { this.setImage(this.selectedImage); --- 52,59 ---- this.setImage(this.defaultImage); //Hack so NS6/Mozilla show button on first load ! //setTimeout(this+".setSize("+this+".defaultImage.width,"+this+".defaultImage.height);",0); }; ButtonImage.prototype.setSelected = function(b) { ! this.selected=b if (b) { this.setImage(this.selectedImage); Index: label.js =================================================================== RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/gui/label.js,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** label.js 2001/10/29 16:36:52 1.19 --- label.js 2002/01/04 14:25:18 1.20 *************** *** 62,66 **** var wrap = this.wrap? '':'nowrap'; this.textFull = '<table '+width+' cellpadding='+this.padding+' cellspacing=0 border=0><tr><td align="'+this.align+'" '+wrap+'>'+styled+'</td></tr></table>'; - this.setHTML(this.textFull); }; --- 62,65 ---- |
From: martin str?m <ma...@us...> - 2001-12-22 17:17:44
|
Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/event In directory usw-pr-cvs1:/tmp/cvs-serv3608 Modified Files: mouse.js Log Message: added setHTML() to include the noevt-parameter (like the original setHTML()) Index: mouse.js =================================================================== RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/event/mouse.js,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** mouse.js 2001/11/05 19:23:10 1.22 --- mouse.js 2001/12/22 17:17:41 1.23 *************** *** 274,279 **** // DynLayer Specific DynLayer.prototype._mouse_setHTML=DynLayer.prototype.setHTML; ! DynLayer.prototype.setHTML = function(s) { ! this._mouse_setHTML(s); if (is.ns4&&this.doc) this.captureMouseEvents(); } --- 274,279 ---- // DynLayer Specific DynLayer.prototype._mouse_setHTML=DynLayer.prototype.setHTML; ! DynLayer.prototype.setHTML = function(s,noevt) { ! this._mouse_setHTML(s,noevt); if (is.ns4&&this.doc) this.captureMouseEvents(); } |
From: Richard B. <ric...@us...> - 2001-11-24 23:26:35
|
Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/event In directory usw-pr-cvs1:/tmp/cvs-serv17952 Modified Files: dragevent.js Log Message: added object check to avoid bug in scrollbars (is.def&&e.orig) Index: dragevent.js =================================================================== RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/event/dragevent.js,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** dragevent.js 2001/11/14 13:27:02 1.13 --- dragevent.js 2001/11/24 23:26:32 1.14 *************** *** 25,29 **** //fix to allow forms in draggable layers to select text. ! if (is.def) { var tn = is.ie? e.orig.srcElement.tagName : e.orig.target.tagName; if (tn=="INPUT" || tn=="TEXTAREA") return; --- 25,29 ---- //fix to allow forms in draggable layers to select text. ! if (is.def&&e.orig) { var tn = is.ie? e.orig.srcElement.tagName : e.orig.target.tagName; if (tn=="INPUT" || tn=="TEXTAREA") return; |
From: Richard B. <ric...@us...> - 2001-11-14 13:27:41
|
Update of /cvsroot/dynapi/dynapi/tests In directory usw-pr-cvs1:/tmp/cvs-serv24860 Modified Files: drag_forms.html Log Message: added Martin Strom's fix for forms in draggable layers, and removed testcode from example Index: drag_forms.html =================================================================== RCS file: /cvsroot/dynapi/dynapi/tests/drag_forms.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** drag_forms.html 2001/11/12 17:49:27 1.2 --- drag_forms.html 2001/11/14 13:27:38 1.3 *************** *** 18,49 **** <!-- - // owerride old one to test - DragEvent.lyrListener.onmousedown=function(e) { - if (is.def) { - var tn = is.ie? e.orig.srcElement.tagName : e.orig.target.tagName; - if (tn=="INPUT" || tn=="TEXTAREA") return; - } - - e.cancelBrowserEvent(); - if (DragEvent.dragevent.src) return; - - var lyr=e.getSource(); - if (is.ie) lyr.doc.body.onselectstart = function() { return false; } - - // Initialize dragEvent object - var de=DragEvent.dragevent; - de.type="dragstart" - de.src=lyr - - // Set properties - de.isDragging=false; - de.x=e.getPageX()-e.getSource().getPageX(); - de.y=e.getPageY()-e.getSource().getPageY(); - de.pageX=e.getPageX(); - de.pageY=e.getPageY(); - de.parentPageX=lyr.parent.getPageX(); - de.parentPageY=lyr.parent.getPageY(); - }; - DynAPI.onLoad=function() { lyr = new DynLayer(null,50,50,250,200,'red'); --- 18,21 ---- *************** *** 54,78 **** '<br><img src="../src/lib/dynapi/images/common/arrowdown.gif" width=50 height=50></form>'); - listener = new EventListener(); - listener.ondragend=function(e) { - - // will be moved to dragevent.js when tested and done - //var html = e.getSource().getHTML().toLowerCase(); - - //if (html.indexOf("<form")>-1 || (is.ns4 && html=="")) { - if (is.ie && is.platform=="mac") { - document.body.className = document.body.className; - } - else if (is.ns4 && is.platform=="win32") { - document.bgColor = document.bgColor; - } - //} - } - lyr.addEventListener(listener); - DynAPI.document.addChild(lyr); DragEvent.enableDragEvents(lyr); ! DragEvent.setDragBoundary(lyr); }; --- 26,33 ---- '<br><img src="../src/lib/dynapi/images/common/arrowdown.gif" width=50 height=50></form>'); DynAPI.document.addChild(lyr); DragEvent.enableDragEvents(lyr); ! DragEvent.setDragBoundary(lyr); }; |
From: Richard B. <ric...@us...> - 2001-11-14 13:27:05
|
Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/event In directory usw-pr-cvs1:/tmp/cvs-serv24725 Modified Files: dragevent.js Log Message: added Martin Strom's fix for forms in draggable layers Index: dragevent.js =================================================================== RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/event/dragevent.js,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** dragevent.js 2001/11/08 14:35:01 1.12 --- dragevent.js 2001/11/14 13:27:02 1.13 *************** *** 24,27 **** --- 24,33 ---- DragEvent.lyrListener.onmousedown=function(e) { + //fix to allow forms in draggable layers to select text. + if (is.def) { + var tn = is.ie? e.orig.srcElement.tagName : e.orig.target.tagName; + if (tn=="INPUT" || tn=="TEXTAREA") return; + } + e.cancelBrowserEvent(); if (DragEvent.dragevent.src) return; *************** *** 118,121 **** --- 124,136 ---- } if (is.ie) lyr.doc.body.onselectstart = null; + + //refresh screen to display form objects in draggable layers + if(lyr.doc.forms.length>0){ + if (is.ie && is.platform=="mac") { + document.body.className = document.body.className; + }else if (is.ns4 && is.platform=="win32") { + document.bgColor = document.bgColor; + } + } // Avoid click for the dragged layer ( with MouseEvent addition ) |
From: martin str?m <ma...@us...> - 2001-11-14 09:31:27
|
Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/gui In directory usw-pr-cvs1:/tmp/cvs-serv30819 Modified Files: list.js Log Message: Updated setColors() with Laszlo Teglas' fix Index: list.js =================================================================== RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/gui/list.js,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** list.js 2001/08/07 15:25:49 1.8 --- list.js 2001/11/14 09:31:22 1.9 *************** *** 66,69 **** --- 66,70 ---- s.textSelect = ts||'#000000'; this.setBgColor(s.bgcolor); + this.setFontColor(s.textNormal); }; ListItem.prototype.boldOnSelect = function(b) { |
From: Richard B. <ric...@us...> - 2001-11-12 22:41:25
|
Update of /cvsroot/dynapi/dynapi/tests In directory usw-pr-cvs1:/tmp/cvs-serv32428 Added Files: hyperstring_speedtest.html Log Message: this tests if the hyperstring code improves dynapi speed. --- NEW FILE --- <html> <head> <title>Precreation speedtest</title> <script language="Javascript" src="../src/dynapi.js"></script> <script language="Javascript"> DynAPI.setLibraryPath('../src/lib/'); DynAPI.include('dynapi.api.*'); DynAPI.include('dynapi.event.*'); </script> <script language="Javascript"> // HyperString - A faster way to handle strings HyperString=function(){this.db=[]} HyperString.prototype.toString=function(delim){return this.db.join(delim||'');} HyperString.prototype.flush=function(){this.db=[];} HyperString.prototype.add=function(src){this.db[this.db.length]=src;} HyperString.prototype.getLength=function(){return this.db.join('').length;} //overwritten methods from dynlayerjs: function overwrite(){ if (is.def) { DynLayer.prototype.getOuterHTML=function() { hs=new HyperString() var s='' hs.add('<div id="'+this.id+'" style="') if (this.visible==false)hs.add(' visibility:hidden;') if (this.x!=null)hs.add(' left:'+this.x+'px;') if (this.y!=null)hs.add(' top:'+this.y+'px;') if (this.w!=null)hs.add(' width:'+this.w+'px;') if (this.h!=null)hs.add(' height:'+this.h+'px;') if (this.clip)hs.add(' clip:rect('+this.clip[0]+'px '+this.clip[1]+'px '+this.clip[2]+'px '+this.clip[3]+'px);') else if (this.w!=null && this.h!=null)hs.add(' clip:rect(0px '+this.w+'px '+this.h+'px 0px);') if (this.z)hs.add(' z-index='+this.z+';') if (this.bgImage!=null)hs.add(' background-image:url('+this.bgImage+');') if (this.bgColor!=null)hs.add(' background-color:'+this.bgColor+';') if (is.ie55 && this.bgImage==null && this.html==null)hs.add(' background-image:url('+DynAPI.librarypath+'dynapi/images/common/transparent.gif);') hs.add(' position:absolute;">') if (this.html!=null)hs.add(this.html) s=hs.toString() for (var i=0; i<this.children.length; i++) s+=this.children[i].getOuterHTML(); s+='</div>'; return s; }; } else if (is.ns4) { DynLayer.prototype.getOuterHTML=function() { hs=new HyperString() var s='' hs.add('\n<layer id="'+this.id+'"') if (this.visible==false)hs.add(' visibility="hide"') if (this.x!=null)hs.add(' left='+this.x) if (this.y!=null)hs.add(' top='+this.y) if (this.w!=null)hs.add(' width='+this.w) if (this.h!=null)hs.add(' height='+this.h) if (this.clip)hs.add(' clip="'+this.clip[3]+','+this.clip[0]+','+this.clip[1]+','+this.clip[2]+'"') else if (this.w!=null && this.h!=null)hs.add(' clip="0,0,'+this.w+','+this.h+'"') if (this.z)hs.add(' zIndex='+this.z) if (this.bgImage!=null)hs.add(' background="'+this.bgImage+'"') if (this.bgColor!=null)hs.add(' bgcolor="'+this.bgColor+'"') hs.add('>') if (this.html!=null)hs.add(this.html) s=hs.toString() for (var i=0; i<this.children.length; i++) s+=this.children[i].getOuterHTML(); s+='</layer>'; return s; }; }; alert("method overwritten") } myHtml="test" //Creates 24 childlayers of 1 dynlayer, using precreation. function make25Precreate(){ start=new Date() myLayers=[] for(i=0;i<26;i++){ myLayers[i] = new DynLayer(null,(i+1)*100,250+(i*50),200,200,"#AA0000",null,null,null,myHtml) myLayers[i].c=[] for(j=0;j<26;j++){ myLayers[i].c[j] = new DynLayer(null,(j+1)*20,(j+1)*30,200,200,"#AAAA00",null,null,null,myHtml) myLayers[i].addChild(myLayers[i].c[j]) } DynAPI.document.addChild(myLayers[i]) } document.forms['frm'].txthyp.value=(new Date()-start) status=(i-1)+' layers with '+(j-1)+' nested layers each = total layers: '+(i-1)*(j-1) } </script> </head> <body > <form name=frm> <font face=arial size=3><b>Hyper String Test</b><br></font> <hr><br /> First click "make 625 dynlayers" to test normal code's speed, then refresh the browser, and click the "overwrite..." link first before running the test. <br /><br /> Time:<input type=text size=10 name=txthyp> milli-seconds<br /> <input type=button onclick="make25Precreate()" value="make 625 dynlayers"><br /><br /> 2) <a href="#" onclick="overwrite();return false">Overwrite dynlayer.js' getOuterHTML methods with Hyperstring version</a><br /> </font> </form> </body> </html> |
From: martin str?m <ma...@us...> - 2001-11-12 17:49:30
|
Update of /cvsroot/dynapi/dynapi/tests In directory usw-pr-cvs1:/tmp/cvs-serv19361 Modified Files: drag_forms.html Log Message: updated test with a possible fix Index: drag_forms.html =================================================================== RCS file: /cvsroot/dynapi/dynapi/tests/drag_forms.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** drag_forms.html 2001/11/08 10:29:49 1.1 --- drag_forms.html 2001/11/12 17:49:27 1.2 *************** *** 11,14 **** --- 11,15 ---- DynAPI.include('dynapi.event.*') + DynAPI.include('dynapi.util.console') //--> *************** *** 17,20 **** --- 18,49 ---- <!-- + // owerride old one to test + DragEvent.lyrListener.onmousedown=function(e) { + if (is.def) { + var tn = is.ie? e.orig.srcElement.tagName : e.orig.target.tagName; + if (tn=="INPUT" || tn=="TEXTAREA") return; + } + + e.cancelBrowserEvent(); + if (DragEvent.dragevent.src) return; + + var lyr=e.getSource(); + if (is.ie) lyr.doc.body.onselectstart = function() { return false; } + + // Initialize dragEvent object + var de=DragEvent.dragevent; + de.type="dragstart" + de.src=lyr + + // Set properties + de.isDragging=false; + de.x=e.getPageX()-e.getSource().getPageX(); + de.y=e.getPageY()-e.getSource().getPageY(); + de.pageX=e.getPageX(); + de.pageY=e.getPageY(); + de.parentPageX=lyr.parent.getPageX(); + de.parentPageY=lyr.parent.getPageY(); + }; + DynAPI.onLoad=function() { lyr = new DynLayer(null,50,50,250,200,'red'); *************** *** 23,31 **** '<input type="button" value="submit">'+ '<textarea name="ta" cols=20 rows=3>textarea textarea textarea textarea textarea textarea textarea</textarea>'+ ! '</form>'); listener = new EventListener(); ! listener.ondragend=function(e) { ! if (is.ns4 && is.platform=="win32") e.getSource().setHTML(e.getSource().getHTML()); } lyr.addEventListener(listener); --- 52,71 ---- '<input type="button" value="submit">'+ '<textarea name="ta" cols=20 rows=3>textarea textarea textarea textarea textarea textarea textarea</textarea>'+ ! '<br><img src="../src/lib/dynapi/images/common/arrowdown.gif" width=50 height=50></form>'); listener = new EventListener(); ! listener.ondragend=function(e) { ! ! // will be moved to dragevent.js when tested and done ! //var html = e.getSource().getHTML().toLowerCase(); ! ! //if (html.indexOf("<form")>-1 || (is.ns4 && html=="")) { ! if (is.ie && is.platform=="mac") { ! document.body.className = document.body.className; ! } ! else if (is.ns4 && is.platform=="win32") { ! document.bgColor = document.bgColor; ! } ! //} } lyr.addEventListener(listener); |
From: martin str?m <ma...@us...> - 2001-11-11 19:55:01
|
Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/util In directory usw-pr-cvs1:/tmp/cvs-serv24621 Modified Files: console.js Log Message: fixed console for ie/mac Index: console.js =================================================================== RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/util/console.js,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** console.js 2001/07/19 15:00:40 1.2 --- console.js 2001/11/11 19:54:58 1.3 *************** *** 20,24 **** if (!DynAPI.console.enabled) return; if (!DynAPI.console.consolewin || DynAPI.console.consolewin.closed) DynAPI.console.open(); ! if (is.ns6) { msg = msg.toString(); msg = msg.replace(/</g,'<'); --- 20,24 ---- if (!DynAPI.console.enabled) return; if (!DynAPI.console.consolewin || DynAPI.console.consolewin.closed) DynAPI.console.open(); ! if (is.ns6 || (is.platform=="mac" && is.ie)) { msg = msg.toString(); msg = msg.replace(/</g,'<'); |
From: martin str?m <ma...@us...> - 2001-11-11 16:26:38
|
Update of /cvsroot/dynapi/dynapi/examples In directory usw-pr-cvs1:/tmp/cvs-serv21759 Modified Files: dynapi.api.sethtml.htm Log Message: added bgcolor in <body> otherwise the layer isn't visible in mac NS4 Index: dynapi.api.sethtml.htm =================================================================== RCS file: /cvsroot/dynapi/dynapi/examples/dynapi.api.sethtml.htm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** dynapi.api.sethtml.htm 2001/03/25 06:04:16 1.5 --- dynapi.api.sethtml.htm 2001/11/11 16:26:35 1.6 *************** *** 21,28 **** </script> </head> <form name="dupdate" onsubmit="myLayer.setHTML(this.newhtml.value); return false;"> <b>Enter HTML:</b> <input type="text" name="newhtml" size="20"> </form> ! <body> </body> </html> --- 21,31 ---- </script> </head> + <body bgcolor="#ffffff"> + + <form name="dupdate" onsubmit="myLayer.setHTML(this.newhtml.value); return false;"> <b>Enter HTML:</b> <input type="text" name="newhtml" size="20"> </form> ! </body> </html> |
From: martin str?m <ma...@us...> - 2001-11-11 16:25:21
|
Update of /cvsroot/dynapi/dynapi/src/lib/dynapi/api In directory usw-pr-cvs1:/tmp/cvs-serv21223 Modified Files: dynlayer.js Log Message: the setHTML \n -trick for mac wasn't correct. fixed and moved to the IE's _setHTML() while this bug is mac/ie -only Index: dynlayer.js =================================================================== RCS file: /cvsroot/dynapi/dynapi/src/lib/dynapi/api/dynlayer.js,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -r1.70 -r1.71 *** dynlayer.js 2001/11/05 15:03:18 1.70 --- dynlayer.js 2001/11/11 16:25:18 1.71 *************** *** 290,293 **** --- 290,294 ---- } else if (is.ie) { DynLayer.prototype._setHTML=function(html) { + if (is.platform=="mac") html+='\n'; this.elm.innerHTML=html; var images = this.elm.all.tags("img"); *************** *** 307,311 **** DynLayer.prototype.setHTML=function(html,noevt) { this.html=html?html:''; - if (is.platform=="mac") this.html+='\n'; if (this.css==null) return; if (noevt!=false) this.invokeEvent("beforeload"); --- 308,311 ---- |
From: Richard B. <ric...@us...> - 2001-11-11 09:10:34
|
Update of /cvsroot/dynapi/dynapi/tests In directory usw-pr-cvs1:/tmp/cvs-serv6178 Added Files: background_image.html Log Message: This is a simple test to see if no-repeat is supported by all browsers --- NEW FILE --- <HTML> <HEAD><TITLE>Background color examples</TITLE> </HEAD> <STYLE TYPE="text/css"> <!-- LAYER{position:absolute; top:0px; left:20px; width:400px; height:200px; background-image:url("http://developer.netscape.com:80/docs/manuals/communicator/dynhtml/bluelite.gif"); /* using layer-background-image no-repeat is not supported it seems. layer-background-image:url("http://developer.netscape.com:80/docs/manuals/communicator/dynhtml/bluelite.gif"); */ background-repeat:no-repeat; } DIV {position:absolute; top:250px; left:20px; width:400px; height:200px; background-image:url("http://developer.netscape.com:80/docs/manuals/communicator/dynhtml/bluelite.gif"); background-repeat:no-repeat; } --> </STYLE> <BODY BGCOLOR=white> <b>Issue :</b><br /> This is a simple test to see if no-repeat is supported by all browsers.<br /> In NS4 you should see two squares with background image, as one Layer is used, and one DIV.<br /><br /> In NS4 it seems when a layers background-image is set with layer layer-background-image no-repeat is not supported<br /><br /> <LAYER> <H4>Layer 1</H4> <P>This layer is defined with a <LAYER> tag.</P> <P>You see that the background image is not repeated. (NS4 only) </P> </LAYER> <DIV > <H4>DIV 1</H4> <P>This DIV is defined in CSS syntax. </P> <P> The style definition sets the background-image property which is not repeated. </P> </DIV> </BODY> |
From: Richard B. <ric...@us...> - 2001-11-08 14:47:36
|
Update of /cvsroot/dynapi/dynapi/tests In directory usw-pr-cvs1:/tmp/cvs-serv17177 Added Files: 10_deep_nesting.html Log Message: added nesting test --- NEW FILE --- <html> <head> <title>Return false test</title> <style> .testClass{ color: red; } </style> <script language="Javascript" src="../src/dynapi.js"></script> <script language="Javascript"> DynAPI.setLibraryPath('../src/lib/'); DynAPI.include('dynapi.api.*'); DynAPI.include('dynapi.event.*'); DynAPI.include('dynapi.util.debug'); </script> <script language="Javascript"> myHtml='<a style="color:green;" href="http://www.cnn.com" onclick="alert(\'hi\');return false;">Return false</a><br /><a class="testClass" href="http://www.cnn.com" onclick="alert(\'hi\');return true;">Return true</a>' function make10(){ myLayers=[] myLayers[0] = new DynLayer(null,100,200,500,500,"#AA0000",null,null,null,myHtml) for(i=1;i<11;i++){ c="#BB"+(i-1)+"A"+(i-1)+"A" myLayers[i] = new DynLayer(null,30,40,500,500,c,null,null,null,myHtml) myLayers[i-1].addChild(myLayers[i]) if(i==10)DynAPI.document.addChild(myLayers[0]) } for(i=0;i<11;i++){ DragEvent.enableDragEvents(myLayers[i]) } } </script> </head> <body > <a class="testClass" href="#" onclick="make10()">make 10 nested layers</a><br /> <b>Issue</b><br /> This is a test where Dynlayers are nested 10 deep, and each one contains one link with:<br /> style="color='green'"<br /> and one with: class="testClass"<br /> "testClass" has been defined in the <style> tags at the top of the page.<br /><br /> This would mainly affect NS4.<br /> P.s. Only te second link should navigate to CNN each time. </body> </html> |