Last active
September 7, 2016 12:35
-
-
Save dorukcan/ef5ad31886b5960463170132432b64d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//MODULE TRANSFER | |
var result = []; | |
jQuery("#system-modules fieldset").each(function() { | |
jQuery(this).find(".form-checkbox").each(function() { | |
result.push([jQuery(this).attr("id"), jQuery(this).attr("checked")]); | |
}); | |
}); | |
console.log(JSON.stringify(result)) | |
values = []; | |
for (i = 0; i < values.length; i++) { | |
jQuery("#" + values[i][0]).attr("checked", values[i][1]); | |
} | |
//------------------------------------------------------------------------------------------- | |
//CK EDITOR BUTTONS TRANSFER | |
var result = []; | |
jQuery("#edit-buttons .form-checkbox").each(function(){ | |
result.push([jQuery(this).attr("id"), jQuery(this).attr("checked")]); | |
}); | |
console.log( JSON.stringify(result) ); | |
var values = []; | |
for (i = 0; i < values.length; i++) { | |
jQuery("#" + values[i][0]).attr("checked", values[i][1]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment