From 84833ca15ec39e85d8c39457f0bb850a0a22525f Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Wed, 21 Jan 2015 12:34:01 +0100 Subject: Update to latest version of jRange (fixes issue #867) --- library/jRange/jquery.range.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'library/jRange/jquery.range.js') diff --git a/library/jRange/jquery.range.js b/library/jRange/jquery.range.js index 978b3e7ba..b3208387d 100644 --- a/library/jRange/jquery.range.js +++ b/library/jRange/jquery.range.js @@ -33,7 +33,9 @@ step : 1, format: '%s', theme : 'theme-green', - width : 300 + width : 300, + minRange: 0, + maxRange: 'auto' }, template : '
\
\ @@ -103,7 +105,8 @@ if(e.which !== 1){return;} e.stopPropagation(); e.preventDefault(); var pointer = $(e.target); - pointer.addClass('focused'); + this.pointers.removeClass('last-active'); + pointer.addClass('focused last-active'); this[(pointer.hasClass('low')?'low':'high') + 'Label'].addClass('focused'); $(document).on('mousemove.slider', $.proxy(this.onDrag, this, pointer)); $(document).on('mouseup.slider', $.proxy(this.onDragEnd, this)); @@ -280,6 +283,7 @@ options = typeof option === 'object' && option; if (!data) { $this.data('plugin_' + pluginName, (data = new jRange(this, options))); + $(window).resize(function() { data.setValue(data.getValue()); }); // Update slider position when window is resized to keep it in sync with scale } // if first argument is a string, call silimarly named function // this gives flexibility to call functions of the plugin e.g. @@ -294,4 +298,4 @@ return result || this; }; -})(jQuery, window, document); \ No newline at end of file +})(jQuery, window, document); -- cgit v1.2.3