Project

General

Profile

Feature #32029 » jquery-tooltips-gantt+calendar-v3.patch

Go MAEDA, 2022-07-30 06:36

View differences:

app/views/common/_calendar.html.erb
<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 hascontextmenu">
<div title="" 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>
lib/redmine/helpers/gantt.rb
style << "width:#{coords[:bar_end] - coords[:bar_start]}px;"
style << "height:12px;"
output << view.content_tag(:div, s.html_safe,
:title => "",
:style => style,
:class => "tooltip hascontextmenu",
:data => data_options)
public/javascripts/application.js
});
});
$(function () {
$('.tooltip').tooltip({
tooltipClass: "white-tip",
position: { my: "left top", at: "left bottom" },
open: function (event, ui) {
ui.tooltip.mouseover(function(){ui.tooltip.stop().animate({opacity:'100'})})
ui.tooltip.mouseout(function(){ui.tooltip.stop().hide("fade")})
},
content: function() {
return $(this).children(".tip").html();
}
});
});
function inlineAutoComplete(element) {
'use strict';
public/stylesheets/application.css
table.cal .starting.ending a.issue, p.cal.legend .starting.ending {background: url(../images/bullet_diamond.png) no-repeat -1px -2px; padding-left:16px;}
p.cal.legend span {display:block;}
/***** Tooltips ******/
.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; }
.tooltip span.tip img.gravatar {
float: none;
margin: 0;
}
div.tooltip:hover span.tip{
display:block;
position:absolute;
top:12px; width:270px;
border:1px solid #555;
background-color:#fff;
padding: 4px;
font-size: 0.8em;
color:#505050;
}
table.cal div.tooltip:hover span.tip {
top: 25px;
}
img.ui-datepicker-trigger {
cursor: pointer;
vertical-align: middle;
......
white-space: pre-wrap;
}
.ui-tooltip.white-tip {
color: #000;
background: #fff;
border: 1px solid lightgray;
box-shadow: 2px 2px 2px gray;
}
.tooltip{z-index:24;}
.tooltip span.tip{display: none;}
table.cal div.tooltip:hover span.tip {
top: 25px;
}
img.ui-datepicker-trigger {
cursor: pointer;
vertical-align: middle;
margin-left: 4px;
}
/***** Icons *****/
.icon {
background-position: 0% 50%;
(3-3/3)