diff options
author | Andreas Gohr <andi@splitbrain.org> | 2013-08-09 23:55:39 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2013-08-09 23:55:39 +0200 |
commit | 72dda0b4378651b271f5fb516fb8e21a80ac3ebf (patch) | |
tree | 051174bdce5b4b228ae2676fcb585edccf04efbf /lib/plugins/extension/script.js | |
parent | 75e063084d865a011e074c29c5edb8569fe2cfe1 (diff) | |
download | rpg-72dda0b4378651b271f5fb516fb8e21a80ac3ebf.tar.gz rpg-72dda0b4378651b271f5fb516fb8e21a80ac3ebf.tar.bz2 |
added AJAX detail infos
Diffstat (limited to 'lib/plugins/extension/script.js')
-rw-r--r-- | lib/plugins/extension/script.js | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js index f2a6aae50..7480801ac 100644 --- a/lib/plugins/extension/script.js +++ b/lib/plugins/extension/script.js @@ -5,7 +5,7 @@ jQuery(function(){ * very simple lightbox * @link http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/super-simple-lightbox-with-css-and-jquery/ */ - jQuery('a.extension_screenshot').click(function(e) { + jQuery('#extension__manager a.extension_screenshot').click(function(e) { e.preventDefault(); //Get clicked link href @@ -31,4 +31,31 @@ jQuery(function(){ return false; }); + /** + * AJAX detail infos + */ + jQuery('#extension__manager a.info').click(function(e){ + e.preventDefault(); + + var $link = jQuery(this); + var $details = $link.parent().find('dl.details'); + if($details.length){ + $link.toggleClass('close'); + $details.toggle(); + return; + } + + $link.addClass('close'); + jQuery.get( + DOKU_BASE + 'lib/exe/ajax.php', + { + call: 'plugin_extension', + ext: $link.data('extid') + }, + function(data){ + $link.parent().append(data); + } + ); + }); + });
\ No newline at end of file |