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

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

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

index b3a02316be2ad4b48f2a7de3fa0e5af2cb810862..19d065640a43386144af5af8b143683b4537f126 100644 (file)
   <% end %>
 <% end %>
 
-<%= @gantt.lines.html_safe %>
+<%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do -%>
+  <%= @gantt.lines.html_safe %>
+<% end %>
 
 <% ###### Today red line (excluded from cache) ###### %>
 <% if User.current.today >= @gantt.date_from and User.current.today <= @gantt.date_to %>
index fc3a6c073ad4c5c964ef35b45bc9bbda5ea83cbf..b859c6c7dd827c08b8e39e1e096786caab9c3983 100644 (file)
@@ -842,6 +842,7 @@ module Redmine
           s = view.content_tag(:span,
                                view.render_issue_tooltip(object).html_safe,
                                :class => "tip")
+          s += view.content_tag(:input, nil, :type => 'checkbox', :name => 'ids[]', :value => object.id, :style => 'display:none;', :class => 'toggle-selection')
           style = ""
           style << "position: absolute;"
           style << "top:#{params[:top]}px;"
@@ -850,7 +851,7 @@ module Redmine
           style << "height:12px;"
           output << view.content_tag(:div, s.html_safe,
                                      :style => style,
-                                     :class => "tooltip")
+                                     :class => "tooltip hascontextmenu")
         end
         @lines << output
         output
index 2b9799387f1b8d229a4ec918115b5fb05349ab4c..7dcd9c81cb0963650c5cc6b1e429671bcf34b1ea 100644 (file)
@@ -54,3 +54,6 @@
 .context-menu-selection { background-color:#507AAA !important; color:#f8f8f8 !important; }
 .context-menu-selection a, .context-menu-selection a:hover { color:#f8f8f8 !important; }
 .context-menu-selection:hover { background-color:#507AAA !important; color:#f8f8f8  !important; }
+div#gantt_area .context-menu-selection { background-color: rgba(80, 122, 170, 0.48) !important; }
+div#gantt_area .context-menu-selection:hover { background-color: rgba(80, 122, 170, 0.48) !important; }
+div#gantt_area .context-menu-selection a { color: #169 !important; }