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
22 22
<p class="day-num"><%= day.day %></p>
23 23
<% calendar.events_on(day).each do |i| %>
24 24
  <% if i.is_a? Issue %>
25
  <div class="<%= i.css_classes %> <%= 'starting' if day == i.start_date %> <%= 'ending' if day == i.due_date %> tooltip hascontextmenu">
25
  <div title="" class="<%= i.css_classes %> <%= 'starting' if day == i.start_date %> <%= 'ending' if day == i.due_date %> tooltip hascontextmenu">
26 26
  <%= "#{i.project} -" unless @project && @project == i.project %>
27 27
  <%= link_to_issue i, :truncate => 30 %>
28 28
  <span class="tip"><%= render_issue_tooltip i %></span>
lib/redmine/helpers/gantt.rb
950 950
          style << "width:#{coords[:bar_end] - coords[:bar_start]}px;"
951 951
          style << "height:12px;"
952 952
          output << view.content_tag(:div, s.html_safe,
953
                                     :title => "",
953 954
                                     :style => style,
954 955
                                     :class => "tooltip hascontextmenu",
955 956
                                     :data => data_options)
public/javascripts/application.js
1120 1120
  });
1121 1121
});
1122 1122

  
1123
$(function () {
1124
  $('.tooltip').tooltip({
1125
    tooltipClass: "white-tip",
1126
    position: { my: "left top", at: "left bottom" },
1127
    open: function (event, ui) {
1128
      ui.tooltip.mouseover(function(){ui.tooltip.stop().animate({opacity:'100'})})
1129
      ui.tooltip.mouseout(function(){ui.tooltip.stop().hide("fade")})
1130
    },
1131
    content: function() {
1132
      return $(this).children(".tip").html();
1133
    }
1134
  });
1135
});
1136

  
1123 1137
function inlineAutoComplete(element) {
1124 1138
    'use strict';
1125 1139

  
public/stylesheets/application.css
1108 1108
table.cal .starting.ending a.issue, p.cal.legend .starting.ending {background: url(../images/bullet_diamond.png) no-repeat -1px -2px; padding-left:16px;}
1109 1109
p.cal.legend span {display:block;}
1110 1110

  
1111
/***** Tooltips ******/
1112
.tooltip{position:relative;z-index:24;}
1113
.tooltip:hover{z-index:25;color:#000;}
1114
.tooltip span.tip{display: none; text-align:left;}
1115
.tooltip span.tip a { color: #169 !important; }
1116

  
1117
.tooltip span.tip img.gravatar {
1118
  float: none;
1119
  margin: 0;
1120
}
1121

  
1122
div.tooltip:hover span.tip{
1123
display:block;
1124
position:absolute;
1125
top:12px; width:270px;
1126
border:1px solid #555;
1127
background-color:#fff;
1128
padding: 4px;
1129
font-size: 0.8em;
1130
color:#505050;
1131
}
1132

  
1133
table.cal div.tooltip:hover span.tip {
1134
  top: 25px;
1135
}
1136

  
1137 1111
img.ui-datepicker-trigger {
1138 1112
  cursor: pointer;
1139 1113
  vertical-align: middle;
......
1523 1497
  white-space: pre-wrap;
1524 1498
}
1525 1499

  
1500
.ui-tooltip.white-tip {
1501
  color: #000;
1502
  background: #fff;
1503
  border: 1px solid lightgray;
1504
  box-shadow: 2px 2px 2px gray;
1505
}
1506

  
1507
.tooltip{z-index:24;}
1508
.tooltip span.tip{display: none;}
1509

  
1510
table.cal div.tooltip:hover span.tip {
1511
  top: 25px;
1512
}
1513

  
1514
img.ui-datepicker-trigger {
1515
  cursor: pointer;
1516
  vertical-align: middle;
1517
  margin-left: 4px;
1518
}
1519

  
1526 1520
/***** Icons *****/
1527 1521
.icon {
1528 1522
  background-position: 0% 50%;
(3-3/3)