Trigger checkbox change event

This commit is contained in:
realies
2018-10-07 20:04:23 +01:00
committed by GitHub
parent 9d508a9abc
commit d96bd77677

View File

@@ -128,7 +128,7 @@ function ct() {
buttons(document.ct);
// inject global cpu pinning links
$('form[name=ct]').find('thead tr th:gt(1)').each((i, elem) => {
elem.innerHTML = elem.innerHTML.replace(/(\d+)/g, `<a href="javascript:void(0)" data-state="false" onclick="$(this).data('state', !$(this).data('state')); $('form[name=ct]').find('[name$=&quot;:$1&quot;]').prop('checked', $(this).data('state'))">$1</a>`);
elem.innerHTML = elem.innerHTML.replace(/(\d+)/g, `<a href="javascript:void(0)" data-state="false" onclick="$(this).data('state', !$(this).data('state')); $('form[name=ct]').find('[name$=&quot;:$1&quot;]').prop('checked', $(this).data('state')).change()">$1</a>`);
});
});
}