3112: no need to reload after sending report.
authorradhika <radhika@curoverse.com>
Tue, 26 Aug 2014 15:32:59 +0000 (11:32 -0400)
committerradhika <radhika@curoverse.com>
Tue, 26 Aug 2014 15:32:59 +0000 (11:32 -0400)
apps/workbench/app/controllers/actions_controller.rb
apps/workbench/app/views/application/_report_error.html.erb
apps/workbench/app/views/application/report_issue.js.erb [deleted file]
apps/workbench/app/views/application/report_issue_popup.js.erb

index 2d23f0768a9aff61cc037bae8be0a44030cc4ae3..c815ba96765a92491f1cb2540f20d16b2705d5a7 100644 (file)
@@ -176,7 +176,7 @@ class ActionsController < ApplicationController
 
     respond_to do |format|
       IssueReporter.send_report(current_user, params).deliver
-      format.js
+      format.js {render nothing: true}
     end
   end
 
index 7ebfddb71150b935fe0d924d16f2eac81765ce80..8ab1d895e90155d5630dd56087a3a48627756920 100644 (file)
@@ -6,16 +6,16 @@
     api_error_response = api_error.andand.api_response ? api_error.api_response : ''
   %>
   Send a problem report right here. <%= link_to report_issue_popup_path(popup_type: 'report', current_location: request.url, current_path: request.fullpath, action_method: 'post', api_error_request_url: api_request_url, api_error_response: api_error_response),
-        {class: 'btn btn-primary report-issue-modal-window', 'data-toggle' =>  "modal", 'data-target' => '#report-issue-modal-window', :remote => true, return_to: request.url} do %>
+        {class: 'btn btn-primary report-issue-modal-window', :remote => true, return_to: request.url} do %>
         <i class="fa fa-fw fa-support"></i> Report problem
   <% end %>
 <% else %>
   Send a problem report right here. <%= link_to report_issue_popup_path(popup_type: 'report', current_location: request.url, current_path: request.fullpath, action_method: 'post', error_message: error_message),
-        {class: 'btn btn-primary report-issue-modal-window', 'data-toggle' =>  "modal", 'data-target' => '#report-issue-modal-window', :remote => true, return_to: request.url} do %>
+        {class: 'btn btn-primary report-issue-modal-window', :remote => true, return_to: request.url} do %>
         <i class="fa fa-fw fa-support"></i> Report problem
   <% end %>
 <% end %>
 <% support_email = Rails.configuration.support_email_address%>
 <br/></br>
-  If you prefer, send email to: <a href="mailto:<%=support_email%>?subject=Workbench problem report&&amp;body=Problem while viewing page <%=request.url%>"><%=support_email%></a>
+  If you prefer, send email to: <a href="mailto:<%=support_email%>?subject=Workbench problem report&amp;body=Problem while viewing page <%=request.url%>"><%=support_email%></a>
 </p>
diff --git a/apps/workbench/app/views/application/report_issue.js.erb b/apps/workbench/app/views/application/report_issue.js.erb
deleted file mode 100644 (file)
index 26113a9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-// Let ajax events handle hiding of the popup.
index 5cfe502166f86210a107314786913c8b2188777e..5c15db3d712425208353fd58647ff7b68f4f3c87 100644 (file)
@@ -1,6 +1,2 @@
 $("#report-issue-modal-window").html("<%= escape_javascript(render partial: 'report_issue_popup') %>");
 $("#report-issue-modal-window .modal").modal('show');
-
-$('#report-issue-modal-window').on('hidden.bs.modal', function () {
- location.reload();
-})