[richfaces-svn-commits] JBoss Rich Faces SVN: r15960 - in branches/sandbox/3.3.X_JSF2/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html: script and 1 other directory.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Sun Nov 22 11:11:32 EST 2009


Author: Alex.Kolonitsky
Date: 2009-11-22 11:11:32 -0500 (Sun, 22 Nov 2009)
New Revision: 15960

Modified:
   branches/sandbox/3.3.X_JSF2/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/css/slider.xcss
   branches/sandbox/3.3.X_JSF2/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
Log:
inputNumberSlider: orientation vertical - broken.
https://jira.jboss.org/jira/browse/RF-8152

Modified: branches/sandbox/3.3.X_JSF2/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/css/slider.xcss
===================================================================
--- branches/sandbox/3.3.X_JSF2/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/css/slider.xcss	2009-11-22 14:08:00 UTC (rev 15959)
+++ branches/sandbox/3.3.X_JSF2/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/css/slider.xcss	2009-11-22 16:11:32 UTC (rev 15960)
@@ -99,6 +99,17 @@
 	text-align : center;
 	z-index : 1;
 }
+
+.rich-inslider-handler-selected-vertical{
+	background-color : transparent;
+	width : 7px;
+	height : 8px;
+	font-size : 1px;
+	position : absolute;
+	text-align : center;
+	z-index : 1;
+}
+
 .rich-inslider-track{
 	background-position: left top;
 	background-repeat: repeat-x;

Modified: branches/sandbox/3.3.X_JSF2/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
===================================================================
--- branches/sandbox/3.3.X_JSF2/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js	2009-11-22 14:08:00 UTC (rev 15959)
+++ branches/sandbox/3.3.X_JSF2/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js	2009-11-22 16:11:32 UTC (rev 15960)
@@ -24,11 +24,11 @@
 	};
 	Object.extend(defaultOptions, options);
 		this.handle = $( id + "Handle" );
-		this.tip	= $( id + "Tip" );
-		this.track	= $( id + "Track" );
-		this.mainTable	= $( id );
+		this.tip = $( id + "Tip" );
+		this.track = $( id + "Track" );
+		this.mainTable = $( id );
 		var inputId = id + "Input";
-		this.input	= $(inputId) || document.getElementsByName(inputId)[0];
+		this.input = $(inputId) || document.getElementsByName(inputId)[0];
 		if(defaultOptions.showArrows){
 			var arrowIncId = id + "ArrowInc";
 			this.arrowInc = $(arrowIncId) || document.getElementsByName(arrowIncId)[0];
@@ -57,9 +57,9 @@
 			  this.classes.arrowSelected = "rich-inslider-handler-selected-vertical";
 			  this.classes.base = " " + this.trim(this.classes.temp.replace("rich-inslider-handler-vertical",""));
 			}
-		
-		this.classes.handleSelected = " " + defaultOptions.handleSelectedClass;
 
+        this.classes.handleSelected = defaultOptions.handleSelectedClass ? " " + defaultOptions.handleSelectedClass : ""; 
+
 		this.table = this.findTableForTrack(this.track);
 		
 		this.input.value = this.options.sliderValue;
@@ -356,10 +356,12 @@
 	},
 
 	startDrag: function(event) {
-		if (this.editInFocus)
+		if (this.editInFocus) {
 			this.input.blur();
-		window.document.onmouseup		= this.eventMouseUp.bindAsEventListener(this);
-		window.document.onmousemove		= this.eventMouseMove.bindAsEventListener(this);
+        }
+
+		window.document.onmouseup = this.eventMouseUp.bindAsEventListener(this);
+		window.document.onmousemove = this.eventMouseMove.bindAsEventListener(this);
 		Event.observe(document, "mouseout", this.eventWindowMouseOut);
 		this.editBlur();
 		this.prevMouseDownEvent = event;
@@ -381,7 +383,7 @@
 				} else {
 				    pointer = Event.pointerX(event);
 				}
-				var offsets	= Position.cumulativeOffset(this.track);
+				var offsets = Position.cumulativeOffset(this.track);
 				this.updating = true;
 				
 				var value;



More information about the richfaces-svn-commits mailing list