Created
February 7, 2017 22:19
-
-
Save ychaker/96dec385f1628373c455b9bf82274668 to your computer and use it in GitHub Desktop.
Rails + Refile + Dropzone (9)
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
$('#alerts').html('<%= j render partial: "shared/alerts" %>'); | |
$('input[type="file"]').val(''); | |
$('input[name="doc[file]"]').val(''); | |
var modal; | |
<% if @operation.valid? %> | |
modal = $('#upload-modal-<%= @model.doc_task.id %>'); | |
modal.modal('hide'); | |
modal.on('hidden.bs.modal', function() { | |
$('#tasks').html('<%= j render partial: "doc_tasks/list", locals: { pending_tasks: @pending_tasks, completed_tasks: @completed_tasks } %>'); | |
}); | |
<% else %> | |
modal = $('.upload-modal'); | |
modal.modal('hide'); | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment