From 7a27da096af5e23e6339585094e6afbd3c2dedd0 Mon Sep 17 00:00:00 2001 From: radhika Date: Fri, 22 Aug 2014 10:29:35 -0400 Subject: [PATCH] 3112: limit ajax event handling only to the report form --- apps/workbench/app/assets/javascripts/report_issue.js | 2 +- .../workbench/app/assets/stylesheets/application.css.scss | 6 ++++++ .../app/views/application/_report_error.html.erb | 4 ++-- .../app/views/application/_report_issue_popup.html.erb | 8 ++++---- apps/workbench/app/views/layouts/body.html.erb | 4 ++-- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/apps/workbench/app/assets/javascripts/report_issue.js b/apps/workbench/app/assets/javascripts/report_issue.js index 482fd53548..bb39d89485 100644 --- a/apps/workbench/app/assets/javascripts/report_issue.js +++ b/apps/workbench/app/assets/javascripts/report_issue.js @@ -1,5 +1,5 @@ // ajax handling for report-issue function -$(document). +$('#report-issue-modal-window form'). on('ajax:send', function() { var $sendButton = $('#report-issue-submit'); if ($sendButton) { diff --git a/apps/workbench/app/assets/stylesheets/application.css.scss b/apps/workbench/app/assets/stylesheets/application.css.scss index c986f034bc..5d6acf3110 100644 --- a/apps/workbench/app/assets/stylesheets/application.css.scss +++ b/apps/workbench/app/assets/stylesheets/application.css.scss @@ -244,3 +244,9 @@ div.pane-content iframe { width: 100%; border: none; } + +.text-overflow-ellipsis { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} diff --git a/apps/workbench/app/views/application/_report_error.html.erb b/apps/workbench/app/views/application/_report_error.html.erb index 4bdc5df884..5f33419603 100644 --- a/apps/workbench/app/views/application/_report_error.html.erb +++ b/apps/workbench/app/views/application/_report_error.html.erb @@ -5,12 +5,12 @@ api_request_url = api_error.andand.request_url ? api_error.request_url : '' 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, action_method: 'post', api_error_request_url: api_request_url, api_error_response: api_error_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 %> Report problem <% end %> <% else %> - Send a problem report right here. <%= link_to report_issue_popup_path(popup_type: 'report', current_location: request.url, action_method: 'post', error_message: error_message), + 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 %> Report problem <% end %> diff --git a/apps/workbench/app/views/application/_report_issue_popup.html.erb b/apps/workbench/app/views/application/_report_issue_popup.html.erb index 3efa6c4c2d..f4f85513bf 100644 --- a/apps/workbench/app/views/application/_report_issue_popup.html.erb +++ b/apps/workbench/app/views/application/_report_issue_popup.html.erb @@ -54,7 +54,7 @@
-

<%=@popup_params[:current_location]%>

+

<%=@popup_params[:current_path]%>

@@ -116,7 +116,7 @@
-

<%=@popup_params[:error_message]%>

+

<%=@popup_params[:error_message]%>

<% end %> @@ -125,7 +125,7 @@
-

<%=@popup_params[:api_error_request_url]%>

+

<%=@popup_params[:api_error_request_url]%>

<% end %> @@ -134,7 +134,7 @@
-

<%=@popup_params[:api_error_response]%>

+

<%=@popup_params[:api_error_response]%>

<% end %> diff --git a/apps/workbench/app/views/layouts/body.html.erb b/apps/workbench/app/views/layouts/body.html.erb index 9bfd12c126..ec8cdf269c 100644 --- a/apps/workbench/app/views/layouts/body.html.erb +++ b/apps/workbench/app/views/layouts/body.html.erb @@ -137,12 +137,12 @@
  • <%= link_to raw(' API Reference'), "#{Rails.configuration.arvados_docsite}/api", target: "_blank" %>
  • <%= link_to raw(' SDK Reference'), "#{Rails.configuration.arvados_docsite}/sdk", target: "_blank" %>
  • -
  • <%= link_to report_issue_popup_path(popup_type: 'version', current_location: request.url, action_method: 'post'), +
  • <%= link_to report_issue_popup_path(popup_type: 'version', current_location: request.url, current_path: request.fullpath, action_method: 'post'), {class: 'report-issue-modal-window', 'data-toggle' => "modal", 'data-target' => '#report-issue-modal-window', :remote => true, return_to: request.url} do %> Show version / debugging info ... <% end %>
  • -
  • <%= link_to report_issue_popup_path(popup_type: 'report', current_location: request.url, action_method: 'post'), +
  • <%= link_to report_issue_popup_path(popup_type: 'report', current_location: request.url, current_path: request.fullpath, action_method: 'post'), {class: 'report-issue-modal-window', 'data-toggle' => "modal", 'data-target' => '#report-issue-modal-window', :remote => true, return_to: request.url} do %> Report a problem ... <% end %> -- 2.39.5