Author: abelevich
Date: 2010-04-27 10:27:33 -0400 (Tue, 27 Apr 2010)
New Revision: 16820
Modified:
root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/datascroller.taglib.xml
root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/resources/script/datascroller.js
Log:
change api
Modified:
root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/datascroller.taglib.xml
===================================================================
---
root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/datascroller.taglib.xml 2010-04-27
14:07:01 UTC (rev 16819)
+++
root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/datascroller.taglib.xml 2010-04-27
14:27:33 UTC (rev 16820)
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<facelet-taglib version="2.0"
xmlns="http://java.sun.com/xml/ns/javaee" id="a4j">
+<facelet-taglib
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
+ version="2.0" id="a4j">
<
namespace>http://richfaces.org/datascroller</namespace>
<tag>
<tag-name>dataScroller</tag-name>
Modified:
root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/resources/script/datascroller.js
===================================================================
---
root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/resources/script/datascroller.js 2010-04-27
14:07:01 UTC (rev 16819)
+++
root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/resources/script/datascroller.js 2010-04-27
14:27:33 UTC (rev 16820)
@@ -1,4 +1,4 @@
-(function (jQuery, richfaces) {
+(function ($, richfaces) {
richfaces.ui = richfaces.ui || {};
@@ -6,6 +6,8 @@
$super.constructor.call(this,id);
+ this.attachToDom.call(this, id);
+
this.options = options;
this.currentPage = options.currentPage;
@@ -48,7 +50,7 @@
var $super = richfaces.BaseComponent.extend(richfaces.BaseComponent,
richfaces.ui.DataScroller);
- jQuery.extend(richfaces.ui.DataScroller.prototype, (function (options) {
+ $.extend(richfaces.ui.DataScroller.prototype, (function (options) {
var copy = function(data) {
var key;
@@ -105,7 +107,7 @@
for(id in buttons) {
- var element = jQuery(document.getElementById(id));
+ var element = $(document.getElementById(id));
data.id = id;
data.page = buttons[id];
@@ -139,11 +141,11 @@
},
next: function() {
- this.switchToPage("next");
+ this.switchToPage("fastforward");
},
previous: function() {
- this.switchToPage("previous");
+ this.switchToPage("fastrewind");
},
first: function() {
@@ -154,14 +156,6 @@
this.switchToPage("last");
},
- fastForward: function() {
- this.switchToPage("fastforward");
- },
-
- fastRewind: function() {
- this.switchToPage("fastrewind");
- },
-
getScrollEventName: function() {
return scrollEventName;
}