Refactored the setCheckboxes code with jQuery
This commit is contained in:
@@ -1202,12 +1202,12 @@ function setVerticalPointer(theRow, theColNum, theAction, theDefaultClass1, theD
|
|||||||
* @return boolean always true
|
* @return boolean always true
|
||||||
*/
|
*/
|
||||||
function setCheckboxes( container_id, state ) {
|
function setCheckboxes( container_id, state ) {
|
||||||
var checkboxes = document.getElementById(container_id).getElementsByTagName('input');
|
|
||||||
|
|
||||||
for ( var i = 0; i < checkboxes.length; i++ ) {
|
if(state) {
|
||||||
if ( checkboxes[i].type == 'checkbox' ) {
|
$("#"+container_id).find("input:checkbox").attr('checked', 'checked');
|
||||||
checkboxes[i].checked = state;
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$("#"+container_id).find("input:checkbox").removeAttr('checked');
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user