diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-21 23:51:13 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-21 23:51:13 +0000 |
commit | 5bb588f9dac320ba16f1d08634e2a26a8dd895a2 (patch) | |
tree | b2a192c198bd9ca29c7e4aaca38e3ee8227f81be /views | |
parent | 05f8aeaf8b08a58267adc6569a64bee38e915b31 (diff) | |
download | elgg-5bb588f9dac320ba16f1d08634e2a26a8dd895a2.tar.gz elgg-5bb588f9dac320ba16f1d08634e2a26a8dd895a2.tar.bz2 |
Refs #2882 basic lightbox
git-svn-id: http://code.elgg.org/elgg/trunk@8808 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views')
-rw-r--r-- | views/default/js/lightbox.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/views/default/js/lightbox.php b/views/default/js/lightbox.php new file mode 100644 index 000000000..5f3764756 --- /dev/null +++ b/views/default/js/lightbox.php @@ -0,0 +1,30 @@ +<?php +/** + * Elgg lightbox + * + * Usage + * Apply the class elgg-lightbox to links. + * + * 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.ui.lightbox_init = function() { + $(".elgg-lightbox").fancybox(); +} + +elgg.register_hook_handler('init', 'system', elgg.ui.lightbox_init); + +<?php + +$js_path = elgg_get_config('path'); +$js_path = "{$js_path}vendors/jquery/fancybox/jquery.fancybox-1.3.4.pack.js"; +include $js_path; |