aboutsummaryrefslogtreecommitdiff
path: root/views/default/js/photos/tidypics.php
diff options
context:
space:
mode:
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);