FSN#35927 Range selectie bij meerdere checkboxen

svn path=/Website/trunk/; revision=28670
This commit is contained in:
Jos Groot Lipman
2016-03-29 17:31:11 +00:00
parent 1e521ef1ff
commit 13e6357e53

View File

@@ -48,6 +48,27 @@ $(document).ready(function() {
delayed(200, doFilter);
});
};
// Bij multi-select Shift-toets gebruiken voor een range
var lastChecked = null;
$(document).ready(function() {
var $chkboxes = $('input.multiselect');
$chkboxes.click(function(e) {
if(!lastChecked) {
lastChecked = this;
return;
}
if(e.shiftKey) {
var start = $chkboxes.index(this);
var end = $chkboxes.index(lastChecked);
$chkboxes.slice(Math.min(start,end), Math.max(start,end)+ 1).prop('checked', lastChecked.checked);
}
lastChecked = this;
});
});
});
function resizeWhenInIFrame()