diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-11-28 07:50:23 -0500 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2011-11-28 07:50:23 -0500 |
commit | efdd4b6544e14355f6ae0e6151c6f828271d3913 (patch) | |
tree | ddc1de199af538df367e625ab5f3cea420e039cd /views/default/tidypics | |
parent | ca5a35607dfb277cecba120ce27eece7c59f270a (diff) | |
download | elgg-efdd4b6544e14355f6ae0e6151c6f828271d3913.tar.gz elgg-efdd4b6544e14355f6ae0e6151c6f828271d3913.tar.bz2 |
working on album sorting
Diffstat (limited to 'views/default/tidypics')
-rw-r--r-- | views/default/tidypics/css.php | 6 | ||||
-rw-r--r-- | views/default/tidypics/sort.php | 54 |
2 files changed, 6 insertions, 54 deletions
diff --git a/views/default/tidypics/css.php b/views/default/tidypics/css.php index 542123bd0..82594db0e 100644 --- a/views/default/tidypics/css.php +++ b/views/default/tidypics/css.php @@ -22,6 +22,12 @@ width: 120px; } +#tidypics-sort li { +width:153px; +height:153px; +} + + <?php return true; ?> diff --git a/views/default/tidypics/sort.php b/views/default/tidypics/sort.php deleted file mode 100644 index 66dd8a999..000000000 --- a/views/default/tidypics/sort.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * Album sorting view - */ - -$album = $vars['album']; -$image_guids = $album->getImageList(); - -// create submission form -$body = elgg_view('input/hidden', array('internalname' => 'guids')); -$body .= elgg_view('input/hidden', array('internalname' => 'album_guid', 'value' => $album->guid)); -$body .= elgg_view('input/submit', array('value' => elgg_echo('save'))); -?> -<div class="contentWrapper"> - <div> - <?php echo elgg_echo('tidypics:sort:instruct'); ?> - </div> - <?php - $params = array( - 'internalid' => 'tidypics_sort_form', - 'action' => "{$vars['url']}action/tidypics/sortalbum", - 'body' => $body, - ); - echo elgg_view('input/form', $params); - ?> - - <ul id="tidypics_album_sort"> - <?php - foreach ($image_guids as $image_guid) { - $image = get_entity($image_guid); - $url = "{$vars['url']}pg/photos/thumbnail/$image_guid/small/"; - echo "<li id=\"$image_guid\"><img src=\"$url\" /></li>"; - } - ?> - </ul> - <div class="clearfloat"></div> -</div> - -<script type="text/javascript"> -$("#tidypics_album_sort").sortable( - { - opacity: 0.7, - revert: true, - scroll: true - } -); -$('#tidypics_sort_form').submit(function() { - var tidypics_guids = []; - $("#tidypics_album_sort li").each(function(index) { - tidypics_guids.push($(this).attr('id')); - }); - $('input[name="guids"]').val(tidypics_guids.toString()); -}); -</script>
\ No newline at end of file |