diff options
Diffstat (limited to 'mod/embed/views/default/js')
-rw-r--r-- | mod/embed/views/default/js/embed/embed.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mod/embed/views/default/js/embed/embed.php b/mod/embed/views/default/js/embed/embed.php index b709af05e..3b398af3a 100644 --- a/mod/embed/views/default/js/embed/embed.php +++ b/mod/embed/views/default/js/embed/embed.php @@ -15,6 +15,8 @@ elgg.embed.init = function() { // special pagination helper for lightbox $('.embed-wrapper .elgg-pagination a').live('click', elgg.embed.pagination); + + $('.embed-section').live('click', elgg.embed.loadTab); } /** @@ -50,4 +52,17 @@ elgg.embed.pagination = function(event) { event.preventDefault(); } +/** + * Loads an embed tab + * + * @param {Object} event + * @return void + */ +elgg.embed.loadTab = function(event) { + var section = $(this).attr('id'); + var url = elgg.config.wwwroot + 'embed/embed?active_section=' + section; + $('.embed-wrapper').parent().load(url); + event.preventDefault(); +} + elgg.register_hook_handler('init', 'system', elgg.embed.init); |