1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-29 02:40:25 +02:00

Fixes #1020 - checkall was failing.

This commit is contained in:
Cameron
2015-07-18 20:40:14 -07:00
parent e0f56d3641
commit 23a5be23eb
4 changed files with 14 additions and 11 deletions

View File

@@ -539,15 +539,18 @@ $(document).ready(function()
// Check-All checkbox toggle
$("input.toggle-all").click(function(evt) {
var selector = 'input[type="checkbox"].checkbox';
if($(this).val().indexOf('jstarget:') === 0) {
selector = 'input[type="checkbox"][name^="' + $(this).val().split(/jstarget\:/)[1] + '"]';
}
if($(this).is(":checked")){
$(selector).attr("checked", "checked");
if($(this).is(":checked")){
//$(selector).attr("checked", "checked");
$(selector).prop('checked', true);
}
else{
$(selector).removeAttr("checked");
$(selector).prop('checked',false);
// $(selector).removeAttr("checked");
}
});