Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
amtuannguyen committed Oct 21, 2024
2 parents 2acc53a + adce8bf commit 8893382
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
File renamed without changes.
7 changes: 3 additions & 4 deletions app/views/documents/edit.js.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
$('#file_upload_modal_container').remove();
$('body').append('<div id="file_upload_modal_container"></div>');
$('#file_upload_modal_container').append('<%= j render "file_upload_modal" %>');
new bootstrap.Modal(document.getElementById('file_upload_modal')).show();
$('body').append('<%= j render "modal" %>');
(new bootstrap.Modal($('#file_upload_modal'))).show();

$('form.file-upload input.file').change ( function() {
if ($(this).val()) {
$(this).parents('form:first').find('input:submit').removeAttr('disabled');
Expand Down
2 changes: 1 addition & 1 deletion app/views/documents/new.js.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$('body').append('<%= j render "file_upload_modal" %>');
$('body').append('<%= j render "modal" %>');
(new bootstrap.Modal($('#file_upload_modal'))).show();

$('form.file-upload input.file').change ( function() {
Expand Down

0 comments on commit 8893382

Please sign in to comment.