Commit 5fa9026a authored by Jonny Bradley's avatar Jonny Bradley

[FIX] listexec: Stop the select all checkbox from changing disabled checkboxes...

[FIX] listexec: Stop the select all checkbox from changing disabled checkboxes - code in two tpls to cover standard and custom table output (thanks Xavi)
parent 12798ecd
......@@ -86,12 +86,13 @@
<input type="submit" class="btn btn-default btn-sm" title="{tr}Apply Changes{/tr}" value="{tr}Apply{/tr}">
</form>
{jq}
$('.listexecute-select-all').removeClass('listexecute-select-all')
.on('click', function (e) {
if( this.checked )
$(this).closest('form').find(':checkbox:not(:checked)').click();
else
$(this).closest('form').find(':checkbox:checked').click();
});
$('.listexecute-select-all').removeClass('listexecute-select-all').on('click', function (e) {
if( this.checked ) {
$(this).closest('form').find(':checkbox:not(:checked):not(:disabled)').click();
} else {
$(this).closest('form').find(':checkbox:checked:not(:disabled)').click();
}
e.preventDefault();
});
{/jq}
{/if}
\ No newline at end of file
......@@ -23,9 +23,12 @@
<input type="submit" class="btn btn-default btn-sm" title="{tr}Apply Changes{/tr}" value="{tr}Apply{/tr}">
</form>
{jq}
$('.listexecute-select-all').removeClass('listexecute-select-all')
.on('click', function (e) {
$(this).closest('form').find(':checkbox:not(:checked)').click();
e.preventDefault();
});
$('.listexecute-select-all').removeClass('listexecute-select-all').on('click', function (e) {
if( this.checked ) {
$(this).closest('form').find(':checkbox:not(:checked):not(:disabled)').click();
} else {
$(this).closest('form').find(':checkbox:checked:not(:disabled)').click();
}
e.preventDefault();
});
{/jq}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment