Author: max
Date: 2006-11-08 18:36:01 -0800 (Wed, 08 Nov 2006)
New Revision: 2452
Modified:
openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js
openlaszlo/branches/legals/WEB-INF/lps/lfc/views/LzInputText.lzs
Log:
Change 20061108-maxcarlson-w by [EMAIL PROTECTED] on 2006-11-08 15:33:27 PST
in /Users/maxcarlson/openlaszlo/legals
Summary: Add focusing to inputtext boxes
New Features:
Bugs Fixed:
Technical Reviewer: promanik
QA Reviewer: hminsky
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Tests:
http://localhost:8080/legals/examples/components/style_example.lzx?lzr=dhtml
now selects the editable inputtext when an item is selected from the list.
Files:
M WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
M WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
M WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js
M WEB-INF/lps/lfc/views/LzInputText.lzs
Changeset:
http://svn.openlaszlo.org/openlaszlo/patches/20061108-maxcarlson-w.tar
Modified:
openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
===================================================================
---
openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
2006-11-09 02:19:09 UTC (rev 2451)
+++
openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
2006-11-09 02:36:01 UTC (rev 2452)
@@ -93,12 +93,13 @@
}
LzInputTextSprite.prototype.__textEvent = function ( e, eventname ){
+ if (this.destroyed == true) return;
var keycode = e ? e.keyCode : event.keyCode;
if (eventname == 'onfocus' || eventname == 'onmousedown') {
- LzKeyboardKernel.__cancelEnter = false;
+ if (LzKeyboardKernel) LzKeyboardKernel.__cancelEnter = false;
LzInputTextSprite.prototype.__focusedView = this.owner;
} else if (eventname == 'onblur') {
- LzKeyboardKernel.__cancelEnter = true;
+ if (LzKeyboardKernel) LzKeyboardKernel.__cancelEnter = true;
if (LzInputTextSprite.prototype.__focusedView == this.owner) {
LzInputTextSprite.prototype.__focusedView = null;
}
@@ -117,10 +118,12 @@
this.__LzInputDiv.maxLength = val;
}
-LzInputTextSprite.prototype.select = function (){
+LzInputTextSprite.prototype.select = function (start, end){
this.__LzInputDiv.select();
}
+LzInputTextSprite.prototype.setSelection = LzInputTextSprite.prototype.select;
+
LzInputTextSprite.prototype.deselect = function (){
//TODO: not implemented
}
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
2006-11-09 02:19:09 UTC (rev 2451)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
2006-11-09 02:36:01 UTC (rev 2452)
@@ -244,7 +244,7 @@
}
LzSprite.prototype.setResource = function ( r ){
-
+ if (this.resource == r) return;
if ( r.indexOf('http:') == 0 || r.indexOf('https:') == 0){
this.skiponload = false;
this.setSource( r );
@@ -927,10 +927,10 @@
var z = 1;
}
- this.__LZdiv.style['zIndex'] = z;
+ this.__LZdiv.style.zIndex = z;
//Debug.info('bringToFront', this.__oldZindex, this.__oldZindex2, this);
if (LzSprite.prototype.quirks.fix_clickable) {
- this.__LZclickdiv.style['zIndex'] = z;
+ this.__LZclickdiv.style.zIndex = z;
}
}
@@ -941,10 +941,10 @@
var z = 0;
}
- this.__LZdiv.style['zIndex'] = z;
+ this.__LZdiv.style.zIndex = z;
//Debug.info('sendToBack', this.__oldZindex);
if (LzSprite.prototype.quirks.fix_clickable) {
- this.__LZclickdiv.style['zIndex'] = z;
+ this.__LZclickdiv.style.zIndex = z;
}
}
Modified:
openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js
2006-11-09 02:19:09 UTC (rev 2451)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js
2006-11-09 02:36:01 UTC (rev 2452)
@@ -245,40 +245,19 @@
function setSelection ( start , end ){
// TODO: not implemented
+ Debug.warn('LzTextSprite.setSelection is not supported.');
}
function getSelectionPosition ( ){
// TODO: not implemented
+ Debug.warn('LzTextSprite.getSelectionPosition is not supported.');
}
function getSelectionSize ( ){
// TODO: not implemented
+ Debug.warn('LzTextSprite.getSelectionSize is not supported.');
}
-function setSelection ( start , end ){
-// TODO: not implemented
-}
-
-function getSelectionPosition ( ){
-// TODO: not implemented
-}
-
-function getSelectionSize ( ){
-// TODO: not implemented
-}
-
-function setSelection ( start , end ){
-// TODO: not implemented
-}
-
-function getSelectionPosition ( ){
-// TODO: not implemented
-}
-
-function getSelectionSize ( ){
-// TODO: not implemented
-}
-
/*
LzTextSprite.prototype.setWidth = function ( ){
// TODO: not implemented
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/views/LzInputText.lzs
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/views/LzInputText.lzs
2006-11-09 02:19:09 UTC (rev 2451)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/views/LzInputText.lzs
2006-11-09 02:36:01 UTC (rev 2452)
@@ -18,6 +18,7 @@
DeclareEvent(prototype, 'onenabled');
+DeclareEvent(prototype, 'onselect');
/*override*/ static var tagname = 'inputtext';
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins