プロジェクト

全般

プロフィール

Vote #81293

完了

Line breaks in the description of a custom field are ignored in a tooltip

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
UI_10
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
10
version_id:
169
issue_org_id:
34834
author_id:
332
assigned_to_id:
332
comments:
6
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
127
ステータス-->[Closed]

説明

The text in the description field of a custom field is displayed as a tooltip. In Redmine 4.1, all line breaks in the descriptions are ignored when showing a tooltip.

!{width: 543px; border: 1px solid #ccc;}.cf-description.png!

Redmine 4.1:
!{width: 390px; border: 1px solid #ccc;}.tooltip-4_1.png!

Redmine 4.0:
!{width: 390px; border: 1px solid #ccc;}.tooltip-4_0.png!


journals

--------------------------------------------------------------------------------

By specifying content instead of title in tooltip, it was possible to reflect including line breaks.
I'm not used to JQuely, so I would appreciate it if you could fix any problems.

public/javascripts/application.js
<pre>
$(function () {
$("[title]:not(.no-tooltip)").tooltip({
+ content: function() {
+ return $(title)
+ },
show: {
delay: 400
},
position: {
my: "center bottom-5",
at: "center top"
}
});
});
</pre>
--------------------------------------------------------------------------------
Line breaks will be reflected in a tooltip by using the following patch.

<pre><code class="diff">
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 9f6b4dc3d7..791ef4c23d 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -1493,7 +1493,8 @@ td.gantt_selected_column .gantt_hdr,.gantt_selected_column_container {
color: #fff;
border-radius: 3px;
border: 0;
- box-shadow: none
+ box-shadow: none;
+ white-space: pre-wrap;
}

/***** Icons *****/
</code></pre>

*Redmine-trunk:* (r21217)
!{width:390px;border:1px solid grey;}tooltip-after-patching.png!
--------------------------------------------------------------------------------
Setting the target version to 4.1.5.
--------------------------------------------------------------------------------
Committed the patch. Thank you.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,31441,Show elements titles using jQuery UI tooltips

Admin Redmine さんが3年以上前に更新

  • カテゴリUI_10 にセット
  • 対象バージョン4.1.5_169 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0