Project

General

Profile

Feature #10485 » 0002-Add-context-menu-to-the-task-bar.patch

Mizuki ISHIKAWA, 2017-07-13 07:59

View differences:

app/views/gantts/show.html.erb
<% 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 %>
lib/redmine/helpers/gantt.rb
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;"
......
style << "height:12px;"
output << view.content_tag(:div, s.html_safe,
:style => style,
:class => "tooltip")
:class => "tooltip hascontextmenu")
end
@lines << output
output
public/stylesheets/context_menu.css
.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; }
(2-2/6)