diff options
author | Andreas Gohr <andi@splitbrain.org> | 2008-08-17 22:38:41 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2008-08-17 22:38:41 +0200 |
commit | a00de5b59af578ac2c2a88d06027a06fc0d9ae1d (patch) | |
tree | 1e845c5664dce59afcd019da0dd026c7d9797b6a /lib | |
parent | 7d3c8d4263d48bd16be068d3b134f70451afac94 (diff) | |
download | rpg-a00de5b59af578ac2c2a88d06027a06fc0d9ae1d.tar.gz rpg-a00de5b59af578ac2c2a88d06027a06fc0d9ae1d.tar.bz2 |
tpl_actiondropdown added
This new template function allows a dropdown menu to be used to access all
the DokuWiki do actions with minimal space requirement.
darcs-hash:20080817203841-7ad00-f267285a3e9f119c5aaaf73ca276e3a2f1f72a94.gz
Diffstat (limited to 'lib')
-rw-r--r-- | lib/scripts/script.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/scripts/script.js b/lib/scripts/script.js index fd2679f01..8a5770f16 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -501,3 +501,20 @@ function cleanMsgArea(){ } } } + +/** + * Add the event handler to the actiondropdown + * + * @author Andreas Gohr <andi@splitbrain.org> + */ +addInitEvent(function(){ + var selector = $('action__selector'); + if(!selector) return; + + addEvent(selector,'change',function(e){ + this.form.submit(); + }); + + $('action__selectorbtn').style.display = 'none'; +}); + |