diff options
author | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-09-14 12:02:29 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-09-14 12:02:29 +0300 |
commit | 09983a574c43b634681e17f4769e1ceca43ccaa5 (patch) | |
tree | 16520ae84d5eb428d04af482a50b64b126681c36 /app/assets/javascripts/milestone_select.js | |
parent | d66e0d4dfbfd5bcbffb8e8baaf8d8ba0c84f0773 (diff) |
Truncate milestone text on collapse; add tooltip for title
Diffstat (limited to 'app/assets/javascripts/milestone_select.js')
-rw-r--r-- | app/assets/javascripts/milestone_select.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/milestone_select.js b/app/assets/javascripts/milestone_select.js index 04579058688..4675b1fcb8f 100644 --- a/app/assets/javascripts/milestone_select.js +++ b/app/assets/javascripts/milestone_select.js @@ -45,7 +45,7 @@ import _ from 'underscore'; if (issueUpdateURL) { milestoneLinkTemplate = _.template('<a href="/<%- full_path %>/milestones/<%- iid %>" class="bold has-tooltip" data-container="body" title="<%- remaining %>"><%- title %></a>'); milestoneLinkNoneTemplate = '<span class="no-value">None</span>'; - collapsedSidebarLabelTemplate = _.template('<span class="has-tooltip" data-container="body" title="<%- remaining %>" data-placement="left"> <%- title %> </span>'); + collapsedSidebarLabelTemplate = _.template('<span class="has-tooltip" data-container="body" title="<%- name %><br /><%- remaining %>" data-placement="left" data-html="true"> <%- title %> </span>'); } return $dropdown.glDropdown({ showMenuAbove: showMenuAbove, @@ -208,6 +208,7 @@ import _ from 'underscore'; if (data.milestone != null) { data.milestone.full_path = _this.currentProject.full_path; data.milestone.remaining = gl.utils.timeFor(data.milestone.due_date); + data.milestone.name = data.milestone.title; $value.html(milestoneLinkTemplate(data.milestone)); return $sidebarCollapsedValue.find('span').html(collapsedSidebarLabelTemplate(data.milestone)); } else { |