diff --git a/app/views/common/_calendar.html.erb b/app/views/common/_calendar.html.erb index 63cb43c97..d5361c099 100644 --- a/app/views/common/_calendar.html.erb +++ b/app/views/common/_calendar.html.erb @@ -22,7 +22,7 @@

<%= day.day %>

<% calendar.events_on(day).each do |i| %> <% if i.is_a? Issue %> -
+
<%= "#{i.project} -" unless @project && @project == i.project %> <%= link_to_issue i, :truncate => 30 %> <%= render_issue_tooltip i %> diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb index c0ff7a250..c533076ba 100644 --- a/lib/redmine/helpers/gantt.rb +++ b/lib/redmine/helpers/gantt.rb @@ -950,6 +950,7 @@ module Redmine 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) diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 91da19229..940aafe3d 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -1120,6 +1120,20 @@ $(function () { }); }); +$(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'; diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 7743cf444..51d31958a 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1108,32 +1108,6 @@ table.cal .ending a.issue, p.cal.legend .ending {background: url(../images/bulle 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; @@ -1523,6 +1497,26 @@ td.gantt_selected_column .gantt_hdr,.gantt_selected_column_container { 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%;