]> source.dussan.org Git - redmine.git/commitdiff
Add right-click context menu to gantt subjects (#10485).
authorGo MAEDA <maeda@farend.jp>
Sat, 25 Nov 2017 16:30:23 +0000 (16:30 +0000)
committerGo MAEDA <maeda@farend.jp>
Sat, 25 Nov 2017 16:30:23 +0000 (16:30 +0000)
Contributed by Mizuki ISHIKAWA.

git-svn-id: http://svn.redmine.org/redmine/trunk@17030 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/gantts/show.html.erb
lib/redmine/helpers/gantt.rb
public/stylesheets/application.css

index 9703e962ea61c84c5d6c4273cb1ebf49dfbf1ea7..b3a02316be2ad4b48f2a7de3fa0e5af2cb810862 100644 (file)
     %>
     <%= content_tag(:div, "", :style => style, :class => "gantt_hdr") %>
     <%= content_tag(:div, :class => "gantt_subjects") do %>
-      <%= @gantt.subjects.html_safe %>
+      <%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do -%>
+        <%= @gantt.subjects.html_safe %>
+      <% end %>
     <% end %>
   <% end %>
 </td>
     resizableSubjectColumn();
   });
 <% end %>
+<%= context_menu %>
index a4b7a2f39f95f5487b246e1ed804e9a21dff2e7a..fc3a6c073ad4c5c964ef35b45bc9bbda5ea83cbf 100644 (file)
@@ -670,6 +670,7 @@ module Redmine
                              :title => assigned_string).to_s.html_safe
           end
           s << view.link_to_issue(issue).html_safe
+          s << view.content_tag(:input, nil, :type => 'checkbox', :name => 'ids[]', :value => issue.id, :style => 'display:none;', :class => 'toggle-selection')
           view.content_tag(:span, s, :class => css_classes).html_safe
         when Version
           version = object
@@ -704,7 +705,7 @@ module Redmine
         case object
         when Issue
           tag_options[:id] = "issue-#{object.id}"
-          tag_options[:class] = "issue-subject"
+          tag_options[:class] = "issue-subject hascontextmenu"
           tag_options[:title] = object.subject
         when Version
           tag_options[:id] = "version-#{object.id}"
index 854616247f0eeffe979d97ffcb62720ff4dfce7b..c9fbb4adf617be0d665b1c5b26ebf1f054cc1d54 100644 (file)
@@ -1164,6 +1164,7 @@ div.wiki img {vertical-align:middle; max-width:100%;}
 
 .gantt_subjects { font-size: 0.8em; }
 .gantt_subjects div { line-height:16px;height:16px;overflow:hidden;white-space:nowrap;text-overflow: ellipsis; }
+.gantt_subjects div.issue-subject:hover { background-color:#ffffdd; }
 
 .gantt_subjects .issue-subject img.icon-gravatar {
   margin: 2px 5px 0px 2px;