aboutsummaryrefslogtreecommitdiff
path: root/mod/embed/views/default/js
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-06-18 21:54:58 -0400
committercash <cash.costello@gmail.com>2011-06-18 21:54:58 -0400
commitaeb88b95d16ff1da7e2ce8fadde0eab1f4653d8b (patch)
tree54b47f12b8c7557ffb7ec2b14506217564664d3e /mod/embed/views/default/js
parentd462b57edfeab81bd90a5d0321ea3d1fcbbddff3 (diff)
downloadelgg-aeb88b95d16ff1da7e2ce8fadde0eab1f4653d8b.tar.gz
elgg-aeb88b95d16ff1da7e2ce8fadde0eab1f4653d8b.tar.bz2
rewrote pagination for embed file listing
Diffstat (limited to 'mod/embed/views/default/js')
-rw-r--r--mod/embed/views/default/js/embed/embed.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/mod/embed/views/default/js/embed/embed.php b/mod/embed/views/default/js/embed/embed.php
index 78ad125ef..b709af05e 100644
--- a/mod/embed/views/default/js/embed/embed.php
+++ b/mod/embed/views/default/js/embed/embed.php
@@ -12,6 +12,9 @@ elgg.embed.init = function() {
var textAreaId = class.substr(class.indexOf('embed-control-') + "embed-control-".length);
elgg.embed.textAreaId = textAreaId;
});
+
+ // special pagination helper for lightbox
+ $('.embed-wrapper .elgg-pagination a').live('click', elgg.embed.pagination);
}
/**
@@ -36,4 +39,15 @@ elgg.embed.insert = function(event) {
event.preventDefault();
}
+/**
+ * Loads the next chunk of content within the lightbox
+ *
+ * @param {Object} event
+ * @return void
+ */
+elgg.embed.pagination = function(event) {
+ $('.embed-wrapper').parent().load($(this).attr('href'));
+ event.preventDefault();
+}
+
elgg.register_hook_handler('init', 'system', elgg.embed.init);