diff options
author | Andreas Gohr <andi@splitbrain.org> | 2011-08-19 13:06:25 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2011-08-19 13:06:57 +0200 |
commit | 38331508a78e955e63596e778f863996dfa7763b (patch) | |
tree | 8bfd6ae3f0f683629fd7142423ba67b327efa1e9 /lib/scripts/script.js | |
parent | 2c5ba7b2e80436af80001c436908217885ce4be3 (diff) | |
download | dokuwiki-38331508a78e955e63596e778f863996dfa7763b.tar.gz dokuwiki-38331508a78e955e63596e778f863996dfa7763b.zip |
jqueryized diff checkbox script
Diffstat (limited to 'lib/scripts/script.js')
-rw-r--r-- | lib/scripts/script.js | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/lib/scripts/script.js b/lib/scripts/script.js index 3e2ec4f89..caa2a107c 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -187,32 +187,4 @@ function closePopups(){ jQuery('div.JSpopup').hide(); } -/** - * disable multiple revisions checkboxes if two are checked - * - * @author Anika Henke <anika@selfthinker.org> - */ -addInitEvent(function(){ - var revForm = $('page__revisions'); - if (!revForm) return; - var elems = revForm.elements; - var countTicks = 0; - for (var i=0; i<elems.length; i++) { - var input1 = elems[i]; - if (input1.type=='checkbox') { - addEvent(input1,'click',function(e){ - if (this.checked) countTicks++; - else countTicks--; - for (var j=0; j<elems.length; j++) { - var input2 = elems[j]; - if (countTicks >= 2) input2.disabled = (input2.type=='checkbox' && !input2.checked); - else input2.disabled = (input2.type!='checkbox'); - } - }); - input1.checked = false; // chrome reselects on back button which messes up the logic - } else if(input1.type=='submit'){ - input1.disabled = true; - } - } -}); |