diff options
author | Trent Richardson <trentdrichardson@gmail.com> | 2012-10-03 10:50:52 -0400 |
---|---|---|
committer | Trent Richardson <trentdrichardson@gmail.com> | 2012-10-03 10:50:52 -0400 |
commit | f00868af4c6ce6e6f55e983d4cd0c1f779a973d8 (patch) | |
tree | 0e239fa023d843a65d58eb902b9e796302bc7378 /jquery-ui-sliderAccess.js | |
parent | a623c563b33191a5302db989e9e1faa554e92ce8 (diff) | |
download | jQuery-Timepicker-Addon-f00868af4c6ce6e6f55e983d4cd0c1f779a973d8.zip jQuery-Timepicker-Addon-f00868af4c6ce6e6f55e983d4cd0c1f779a973d8.tar.gz jQuery-Timepicker-Addon-f00868af4c6ce6e6f55e983d4cd0c1f779a973d8.tar.bz2 |
RTL support
Diffstat (limited to 'jquery-ui-sliderAccess.js')
-rw-r--r-- | jquery-ui-sliderAccess.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/jquery-ui-sliderAccess.js b/jquery-ui-sliderAccess.js index 4c96bd5..be514d1 100644 --- a/jquery-ui-sliderAccess.js +++ b/jquery-ui-sliderAccess.js @@ -31,11 +31,12 @@ upText: '+', downText: '-', buttonset: true, - buttonsetTag: 'span' + buttonsetTag: 'span', + isRTL: false }, options), $buttons = $('<'+ o.buttonsetTag +' class="ui-slider-access">'+ - '<button data-icon="'+ o.downIcon +'" data-step="-'+ o.step +'">'+ o.downText +'</button>'+ - '<button data-icon="'+ o.upIcon +'" data-step="'+ o.step +'">'+ o.upText +'</button>'+ + '<button data-icon="'+ o.downIcon +'" data-step="'+ (o.isRTL? o.step : o.step*-1) +'">'+ o.downText +'</button>'+ + '<button data-icon="'+ o.upIcon +'" data-step="'+ (o.isRTL? o.step*-1 : o.step) +'">'+ o.upText +'</button>'+ '</'+ o.buttonsetTag +'>'); $buttons.children('button').each(function(j, jobj){ @@ -73,8 +74,8 @@ // adjust the width so we don't break the original layout var bOuterWidth = $buttons.css({ - marginLeft: (o.where == 'after'? 10:0), - marginRight: (o.where == 'before'? 10:0) + marginLeft: ((o.where == 'after' && !o.isRTL) || (o.where == 'before' && o.isRTL)? 10:0), + marginRight: ((o.where == 'before' && !o.isRTL) || (o.where == 'after' && o.isRTL)? 10:0) }).outerWidth(true) + 5; var tOuterWidth = $t.outerWidth(true); $t.css('display','inline-block').width(tOuterWidth-bOuterWidth); |