Skip to content

Instantly share code, notes, and snippets.

@jbroadway
Created December 10, 2013 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbroadway/7895517 to your computer and use it in GitHub Desktop.
Save jbroadway/7895517 to your computer and use it in GitHub Desktop.
Multi-image with drag and drop sorting in Elefant.
<!-- apps/test/views/images.html -->
{! filemanager/util/multi-image !}
<script>
$(function () {
$('#sub').click (function () {
console.log ($('#images').val ().split ('|'));
});
$.multi_image ({
field: '#images',
preview: '#preview'
});
});
</script>
<p>
{"Attach images"}:
<div id="preview"></div>
<input type="hidden" name="images" id="images" />
</p>
<button id="sub">Show Data</button>
<?php // apps/test/handlers/images.php
$page->layout = 'admin';
$this->require_admin ();
echo $tpl->render ('test/images');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment