diff options
author | haobug <qingxianhao@gmail.com> | 2013-06-28 05:18:19 +0800 |
---|---|---|
committer | haobug <qingxianhao@gmail.com> | 2013-06-28 07:51:36 +0800 |
commit | 935ecb0ef751ac1d658932316e06410e70c483e0 (patch) | |
tree | a2d217c6153ad785029eaaa97d552ee8418ddc38 /lib/scripts/toolbar.js | |
parent | 8ff58cbbee0b684c609d5a559e51e9f4ba41dad4 (diff) | |
download | rpg-935ecb0ef751ac1d658932316e06410e70c483e0.tar.gz rpg-935ecb0ef751ac1d658932316e06410e70c483e0.tar.bz2 |
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.
Diffstat (limited to 'lib/scripts/toolbar.js')
-rw-r--r-- | lib/scripts/toolbar.js | 5 |
1 files changed, 3 insertions, 2 deletions
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 <gohr@cosmocode.de> */ -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; }); |