X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=js%2FCommon.js;h=68b06ce38d34170cb91934de71828576c863bec5;hb=3c3080c01a8ed53aea86cf96e036bf79cf26577b;hp=8a385fb1323909c58a960e235bceca6f83bf24b3;hpb=8d8705843bd85a0e25279f50325ae5fab5ec1d16;p=civicrm-core.git diff --git a/js/Common.js b/js/Common.js index 8a385fb132..68b06ce38d 100644 --- a/js/Common.js +++ b/js/Common.js @@ -247,7 +247,8 @@ CRM.validate = CRM.validate || { var isDirty = false; $(':input:visible, :input.select2-offscreen', el).each(function () { var initialValue = $(this).data('crm-initial-value'); - if (initialValue !== undefined && initialValue != $(this).val()) { + // skip change of value for submit buttons + if (initialValue !== undefined && !$(this).hasClass('form-submit') && initialValue != $(this).val()) { isDirty = true; } }); @@ -451,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) { @@ -464,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');