Private GIT

Skip to content
Snippets Groups Projects
Commit dbbe185b authored by Andrew Brampton's avatar Andrew Brampton
Browse files

Added shift select of the checkboxes on the mass update page.

parent 1159ac98
No related branches found
No related tags found
No related merge requests found
......@@ -76,4 +76,32 @@ $(document).ready(function(){
});
});
['.editCheck', '.updateCheck', '.refreshCheck', '.renameCheck', '.deleteCheck'].forEach(function(name) {
var lastCheck = null;
$(name).click(function(event) {
if(!lastCheck || !event.shiftKey) {
lastCheck = this;
return;
}
var check = this;
var found = 0;
$(name).each(function() {
switch (found) {
case 2: return false;
case 1: this.checked = lastCheck.checked;
}
if (this == check || this == lastCheck)
found++;
});
lastClick = this;
});
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment