https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292019-05-24T10:04:11ZRedmineRedmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=920172019-05-24T10:04:11ZGo MAEDA
<ul><li><strong>Target version</strong> set to <i>Candidate for next major release</i></li></ul><p>+1 remarkably nice improvement!</p> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=920372019-05-26T07:02:38ZGo MAEDA
<ul><li><strong>Target version</strong> changed from <i>Candidate for next major release</i> to <i>4.1.0</i></li></ul><p>Setting the target version to 4.1.0.</p> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=923822019-06-18T02:00:09ZMizuki ISHIKAWA
<ul></ul><p>+1</p> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=923852019-06-18T07:34:17ZSeiei Miyagi
<ul></ul><p>I found the XSS in attached patch.<br />If I fill the project description like below, then open <a class="external" href="http://localhost:3000/admin/projects">http://localhost:3000/admin/projects</a> and hover the title of the project, the alert is showing.</p>
<pre>
<script>alert(1)</script>
</pre>
<p>the content function needs to escape the <code>$(this).prop('title')</code></p> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=923862019-06-18T07:52:16ZMarius BĂLTEANU
<ul><li><strong>Assignee</strong> set to <i>Marius BĂLTEANU</i></li></ul><p>Seiei Miyagi wrote:</p>
<blockquote>
<p>I found the XSS in attached patch.<br />If I fill the project description like below, then open <a class="external" href="http://localhost:3000/admin/projects">http://localhost:3000/admin/projects</a> and hover the title of the project, the alert is showing.</p>
<p>[...]</p>
<p>the content function needs to escape the <code>$(this).prop('title')</code></p>
</blockquote>
<p>You're right, thanks for pointing this out, I'll fix it.</p> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=924142019-06-19T08:01:57ZMarius BĂLTEANU
<ul><li><strong>File</strong> <a href="/attachments/23341">tooltip_v2.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/23341/tooltip_v2.patch">tooltip_v2.patch</a> added</li></ul><p>I think for now it's enough to disable the HTML support (attached patch).</p>
<p>What do you think, Seiei Miyagi?</p> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=924152019-06-19T08:22:30ZSeiei Miyagi
<ul></ul><p>Thank you! It looks good to me.</p>
<p>Since the title attribute is too general and XSS may occur, I think it would be nice to disable HTML support.<br />IMO If you need HTML support, it may be better to add explicit attributes. (e.g. like html-safe? IDK)</p> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=924162019-06-19T08:33:16ZGo MAEDA
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Assignee</strong> changed from <i>Marius BĂLTEANU</i> to <i>Go MAEDA</i></li></ul><p>Thank you to everyone who involved in this patch.</p> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=929542019-08-04T21:01:19ZMarius BĂLTEANU
<ul><li><strong>File</strong> <a href="/attachments/23572">issue_subject_tooltip.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/23572/issue_subject_tooltip.png">issue_subject_tooltip.png</a> added</li><li><strong>File</strong> <a href="/attachments/23573">selectors_for_tooltip.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/23573/selectors_for_tooltip.patch">selectors_for_tooltip.patch</a> added</li><li><strong>Status</strong> changed from <i>Closed</i> to <i>Reopened</i></li></ul><p>I've just observed some bad effects of my patch. For example, in the gantt chart, the tooltip is shown even if the issue subject is visible:<br /> <img src="https://www.redmine.org/attachments/download/23572/issue_subject_tooltip.png" alt="" /></p>
<p>I propose to replace the current <code>[title]</code> selector (which is too generic) with:<br />- a custom attribute <code>data-toggle="tooltip"</code> for enable the tooltip on elements<br />- <code>'.icon-only'</code> selector to target all the links rendered only as icon</p> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=929862019-08-07T00:19:13ZGo MAEDA
<ul><li><strong>File</strong> <a href="/attachments/23578">tooltip-for-issues@2x.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/23578/tooltip-for-issues@2x.png">tooltip-for-issues@2x.png</a> added</li></ul><p>Marius BALTEANU wrote:</p>
<blockquote>
<p>I propose to replace the current <code>[title]</code> selector (which is too generic) with:<br />- a custom attribute <code>data-toggle="tooltip"</code> for enable the tooltip on elements<br />- <code>'.icon-only'</code> selector to target all the links rendered only as icon</p>
</blockquote>
<p>Tooltip for issues or some other objects will disappear after applying the new patch. Please see the screenshot below for an example. It is a pity if I cannot see the useful information any longer.</p>
<p><img src="https://www.redmine.org/attachments/download/23578/tooltip-for-issues@2x.png" srcset="https://www.redmine.org/attachments/download/23578/tooltip-for-issues@2x.png 2x" style="width: 426px;border: 1px solid #ccc;" alt="" /></p> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=929962019-08-07T05:52:17ZMarius BĂLTEANU
<ul></ul><p>Go MAEDA wrote:</p>
<blockquote>
<p>Tooltip for issues or some other objects will disappear after applying the new patch. Please see the screenshot below for an example. It is a pity if I cannot see the useful information any longer.</p>
</blockquote>
<p>You're right, but the plan is to add to all other objects that should have tooltips one by one. I'll update the patch to include the tooltip for object links as well.</p> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=931552019-08-17T10:26:18ZMarius BĂLTEANU
<ul></ul><p>Go Maeda, is it better if we remove the title the from gantt issue subject?</p>
<pre><code class="diff syntaxhl"><span class="p">Mariuss-MacBook-Pro:redmine mariusbalteanu$ git diff
</span><span class="gh">diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb
index ef9475cea..ed2a8f8f7 100644
</span><span class="gd">--- a/lib/redmine/helpers/gantt.rb
</span><span class="gi">+++ b/lib/redmine/helpers/gantt.rb
</span><span class="p">@@ -747,7 +747,6 @@</span> module Redmine
when Issue
tag_options[:id] = "issue-#{object.id}"
tag_options[:class] = "issue-subject hascontextmenu"
<span class="gd">- tag_options[:title] = object.subject
</span> children = object.children & project_issues(object.project)
has_children = children.present? && (children.collect(&:fixed_version).uniq & [object.fixed_version]).present?
when Version
</code></pre> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=932112019-08-18T04:04:09ZGo MAEDA
<ul></ul><p>Marius BALTEANU wrote:</p>
<blockquote>
<p>Go Maeda, is it better if we remove the title the from gantt issue subject?</p>
</blockquote>
<p>I agree.</p>
<p>But I would like to suggest another option. How about setting "Assignee (Status)" instead of removing the subject? The assignee and status are important information but those are not prominent in gantt.</p>
<p>Marius, which do you prefer?</p>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb
index ef9475cea..cc5b97cd7 100644
</span><span class="gd">--- a/lib/redmine/helpers/gantt.rb
</span><span class="gi">+++ b/lib/redmine/helpers/gantt.rb
</span><span class="p">@@ -747,7 +747,7 @@</span> module Redmine
when Issue
tag_options[:id] = "issue-#{object.id}"
tag_options[:class] = "issue-subject hascontextmenu"
<span class="gd">- tag_options[:title] = object.subject
</span><span class="gi">+ tag_options[:title] = "#{object.assigned_to&.name} (#{object.status.name})".lstrip
</span> children = object.children & project_issues(object.project)
has_children = children.present? && (children.collect(&:fixed_version).uniq & [object.fixed_version]).present?
when Version
</code></pre> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=935672019-09-06T14:56:52ZAnonymous
<ul><li><strong>File</strong> <a href="/attachments/23810">gantttooltip.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/23810/gantttooltip.png">gantttooltip.png</a> added</li></ul><p>I think tool-tips like these should also be used as gantt tool-tips which display brief information when rolling cursor over issue lines of the timeline, because currently those kind of tool-tips in gantt aren't designed to spawn on the left, right, below or over the issue lines, depending on which side a free space available, so the tool-tip wouldn't end up half cut outside of the window.<br />I tested the way new tool-tips are displayed and saw that they actually support that kind of smart behavior.</p>
<p><img src="https://www.redmine.org/attachments/download/23810/gantttooltip.png" alt="" /></p> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=935762019-09-07T01:04:58ZGo MAEDA
<ul></ul><p>Antonio McDeal wrote:</p>
<blockquote>
<p>I think tool-tips like these should also be used as gantt tool-tips which display brief information when rolling cursor over issue lines of the timeline, because currently those kind of tool-tips in gantt aren't designed to spawn on the left, right, below or over the issue lines, depending on which side a free space available, so the tool-tip wouldn't end up half cut outside of the window.<br />I tested the way new tool-tips are displayed and saw that they actually support that kind of smart behavior.</p>
</blockquote>
<p>It is a big change to discuss on this issue. Could you open a new issue?</p> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=935772019-09-07T21:16:11ZAnonymous
<ul></ul><p>Go MAEDA wrote:</p>
<blockquote>
<p>Could you open a new issue?</p>
</blockquote>
<p>Of course, I will do now. Could you please add this ticket as related if a relationship would make sense? I don't have a patch at the moment, but if nobody minds I might try to compose something a tad bit later next week. So far I figured out that jQuery tool-tips should support bare HTML fed into the title fields of tags (I'm aware of possible XSS but there is a good workaround I should test). Then there is multiple things from old tool-tips to consider for cleanup, including in style sheets, which shalt not be overlooked.</p> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=935792019-09-07T23:55:38ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-1 priority-4 priority-default" href="/issues/32029">Feature #32029</a>: Replace gantt and calendar tooltips with jquery tooltips</i> added</li></ul> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=936122019-09-09T19:39:36ZMarius BĂLTEANU
<ul><li><strong>Status</strong> changed from <i>Reopened</i> to <i>Closed</i></li></ul><p>Go MAEDA wrote:</p>
<blockquote>
<p>Marius BALTEANU wrote:</p>
<blockquote>
<p>Go Maeda, is it better if we remove the title the from gantt issue subject?</p>
</blockquote>
<p>I agree.</p>
<p>But I would like to suggest another option. How about setting "Assignee (Status)" instead of removing the subject? The assignee and status are important information but those are not prominent in gantt.</p>
<p>Marius, which do you prefer?</p>
</blockquote>
<p>I'll open a new issue to discuss this change (I should have done it from the beginning).</p> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=957502020-01-16T03:49:16ZAnonymous
<ul></ul><p>When adding some (self made) plugins that use Highcharts graphs, etc., there is no <code>"tooltip"</code> in the <code>"title"</code> attribute.<br />So, <br /><pre>
if ($('[title]').tooltip !== undefined) {
</pre><br />is necessary before calling the <code>tooltip()</code> function.</p> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=970862020-04-04T06:30:48ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/33250">Defect #33250</a>: Useless white box appears over the the tooltip in EdgeHTML</i> added</li></ul> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=1005792021-01-19T08:59:01ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/34247">Defect #34247</a>: Web browser freezes when displaying workflow page with a large number of issue statuses</i> added</li></ul> Redmine - Patch #31441: Show elements titles using jQuery UI tooltipshttps://www.redmine.org/issues/31441?journal_id=1011962021-03-04T07:01:31ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/34834">Defect #34834</a>: Line breaks in the description of a custom field are ignored in a tooltip</i> added</li></ul>