Permalink
Browse files

Slider: Removed JS and CSS for option inline that does not exist.

Inline has never been documented as an option and is not in the options object. No need to add this option because it is simple enough and more flexible to set display inline-block and width for ui-slider in your custom CSS.
  • Loading branch information...
jaspermdegroot committed Dec 20, 2012
1 parent 5370652 commit 130932f4b86aba16b2d70d85f7304a070fc2d6be
Showing with 2 additions and 5 deletions.
  1. +0 −2 css/structure/jquery.mobile.forms.slider.css
  2. +2 −3 js/widgets/forms/slider.js
@@ -40,8 +40,6 @@ div.ui-slider-switch.ui-mini a.ui-slider-handle .ui-btn-inner { height: 30px; wi
span.ui-slider-label-a { z-index: 1; left: 0; text-indent: -1.5em; }
span.ui-slider-label-b { z-index: 0; right: 0; text-indent: 1.5em;}
.ui-slider-inline { width: 120px; display: inline-block; }
@media all and (min-width: 28em){
.ui-field-contain label.ui-slider { vertical-align: top; display: inline-block; width: 20%; margin: 0 2% 0 0; }
.ui-field-contain div.ui-slider { display: inline-block; width: 78%; }
@@ -40,7 +40,6 @@ $.widget( "mobile.slider", $.mobile.widget, {
min = !this.isToggleSwitch ? parseFloat( control.attr( "min" ) ) : 0,
max = !this.isToggleSwitch ? parseFloat( control.attr( "max" ) ) : control.find( "option" ).length-1,
step = window.parseFloat( control.attr( "step" ) || 1 ),
inlineClass = ( this.options.inline || control.jqmData( "inline" ) === true ) ? " ui-slider-inline" : "",
miniClass = ( this.options.mini || control.jqmData( "mini" ) ) ? " ui-mini" : "",
domHandle = document.createElement( "a" ),
handle = $( domHandle ),
@@ -56,7 +55,7 @@ $.widget( "mobile.slider", $.mobile.widget, {
this.element.addClass("ui-mini");
domHandle.setAttribute( "href", "#" );
domSlider.setAttribute( "role", "application" );
domSlider.className = ["ui-slider-app ",selectClass," ui-btn-down-",trackTheme," ui-btn-corner-all", inlineClass, miniClass].join( "" );
domSlider.className = ["ui-slider-app ",selectClass," ui-btn-down-",trackTheme," ui-btn-corner-all", miniClass].join( "" );
domHandle.className = "ui-slider-handle";
domSlider.appendChild( domHandle );
@@ -358,7 +357,7 @@ $.widget( "mobile.slider", $.mobile.widget, {
theme = this.options.theme || parentTheme,
trackTheme = this.options.trackTheme || parentTheme;
self.slider[0].className = ['ui-slider-app ', ( this.isToggleSwitch ) ? "ui-slider-switch" : ""," ui-btn-down-" + trackTheme,' ui-btn-corner-all', ( this.options.inline ) ? " ui-slider-inline" : "", ( this.options.mini ) ? " ui-mini":""].join( "" );
self.slider[0].className = ['ui-slider-app ', ( this.isToggleSwitch ) ? "ui-slider-switch" : ""," ui-btn-down-" + trackTheme,' ui-btn-corner-all', ( this.options.mini ) ? " ui-mini":""].join( "" );
if ( this.options.disabled || this.element.attr( "disabled" ) ) {
this.disable();
}

0 comments on commit 130932f

Please sign in to comment.