Skip to content

Commit ce314d1

Browse files
committed
XP checkbox handling, fix hiding of open issues
--HG-- extra : rebase_source : b2a88382c70703c4e6a77b20181c281af2115ecd
1 parent 797575b commit ce314d1

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

bin/issuegen.pl

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,21 @@ sub script {
236236
element.innerHTML = null;
237237
var check = document.createElement('input');
238238
check.type = 'checkbox';
239-
check.checked = true;
240-
sheet.addRule('pre.' + className, '');
241-
var rule = sheet.rules[sheet.rules.length - 1];
242-
check.onchange = function (e) {
243-
rule.style.display = this.checked ? 'block' : 'none';
239+
if (className == 'open') {
240+
check.checked = false;
241+
sheet.insertRule('pre:not(.open)' + '{}', sheet.cssRules.length);
242+
check.onchange = function (e) {
243+
rule.style.display = this.checked ? 'none' : 'block';
244+
}
244245
}
246+
else {
247+
check.checked = true;
248+
sheet.insertRule('pre.' + className + '{}', sheet.cssRules.length);
249+
check.onchange = function (e) {
250+
rule.style.display = this.checked ? 'block' : 'none';
251+
}
252+
}
253+
var rule = sheet.cssRules[sheet.cssRules.length - 1];
245254
element.appendChild(check);
246255
element.appendChild(span);
247256
}

0 commit comments

Comments
 (0)