Commit f5ee9bdf authored by fred's avatar fred

js: trigger custom event after file upload is done

parent 9e518c93
...@@ -20,6 +20,7 @@ $(function() { ...@@ -20,6 +20,7 @@ $(function() {
$(base_widget).find('.fileinfo').show(); $(base_widget).find('.fileinfo').show();
$(base_widget).find('input[type=hidden]').val(data.result[0].token); $(base_widget).find('input[type=hidden]').val(data.result[0].token);
$(this).hide(); $(this).hide();
$(this).parents('form').trigger('panik:file-upload-complete');
}, },
progress: function (e, data) { progress: function (e, data) {
var progress = parseInt(data.loaded / data.total * 100, 10); var progress = parseInt(data.loaded / data.total * 100, 10);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment