Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 130932f

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.
1 parent 5370652 commit 130932f

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

css/structure/jquery.mobile.forms.slider.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ div.ui-slider-switch.ui-mini a.ui-slider-handle .ui-btn-inner { height: 30px; wi
4040
span.ui-slider-label-a { z-index: 1; left: 0; text-indent: -1.5em; }
4141
span.ui-slider-label-b { z-index: 0; right: 0; text-indent: 1.5em;}
4242

43-
.ui-slider-inline { width: 120px; display: inline-block; }
44-
4543
@media all and (min-width: 28em){
4644
.ui-field-contain label.ui-slider { vertical-align: top; display: inline-block; width: 20%; margin: 0 2% 0 0; }
4745
.ui-field-contain div.ui-slider { display: inline-block; width: 78%; }

js/widgets/forms/slider.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ $.widget( "mobile.slider", $.mobile.widget, {
4040
min = !this.isToggleSwitch ? parseFloat( control.attr( "min" ) ) : 0,
4141
max = !this.isToggleSwitch ? parseFloat( control.attr( "max" ) ) : control.find( "option" ).length-1,
4242
step = window.parseFloat( control.attr( "step" ) || 1 ),
43-
inlineClass = ( this.options.inline || control.jqmData( "inline" ) === true ) ? " ui-slider-inline" : "",
4443
miniClass = ( this.options.mini || control.jqmData( "mini" ) ) ? " ui-mini" : "",
4544
domHandle = document.createElement( "a" ),
4645
handle = $( domHandle ),
@@ -56,7 +55,7 @@ $.widget( "mobile.slider", $.mobile.widget, {
5655
this.element.addClass("ui-mini");
5756
domHandle.setAttribute( "href", "#" );
5857
domSlider.setAttribute( "role", "application" );
59-
domSlider.className = ["ui-slider-app ",selectClass," ui-btn-down-",trackTheme," ui-btn-corner-all", inlineClass, miniClass].join( "" );
58+
domSlider.className = ["ui-slider-app ",selectClass," ui-btn-down-",trackTheme," ui-btn-corner-all", miniClass].join( "" );
6059
domHandle.className = "ui-slider-handle";
6160
domSlider.appendChild( domHandle );
6261

@@ -358,7 +357,7 @@ $.widget( "mobile.slider", $.mobile.widget, {
358357
theme = this.options.theme || parentTheme,
359358
trackTheme = this.options.trackTheme || parentTheme;
360359

361-
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( "" );
360+
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( "" );
362361
if ( this.options.disabled || this.element.attr( "disabled" ) ) {
363362
this.disable();
364363
}

0 commit comments

Comments
 (0)