blob: 7480801ac9971198582684bce6daa1f60153c4b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
jQuery(function(){
/**
* very simple lightbox
* @link http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/super-simple-lightbox-with-css-and-jquery/
*/
jQuery('#extension__manager a.extension_screenshot').click(function(e) {
e.preventDefault();
//Get clicked link href
var image_href = jQuery(this).attr("href");
// create lightbox if needed
var $lightbox = jQuery('#plugin__extensionlightbox');
if(!$lightbox.length){
$lightbox = jQuery('<div id="plugin__extensionlightbox"><p>Click to close</p><div></div></div>')
.appendTo(jQuery('body'))
.hide()
.click(function(){
$lightbox.hide();
});
}
// fill and show it
$lightbox
.show()
.find('div').html('<img src="' + image_href + '" />');
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);
}
);
});
});
|