Feature #28067 » add_context_menu_in_calendar_v2.patch
| app/views/common/_calendar.html.erb | ||
|---|---|---|
|
<%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do -%>
|
||
|
<table class="cal">
|
||
|
<thead>
|
||
|
<tr><th scope="col" title="<%= l(:label_week) %>" class="week-number"></th><% 7.times do |i| %><th scope="col"><%= day_name( (calendar.first_wday+i)%7 ) %></th><% end %></tr>
|
||
| ... | ... | |
|
<p class="day-num"><%= day.day %></p>
|
||
|
<% calendar.events_on(day).each do |i| %>
|
||
|
<% if i.is_a? Issue %>
|
||
|
<div class="<%= i.css_classes %> <%= 'starting' if day == i.start_date %> <%= 'ending' if day == i.due_date %> tooltip">
|
||
|
<div class="<%= i.css_classes %> <%= 'starting' if day == i.start_date %> <%= 'ending' if day == i.due_date %> tooltip hascontextmenu">
|
||
|
<%= "#{i.project} -" unless @project && @project == i.project %>
|
||
|
<%= link_to_issue i, :truncate => 30 %>
|
||
|
<span class="tip"><%= render_issue_tooltip i %></span>
|
||
|
<%= check_box_tag 'ids[]', i.id, false, :style => 'display:none;', :id => nil %>
|
||
|
</div>
|
||
|
<% else %>
|
||
|
<span class="icon icon-package">
|
||
| ... | ... | |
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
<% end %>
|
||
|
<%= context_menu %>
|
||
| public/stylesheets/application.css | ||
|---|---|---|
|
.tooltip{position:relative;z-index:24;}
|
||
|
.tooltip:hover{z-index:25;color:#000;}
|
||
|
.tooltip span.tip{display: none; text-align:left;}
|
||
|
.tooltip span.tip a { color: #169 !important; }
|
||
|
div.tooltip:hover span.tip{
|
||
|
display:block;
|
||
| ... | ... | |
|
color:#505050;
|
||
|
}
|
||
|
table.cal div.tooltip:hover span.tip {
|
||
|
top: 25px;
|
||
|
}
|
||
|
img.ui-datepicker-trigger {
|
||
|
cursor: pointer;
|
||
|
vertical-align: middle;
|
||
| test/functional/calendars_controller_test.rb | ||
|---|---|---|
|
assert_response :success
|
||
|
assert_select 'h2', :text => 'Open issues grouped by tracker'
|
||
|
end
|
||
|
def test_show_should_have_a_context_menu_for_each_issue
|
||
|
get :show
|
||
|
assert_select 'form[data-cm-url=?]', '/issues/context_menu'
|
||
|
assert_select 'div.issue.hascontextmenu' do
|
||
|
assert_select 'input[name=?][type=?]', 'ids[]', 'checkbox'
|
||
|
end
|
||
|
end
|
||
|
end
|
||