Created
December 10, 2013 18:27
-
-
Save jbroadway/7895517 to your computer and use it in GitHub Desktop.
Multi-image with drag and drop sorting in Elefant.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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