jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/378846 )
Change subject: CRM-21011 Sort out tag descriptions when displaying better
......................................................................
CRM-21011 Sort out tag descriptions when displaying better
Change-Id: Id78049e1efa176edbece3020714ad77f53d36326
---
M templates/CRM/Contact/Form/Edit/Tagtree.tpl
M templates/CRM/Contact/Page/View/Summary.tpl
M templates/CRM/Tag/Form/Tag.tpl
M templates/CRM/Tag/Form/Tagtree.tpl
4 files changed, 5 insertions(+), 5 deletions(-)
Approvals:
jenkins-bot: Verified
Ejegg: Looks good to me, approved
diff --git a/templates/CRM/Contact/Form/Edit/Tagtree.tpl
b/templates/CRM/Contact/Form/Edit/Tagtree.tpl
index 2f6d1c5..d35eea1 100644
--- a/templates/CRM/Contact/Form/Edit/Tagtree.tpl
+++ b/templates/CRM/Contact/Form/Edit/Tagtree.tpl
@@ -29,7 +29,7 @@
<li id="tagli_{$id}">
<input name="tag[{$id}]" id="tag_{$id}" class="form-checkbox"
type="checkbox" value="1" {if $node.is_selectable EQ 0}disabled=""{/if} {if
$form.tag.value.$id EQ 1}checked="checked"{/if}/>
<span>
- <label for="tag_{$id}" id="tagLabel_{$id}" class="crm-tag-item" {if
!empty($allTags.$id.color)}style="background-color: {$allTags.$id.color};
color: {$allTags.$id.color|colorContrast};"{/if}
title="{$node.description}">{$node.name}</label>
+ <label for="tag_{$id}" id="tagLabel_{$id}" class="crm-tag-item" {if
!empty($allTags.$id.color)}style="background-color: {$allTags.$id.color};
color: {$allTags.$id.color|colorContrast};"{/if}
title="{$node.description|escape:'html'}">{$node.name}</label>
</span>
{if $node.children}
{* Recurse... *}
diff --git a/templates/CRM/Contact/Page/View/Summary.tpl
b/templates/CRM/Contact/Page/View/Summary.tpl
index 3e646f2..4b359d8 100644
--- a/templates/CRM/Contact/Page/View/Summary.tpl
+++ b/templates/CRM/Contact/Page/View/Summary.tpl
@@ -166,7 +166,7 @@
</div>
<div class="crm-content" id="tags">
{foreach from=$contactTag item=tagName key=tagId}
- <span class="crm-tag-item" {if
!empty($allTags.$tagId.color)}style="background-color: {$allTags.$tagId.color};
color: {$allTags.$tagId.color|colorContrast};"{/if}
title="{$allTags.$tagId.description}">
+ <span class="crm-tag-item" {if
!empty($allTags.$tagId.color)}style="background-color: {$allTags.$tagId.color};
color: {$allTags.$tagId.color|colorContrast};"{/if}
title="{$allTags.$tagId.description|escape:'html'}">
{$tagName}
</span>
{/foreach}
diff --git a/templates/CRM/Tag/Form/Tag.tpl b/templates/CRM/Tag/Form/Tag.tpl
index 64ccc97..bad26d4 100644
--- a/templates/CRM/Tag/Form/Tag.tpl
+++ b/templates/CRM/Tag/Form/Tag.tpl
@@ -41,11 +41,11 @@
selected = $("#tagtree").jstree(true).get_selected(true);
$.each(selected, function(k, item) {
var $tag = $(item.text);
- tags.push('<span class="crm-tag-item" style="' + $tag.attr('style')
+ '" title="' + ($tag.attr('title') || '') + '">' + $tag.text() + '</span>');
+ tags.push('<span class="crm-tag-item" style="' + $tag.attr('style')
+ '" title="' + ($.parseHTML($tag.attr('title')) || '') + '">' + $tag.text() +
'</span>');
});
$('input.crm-contact-tagset').each(function() {
$.each($(this).select2('data'), function (i, tag) {
- tags.push('<span class="crm-tag-item" title="' + (tag.description
|| '') + '"' + (tag.color ? 'style="color: ' +
CRM.utils.colorContrast(tag.color) + '; background-color: ' + tag.color + ';"'
: '') + '>' + tag.label + '</span>');
+ tags.push('<span class="crm-tag-item" title="' +
($.parseHTML(tag.description.text) || '') + '"' + (tag.color ? 'style="color: '
+ CRM.utils.colorContrast(tag.color) + '; background-color: ' + tag.color +
';"' : '') + '>' + tag.label + '</span>');
});
});
// contact summary tabs and search forms both listen for this event
diff --git a/templates/CRM/Tag/Form/Tagtree.tpl
b/templates/CRM/Tag/Form/Tagtree.tpl
index 8f3a1df..9c00437 100644
--- a/templates/CRM/Tag/Form/Tagtree.tpl
+++ b/templates/CRM/Tag/Form/Tagtree.tpl
@@ -28,7 +28,7 @@
{foreach from=$tree item="node" key="id"}
<li>
<a id="tag_{$id}" class="{if !$node.is_selectable || $permission neq
'edit'}jstree-disabled{/if} {if $tagged[$id]}jstree-clicked{/if}">
- <span class="crm-tag-item" {if
!empty($allTags.$id.color)}style="background-color: {$allTags.$id.color};
color: {$allTags.$id.color|colorContrast};"{/if} title="{$node.description}">
+ <span class="crm-tag-item" {if
!empty($allTags.$id.color)}style="background-color: {$allTags.$id.color};
color: {$allTags.$id.color|colorContrast};"{/if}
title="{$node.description|escape:'html'}">
{$node.name}
</span>
</a>
--
To view, visit https://gerrit.wikimedia.org/r/378846
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id78049e1efa176edbece3020714ad77f53d36326
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Mepps <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits