From 4bc72ff2e2a895ec11186bbc3a7272054cd3c929 Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Thu, 30 Jul 2020 14:24:45 -0400 Subject: [PATCH] Eliminate support for old jQuery UI based crm-button-icon icon buttons --- ang/crmMailingAB/EditCtrl/report.html | 2 +- ang/crmUi.js | 2 +- css/civicrm.css | 9 --------- js/crm.ajax.js | 2 +- templates/CRM/common/formButtons.tpl | 5 +---- 5 files changed, 4 insertions(+), 16 deletions(-) diff --git a/ang/crmMailingAB/EditCtrl/report.html b/ang/crmMailingAB/EditCtrl/report.html index 18380923c1..5e97ae964a 100644 --- a/ang/crmMailingAB/EditCtrl/report.html +++ b/ang/crmMailingAB/EditCtrl/report.html @@ -83,7 +83,7 @@ class="crm-hover-button action-item" ng-href="{{statUrl(am.mailing, statType, 'report')}}" title="{{ts('Reports for \'%1\'', {1: statType.title})}}" - crm-icon="clipboard" + crm-icon="fa-clipboard" > diff --git a/ang/crmUi.js b/ang/crmUi.js index c6ba58b146..355939c2dc 100644 --- a/ang/crmUi.js +++ b/ang/crmUi.js @@ -908,7 +908,7 @@ }) // Example for Font Awesome: - // Example for jQuery UI (deprecated): + // Example for jQuery UI (deprecated): .directive('crmIcon', function() { return { restrict: 'EA', diff --git a/css/civicrm.css b/css/civicrm.css index 22a6b34bf7..12b14aab45 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -2062,15 +2062,6 @@ input.crm-form-entityref { padding-left: 0; } -.crm-container .crm-button-icon { - background-image: url("../i/icons/jquery-ui-FFFFFF.png"); - height: 16px; - width: 16px; - display: block; - position: absolute; - pointer-events: none; -} - .crm-container .delete-icon { background-position: -176px -96px; } diff --git a/js/crm.ajax.js b/js/crm.ajax.js index 9a3c3f1ce5..e65bd7b2a2 100644 --- a/js/crm.ajax.js +++ b/js/crm.ajax.js @@ -517,7 +517,7 @@ added.push(identifier); } // display:none causes the form to not submit when pressing "enter" - $el.parents(buttonContainers).css({height: 0, padding: 0, margin: 0, overflow: 'hidden'}).find('.crm-button-icon').hide(); + $el.parents(buttonContainers).css({height: 0, padding: 0, margin: 0, overflow: 'hidden'}); }); $el.dialog('option', 'buttons', buttons); } diff --git a/templates/CRM/common/formButtons.tpl b/templates/CRM/common/formButtons.tpl index 9af85592f3..7af01e646b 100644 --- a/templates/CRM/common/formButtons.tpl +++ b/templates/CRM/common/formButtons.tpl @@ -42,12 +42,9 @@ {capture assign=iconPrefix}{$icon|truncate:3:"":true}{/capture} {if $icon && $iconPrefix eq 'fa-'} {capture assign=iconDisp}{/capture} - {elseif $icon} - {assign var='buttonClass' value=' crm-icon-button'} - {capture assign=iconDisp} {/capture} {/if} {crmGetAttribute html=$html attr='disabled' assign='disabled'} - + {$iconDisp} {$html} -- 2.25.1