X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9e01d65e64173caf29ef750c7d29c2b3d424c4ab..c7cf228372bee18d84b14fc4089a758bc157fe76:/apps/workbench/app/views/application/report_issue_popup.js.erb diff --git a/apps/workbench/app/views/application/report_issue_popup.js.erb b/apps/workbench/app/views/application/report_issue_popup.js.erb deleted file mode 100644 index 48b66dcb9e..0000000000 --- a/apps/workbench/app/views/application/report_issue_popup.js.erb +++ /dev/null @@ -1,48 +0,0 @@ -$("#report-issue-modal-window").html("<%= escape_javascript(render partial: 'report_issue_popup') %>"); - -// reset form input fields, for the next time around -function reset_form() { - $('#report_issue_text').val(""); - $('#additional_info').val(""); -} - -// ajax handling for report-issue function -$(document). - on('ajax:send', function() { - var sendButton = document.getElementById('report-issue-submit'); - if (sendButton) { - var text = document.getElementById('report-issue-submit').firstChild; - text.data = "Sending..."; - sendButton.disabled = true; - } - var cancelButton = document.getElementById('report-issue-cancel'); - if (cancelButton) { - var text = document.getElementById('report-issue-cancel').firstChild; - text.data = "Close"; - } - $('div').remove('.modal-footer-status'); - }). - on('ajax:success', function() { - var sendButton = document.getElementById('report-issue-submit'); - if (sendButton && sendButton.disabled) { - var text = document.getElementById('report-issue-submit').firstChild; - text.data = "Report sent"; - $('div').remove('.modal-footer-status'); - $('.modal-footer').append(''); - } - }). - on('ajax:failure', function() { - var sendButton = document.getElementById('report-issue-submit'); - if (sendButton && sendButton.disabled) { - $('div').remove('.modal-footer-status'); - $('.modal-footer').append(''); - var text = document.getElementById('report-issue-submit').firstChild; - text.data = "Report issue"; - sendButton.disabled = false; - } - var cancelButton = document.getElementById('report-issue-cancel'); - if (cancelButton) { - var text = document.getElementById('report-issue-cancel').firstChild; - text.data = "Cancel"; - } - });