aboutsummaryrefslogtreecommitdiff
path: root/views/default/js/photos/tidypics.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-28 07:50:23 -0500
committerCash Costello <cash.costello@gmail.com>2011-11-28 07:50:23 -0500
commitefdd4b6544e14355f6ae0e6151c6f828271d3913 (patch)
treeddc1de199af538df367e625ab5f3cea420e039cd /views/default/js/photos/tidypics.php
parentca5a35607dfb277cecba120ce27eece7c59f270a (diff)
downloadelgg-efdd4b6544e14355f6ae0e6151c6f828271d3913.tar.gz
elgg-efdd4b6544e14355f6ae0e6151c6f828271d3913.tar.bz2
working on album sorting
Diffstat (limited to 'views/default/js/photos/tidypics.php')
-rw-r--r--views/default/js/photos/tidypics.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/views/default/js/photos/tidypics.php b/views/default/js/photos/tidypics.php
new file mode 100644
index 000000000..509d2116a
--- /dev/null
+++ b/views/default/js/photos/tidypics.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ *
+ */
+
+?>
+
+elgg.provide('elgg.tidypics');
+
+elgg.tidypics.init = function() {
+ $("#tidypics-sort").sortable({
+ opacity: 0.7,
+ revert: true,
+ scroll: true
+ });
+
+ $('.elgg-form-photos-album-sort').submit(function() {
+ var tidypics_guids = [];
+ $("#tidypics-sort li").each(function(index) {
+ tidypics_guids.push($(this).attr('id'));
+ });
+ $('input[name="guids"]').val(tidypics_guids.toString());
+ });
+};
+
+elgg.register_hook_handler('init', 'system', elgg.tidypics.init);