aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/styles
diff options
context:
space:
mode:
authorVjacheslav Trushkin <cyberalien@gmail.com>2013-05-23 11:23:19 +0300
committerVjacheslav Trushkin <cyberalien@gmail.com>2013-08-30 14:52:45 +0300
commit2c4fc9c8bdbedeecb9536fd2f5223512f62a32e1 (patch)
treef26cedaa9317d6a27bbfe551badd865b9ace2943 /phpBB/styles
parentafc12906b92c2cf126fa2ff9006583d0c4ef01ec (diff)
downloadforums-2c4fc9c8bdbedeecb9536fd2f5223512f62a32e1.tar
forums-2c4fc9c8bdbedeecb9536fd2f5223512f62a32e1.tar.gz
forums-2c4fc9c8bdbedeecb9536fd2f5223512f62a32e1.tar.bz2
forums-2c4fc9c8bdbedeecb9536fd2f5223512f62a32e1.tar.xz
forums-2c4fc9c8bdbedeecb9536fd2f5223512f62a32e1.zip
[ticket/11562] Convert marklist() to jQuery
PHPBB3-11562
Diffstat (limited to 'phpBB/styles')
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js17
1 files changed, 5 insertions, 12 deletions
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index eccb12e827..8f99fe5c60 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -42,19 +42,12 @@ function jumpto() {
* id = ID of parent container, name = name prefix, state = state [true/false]
*/
function marklist(id, name, state) {
- var parent = document.getElementById(id) || document[id];
-
- if (!parent) {
- return;
- }
-
- var rb = parent.getElementsByTagName('input');
-
- for (var r = 0; r < rb.length; r++) {
- if (rb[r].name.substr(0, name.length) === name) {
- rb[r].checked = state;
+ jQuery('#' + id + ' input[type=checkbox][name]').each(function() {
+ var $this = jQuery(this);
+ if ($this.attr('name').substr(0, name.length) == name) {
+ $this.prop('checked', state);
}
- }
+ });
}
/**