aboutsummaryrefslogtreecommitdiffstats
path: root/library/jRange/jquery.range.js
diff options
context:
space:
mode:
authorHabeas Codice <habeascodice@federated.social>2015-01-21 21:27:07 -0800
committerHabeas Codice <habeascodice@federated.social>2015-01-21 21:27:07 -0800
commitc05f0ec40784a17de2e675c4d684d3a0c54228b0 (patch)
treefdab07506568d57c9abbac72511c5c04ea46f2fd /library/jRange/jquery.range.js
parent6d291d880e14c0489277fd670f235bdb60bcfcd5 (diff)
parent7d0e0366b946093f81e1ea4e358697fe5a22be64 (diff)
downloadvolse-hubzilla-c05f0ec40784a17de2e675c4d684d3a0c54228b0.tar.gz
volse-hubzilla-c05f0ec40784a17de2e675c4d684d3a0c54228b0.tar.bz2
volse-hubzilla-c05f0ec40784a17de2e675c4d684d3a0c54228b0.zip
Merge branch 'master' of https://github.com/friendica/red
Diffstat (limited to 'library/jRange/jquery.range.js')
-rw-r--r--library/jRange/jquery.range.js10
1 files changed, 7 insertions, 3 deletions
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 : '<div class="slider-container">\
<div class="back-bar">\
@@ -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);