Author: pyaschenko
Date: 2010-10-07 12:20:20 -0400 (Thu, 07 Oct 2010)
New Revision: 19491
Modified:
trunk/core/impl/src/main/resources/META-INF/resources/richfaces-event.js
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/AutocompleteBase.js
Log:
https://jira.jboss.org/browse/RF-9439
Modified: trunk/core/impl/src/main/resources/META-INF/resources/richfaces-event.js
===================================================================
--- trunk/core/impl/src/main/resources/META-INF/resources/richfaces-event.js 2010-10-07
15:35:54 UTC (rev 19490)
+++ trunk/core/impl/src/main/resources/META-INF/resources/richfaces-event.js 2010-10-07
16:20:20 UTC (rev 19491)
@@ -184,6 +184,25 @@
return $(document.getElementById(id)).unbind(eventType, fn);
},
+ // TODO add jsdocs and qunits
+ bindScrollEventHandlers: function(element, handler, component) {
+ var elements = [];
+ element = richfaces.getDomElement(element).parentNode;
+ while (element && element!=window.document.body)
+ {
+ if (element.offsetWidth!=element.scrollWidth ||
element.offsetHeight!=element.scrollHeight)
+ {
+ elements.push(element);
+ richfaces.Event.bind(element, "scroll"+component.getNamespace(), handler,
component);
+ }
+ element = element.parentNode;
+ }
+ return elements;
+ },
+ unbindScrollEventHandlers: function(elements, component) {
+ richfaces.Event.unbind(elements, "scroll"+component.getNamespace());
+ },
+
/**
* Execute all handlers and behaviors attached to the matched elements for the given
event type.
* @function
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/AutocompleteBase.js
===================================================================
---
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/AutocompleteBase.js 2010-10-07
15:35:54 UTC (rev 19490)
+++
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/AutocompleteBase.js 2010-10-07
16:20:20 UTC (rev 19491)
@@ -1,24 +1,3 @@
-// TODO: move this extend to RichFaces.Event for exapmle
-$.extend(RichFaces.Event, {
- bindScrollEventHandlers: function(element, handler, component) {
- var elements = [];
- element = RichFaces.getDomElement(element).parentNode;
- while (element && element!=window.document.body)
- {
- if (element.offsetWidth!=element.scrollWidth ||
element.offsetHeight!=element.scrollHeight)
- {
- elements.push(element);
- RichFaces.Event.bind(element, "scroll"+component.getNamespace(), handler,
component);
- }
- element = element.parentNode;
- }
- return elements;
- },
- unbindScrollEventHandlers: function(elements, component) {
- RichFaces.Event.unbind(elements, "scroll"+component.getNamespace());
- }
-});
-
(function (rf) {
rf.KEYS = {
BACKSPACE: 8,
@@ -31,8 +10,8 @@
UP: 38,
RIGHT: 39,
DOWN: 40,
- DEL: 46,
- }
+ DEL: 46
+ };
})(RichFaces);
(function ($, rf) {
@@ -205,7 +184,7 @@
}
break;
}
- }
+ };
/*
* public API functions definition