Author: konstantin.mishin
Date: 2010-07-28 15:12:48 -0400 (Wed, 28 Jul 2010)
New Revision: 18265
Added:
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/java/org/richfaces/renderkit/html/images/SliderSelectedArrowBottom.java
Modified:
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.ecss
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.js
Log:
RF-8983
Modified:
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java
===================================================================
---
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java 2010-07-28
17:14:35 UTC (rev 18264)
+++
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowBase.java 2010-07-28
19:12:48 UTC (rev 18265)
@@ -50,22 +50,18 @@
private Dimension dimension = new Dimension(7, 7);
private int color;
- private final String colorName;
+ private String colorName = Skin.GENERAL_TEXT_COLOR;
- public SliderArrowBase() {
- this(Skin.GENERAL_TEXT_COLOR);
- }
-
- public SliderArrowBase(String colorName) {
- this.colorName = colorName;
- }
-
private void initialize() {
FacesContext context = FacesContext.getCurrentInstance();
Skin skin = SkinFactory.getInstance(context).getSkin(context);
this.color = skin.getColorParameter(context, colorName);
}
+ protected final void setColorName(String colorName) {
+ this.colorName = colorName;
+ }
+
public Dimension getDimension() {
return dimension;
}
Added:
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/java/org/richfaces/renderkit/html/images/SliderSelectedArrowBottom.java
===================================================================
---
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/java/org/richfaces/renderkit/html/images/SliderSelectedArrowBottom.java
(rev 0)
+++
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/java/org/richfaces/renderkit/html/images/SliderSelectedArrowBottom.java 2010-07-28
19:12:48 UTC (rev 18265)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.richfaces.renderkit.html.images;
+
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public class SliderSelectedArrowBottom extends SliderArrowBottom {
+
+ public SliderSelectedArrowBottom() {
+ setColorName("tipBorderColor");
+ }
+}
Modified:
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.ecss
===================================================================
---
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.ecss 2010-07-28
17:14:35 UTC (rev 18264)
+++
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.ecss 2010-07-28
19:12:48 UTC (rev 18265)
@@ -84,6 +84,10 @@
background-image:
url("#{resource['org.richfaces.renderkit.html.images.SliderArrowBottom']}");
}
+.rf-ins-h-s {
+ background-image:
url("#{resource['org.richfaces.renderkit.html.images.SliderSelectedArrowBottom']}");
+}
+
.rf-ins-db {
background-image:
url("#{resource['org.richfaces.renderkit.html.images.SliderArrowLeft']}");
}
Modified:
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.js
===================================================================
---
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.js 2010-07-28
17:14:35 UTC (rev 18264)
+++
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.js 2010-07-28
19:12:48 UTC (rev 18265)
@@ -98,6 +98,7 @@
var jQueryDocument = jQuery(document);
jQueryDocument.mousemove(jQuery.proxy(this.__mousemoveHandler, this));
jQueryDocument.one("mouseup", jQuery.proxy(this.__mouseupHandler,
this));
+ this.handle.addClass("rf-ins-h-s");
this.tooltip.show();
event.preventDefault();
},
@@ -109,6 +110,7 @@
},
__mouseupHandler: function () {
+ this.handle.removeClass("rf-ins-h-s");
this.tooltip.hide();
jQuery(document).unbind("mousemove", this.__mousemoveHandler);
}