Author: ben
Date: 2007-07-24 18:12:50 -0700 (Tue, 24 Jul 2007)
New Revision: 5782

Modified:
   openlaszlo/branches/4.0/
   openlaszlo/branches/4.0/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
   openlaszlo/branches/4.0/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
   openlaszlo/branches/4.0/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
Log:
Merged revisions 
4610-4623,4625-4651,4655-4659,4661-4664,4666-4672,4674-4681,4683-4692,4694-4699,4701-4713,4715-4716,4719-4732,4734-4738,4740-4741,4743-4744,4746-4747,4751-4753,4757-4758,4760-4762,4765,4768-4769,4771-4779,4781,4783,4785-4788,4791-4794,4796-4797,4799-4804,4808-4810,4812-4814,4816-4819,4822,4824-4832,4838-4841,4843-4844,4850-4853,4857,4859,4861-4865,4867,4871-4874,4877-4878,4880-4891,4894-4896,4899-4900,4902-4911,4913-4918,4920,4926-4930,4936,4942-4948,4950-4953,4955-4957,4960-4964,4966-4968,4971-4978,4981,4983-4985,4987-4989,4991-4998,5002-5013,5016-5026,5029-5030,5032,5034-5040,5044,5051-5052,5054-5060,5062-5063,5066,5070,5072,5076-5079,5085-5095,5104-5105,5107-5112,5114,5118-5121,5125,5131-5139,5142,5144,5146-5147,5149-5150,5152,5158-5159,5161-5167,5171-5173,5176-5189,5191,5193,5197-5198,5202-5207,5209-5211,5213,5216,5218-5224,5227,5230-5231,5233-5234,5238-5245,5247-5248,5250-5251,5255-5259,5261-5268,5270-5272,5276-5277,5280-5284,5286,5288-5291,5299-5303,53!
 
05-5308,5311-5312,5314-5316,5318,5321-5322,5326-5327,5329,5331-5332,5335-5336,5339,5341-5342,5345-5347,5349-5366,5368-5369,5372-5374,5379-5380,5382-5383,5386,5389-5390,5392,5395-5401,5403-5406,5408-5419,5421,5424-5425,5427-5431,5434-5435,5437-5438,5441-5447,5449-5453,5457-5460,5462-5463,5466,5468-5469,5471,5473-5478,5481-5487,5490-5495,5497-5501,5503,5505-5512,5514-5523,5527-5529,5531-5533,5536-5537,5539-5551,5554-5555,5557-5559,5561-5563,5565-5566,5569-5578,5581-5589,5593-5594,5597-5634,5637,5639-5643,5645-5650,5652-5654,5656,5658-5675,5677-5680,5682-5684,5687-5688,5690,5693-5695,5698,5700-5701,5705-5716,5719,5721,5724,5727,5729-5731,5733-5734,5736-5739,5741-5750,5752,5754,5756-5766,5768-5770,5772,5775,5777-5781
 via svnmerge from 
http://svn.openlaszlo.org/openlaszlo/branches/legals

.......
  r5747 | max | 2007-07-22 21:00:59 -0700 (Sun, 22 Jul 2007) | 28 lines
  
  Change 20070722-maxcarlson-g by [EMAIL PROTECTED] on 2007-07-22 12:13:31 PDT
      in /Users/maxcarlson/openlaszlo/legals-checkin
      for http://svn.openlaszlo.org/openlaszlo/branches/legals
  
  Summary: Fix inputtext focus and blurring in IE
  
  New Features:
  
  Bugs Fixed: LPP-4244 - Mouse handling busted in R5588 IE7 DHTML
  
  Technical Reviewer: promanik
  QA Reviewer: hminsky
  Doc Reviewer: (pending)
  
  Documentation: 
  
  Release Notes:
  
  Details: LzSprite.js - setWidth/Height() return new width value if changed.  
Optimize setOpacity.
  
  LzMouseKernel.js - Pass eventname and target into 
LzInputTextSprite.__hideIfNotFocused(), but only when fix_ie_clickable quirk is 
on.  Otherwise, act the same as before.
  
  LzInputTextSprite.js - Add __setglobalclickable() method and call it instead 
of calling __setCSSClassProperty() directly.  Turn global ckickability on when 
mousing out of inputtext, and off again when mousing back over the inputtext.  
This makes clickable views function they way they should without interfering 
with the inputtext.  setWidth/Height() use values returned from 
LzSprite.setWidth/Height().
      
  
  Tests: ant lztest, LPP-4244 pass.
.......
  r5757 | max | 2007-07-23 17:07:34 -0700 (Mon, 23 Jul 2007) | 24 lines
  
  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).
.......



Property changes on: openlaszlo/branches/4.0
___________________________________________________________________
Name: svnmerge-integrated
   - 
/openlaszlo/branches/legals:1-4607,4609-4664,4666-4716,4718-4744,4746-4749,4751-4755,4757-4758,4760-4766,4768-4781,4783,4785-4822,4824-4832,4835-4836,4838-4841,4843-4844,4848-4867,4871-4874,4877-4891,4894-4918,4920,4923,4925-4932,4934-4936,4938-4939,4942-4953,4955-4957,4960-4964,4966-4969,4971-4978,4981,4983-4989,4991-4998,5000,5002-5013,5016-5042,5044,5051-5052,5054-5060,5062-5066,5070,5072,5076-5079,5081,5085-5096,5101-5102,5104-5105,5107-5112,5114,5118-5121,5123,5125-5142,5144-5152,5156-5173,5176-5191,5193-5200,5202-5207,5209-5214,5216-5225,5227-5231,5233-5235,5237-5245,5247-5251,5253-5273,5276-5277,5279-5291,5295-5296,5298-5308,5311-5316,5318-5319,5321-5322,5324,5326-5329,5331-5332,5335-5336,5338-5366,5368-5370,5372-5380,5382-5390,5392-5406,5408-5419,5421-5422,5424-5453,5455-5469,5471-5495,5497-5523,5527-5529,5531-5533,5536-5537,5539-5551,5554-5563,5565-5567,5569-5589,5593-5595,5597-5634,5637,5639-5643,5645-5646
   + 
/openlaszlo/branches/legals:1-4607,4609-4664,4666-4716,4718-4744,4746-4749,4751-4755,4757-4758,4760-4766,4768-4781,4783,4785-4822,4824-4832,4835-4836,4838-4841,4843-4844,4848-4867,4871-4874,4877-4891,4894-4918,4920,4923,4925-4932,4934-4936,4938-4939,4942-4953,4955-4957,4960-4964,4966-4969,4971-4978,4981,4983-4989,4991-4998,5000,5002-5013,5016-5042,5044,5051-5052,5054-5060,5062-5066,5070,5072,5076-5079,5081,5085-5096,5101-5102,5104-5105,5107-5112,5114,5118-5121,5123,5125-5142,5144-5152,5156-5173,5176-5191,5193-5200,5202-5207,5209-5214,5216-5225,5227-5231,5233-5235,5237-5245,5247-5251,5253-5273,5276-5277,5279-5291,5295-5296,5298-5308,5311-5316,5318-5319,5321-5322,5324,5326-5329,5331-5332,5335-5336,5338-5366,5368-5370,5372-5380,5382-5390,5392-5406,5408-5419,5421-5422,5424-5453,5455-5469,5471-5495,5497-5523,5527-5529,5531-5533,5536-5537,5539-5551,5554-5563,5565-5567,5569-5589,5593-5595,5597-5634,5637,5639-5643,5645-5650,5652-5654,5656,5658-5675,5677-5680,5682-5684,5687-5688!
 
,5690,5693-5695,5698,5700-5701,5705-5716,5719,5721,5724,5727,5729-5731,5733-5734,5736-5739,5741-5750,5752,5754,5756-5766,5768-5770,5772,5775,5777-5781

Modified: 
openlaszlo/branches/4.0/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
===================================================================
--- openlaszlo/branches/4.0/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js   
2007-07-25 00:45:39 UTC (rev 5781)
+++ openlaszlo/branches/4.0/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js   
2007-07-25 01:12:50 UTC (rev 5782)
@@ -74,6 +74,7 @@
         this.__LZinputclickdiv.className = 'lzclickdiv';
         this.__LZinputclickdiv.owner = this;
         this.__LZinputclickdiv.onmouseover = function () {
+            LzInputTextSprite.prototype.__setglobalclickable(false);
             this.owner.__show();
         }
         this.__LZclickdiv.appendChild(this.__LZinputclickdiv);
@@ -110,19 +111,41 @@
     }
     if (this.quirks.fix_ie_clickable) {
         this.__LZclickdiv.appendChild(this.__LzInputDiv);
-        this.__setCSSClassProperty('.lzclickdiv', 'display', 'none');
+        this.__setglobalclickable(false);
     } else {
         this.__LZinputclickdiv.appendChild(this.__LzInputDiv);
     }
     //Debug.write('show');
 }
 
-LzInputTextSprite.prototype.__hideIfNotFocused = function() {
+LzInputTextSprite.prototype.__hideIfNotFocused = function(eventname, target) {
     if (LzInputTextSprite.prototype.__lastshown == null) return;
-    if (LzInputTextSprite.prototype.__focusedSprite != 
LzInputTextSprite.prototype.__lastshown) {
-        LzInputTextSprite.prototype.__lastshown.__hide();
+    if (LzSprite.prototype.quirks.fix_ie_clickable && eventname == 
'onmousemove') {
+        // track mouse position for inputtext when global clickable is false
+        if (LzInputTextSprite.prototype.__globalclickable == false && 
LzInputTextSprite.prototype.__focusedSprite && target) {
+            if (target.owner != LzInputTextSprite.prototype.__focusedSprite) {
+                LzInputTextSprite.prototype.__setglobalclickable(true);
+            } else {
+                LzInputTextSprite.prototype.__setglobalclickable(false);
+            }
+        }
+    } else {
+        if (eventname != null && LzInputTextSprite.prototype.__globalclickable 
== true) {
+            LzInputTextSprite.prototype.__setglobalclickable(false);
+        }
+        if (LzInputTextSprite.prototype.__focusedSprite != 
LzInputTextSprite.prototype.__lastshown) {
+            LzInputTextSprite.prototype.__lastshown.__hide();
+        }
     }
+
 }
+LzInputTextSprite.prototype.__setglobalclickable = function(c) {
+    if (! LzSprite.prototype.quirks.fix_ie_clickable) return;
+    if (c != LzInputTextSprite.prototype.__globalclickable) {
+        LzInputTextSprite.prototype.__globalclickable = c;
+        LzInputTextSprite.prototype.__setCSSClassProperty('.lzclickdiv', 
'display', c ? '' : 'none');
+    }
+}
 
 LzInputTextSprite.prototype.__hide = function() {
     if (this.__shown != true || this.disabled == true) return;
@@ -146,7 +169,7 @@
         // and make the click be displayed or not by whether it is before or 
after the (input) div? 
         // [max 1-18-2007] IE requires different nesting rules for inputtext.  
Also, if there are _any_ clickable divs behind the inputtext they'll grab 
clicks.  This is the reason I temporarily hide all clickable divs when the 
inputtext is selected -  and the reason the inputtext can't be a child of the 
clickable view.
 
-        this.__setCSSClassProperty('.lzclickdiv', 'display', '');
+        this.__setglobalclickable(true);
         this.__LzInputDiv = this.__LZclickdiv.removeChild(this.__LzInputDiv);
     } else {
         this.__LzInputDiv = 
this.__LZinputclickdiv.removeChild(this.__LzInputDiv);
@@ -179,6 +202,7 @@
     if (c) {
         this.__LzInputDiv.onblur = function (e) { this.owner.__textEvent(e, 
'onblur') }
         this.__LzInputDiv.onmousedown = function (e) { 
this.owner.__textEvent(e, 'onmousedown') }
+        this.__LzInputDiv.onmouseout = function (e) { 
this.owner.__textEvent(e, 'onmouseout') }
         this.__LzInputDiv.onfocus = function (e) { this.owner.__textEvent(e, 
'onfocus') }
         this.__LzInputDiv.onclick = function (e) { this.owner.__textEvent(e, 
'onclick') }
         this.__LzInputDiv.onkeyup = function (e) { this.owner.__textEvent(e, 
'onkeyup') }
@@ -201,6 +225,9 @@
     if (this.destroyed == true) return;
     var keycode = e ? e.keyCode : event.keyCode;
     if (eventname == 'onfocus' || eventname == 'onmousedown') {
+        if (eventname == 'onfocus') {
+            LzInputTextSprite.prototype.__setglobalclickable(false);
+        }
         LzInputTextSprite.prototype.__focusedSprite = this;         
         this.__show();
         if (eventname == 'onfocus' && this._cancelfocus) {
@@ -218,7 +245,9 @@
             this._cancelblur = false;
             return;
         }
-    }    
+    } else if (eventname == 'onmouseout') {
+        this.__setglobalclickable(true);
+    }
 
     //Debug.info('__textEvent', eventname, keycode);
     if (this.owner) this.owner.inputtextevent(eventname, keycode);
@@ -295,24 +324,26 @@
 LzInputTextSprite.prototype.setWidth = function (w) {
     if (w == null || w < 0 || isNaN(w) || this.width == w) return;
     // call LzSprite.setWidth();
-    this.__setWidth(w - this.____wpadding);
-    if (this.quirks.fix_clickable) {
-        var w = this.CSSDimension(this.width);
-        this.__LZclickdiv.style.width = w;
-        this.__LZinputclickdiv.style.width = w;
+    var nw = this.__setWidth(w - this.____wpadding);
+    if (this.quirks.fix_clickable && nw != null) {
+        this.__LZclickdiv.style.width = nw;
+        this.__LZinputclickdiv.style.width = nw;
     }   
 }
 
 LzInputTextSprite.prototype.setHeight = function (h) {
     if (h == null || h < 0 || isNaN(h) || this.height == h) return;
     // call LzSprite.setHeight();
-    this.__setHeight(h);
-    if (this.quirks.fix_clickable) {
-        var h = this.CSSDimension(this.height);
-        this.__LZclickdiv.style.height = h;
-        this.__LZinputclickdiv.style.height = h;
+    var nh = this.__setHeight(h);
+    if (this.quirks.fix_clickable && nh != null) {
+        this.__LZclickdiv.style.height = nh;
+        this.__LZinputclickdiv.style.height = nh;
         if (this.multiline && this.quirks.set_height_for_multiline_inputtext) {
-            this.__LzInputDiv.style.height = this.CSSDimension(this.height - 
(this.____hpadding * 2));
+            h = this.CSSDimension(h - (this.____hpadding * 2));
+            if (h != this._multilineheight) {
+                this._multilineheight = h;
+                this.__LzInputDiv.style.height = h
+            }
         }
     }   
 }   

Modified: openlaszlo/branches/4.0/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
===================================================================
--- openlaszlo/branches/4.0/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js       
2007-07-25 00:45:39 UTC (rev 5781)
+++ openlaszlo/branches/4.0/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js       
2007-07-25 01:12:50 UTC (rev 5782)
@@ -21,8 +21,15 @@
     ,__mouseEvent: function(e) {
         if (!e) e = window.event;
         var eventname = 'on' + e.type;
-        if (window['LzKeyboardKernel']) LzKeyboardKernel.__keyboardEvent(e);
-        if (window['LzInputTextSprite'] && eventname != 'onmousemove' && 
LzInputTextSprite.prototype.__lastshown != null) 
LzInputTextSprite.prototype.__hideIfNotFocused();
+        var targ = e.srcElement ? e.srcElement : e.target; 
+        if (window['LzKeyboardKernel'] && LzKeyboardKernel['__keyboardEvent']) 
LzKeyboardKernel.__keyboardEvent(e);
+        if (window['LzInputTextSprite']) {
+            if (LzSprite.prototype.quirks.fix_ie_clickable) {
+                LzInputTextSprite.prototype.__hideIfNotFocused(eventname, 
targ);
+            } else if (eventname != 'onmousemove' && 
LzInputTextSprite.prototype.__lastshown != null) {
+                LzInputTextSprite.prototype.__hideIfNotFocused();
+            }
+        }
         if (eventname == 'onmouseup' && LzMouseKernel.__lastMouseDown != null) 
{
             // call mouseup on the sprite that got the last mouse down  
             LzMouseKernel.__lastMouseDown.__globalmouseup(e);
@@ -38,7 +45,6 @@
         if (LzMouseKernel.__callback) {
             if (e.button == 2 && eventname != 'oncontextmenu') return;
             if (eventname == 'oncontextmenu') {
-                var targ = e.srcElement ? e.srcElement : e.target; 
                 if (targ && targ.owner && targ.owner.__contextmenu) {
                     targ.owner.__contextmenu.__show();
                     return targ.owner.__contextmenu.showbuiltins;

Modified: openlaszlo/branches/4.0/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/branches/4.0/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js    
2007-07-25 00:45:39 UTC (rev 5781)
+++ openlaszlo/branches/4.0/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js    
2007-07-25 01:12:50 UTC (rev 5782)
@@ -206,6 +206,7 @@
     ,inputtext_parents_cannot_contain_clip: false
     ,minimize_opacity_changes: false
     ,set_height_for_multiline_inputtext: false
+    ,ie_opacity: false
 }
 
 LzSprite.prototype.capabilities = {
@@ -232,8 +233,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;
 
@@ -664,10 +671,15 @@
 
     //Debug.info('setWidth', w);
     this.width = w;
-    this.__LZdiv.style.width = this.CSSDimension( w );
-    if (this.clip) this.__updateClip();
-    if (this.stretches) this.__updateStretches();
-    if (this.__LZclick) this.__LZclick.style.width = this.__LZdiv.style.width;
+    w = this.CSSDimension(w);
+    if (this._w != w) {
+        this._w = w;
+        this.__LZdiv.style.width = w;
+        if (this.clip) this.__updateClip();
+        if (this.stretches) this.__updateStretches();
+        if (this.__LZclick) this.__LZclick.style.width = w;
+        return w;
+    }
 }
 
 LzSprite.prototype.setY = function ( y ){
@@ -686,10 +698,15 @@
 
     this.height = h;
     //Debug.info('setHeight', h, this.height, this.owner);
-    this.__LZdiv.style.height = this.CSSDimension( h );
-    if (this.clip) this.__updateClip();
-    if (this.stretches) this.__updateStretches();
-    if (this.__LZclick) this.__LZclick.style.height = 
this.__LZdiv.style.height;
+    h = this.CSSDimension(h);
+    if (this._h != h) {
+        this._h = h;
+        this.__LZdiv.style.height = h; 
+        if (this.clip) this.__updateClip();
+        if (this.stretches) this.__updateStretches();
+        if (this.__LZclick) this.__LZclick.style.height = h;
+        return h;
+    }
 }
 
 /**
@@ -754,11 +771,30 @@
     if (this.opacity == o || o < 0) return;
     //Debug.info('setOpacity', o);
     this.opacity = o;
-    if (o < .001) o = 0;
-    if (this.quirks.ie_alpha_image_loader) {
-        this.__LZdiv.style.filter = "alpha(opacity="+(o * 100)+")";
-    } else {
-        this.__LZdiv.style.opacity = o;
+    o = parseInt(o * 100) / 100;
+    if (o != this._opacity) { 
+        this._opacity = o;
+        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 {
+            if (o == 1) {
+                this.__LZdiv.style.opacity = "";
+            } else {
+                this.__LZdiv.style.opacity = o;
+            }
+        }
     }
 }
 
@@ -847,6 +883,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

Reply via email to