[Laszlo-checkins] r14378 - in openlaszlo/trunk/WEB-INF/lps/lfc: kernel/dhtml kernel/swf kernel/swf9 views
max@openlaszlo.org
max at openlaszlo.org
Thu Jul 23 18:39:21 PDT 2009
Author: max
Date: 2009-07-23 18:39:15 -0700 (Thu, 23 Jul 2009)
New Revision: 14378
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs
Log:
Change 20090723-maxcarlson-v by maxcarlson at Bank on 2009-07-23 15:02:38 PDT
in /Users/maxcarlson/openlaszlo/trunk-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: iUPDATED: Improve div IDs for DHTML in debug mode
Bugs Fixed: LPP-8264 - No OL debugger in IE7, DHTML with webtop wrapper page
Technical Reviewer: ptw
QA Reviewer: hminsky
Details: swf/LzSprite.as, swf9/LzSprite.as - Set capabilities.setid to false.
dhtml/LzSprite.js - Set capabilities.setid to true. Define setID() to set the sprite div's ID. To address Andre's comment, I moved the id setting for accessibility to setAADescription().
LzTextSprite.js, LzInputTextSprite.js - Define setID() to set the sprite div's ID.
LaszloView.lzs - Set sprite ids if debug mode is on and capabilities.setid is true
Tests: DHTML DOM is much easier to debug - sprite relationships to LZX are much clearer.
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js 2009-07-24 00:04:36 UTC (rev 14377)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js 2009-07-24 01:39:15 UTC (rev 14378)
@@ -23,11 +23,6 @@
this.__LZclickcontainerdiv.className = 'lzinputtextcontainer_click';
this.__LZclickcontainerdiv.owner = this;
}
- if ($debug) {
- // annotate divs with sprite IDs
- this.__LZdiv.id = 'inputtextsprite_' + this.uid;
- this.__LZclickcontainerdiv.id = 'click_' + this.__LZdiv.id;
- }
if (this.quirks.ie_leak_prevention) {
this.__sprites[this.uid] = this;
}
@@ -1154,3 +1149,7 @@
}
}
+LzInputTextSprite.prototype.setID = function(id){
+ if (!this.__LZdiv.id) this.__LZdiv.id = 'inputtextsprite' + id;
+ if (!this.__LZclickcontainerdiv.id) this.__LZclickcontainerdiv.id = 'click' + id;
+}
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2009-07-24 00:04:36 UTC (rev 14377)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2009-07-24 01:39:15 UTC (rev 14378)
@@ -180,11 +180,6 @@
}
}
- if ($debug || this.capabilities.accessibility) {
- // annotate divs with sprite IDs, but don't override existing IDs!
- if (!this.__LZdiv.id) this.__LZdiv.id = 'sprite_' + this.uid;
- if (!this.__LZclickcontainerdiv.id) this.__LZclickcontainerdiv.id = 'click_' + this.__LZdiv.id;
- }
this.__LZdiv.owner = this;
if (this.quirks.fix_clickable) {
this.__LZclickcontainerdiv.owner = this;
@@ -558,6 +553,7 @@
,linescrolling: false
,disableglobalfocustrap: true
,allowfullscreen: false
+ ,setid: true
}
LzSprite.prototype.__updateQuirks = function () {
@@ -2416,6 +2412,8 @@
// a <div style='display:none'> to make it invisible
this.aadescriptionDiv = aadiv = document.createElement('LABEL');
aadiv.className = 'lzaccessibilitydiv';
+ // annotate divs with sprite IDs, but don't override existing IDs!
+ if (!this.__LZdiv.id) this.__LZdiv.id = 'sprite_' + this.uid;
// Safari reader only speaks labels which have a 'for' attribute
aadiv.setAttribute('for', this.__LZdiv.id);
this.__LZdiv.appendChild(aadiv);
@@ -2429,7 +2427,6 @@
*/
LzSprite.prototype.setAccessible = function(accessible) {
// TODO [hqm 2009-06] also need to check LzBrowserKernel.isAAActive() when it is working
- var a = accessible;
LzSprite.__rootSprite.accessible = accessible;
}
@@ -2502,3 +2499,7 @@
}
}
+LzSprite.prototype.setID = function(id){
+ if (!this.__LZdiv.id) this.__LZdiv.id = 'sprite' + id;
+ if (!this.__LZclickcontainerdiv.id) this.__LZclickcontainerdiv.id = 'click' + id;
+}
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js 2009-07-24 00:04:36 UTC (rev 14377)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js 2009-07-24 01:39:15 UTC (rev 14378)
@@ -32,11 +32,6 @@
this.__LZclickcontainerdiv.className = 'lztextcontainer_click';
this.__LZclickcontainerdiv.owner = this;
}
- if ($debug) {
- // annotate divs with sprite IDs
- this.__LZdiv.id = 'textsprite_' + this.uid;
- this.__LZclickcontainerdiv.id = 'click_' + this.__LZdiv.id;
- }
if (this.quirks.ie_leak_prevention) {
this.__sprites[this.uid] = this;
}
@@ -821,5 +816,9 @@
}
}
+LzTextSprite.prototype.setID = function(id){
+ if (!this.__LZdiv.id) this.__LZdiv.id = 'textsprite' + id;
+ if (!this.__LZclickcontainerdiv.id) this.__LZclickcontainerdiv.id = 'click' + id;
+}
}
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2009-07-24 00:04:36 UTC (rev 14377)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2009-07-24 01:39:15 UTC (rev 14378)
@@ -73,6 +73,7 @@
,linescrolling: true
,disableglobalfocustrap: false
,allowfullscreen: true
+ ,setid: false
}
/** Turns accessibility on/off if accessible == true and a screen reader is active
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as 2009-07-24 00:04:36 UTC (rev 14377)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as 2009-07-24 01:39:15 UTC (rev 14378)
@@ -138,6 +138,7 @@
,linescrolling: true
,disableglobalfocustrap: false
,allowfullscreen: true
+ ,setid: false
};
var capabilities = LzSprite.capabilities;
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs 2009-07-24 00:04:36 UTC (rev 14377)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs 2009-07-24 01:39:15 UTC (rev 14378)
@@ -445,6 +445,10 @@
// Cache capabilities
this.capabilities = this.sprite.capabilities;
+ if ($debug && this.capabilities.setid) {
+ this.sprite.setID(this._dbg_name());
+ }
+
if (args['width'] != null || this.__LZhasConstraint('width')) {
this.hassetwidth = true;
this.__LZcheckwidth = false;
More information about the Laszlo-checkins
mailing list