Author: abelevich
Date: 2011-01-11 07:21:10 -0500 (Tue, 11 Jan 2011)
New Revision: 20948
Modified:
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datascroller.ecss
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datascroller.js
trunk/ui/iteration/ui/src/main/templates/datascroller.template.xml
trunk/ui/iteration/ui/src/test/java/org/richfaces/renderkit/DataScrollerRenderTest.java
Log:
RF-8922: Following classes were added: rf-ds-btn-prev, rf-ds-btn-next, rf-ds-btn-first,
rf-ds-btn-last, rf-ds-btn-fastfwd, rf-ds-btn-fastrwd
Modified:
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datascroller.ecss
===================================================================
---
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datascroller.ecss 2011-01-11
12:07:52 UTC (rev 20947)
+++
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datascroller.ecss 2011-01-11
12:21:10 UTC (rev 20948)
@@ -50,11 +50,11 @@
font-weight: normal;
}
-.rf-ds-lft {
+.rf-ds-btn-first, .rf-ds-btn-fastrwd, .rf-ds-btn-prev {
margin-right: 1px;
}
-.rf-ds-rgh {
+.rf-ds-btn-next, .rf-ds-btn-fastfwd, .rf-ds-btn-last {
margin-left: 1px;
}
Modified:
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datascroller.js
===================================================================
---
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datascroller.js 2011-01-11
12:07:52 UTC (rev 20947)
+++
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datascroller.js 2011-01-11
12:21:10 UTC (rev 20948)
@@ -1,169 +1,146 @@
(function ($, richfaces) {
-
+
richfaces.ui = richfaces.ui || {};
-
- var initButtons = function(buttons, css, component) {
- var id;
- var fn = function(e) {
- e.data.fn.call(e.data.component, e);
- }
-
- var data = {};
- data.component = component;
+ var initButtons = function(buttons, css, component) {
+ var id;
- for(id in buttons) {
- var element = $(document.getElementById(id));
-
- data.id = id;
- data.page = buttons[id];
- data.element = element;
- data.fn = component.processClick;
+ var fn = function(e) {
+ e.data.fn.call(e.data.component, e);
+ }
- element.bind('click', copy(data), fn);
-
- if(css) {
- data.fn = component.processStyles;
- data.css = css.mousedown;
- element.bind('mousedown', copy(data), fn);
-
- data.css = css.mouseup;
- element.bind('mouseup', copy(data), fn);
-
- data.css = css.mouseout;
- element.bind('mouseout', copy(data), fn);
-
- data.css = css.mouseover;
- element.bind('mouseover', copy(data), fn);
- }
- }
- };
-
- var copy = function(data) {
- var key;
- var eventData = {};
-
- for (key in data) {
- eventData[key] = data[key];
- }
-
- return eventData;
- };
-
- richfaces.ui.DataScroller = function(id, submit, options) {
-
- $super.constructor.call(this, id);
-
- this.attachToDom();
-
- this.options = options;
+ var data = {};
+ data.component = component;
+
+ for (id in buttons) {
+ var element = $(document.getElementById(id));
+
+ data.id = id;
+ data.page = buttons[id];
+ data.element = element;
+ data.fn = component.processClick;
+
+ element.bind('click', copy(data), fn);
+ }
+ };
+
+ var copy = function(data) {
+ var key;
+ var eventData = {};
+
+ for (key in data) {
+ eventData[key] = data[key];
+ }
+
+ return eventData;
+ };
+
+ richfaces.ui.DataScroller = function(id, submit, options) {
+
+ $super.constructor.call(this, id);
+
+ var dataScrollerElement = this.attachToDom();
+
+ this.options = options;
this.currentPage = options.currentPage;
- var buttons = options.buttons;
+ var buttons = options.buttons;
var digitals = options.digitals;
-
- if (submit && typeof submit == 'function') {
- RichFaces.Event.bindById(id, this.getScrollEventName(), submit);
- }
-
+
+ if (submit && typeof submit == 'function') {
+ RichFaces.Event.bindById(id, this.getScrollEventName(), submit);
+ }
+
var css = {};
-
- if(buttons) {
- var leftButtons = buttons.left;
- css.mouseover = "rf-ds-btn rf-ds-lft";
- css.mouseup = "rf-ds-btn rf-ds-lft";
- css.mouseout = "rf-ds-btn rf-ds-lft";
- css.mousedown = "rf-ds-btn rf-ds-lft rf-ds-hov";
- initButtons(leftButtons,css, this);
-
- var rightButtons = buttons.right;
- css.mouseover = "rf-ds-btn rf-ds-rgh";
- css.mouseup = "rf-ds-btn rf-ds-rgh";
- css.mouseout = "rf-ds-btn rf-ds-rgh";
- css.mousedown = "rf-ds-btn rf-ds-rgh rf-ds-hov";
- initButtons(rightButtons,css, this);
+
+ if (buttons) {
+
+ $(dataScrollerElement).delegate('.rf-ds-btn', 'mouseover mouseup
mouseout mousedown', function(event) {
+ if (event.type == 'mousedown') {
+ $(this).addClass('rf-ds-hov');
+ } else {
+ $(this).removeClass('rf-ds-hov');
+ }
+ });
+
+ initButtons(buttons.left, css, this);
+ initButtons(buttons.right, css, this);
}
-
- if(digitals) {
- css.mouseover= "rf-ds-nmb-btn rf-ds-hov";
- css.mouseup= "rf-ds-nmb-btn rf-ds-hov";
- css.mouseout = "rf-ds-nmb-btn";
- css.mousedown="rf-ds-nmb-btn rf-ds-press";
- initButtons(digitals, css,this);
+
+ if (digitals) {
+
+ $(dataScrollerElement).delegate('.rf-ds-nmb-btn', 'mouseover
mouseup mouseout mousedown', function(event) {
+ if (event.type == 'mouseover' || event.type == 'mouseup')
{
+ $(this).addClass('rf-ds-hov');
+ } else if (event.type == 'mouseout') {
+ $(this).removeClass('rf-ds-hov');
+ } else if (event.type == 'mousedown') {
+ $(this).toggleClass('rf-ds-press');
+ }
+ });
+
+ initButtons(digitals, css, this);
}
};
-
- richfaces.BaseComponent.extend(richfaces.ui.DataScroller);
- var $super = richfaces.ui.DataScroller.$super;
-
+
+ richfaces.BaseComponent.extend(richfaces.ui.DataScroller);
+ var $super = richfaces.ui.DataScroller.$super;
+
$.extend(richfaces.ui.DataScroller.prototype, (function (options) {
-
- var scrollEventName = "rich:datascroller:onscroll";
-
+
+ var scrollEventName = "rich:datascroller:onscroll";
+
return {
-
- name: "RichFaces.ui.DataScroller",
- processClick: function(event) {
- var data = event.data;
- if(data) {
- var page = data.page;
- if(page) {
- this.switchToPage(page);
- }
- }
- },
-
- processStyles: function(event) {
- var data = event.data;
-
- if(data && (data.page != this.currentPage)) {
- var element = data.element;
- var css = data.css;
-
- if(element && css) {
- element.attr('class', css);
- }
- }
- },
-
- switchToPage: function(page) {
- if (typeof page != 'undefined' && page != null) {
- RichFaces.Event.fireById(this.id, this.getScrollEventName(), {'page' :
page});
- }
- },
-
- fastForward: function() {
- this.switchToPage("fastforward");
- },
-
- fastRewind: function() {
- this.switchToPage("fastrewind");
- },
-
- next: function() {
- this.switchToPage("next");
- },
-
- previous: function() {
- this.switchToPage("previous");
- },
-
- first: function() {
- this.switchToPage("first");
- },
-
- last: function() {
- this.switchToPage("last");
- },
-
- getScrollEventName: function() {
- return scrollEventName;
- },
- destroy: function() {
- $super.destroy.call(this);
- }
- }
-
+ name: "RichFaces.ui.DataScroller",
+
+ processClick: function(event) {
+ var data = event.data;
+ if (data) {
+ var page = data.page;
+ if (page) {
+ this.switchToPage(page);
+ }
+ }
+ },
+
+ switchToPage: function(page) {
+ if (typeof page != 'undefined' && page != null) {
+ RichFaces.Event.fireById(this.id, this.getScrollEventName(),
{'page' : page});
+ }
+ },
+
+ fastForward: function() {
+ this.switchToPage("fastforward");
+ },
+
+ fastRewind: function() {
+ this.switchToPage("fastrewind");
+ },
+
+ next: function() {
+ this.switchToPage("next");
+ },
+
+ previous: function() {
+ this.switchToPage("previous");
+ },
+
+ first: function() {
+ this.switchToPage("first");
+ },
+
+ last: function() {
+ this.switchToPage("last");
+ },
+
+ getScrollEventName: function() {
+ return scrollEventName;
+ },
+ destroy: function() {
+ $super.destroy.call(this);
+ }
+ }
+
})());
})(jQuery, window.RichFaces);
\ No newline at end of file
Modified: trunk/ui/iteration/ui/src/main/templates/datascroller.template.xml
===================================================================
--- trunk/ui/iteration/ui/src/main/templates/datascroller.template.xml 2011-01-11 12:07:52
UTC (rev 20947)
+++ trunk/ui/iteration/ui/src/main/templates/datascroller.template.xml 2011-01-11 12:21:10
UTC (rev 20948)
@@ -44,8 +44,8 @@
<c:if test="#{controlsState.firstRendered}">
<cdk:object type="boolean" name="isEnabled"
value="#{controlsState.firstEnabled}"/>
<cdk:object type="UIComponent" name="facet"
value="#{component.getFacet('first')}"/>
- <cdk:object type="String" name="enabledStyles"
value="rf-ds-btn rf-ds-lft"/>
- <cdk:object type="String" name="disabledStyles"
value="rf-ds-btn rf-ds-lft rf-ds-dis"/>
+ <cdk:object type="String" name="enabledStyles"
value="rf-ds-btn rf-ds-btn-first"/>
+ <cdk:object type="String" name="disabledStyles"
value="rf-ds-btn rf-ds-btn-first rf-ds-dis"/>
<cdk:object type="String" name="id"
value="#{clientId}_ds_f"/>
<cdk:object type="String" name="defaultText"
value="««««"/>
<xi:include xpointer="xpointer(/*)"
href="buttons.template.include" />
@@ -54,8 +54,8 @@
<c:if test="#{controlsState.fastRewindRendered}">
<cdk:object type="boolean" name="isEnabled"
value="#{controlsState.fastRewindEnabled}"/>
<cdk:object type="UIComponent" name="facet"
value="#{component.getFacet('fastRewind')}"/>
- <cdk:object type="java.lang.String" name="enabledStyles"
value="rf-ds-btn rf-ds-lft"/>
- <cdk:object type="java.lang.String" name="disabledStyles"
value="rf-ds-btn rf-ds-lft rf-ds-dis"/>
+ <cdk:object type="java.lang.String" name="enabledStyles"
value="rf-ds-btn rf-ds-btn-fastrwd"/>
+ <cdk:object type="java.lang.String" name="disabledStyles"
value="rf-ds-btn rf-ds-btn-fastrwd rf-ds-dis"/>
<cdk:object type="java.lang.String" name="id"
value="#{clientId}_ds_fr"/>
<cdk:object type="java.lang.String" name="defaultText"
value="««"/>
<xi:include xpointer="xpointer(/*)"
href="buttons.template.include" />
@@ -64,8 +64,8 @@
<c:if test="#{controlsState.previousRendered}">
<cdk:object name="isEnabled"
value="#{controlsState.previousEnabled}"/>
<cdk:object name="facet"
value="#{component.getFacet('previous')}"/>
- <cdk:object type="java.lang.String" name="enabledStyles"
value="rf-ds-btn rf-ds-lft"/>
- <cdk:object type="java.lang.String" name="disabledStyles"
value="rf-ds-btn rf-ds-lft rf-ds-dis"/>
+ <cdk:object type="java.lang.String" name="enabledStyles"
value="rf-ds-btn rf-ds-btn-prev"/>
+ <cdk:object type="java.lang.String" name="disabledStyles"
value="rf-ds-btn rf-ds-btn-prev rf-ds-dis"/>
<cdk:object name="id" value="#{clientId}_ds_prev"/>
<cdk:object name="defaultText" value="«"/>
<xi:include xpointer="xpointer(/*)"
href="buttons.template.include" />
@@ -76,8 +76,8 @@
<c:if test="#{controlsState.nextRendered}">
<cdk:object name="isEnabled"
value="#{controlsState.nextEnabled}"/>
<cdk:object name="facet"
value="#{component.getFacet('next')}"/>
- <cdk:object type="java.lang.String" name="enabledStyles"
value="rf-ds-btn rf-ds-rgh"/>
- <cdk:object type="java.lang.String" name="disabledStyles"
value="rf-ds-btn rf-ds-rgh rf-ds-dis"/>
+ <cdk:object type="java.lang.String" name="enabledStyles"
value="rf-ds-btn rf-ds-btn-next"/>
+ <cdk:object type="java.lang.String" name="disabledStyles"
value="rf-ds-btn rf-ds-btn-next rf-ds-dis"/>
<cdk:object name="id" value="#{clientId}_ds_next"/>
<cdk:object name="defaultText" value="»"/>
<xi:include xpointer="xpointer(/*)"
href="buttons.template.include" />
@@ -86,8 +86,8 @@
<c:if test="#{controlsState.fastForwardRendered}">
<cdk:object name="isEnabled"
value="#{controlsState.fastForwardEnabled}"/>
<cdk:object name="facet"
value="#{component.getFacet('fastForward')}"/>
- <cdk:object type="java.lang.String" name="enabledStyles"
value="rf-ds-btn rf-ds-rgh"/>
- <cdk:object type="java.lang.String" name="disabledStyles"
value="rf-ds-btn rf-ds-rgh rf-ds-dis"/>
+ <cdk:object type="java.lang.String" name="enabledStyles"
value="rf-ds-btn rf-ds-btn-fastfwd"/>
+ <cdk:object type="java.lang.String" name="disabledStyles"
value="rf-ds-btn rf-ds-btn-fastfwd rf-ds-dis"/>
<cdk:object name="id" value="#{clientId}_ds_ff"/>
<cdk:object name="defaultText"
value="»»"/>
<xi:include xpointer="xpointer(/*)"
href="buttons.template.include" />
@@ -96,8 +96,8 @@
<c:if test="#{controlsState.lastRendered}">
<cdk:object name="isEnabled"
value="#{controlsState.lastEnabled}"/>
<cdk:object name="facet"
value="#{component.getFacet('last')}"/>
- <cdk:object type="java.lang.String" name="enabledStyles"
value="rf-ds-btn rf-ds-rgh"/>
- <cdk:object type="java.lang.String" name="disabledStyles"
value="rf-ds-btn rf-ds-rgh rf-ds-dis"/>
+ <cdk:object type="java.lang.String" name="enabledStyles"
value="rf-ds-btn rf-ds-btn-last"/>
+ <cdk:object type="java.lang.String" name="disabledStyles"
value="rf-ds-btn rf-ds-btn-last rf-ds-dis"/>
<cdk:object name="id" value="#{clientId}_ds_l"/>
<cdk:object name="defaultText"
value="»»»»"/>
<xi:include xpointer="xpointer(/*)"
href="buttons.template.include" />
Modified:
trunk/ui/iteration/ui/src/test/java/org/richfaces/renderkit/DataScrollerRenderTest.java
===================================================================
---
trunk/ui/iteration/ui/src/test/java/org/richfaces/renderkit/DataScrollerRenderTest.java 2011-01-11
12:07:52 UTC (rev 20947)
+++
trunk/ui/iteration/ui/src/test/java/org/richfaces/renderkit/DataScrollerRenderTest.java 2011-01-11
12:21:10 UTC (rev 20948)
@@ -49,15 +49,15 @@
// first/fastRewind/previous buttons with arrows
HtmlElement first = getFirstButton(page, scrollerId);
assertEquals("span", first.getNodeName());
- assertEquals("rf-ds-btn rf-ds-lft rf-ds-dis",
first.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-first rf-ds-dis",
first.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
HtmlElement fastRewind = getFastRewindButton(page, scrollerId);
assertEquals("span", fastRewind.getNodeName());
- assertEquals("rf-ds-btn rf-ds-lft rf-ds-dis",
fastRewind.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-fastrwd rf-ds-dis",
fastRewind.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
HtmlElement previous = getPreviousButton(page, scrollerId);
assertEquals("span", previous.getNodeName());
- assertEquals("rf-ds-btn rf-ds-lft rf-ds-dis",
previous.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-prev rf-ds-dis",
previous.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
// currently selected digital button
HtmlElement dc1 = getDigitalButton(page, scrollerId, 1);
@@ -88,17 +88,17 @@
// next/fastForward/last buttons with arrows
HtmlElement next = getNextButton(page, scrollerId);
assertEquals("a", next.getNodeName());
- assertEquals("rf-ds-btn rf-ds-rgh",
next.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-next",
next.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
assertEquals("javascript:void(0);",
next.getAttribute(HtmlConstants.HREF_ATTR));
HtmlElement fastForward = getFastForwardButton(page, scrollerId);
assertEquals("a", fastForward.getNodeName());
- assertEquals("rf-ds-btn rf-ds-rgh",
fastForward.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-fastfwd",
fastForward.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
assertEquals("javascript:void(0);",
fastForward.getAttribute(HtmlConstants.HREF_ATTR));
HtmlElement last = getLastButton(page, scrollerId);
assertEquals("a", last.getNodeName());
- assertEquals("rf-ds-btn rf-ds-rgh",
last.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-last",
last.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
assertEquals("javascript:void(0);",
last.getAttribute(HtmlConstants.HREF_ATTR));
}
@@ -437,26 +437,26 @@
//check right buttons
assertEquals("a", fastForward.getNodeName());
- assertEquals("rf-ds-btn rf-ds-rgh",
fastForward.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-fastfwd",
fastForward.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
assertEquals("a", last.getNodeName());
- assertEquals("rf-ds-btn rf-ds-rgh",
last.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-last",
last.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
assertEquals("a", next.getNodeName());
- assertEquals("rf-ds-btn rf-ds-rgh",
next.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-next",
next.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
fastForward = getFastForwardButton(page, secondScrollerId);
- last = getFastForwardButton(page, secondScrollerId);
+ last = getLastButton(page, secondScrollerId);
next = getNextButton(page, secondScrollerId);
assertEquals("a", fastForward.getNodeName());
- assertEquals("rf-ds-btn rf-ds-rgh",
fastForward.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-fastfwd",
fastForward.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
assertEquals("a", last.getNodeName());
- assertEquals("rf-ds-btn rf-ds-rgh",
last.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-last",
last.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
assertEquals("a", next.getNodeName());
- assertEquals("rf-ds-btn rf-ds-rgh",
next.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-next",
next.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
//check if left buttons is disabled
HtmlElement fastRewind = getFastRewindButton(page, firstScrollerId);
@@ -464,26 +464,26 @@
HtmlElement previous = getPreviousButton(page, firstScrollerId);
assertEquals("span", fastRewind.getNodeName());
- assertEquals("rf-ds-btn rf-ds-lft rf-ds-dis",
fastRewind.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-fastrwd rf-ds-dis",
fastRewind.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
assertEquals("span", first.getNodeName());
- assertEquals("rf-ds-btn rf-ds-lft rf-ds-dis",
first.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-first rf-ds-dis",
first.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
assertEquals("span", previous.getNodeName());
- assertEquals("rf-ds-btn rf-ds-lft rf-ds-dis",
previous.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-prev rf-ds-dis",
previous.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
fastRewind = getFastRewindButton(page, secondScrollerId);
first = getFirstButton(page, secondScrollerId);
next = getNextButton(page, secondScrollerId);
assertEquals("span", fastRewind.getNodeName());
- assertEquals("rf-ds-btn rf-ds-lft rf-ds-dis",
fastRewind.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-fastrwd rf-ds-dis",
fastRewind.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
assertEquals("span", first.getNodeName());
- assertEquals("rf-ds-btn rf-ds-lft rf-ds-dis",
first.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-first rf-ds-dis",
first.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
assertEquals("span", previous.getNodeName());
- assertEquals("rf-ds-btn rf-ds-lft rf-ds-dis",
previous.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-prev rf-ds-dis",
previous.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
}
private void checkLastPageButtons(HtmlPage page, String firstScrollerId, String
secondScrollerId) throws Exception {
@@ -493,13 +493,13 @@
HtmlElement next = getNextButton(page, firstScrollerId);
assertEquals("span", fastForward.getNodeName());
- assertEquals("rf-ds-btn rf-ds-rgh rf-ds-dis",
fastForward.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-fastfwd rf-ds-dis",
fastForward.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
assertEquals("span", last.getNodeName());
- assertEquals("rf-ds-btn rf-ds-rgh rf-ds-dis",
last.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-last rf-ds-dis",
last.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
assertEquals("span", next.getNodeName());
- assertEquals("rf-ds-btn rf-ds-rgh rf-ds-dis",
next.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-next rf-ds-dis",
next.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
fastForward = getFastForwardButton(page, secondScrollerId);
@@ -507,13 +507,13 @@
next = getNextButton(page, secondScrollerId);
assertEquals("span", fastForward.getNodeName());
- assertEquals("rf-ds-btn rf-ds-rgh rf-ds-dis",
fastForward.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-fastfwd rf-ds-dis",
fastForward.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
assertEquals("span", last.getNodeName());
- assertEquals("rf-ds-btn rf-ds-rgh rf-ds-dis",
last.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-fastfwd rf-ds-dis",
last.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
assertEquals("span", next.getNodeName());
- assertEquals("rf-ds-btn rf-ds-rgh rf-ds-dis",
next.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-next rf-ds-dis",
next.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
//check if left buttons is enabled
HtmlElement fastRewind = getFastRewindButton(page, firstScrollerId);
@@ -521,26 +521,26 @@
HtmlElement previous = getPreviousButton(page, firstScrollerId);
assertEquals("a", fastRewind.getNodeName());
- assertEquals("rf-ds-btn rf-ds-lft",
fastRewind.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-fastrwd",
fastRewind.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
assertEquals("a", first.getNodeName());
- assertEquals("rf-ds-btn rf-ds-lft",
first.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-first",
first.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
assertEquals("a", previous.getNodeName());
- assertEquals("rf-ds-btn rf-ds-lft",
previous.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-prev",
previous.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
fastRewind = getFastRewindButton(page, secondScrollerId);
first = getFirstButton(page, secondScrollerId);
previous = getPreviousButton(page, secondScrollerId);
assertEquals("a", fastRewind.getNodeName());
- assertEquals("rf-ds-btn rf-ds-lft",
fastRewind.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-fastrwd",
fastRewind.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
assertEquals("a", first.getNodeName());
- assertEquals("rf-ds-btn rf-ds-lft",
first.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-first",
first.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
assertEquals("a", previous.getNodeName());
- assertEquals("rf-ds-btn rf-ds-lft",
previous.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-btn-prev",
previous.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
}
private String getCurrentPageContent(HtmlPage page, int i) throws Exception {