From 57db188afa86a9ca8281608482b3b7ccf8e2453d Mon Sep 17 00:00:00 2001 From: deepak-srivastava Date: Mon, 17 Aug 2015 17:59:43 +0100 Subject: [PATCH] get rid of crm-pair-conflict, and use index to catch cells to no-wrap --- templates/CRM/Contact/Page/DedupeFind.tpl | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/templates/CRM/Contact/Page/DedupeFind.tpl b/templates/CRM/Contact/Page/DedupeFind.tpl index cfb722dd59..9a7a8342bb 100644 --- a/templates/CRM/Contact/Page/DedupeFind.tpl +++ b/templates/CRM/Contact/Page/DedupeFind.tpl @@ -87,7 +87,7 @@ {ts}Street Address{/ts} 2 ({ts}Duplicate{/ts}) - + @@ -212,7 +212,8 @@ // for action column at the last, set nowrap $('td:last', row).attr('nowrap','nowrap'); // for conflcts column - $('td.crm-pair-conflict', row).attr('nowrap','nowrap'); + var col = CRM.$('table#dupePairs thead th.crm-contact-conflicts').index(); + $('td:eq(' + col + ')', row).attr('nowrap','nowrap'); } }); $(function($) { @@ -279,8 +280,11 @@ // nowrap to conflicts column is applied only during initial rendering // for show / hide clicks we need to set it explicitly - $('#dupePairs tbody td.crm-pair-conflict').attr('nowrap', 'nowrap'); - + var col = CRM.$('table#dupePairs thead th.crm-contact-conflicts').index() + 1; + if (col > 0) { + CRM.$('table#dupePairs tbody tr td:nth-child(' + col + ')').attr('nowrap','nowrap'); + } + if ($(this).attr('data-column-dupe')) { column = table.column( $(this).attr('data-column-dupe') ); column.visible( ! column.visible() ); -- 2.25.1
{ts}Postcode{/ts} 1 {ts}Postcode{/ts} 2 ({ts}Duplicate{/ts}){ts}Conflicts{/ts}{ts}Conflicts{/ts} {ts}Threshold{/ts}