From 1562b9aad9200928b59d965b054b645d0809382d Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Tue, 20 May 2014 19:49:07 +0530 Subject: [PATCH] CRM-12872 --- js/Common.js | 10 ++++++++++ templates/CRM/Contact/Form/Selector.tpl | 3 --- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/js/Common.js b/js/Common.js index 72a27d4972..68b06ce38d 100644 --- a/js/Common.js +++ b/js/Common.js @@ -452,6 +452,13 @@ CRM.validate = CRM.validate || { // Initialize widgets $(document) .on('crmLoad', function(e) { + $('table.form-layout-compressed') + .on('change', 'input.select-rows', function () { + if ($(this).prop('checked')) { + $('input#toggleSelect:checked').prop('checked', false); + $('input.select-row:checked').prop('checked', false); + } + }) $('table.row-highlight', e.target) .off('.rowHighlight') .on('change.rowHighlight', 'input.select-row, input.select-rows', function (e, data) { @@ -465,6 +472,9 @@ CRM.validate = CRM.validate || { if (data !== 'master-selected') { $('input.select-rows', $table).prop('checked', $(".select-row:not(':checked')", $table).length < 1); } + if ($(this).prop('checked')) { + $('input[value=ts_sel]:radio').prop('checked', true); + } } }) .find('input.select-row:checked').parents('tr').addClass('crm-row-selected'); diff --git a/templates/CRM/Contact/Form/Selector.tpl b/templates/CRM/Contact/Form/Selector.tpl index e485efa9d9..393f921071 100644 --- a/templates/CRM/Contact/Form/Selector.tpl +++ b/templates/CRM/Contact/Form/Selector.tpl @@ -172,9 +172,6 @@ function countSelections(obj) { label.prepend('' + obj.getCount + ' '); } else { - if(obj.getCount > 0) { - cj('input[name=radio_ts][value=ts_sel]').prop('checked', true); - } cj('span', label).html(obj.getCount); } toggleTaskAction(obj.getCount); -- 2.25.1