Author: max
Date: 2007-07-23 17:07:34 -0700 (Mon, 23 Jul 2007)
New Revision: 5757
Modified:
openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
Log:
Change 20070723-maxcarlson-r by [EMAIL PROTECTED] on 2007-07-23 13:14:59 PDT
in /Users/maxcarlson/openlaszlo/legals-checkin
for http://svn.openlaszlo.org/openlaszlo/branches/legals
Summary: Turn off opacity for opacity == 1, turn off alphaimageloader in ie7
New Features:
Bugs Fixed: LPP-4242 - Controls go to disabled state when outer view opacity
set in R5588 IE7 DHTML
Technical Reviewer: promanik
QA Reviewer: jcrowley
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: LzSprite.js - Separate ie_opacity into its own quirk. Turn off
ie_alpha_image_loader and turn on invisible_parent_image_sizing_fix quirks for
ie 7. setOpacity(0) hides the div, and setOpacity(1) removes the opacity css
property. Fix __findParents for cases where the parent sprite is null.
Tests: Fixes initial testcase in LPP-4242. Also fixes display bug in calendar
edit panel (select an event and click the (i) button).
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
2007-07-23 23:32:23 UTC (rev 5756)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
2007-07-24 00:07:34 UTC (rev 5757)
@@ -207,6 +207,7 @@
,minimize_opacity_changes: false
,set_height_for_multiline_inputtext: false
,ie_offset_position_by_2: false
+ ,ie_opacity: false
}
LzSprite.prototype.capabilities = {
@@ -234,8 +235,14 @@
//this.quirks['fix_clickable'] = true;
if (Lz.__BrowserDetect.isIE) {
// Provide IE PNG/opacity support
- this.quirks['ie_alpha_image_loader'] = true;
+ if (Lz.__BrowserDetect.version < 7) {
+ this.quirks['ie_alpha_image_loader'] = true;
+ } else {
+ this.quirks['invisible_parent_image_sizing_fix'] = true;
+ }
+ this.quirks['ie_opacity'] = true;
+
// IE DOM leak prevention
this.quirks['ie_leak_prevention'] = true;
@@ -782,10 +789,26 @@
o = parseInt(o * 100) / 100;
if (o != this._opacity) {
this._opacity = o;
- if (this.quirks.ie_alpha_image_loader) {
- this.__LZdiv.style.filter = "alpha(opacity=" + parseInt(o * 100) +
")";
+ if (o == 0) {
+ this.__LZdiv.style.display = 'none';
+ this._opacitywas0 = true;
+ } else if (this._opacitywas0) {
+ this._opacitywas0 = false;
+ this.__LZdiv.style.display = 'block';
+ }
+
+ if (this.quirks.ie_opacity) {
+ if (o == 1) {
+ this.__LZdiv.style.filter = "";
+ } else {
+ this.__LZdiv.style.filter = "alpha(opacity=" + parseInt(o *
100) + ")";
+ }
} else {
- this.__LZdiv.style.opacity = o;
+ if (o == 1) {
+ this.__LZdiv.style.opacity = "";
+ } else {
+ this.__LZdiv.style.opacity = o;
+ }
}
}
}
@@ -875,6 +898,7 @@
if (sprite[prop] != null) out.push(sprite);
do {
sprite = sprite.__parent;
+ if (! sprite) return out;
if (sprite[prop] != null) out.push(sprite);
//alert(sprite);
} while (sprite != LzSprite.__rootSprite)
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins