blob: a7beaadcc67fbdbd5f5ae3d488bf896599ae9c86 (
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
|
<?php
/**
* Elgg lightbox
*
* Usage
* Apply the class elgg-lightbox to links.
*
* Advanced Usage
* Elgg is distributed with the Colorbox jQuery library. Please go to
* http://www.jacklmoore.com/colorbox for more information on the options of this lightbox.
*
* Overriding
* In a plugin, override this view and override the registration for the
* lightbox JavaScript and CSS (@see elgg_views_boot()).
*
* @todo add support for passing options: $('#myplugin-lightbox').elgg.ui.lightbox(options);
*/
?>
/**
* Lightbox initialization
*/
elgg.provide('elgg.ui.lightbox');
elgg.ui.lightbox.init = function() {
$(".elgg-lightbox").colorbox();
}
elgg.ui.lightbox.close = function() {
$.colorbox.close();
}
elgg.register_hook_handler('init', 'system', elgg.ui.lightbox.init);
<?php
$js_path = elgg_get_plugins_path();
$js_path = "{$js_path}colorbox/vendors/jquery/colorbox/colorbox/jquery.colorbox-min.js";
include $js_path;
|