Created
February 26, 2013 20:30
-
-
Save phzbox/5041872 to your computer and use it in GitHub Desktop.
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
// The JSON is provided by the server-side. It's a json string stored in the db. | |
var init_slides = JSON.parse('[{"url":"..."}]'); | |
// When the form is submited, we're serializing the files and storing them in a hidden input field. | |
$('.submit-form').submit(function() { | |
$("#slides").val(JSON.stringify(uploaded_media_fpfiles)); | |
}); | |
// When the page is loaded for the first time, we're faking a file update using the fpfiles already saved. | |
uploaded_media(init_slides); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment