Project

General

Profile

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

Anonymous, 2019-09-30 17:19

View differences:

app/views/common/_calendar.html.erb (working copy)
13 13
<p class="day-num"><%= day.day %></p>
14 14
<% calendar.events_on(day).each do |i| %>
15 15
  <% if i.is_a? Issue %>
16
  <div class="<%= i.css_classes %> <%= 'starting' if day == i.start_date %> <%= 'ending' if day == i.due_date %> tooltip hascontextmenu">
16
  <div title="" class="<%= i.css_classes %> <%= 'starting' if day == i.start_date %> <%= 'ending' if day == i.due_date %> tooltip hascontextmenu">
17 17
  <%= "#{i.project} -" unless @project && @project == i.project %>
18 18
  <%= link_to_issue i, :truncate => 30 %>
19 19
  <span class="tip"><%= render_issue_tooltip i %></span>
lib/redmine/helpers/gantt.rb (working copy)
926 926
          style << "width:#{coords[:bar_end] - coords[:bar_start]}px;"
927 927
          style << "height:12px;"
928 928
          output << view.content_tag(:div, s.html_safe,
929
                                     :title => "",
929 930
                                     :style => style,
930 931
                                     :class => "tooltip hascontextmenu",
931 932
                                     :data => data_options)
public/javascripts/application.js (working copy)
1008 1008
    });
1009 1009
});
1010 1010

  
1011
$(function () {
1012
  $('.tooltip').tooltip({
1013
    tooltipClass: "white-tip",
1014
    position: { my: "left top", at: "left bottom" },
1015
    open: function (event, ui) {
1016
      ui.tooltip.mouseover(function(){ui.tooltip.stop().animate({opacity:'100'})})
1017
      ui.tooltip.mouseout(function(){ui.tooltip.stop().hide("fade")})
1018
    },
1019
    content: function() {
1020
      return $(this).children(".tip").html();
1021
    }
1022
  });
1023
});
1024

  
1011 1025
function inlineAutoComplete(element) {
1012 1026
    'use strict';
1013 1027
    // do not attach if Tribute is already initialized
public/stylesheets/application.css (working copy)
1044 1044
table.cal .starting.ending a.issue, p.cal.legend .starting.ending {background: url(../images/bullet_diamond.png) no-repeat -1px -2px; padding-left:16px;}
1045 1045
p.cal.legend span {display:block;}
1046 1046

  
1047
/***** Tooltips ******/
1048
.tooltip{position:relative;z-index:24;}
1049
.tooltip:hover{z-index:25;color:#000;}
1050
.tooltip span.tip{display: none; text-align:left;}
1051
.tooltip span.tip a { color: #169 !important; }
1052

  
1053
.tooltip span.tip img.gravatar {
1054
  float: none;
1055
  margin: 0;
1056
}
1057

  
1058
div.tooltip:hover span.tip{
1059
display:block;
1060
position:absolute;
1061
top:12px; width:270px;
1062
border:1px solid #555;
1063
background-color:#fff;
1064
padding: 4px;
1065
font-size: 0.8em;
1066
color:#505050;
1067
}
1068

  
1069
table.cal div.tooltip:hover span.tip {
1070
  top: 25px;
1071
}
1072

  
1073
img.ui-datepicker-trigger {
1074
  cursor: pointer;
1075
  vertical-align: middle;
1076
  margin-left: 4px;
1077
}
1078

  
1079 1047
/***** Progress bar *****/
1080 1048
table.progress {
1081 1049
  border-collapse: collapse;
......
1431 1399
  color: #1D781D;
1432 1400
  border: 1px solid #1D781D;
1433 1401
}
1402

  
1434 1403
/***** Tooltips *****/
1435 1404
.ui-tooltip {
1436 1405
  background: #000;
......
1441 1410
  box-shadow: none
1442 1411
}
1443 1412

  
1413
.ui-tooltip.white-tip {
1414
  color: #000;
1415
  background: #fff;
1416
  border: 1px solid lightgray;
1417
  box-shadow: 2px 2px 2px gray;
1418
}
1419

  
1420
.tooltip{z-index:24;}
1421
.tooltip span.tip{display: none;}
1422

  
1423
table.cal div.tooltip:hover span.tip {
1424
  top: 25px;
1425
}
1426

  
1427
img.ui-datepicker-trigger {
1428
  cursor: pointer;
1429
  vertical-align: middle;
1430
  margin-left: 4px;
1431
}
1432

  
1444 1433
/***** Icons *****/
1445 1434
.icon {
1446 1435
  background-position: 0% 50%;
......
1572 1561
  border-radius: 20%;
1573 1562
}
1574 1563

  
1575
div.issue img.gravatar {
1576
  float: left;
1577
  margin: 0 12px 6px 0;
1578
}
1579

  
1580 1564
div.gravatar-with-child {
1581 1565
  position: relative;
1582 1566
}
(2-2/3)