Author: abelevich
Date: 2010-05-19 12:41:26 -0400 (Wed, 19 May 2010)
New Revision: 17131
Added:
root/ui-sandbox/datascroller/trunk/ui/src/main/java/org/richfaces/renderkit/html/
root/ui-sandbox/datascroller/trunk/ui/src/main/java/org/richfaces/renderkit/html/images/
root/ui-sandbox/datascroller/trunk/ui/src/main/java/org/richfaces/renderkit/html/images/DSButtonGradientImage.java
root/ui-sandbox/datascroller/trunk/ui/src/main/java/org/richfaces/renderkit/html/images/DSButtonOverGradientImage.java
root/ui-sandbox/datascroller/trunk/ui/src/main/java/org/richfaces/renderkit/html/images/DSDigitalGradientImage.java
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/org.richfaces.renderkit.html.images.DSButtonGradientImage.resource.properties
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/org.richfaces.renderkit.html.images.DSButtonOverGradientImage.resource.properties
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/org.richfaces.renderkit.html.images.DSDigitalGradientImage.resource.properties
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/resources/css/datascroller.ecss
Removed:
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/resources/css/datascroller.css
Modified:
root/ui-sandbox/datascroller/trunk/ui/src/main/java/org/richfaces/renderkit/DataScrollerBaseRenderer.java
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/dataTable.faces-config.xml
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/resources/script/datascroller.js
root/ui-sandbox/datascroller/trunk/ui/src/main/templates/datascroller.template.xml
Log:
skinning, add gradient image generation classes
Modified:
root/ui-sandbox/datascroller/trunk/ui/src/main/java/org/richfaces/renderkit/DataScrollerBaseRenderer.java
===================================================================
---
root/ui-sandbox/datascroller/trunk/ui/src/main/java/org/richfaces/renderkit/DataScrollerBaseRenderer.java 2010-05-19
16:38:35 UTC (rev 17130)
+++
root/ui-sandbox/datascroller/trunk/ui/src/main/java/org/richfaces/renderkit/DataScrollerBaseRenderer.java 2010-05-19
16:41:26 UTC (rev 17131)
@@ -48,7 +48,7 @@
@ResourceDependency(name = "jquery.js"), @ResourceDependency(name =
"richfaces.js"),
@ResourceDependency(name = "richfaces-event.js"), @ResourceDependency(name
= "richfaces-queue.js"),
@ResourceDependency(name = "richfaces-base-component.js"),
@ResourceDependency(name = "script/datascroller.js"),
- @ResourceDependency(name = "css/datascroller.css")
+ @ResourceDependency(name = "css/datascroller.ecss")
})
public class DataScrollerBaseRenderer extends RendererBase {
@@ -201,15 +201,16 @@
styleClass = "";
}
- out.startElement(HTML.A_ELEMENT, component);
if (isCurrentPage) {
+ out.startElement(HTML.SPAN_ELEM, component);
out.writeAttribute(HTML.CLASS_ATTRIBUTE, "ds_digital ds_current
" + styleClass, null);
} else {
+ out.startElement(HTML.A_ELEMENT, component);
out.writeAttribute(HTML.CLASS_ATTRIBUTE, "ds_digital " +
styleClass, null);
+ out.writeAttribute(HTML.HREF_ATTR, "javascript:void(0);",
null);
}
- out.writeAttribute(HTML.HREF_ATTR, "javascript:void(0);", null);
if (null != style) {
out.writeAttribute(HTML.STYLE_ATTRIBUTE, style, null);
@@ -223,7 +224,12 @@
digital.put(id, page);
out.writeText(page, null);
- out.endElement(HTML.A_ELEMENT);
+
+ if(isCurrentPage) {
+ out.endElement(HTML.SPAN_ELEM);
+ } else {
+ out.endElement(HTML.A_ELEMENT);
+ }
}
return digital;
Added:
root/ui-sandbox/datascroller/trunk/ui/src/main/java/org/richfaces/renderkit/html/images/DSButtonGradientImage.java
===================================================================
---
root/ui-sandbox/datascroller/trunk/ui/src/main/java/org/richfaces/renderkit/html/images/DSButtonGradientImage.java
(rev 0)
+++
root/ui-sandbox/datascroller/trunk/ui/src/main/java/org/richfaces/renderkit/html/images/DSButtonGradientImage.java 2010-05-19
16:41:26 UTC (rev 17131)
@@ -0,0 +1,9 @@
+package org.richfaces.renderkit.html.images;
+
+import org.richfaces.renderkit.html.BaseGradient;
+
+public class DSButtonGradientImage extends BaseGradient {
+ public DSButtonGradientImage() {
+ super("headerGradientColor", "headerBackgroundColor");
+ }
+}
Added:
root/ui-sandbox/datascroller/trunk/ui/src/main/java/org/richfaces/renderkit/html/images/DSButtonOverGradientImage.java
===================================================================
---
root/ui-sandbox/datascroller/trunk/ui/src/main/java/org/richfaces/renderkit/html/images/DSButtonOverGradientImage.java
(rev 0)
+++
root/ui-sandbox/datascroller/trunk/ui/src/main/java/org/richfaces/renderkit/html/images/DSButtonOverGradientImage.java 2010-05-19
16:41:26 UTC (rev 17131)
@@ -0,0 +1,9 @@
+package org.richfaces.renderkit.html.images;
+
+import org.richfaces.renderkit.html.BaseGradient;
+
+public class DSButtonOverGradientImage extends BaseGradient{
+ public DSButtonOverGradientImage() {
+ super("additionalBackgroundColor", "tableBackgroundColor");
+ }
+}
Added:
root/ui-sandbox/datascroller/trunk/ui/src/main/java/org/richfaces/renderkit/html/images/DSDigitalGradientImage.java
===================================================================
---
root/ui-sandbox/datascroller/trunk/ui/src/main/java/org/richfaces/renderkit/html/images/DSDigitalGradientImage.java
(rev 0)
+++
root/ui-sandbox/datascroller/trunk/ui/src/main/java/org/richfaces/renderkit/html/images/DSDigitalGradientImage.java 2010-05-19
16:41:26 UTC (rev 17131)
@@ -0,0 +1,9 @@
+package org.richfaces.renderkit.html.images;
+
+import org.richfaces.renderkit.html.BaseGradient;
+
+public class DSDigitalGradientImage extends BaseGradient {
+ public DSDigitalGradientImage() {
+ super("additionalBackgroundColor", "tableBackgroundColor");
+ }
+}
Modified:
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/dataTable.faces-config.xml
===================================================================
---
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/dataTable.faces-config.xml 2010-05-19
16:38:35 UTC (rev 17130)
+++
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/dataTable.faces-config.xml 2010-05-19
16:41:26 UTC (rev 17131)
@@ -7,4 +7,12 @@
<system-event-class>javax.faces.event.PreRenderComponentEvent</system-event-class>
</system-event-listener>
</application>
+ <render-kit>
+ <render-kit-id>HTML_BASIC</render-kit-id>
+ <renderer>
+ <component-family>org.richfaces.DataScroller</component-family>
+ <renderer-type>org.richfaces.DataScrollerRenderer</renderer-type>
+ <renderer-class>org.richfaces.renderkit.html.DataScrollerRenderer</renderer-class>
+ </renderer>
+ </render-kit>
</faces-config>
Added:
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/org.richfaces.renderkit.html.images.DSButtonGradientImage.resource.properties
===================================================================
Added:
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/org.richfaces.renderkit.html.images.DSButtonOverGradientImage.resource.properties
===================================================================
Added:
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/org.richfaces.renderkit.html.images.DSDigitalGradientImage.resource.properties
===================================================================
Deleted:
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/resources/css/datascroller.css
===================================================================
---
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/resources/css/datascroller.css 2010-05-19
16:38:35 UTC (rev 17130)
+++
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/resources/css/datascroller.css 2010-05-19
16:41:26 UTC (rev 17131)
@@ -1,75 +0,0 @@
-.ds_container{
- white-space : nowrap;
- display : inline-block;
- font-size : 11px/*generalSizeFont*/;
- padding : 1px;
- font-family : verdana/*generalFamilyFont*/;
- background : #ffffff/*background-color - tableBackgroundColor*/;
-}
-
-.ds_container_decor{
- border : 1px solid #A6A6A6/*tableBorderColor*/;
-}
-
-.ds_button{
- cursor : pointer;
- padding : 2px 10px 3px 10px;
- border : 1px solid #A6A6A6/*tableBorderColor*/;
- display : inline-block;
- background : url(images/bg_btn.png) top left repeat-x #C0D1E7/*gradient - from
headerGradientColor to headerBackgroundColor, background-color - headerBackgroundColor*/;
- font-size : 11px/*generalSizeFont*/;
- font-family : verdana/*generalFamilyFont*/;
- color : #000000/*generalTextColor*/;
- text-decoration:none;
- font-weight: normal;
-}
-
-.ds_left{
- margin-right : 1px;
-}
-
-.ds_right{
- margin-left : 1px;
-}
-
-.ds_digital{
- cursor : pointer;
- width : 2em;
- text-align : center;
- margin-left : 1px;
- margin-right : 1px;
- padding : 2px 2px 3px 2px;
- border : 1px solid transparent;
- border-top : 1px solid #A6A6A6/*tableBorderColor*/;
- background : url(images/bg_field.png) top left repeat-x/*gradient - from
additionalBackgroundColor to tableBackgroundColor, background-color -
tableBackgroundColor*/;
- display : inline-block;
- font-size : 11px/*generalSizeFont*/;
- font-family : verdana/*generalFamilyFont*/;
- text-decoration:none;
- color : #000000/*generalTextColor*/;
- font-weight: normal;
-
-}
-
-.ds_over{
- border : 1px solid #A6A6A6/*tableBorderColor*/;
- background : url(images/bg_field.png) top left repeat-x #FFFFFF; /*gradient - from
additionalBackgroundColor to tableBackgroundColor, background-color -
tableBackgroundColor*/;
-}
-
-.ds_press{
- border : 1px solid #A6A6A6/*tableBorderColor*/;
- background : #ECF3FA; /*background-color - additionalBackgroundColor*/;
-}
-
-.ds_current{
- cursor : default;
- font-weight : bold;
- border : 1px solid transparent;
- border-bottom : 1px solid #A6A6A6/*tableBorderColor*/;
- background : none;
-}
-
-.ds_disabled{
- color : #A6A6A6/*tableBorderColor*/;
- cursor : default;
-}
\ No newline at end of file
Added:
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/resources/css/datascroller.ecss
===================================================================
---
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/resources/css/datascroller.ecss
(rev 0)
+++
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/resources/css/datascroller.ecss 2010-05-19
16:41:26 UTC (rev 17131)
@@ -0,0 +1,114 @@
+a.ds_digital {
+ color: '#{richSkin.generalTextColor}';
+}
+
+a.ds_button {
+ color: '#{richSkin.generalTextColor}';
+}
+
+.ds_container {
+ white-space: nowrap;
+ display: inline-block;
+ font-size: '#{richSkin.generalSizeFont}';
+ padding: 1px;
+ font-family: '#{richSkin.generalFamilyFont}';
+ background: '#{richSkin.tableBackgroundColor}';
+}
+
+.ds_container_decor {
+ border-width: 1px;
+ border-style: solid;
+ border-color: '#{richSkin.tableBorderColor}';
+}
+
+.ds_button {
+ cursor: pointer;
+ padding: 2px 10px 3px 10px;
+ border-width: 1px;
+ border-style: solid;
+ border-color: '#{richSkin.tableBorderColor}';
+ display: inline-block;
+
+ background-position: top left;
+ background-repeat: repeat-x;
+ background-color: '#{richSkin.headerBackgroundColor}';
+ background-image:
"url(#{resource['org.richfaces.renderkit.html.images.DSButtonGradientImage']})";
+
+ font-size: '#{richSkin.generalSizeFont}';
+ font-family: '#{richSkin.generalFamilyFont}';
+ color: '#{richSkin.generalTextColor}';
+ text-decoration: none;
+ font-weight: normal;
+}
+
+.ds_left {
+ margin-right: 1px;
+}
+
+.ds_right {
+ margin-left: 1px;
+}
+
+.ds_digital {
+ cursor: pointer;
+ width: 2em;
+ text-align: center;
+ margin-left: 1px;
+ margin-right: 1px;
+ padding: 2px 2px 3px 2px;
+ border-width: 1px;
+ border-style: solid;
+ border-color: transparent;
+ border-top-width: 1px;
+ border-top-style: solid;
+ border-top-color: '#{richSkin.tableBorderColor}';
+
+ background-color: '#{richSkin.tableBackgroundColor}';
+ background-image:
"url(#{resource['org.richfaces.renderkit.html.images.DSDigitalGradientImage']})";
+
+
+ background-position: top left;
+ background-repeat: repeat-x;
+
+ display: inline-block;
+ font-size: '#{richSkin.generalSizeFont}';
+ font-family: '#{richSkin.generalFamilyFont}';
+ text-decoration: none;
+ color: '#{richSkin.generalTextColor}';
+ font-weight: normal;
+
+}
+
+.ds_over {
+ border-width : 1px;
+ border-style: solid;
+ border-color: '#{richSkin.tableBorderColor}';
+ background-position: top left;
+ background-repeat: repeat-x;
+ background-color: '#{richSkin.tableBackgroundColor}';
+ background-image:
"url(#{resource['org.richfaces.renderkit.html.images.DSButtonOverGradientImage']})";
+}
+
+.ds_press {
+ border-width: 1px;
+ border-style: solid;
+ border-color: '#{richSkin.tableBorderColor}';
+ background: '#{richSkin.additionalBackgroundColor}';
+}
+
+.ds_current {
+ cursor: default;
+ font-weight: bold;
+ border-width: 1px;
+ bordr-style: solid;
+ border-color: transparent;
+ border-bottom-width: 1px;
+ border-bottom-style: solid;
+ border-bottom-color: '#{richSkin.tableBorderColor}';
+ background: none;
+}
+
+.ds_disabled{
+ color: '#{richSkin.tableBorderColor}';
+ cursor: default;
+}
\ No newline at end of file
Modified:
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/resources/script/datascroller.js
===================================================================
---
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/resources/script/datascroller.js 2010-05-19
16:38:35 UTC (rev 17130)
+++
root/ui-sandbox/datascroller/trunk/ui/src/main/resources/META-INF/resources/script/datascroller.js 2010-05-19
16:41:26 UTC (rev 17131)
@@ -69,14 +69,14 @@
if(buttons) {
var leftButtons = buttons.left;
- css.mouseover = "ds_button ds_left ds_over";
+ css.mouseover = "ds_button ds_left";
css.mouseup = "ds_button ds_left";
css.mouseout = "ds_button ds_left";
css.mousedown = "ds_button ds_left ds_over";
initButtons(leftButtons,css, this);
var rightButtons = buttons.right;
- css.mouseover = "ds_button ds_right ds_over";
+ css.mouseover = "ds_button ds_right";
css.mouseup = "ds_button ds_right";
css.mouseout = "ds_button ds_right";
css.mousedown = "ds_button ds_right ds_over";
Modified:
root/ui-sandbox/datascroller/trunk/ui/src/main/templates/datascroller.template.xml
===================================================================
---
root/ui-sandbox/datascroller/trunk/ui/src/main/templates/datascroller.template.xml 2010-05-19
16:38:35 UTC (rev 17130)
+++
root/ui-sandbox/datascroller/trunk/ui/src/main/templates/datascroller.template.xml 2010-05-19
16:41:26 UTC (rev 17131)
@@ -25,9 +25,9 @@
</a>
</c:when>
<c:otherwise>
- <a id="#{clientId}_ds_f" class="ds_button ds_left
ds_disabled" href="javascript:void(0)">
+ <span id="#{clientId}_ds_f" class="ds_button ds_left
ds_disabled">
««
- </a>
+ </span>
</c:otherwise>
</c:choose>
</c:if>
@@ -41,9 +41,9 @@
</a>
</c:when>
<c:otherwise>
- <a id="#{clientId}_ds_fr" class="ds_button ds_left
ds_disabled" href="javascript:void(0)">
+ <span id="#{clientId}_ds_fr" class="ds_button ds_left
ds_disabled">
«
- </a>
+ </span>
</c:otherwise>
</c:choose>
</c:if>
@@ -58,9 +58,9 @@
</a>
</c:when>
<c:otherwise>
- <a id="#{clientId}_ds_ff" class="ds_button ds_right
ds_disabled" href="javascript:void(0)">
+ <span id="#{clientId}_ds_ff" class="ds_button ds_right
ds_disabled">
»
- </a>
+ </span>
</c:otherwise>
</c:choose>
</c:if>
@@ -73,9 +73,9 @@
</a>
</c:when>
<c:otherwise>
- <a id="#{clientId}_ds_l" class="ds_button ds_right
ds_disabled" href="javascript:void(0)">
+ <span id="#{clientId}_ds_l" class="ds_button ds_right
ds_disabled">
»»
- </a>
+ </span>
</c:otherwise>
</c:choose>
</c:if>