From a00de5b59af578ac2c2a88d06027a06fc0d9ae1d Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 17 Aug 2008 22:38:41 +0200 Subject: 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 --- lib/scripts/script.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/scripts') 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 + */ +addInitEvent(function(){ + var selector = $('action__selector'); + if(!selector) return; + + addEvent(selector,'change',function(e){ + this.form.submit(); + }); + + $('action__selectorbtn').style.display = 'none'; +}); + -- cgit v1.2.3