mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-30 23:42:33 +01:00
c181096b51
New: Series Editor controls are always visible New: Can shift-click to select series in editor Fixed: Maximum form elements increased
16 lines
625 B
JavaScript
16 lines
625 B
JavaScript
(function ($) {
|
|
$.fn.enableCheckboxRangeSelection = function () {
|
|
var lastCheckbox = null;
|
|
var $spec = this;
|
|
$spec.unbind("click.checkboxrange");
|
|
$spec.bind("click.checkboxrange", function (e) {
|
|
if (lastCheckbox != null && (e.shiftKey || e.metaKey)) {
|
|
$spec.slice(
|
|
Math.min($spec.index(lastCheckbox), $spec.index(e.target)),
|
|
Math.max($spec.index(lastCheckbox), $spec.index(e.target)) + 1
|
|
).prop('checked', e.target.checked);
|
|
}
|
|
lastCheckbox = e.target;
|
|
});
|
|
};
|
|
})(jQuery); |