FSN#35927 Range selectie bij meerdere checkboxen
svn path=/Website/trunk/; revision=28670
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user