From 935ecb0ef751ac1d658932316e06410e70c483e0 Mon Sep 17 00:00:00 2001 From: haobug Date: Fri, 28 Jun 2013 05:18:19 +0800 Subject: Improve Linkwizard, make it can be used more than once. As reported in https://forum.dokuwiki.org/thread/9988 the previous implementation can not handle the situation of use the linkwiz more than once. Now you can use in you toolbar plugin 'type' => 'linkwiz' to make use of the handy Linkwizard for choosing the wiki pages. --- lib/scripts/toolbar.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/scripts/toolbar.js') diff --git a/lib/scripts/toolbar.js b/lib/scripts/toolbar.js index 6d75215e0..e33fa8677 100644 --- a/lib/scripts/toolbar.js +++ b/lib/scripts/toolbar.js @@ -211,9 +211,10 @@ function addBtnActionPicker($btn, props, edid) { * @return boolean If button should be appended * @author Andreas Gohr */ -function addBtnActionLinkwiz(btn, props, edid) { +function addBtnActionLinkwiz($btn, props, edid) { dw_linkwiz.init(jQuery('#'+edid)); - jQuery(btn).click(function(){ + jQuery($btn).click(function(){ + dw_linkwiz.val = props; dw_linkwiz.toggle(); return false; }); -- cgit v1.2.3