Author: pyaschenko
Date: 2010-06-17 11:23:38 -0400 (Thu, 17 Jun 2010)
New Revision: 17636
Added:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/Copy
of bg_btn.png
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/Copy
of bg_press.png
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/bg_btn.png
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/bg_btn1.png
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/bg_field.png
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/bg_press.png
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/bg_press1.png
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/bg_shadow.png
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/down.gif
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/down1.gif
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/spacer.gif
Modified:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/autocomplete.js
Log:
autocomplete prototype
Modified:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/autocomplete.js
===================================================================
---
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/autocomplete.js 2010-06-17
10:59:10 UTC (rev 17635)
+++
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/autocomplete.js 2010-06-17
15:23:38 UTC (rev 17636)
@@ -60,7 +60,8 @@
var bindEventHandlers = function() {
if (this.options.buttonId) {
- rf.Event.bindById(this.options.buttonId, "click"+this.namespace,
onButtonShow, this);
+ rf.Event.bindById(this.options.buttonId, "mousedown"+this.namespace,
onButtonShow, this);
+ rf.Event.bindById(this.options.buttonId, "mouseup"+this.namespace,
onSelectMouseUp, this);
}
var inputEventHandlers = {};
@@ -81,15 +82,17 @@
};
var onSelectMouseDown = function () {
this.isMouseDown = true;
- console.log("onMouseDown");
+ console && console.log && console.log("onMouseDown");
};
var onSelectMouseUp = function () {
- this.isMouseDown = false;
- console.log("onMouseUp");
+ //this.isMouseDown = false;
+ rf.getDomElement(this.fieldId).focus();
+ console && console.log && console.log("onMouseUp");
};
var onButtonShow = function (event) {
- console.log("onButtonShow - "+this.timeoutId);
+ this.isMouseDown = true;
+ console && console.log && console.log("onButtonShow -
"+this.timeoutId);
if (this.timeoutId) {
window.clearTimeout(this.timeoutId);
this.timeoutId = null;
@@ -100,19 +103,21 @@
this.hide(event);
} else {
this.show(event);
- rf.getDomElement(this.fieldId).focus();
+ //rf.getDomElement(this.fieldId).focus();
}
};
var onFocus = function (event) {
+ console && console.log && console.log("onFocus");
};
var onBlur = function (event) {
- console.log("onBlur");
+ console && console.log && console.log("onBlur");
if (this.isMouseDown) {
rf.getDomElement(this.fieldId).focus();
- console.log("onBlur and focus");
- } else if (this.isVisible/*&& checkOnBlur.call(this, event)*/) {
+ this.isMouseDown = false;
+ console && console.log && console.log("---------> and
focus");
+ } else if (this.isVisible && !this.isMouseDown/*&&
checkOnBlur.call(this, event)*/) {
var _this = this;
this.timeoutId = window.setTimeout(function(){_this.hide();}, 200);
}
Added:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/Copy
of bg_btn.png
===================================================================
(Binary files differ)
Property changes on:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/Copy
of bg_btn.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/Copy
of bg_press.png
===================================================================
(Binary files differ)
Property changes on:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/Copy
of bg_press.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/bg_btn.png
===================================================================
(Binary files differ)
Property changes on:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/bg_btn.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/bg_btn1.png
===================================================================
(Binary files differ)
Property changes on:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/bg_btn1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/bg_field.png
===================================================================
(Binary files differ)
Property changes on:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/bg_field.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/bg_press.png
===================================================================
(Binary files differ)
Property changes on:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/bg_press.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/bg_press1.png
===================================================================
(Binary files differ)
Property changes on:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/bg_press1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/bg_shadow.png
===================================================================
(Binary files differ)
Property changes on:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/bg_shadow.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/down.gif
===================================================================
(Binary files differ)
Property changes on:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/down.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/down1.gif
===================================================================
(Binary files differ)
Property changes on:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/down1.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/spacer.gif
===================================================================
(Binary files differ)
Property changes on:
root/ui-sandbox/inputs/trunk/autocomplete/src/main/resources/META-INF/resources/script/images/spacer.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Show replies by date