tidypics.php 614 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. *
  4. */
  5. ?>
  6. elgg.provide('elgg.tidypics');
  7. elgg.tidypics.init = function() {
  8. if ($(".tidypics-lightbox").length) {
  9. $(".tidypics-lightbox").colorbox({photo:true, maxWidth:'95%', maxHeight:'95%'});
  10. }
  11. $("#tidypics-sort").sortable({
  12. opacity: 0.7,
  13. revert: true,
  14. scroll: true
  15. });
  16. $('.elgg-form-photos-album-sort').submit(function() {
  17. var tidypics_guids = [];
  18. $("#tidypics-sort li").each(function(index) {
  19. tidypics_guids.push($(this).attr('id'));
  20. });
  21. $('input[name="guids"]').val(tidypics_guids.toString());
  22. });
  23. };
  24. elgg.register_hook_handler('init', 'system', elgg.tidypics.init);