From c9b4a20d0249ee98da9871dc087025ebbe0745b4 Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Thu, 30 Jul 2020 14:04:39 -0400 Subject: [PATCH 1/9] Icons on buttons positioned inline, not absolute --- css/civicrm.css | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/css/civicrm.css b/css/civicrm.css index 06cfe11d01e8..ea4941adec36 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -2121,20 +2121,13 @@ a.crm-i:hover { color: #86c661; } -.crm-i-button { - position: relative; -} - .crm-i-button>.crm-i { - position: absolute; - pointer-events: none; - top: .4em; - left: .4em; + padding-left: 5px; } .crm-container .crm-button.crm-i-button input[type="button"], .crm-container .crm-button.crm-i-button input.crm-form-submit { - padding-left: 1.6em; + padding-left: 0; } .crm-container a.helpicon { From dae5c8c3b10eca6e68cab3f9cb91cfa23353dc7e Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Thu, 30 Jul 2020 14:15:02 -0400 Subject: [PATCH 2/9] No need for crm-i-button class --- css/civicrm.css | 6 +++--- templates/CRM/Admin/Page/APIExplorer.tpl | 2 +- templates/CRM/Admin/Page/CKEditorConfig.tpl | 4 ++-- templates/CRM/common/formButtons.tpl | 1 - 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/css/civicrm.css b/css/civicrm.css index ea4941adec36..bd8a68689352 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -2121,12 +2121,12 @@ a.crm-i:hover { color: #86c661; } -.crm-i-button>.crm-i { +.crm-button>.crm-i { padding-left: 5px; } -.crm-container .crm-button.crm-i-button input[type="button"], -.crm-container .crm-button.crm-i-button input.crm-form-submit { +.crm-container .crm-button .crm-i + input[type="button"], +.crm-container .crm-button .crm-i + input.crm-form-submit { padding-left: 0; } diff --git a/templates/CRM/Admin/Page/APIExplorer.tpl b/templates/CRM/Admin/Page/APIExplorer.tpl index 1e1b8eb497da..ced1f3668dcd 100644 --- a/templates/CRM/Admin/Page/APIExplorer.tpl +++ b/templates/CRM/Admin/Page/APIExplorer.tpl @@ -285,7 +285,7 @@
- +
diff --git a/templates/CRM/Admin/Page/CKEditorConfig.tpl b/templates/CRM/Admin/Page/CKEditorConfig.tpl index 14af566be27a..ad179df5ab7a 100644 --- a/templates/CRM/Admin/Page/CKEditorConfig.tpl +++ b/templates/CRM/Admin/Page/CKEditorConfig.tpl @@ -99,10 +99,10 @@
- + - +
diff --git a/templates/CRM/common/formButtons.tpl b/templates/CRM/common/formButtons.tpl index 92b41f4dff0d..9af85592f3a5 100644 --- a/templates/CRM/common/formButtons.tpl +++ b/templates/CRM/common/formButtons.tpl @@ -41,7 +41,6 @@ {crmGetAttribute html=$html attr='crm-icon' assign='icon'} {capture assign=iconPrefix}{$icon|truncate:3:"":true}{/capture} {if $icon && $iconPrefix eq 'fa-'} - {assign var='buttonClass' value=' crm-i-button'} {capture assign=iconDisp}{/capture} {elseif $icon} {assign var='buttonClass' value=' crm-icon-button'} From 748a567cf7d0f83839afadb63dd175c981df77aa Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Thu, 30 Jul 2020 14:24:45 -0400 Subject: [PATCH 3/9] 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 18380923c1ee..5e97ae964a5b 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 c6ba58b1464e..355939c2dcf7 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 bd8a68689352..3473e75d6742 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -2066,15 +2066,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 9a3c3f1ce572..e65bd7b2a22c 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 9af85592f3a5..7af01e646bec 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} From 3eb86289fe3cca3db8488f350156d6df21853712 Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Thu, 30 Jul 2020 14:36:13 -0400 Subject: [PATCH 4/9] Standardize single space (not nbsp) between icon and text --- CRM/Core/Controller.php | 4 ++-- CRM/Core/Smarty/plugins/block.crmButton.php | 2 +- templates/CRM/Admin/Page/APIExplorer.tpl | 2 +- .../Contact/Form/Search/Custom/FullText.tpl | 14 ++++++------- .../Event/Form/ParticipantFeeSelection.tpl | 2 +- templates/CRM/Event/Page/DashBoard.tpl | 2 +- templates/CRM/Report/Form/Actions.tpl | 2 +- templates/CRM/Tag/Page/Tag.tpl | 20 +++++++++---------- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/CRM/Core/Controller.php b/CRM/Core/Controller.php index 4a4254c25505..68c653185855 100644 --- a/CRM/Core/Controller.php +++ b/CRM/Core/Controller.php @@ -568,8 +568,8 @@ public function wizardHeader($currentPageName) { public function addWizardStyle(&$wizard) { $wizard['style'] = [ 'barClass' => '', - 'stepPrefixCurrent' => ' ', - 'stepPrefixPast' => ' ', + 'stepPrefixCurrent' => ' ', + 'stepPrefixPast' => ' ', 'stepPrefixFuture' => ' ', 'subStepPrefixCurrent' => '  ', 'subStepPrefixPast' => '  ', diff --git a/CRM/Core/Smarty/plugins/block.crmButton.php b/CRM/Core/Smarty/plugins/block.crmButton.php index 390a8e73030e..64543d595768 100644 --- a/CRM/Core/Smarty/plugins/block.crmButton.php +++ b/CRM/Core/Smarty/plugins/block.crmButton.php @@ -47,7 +47,7 @@ function smarty_block_crmButton($params, $text, &$smarty) { if (strpos($icon, 'fa-') !== 0) { $icon = "fa-$icon"; } - $iconMarkup = "  "; + $iconMarkup = " "; } // All other params are treated as html attributes CRM_Utils_Array::remove($params, 'icon', 'p', 'q', 'a', 'f', 'h', 'fb', 'fe'); diff --git a/templates/CRM/Admin/Page/APIExplorer.tpl b/templates/CRM/Admin/Page/APIExplorer.tpl index ced1f3668dcd..9c127fcb6fca 100644 --- a/templates/CRM/Admin/Page/APIExplorer.tpl +++ b/templates/CRM/Admin/Page/APIExplorer.tpl @@ -286,7 +286,7 @@
- +
diff --git a/templates/CRM/Contact/Form/Search/Custom/FullText.tpl b/templates/CRM/Contact/Form/Search/Custom/FullText.tpl index 6a7d8b516a80..51a3c91956d8 100644 --- a/templates/CRM/Contact/Form/Search/Custom/FullText.tpl +++ b/templates/CRM/Contact/Form/Search/Custom/FullText.tpl @@ -62,7 +62,7 @@ {if !$table and $summary.addShowAllLink.Contact}
 {ts}View all results for contacts{/ts} + title="{ts}View all results for contacts{/ts}"> {ts}View all results for contacts{/ts}
{/if} {* note we using location="below" because we don't want to use rows per page for now. And therefore don't put location="bottom" for now. *} {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} @@ -125,7 +125,7 @@ {if !$table and $summary.addShowAllLink.Activity}
 {ts}View all results for activities{/ts} + title="{ts}View all results for activities{/ts}"> {ts}View all results for activities{/ts}
{/if} {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} @@ -182,7 +182,7 @@ {if !$table and $summary.addShowAllLink.Case}
 {ts}View all results for cases{/ts} + title="{ts}View all results for cases{/ts}"> {ts}View all results for cases{/ts}
{/if} {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} @@ -236,7 +236,7 @@ {if !$table and $summary.addShowAllLink.Contribution}
 {ts}View all results for contributions{/ts} + title="{ts}View all results for contributions{/ts}"> {ts}View all results for contributions{/ts}
{/if} {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} @@ -293,7 +293,7 @@ {if !$table and $summary.addShowAllLink.Participant}
 {ts}View all results for participants{/ts} + title="{ts}View all results for participants{/ts}"> {ts}View all results for participants{/ts}
{/if} {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} {* END Actions/Results section *} @@ -349,7 +349,7 @@ {if !$table and $summary.addShowAllLink.Membership}
 {ts}View all results for memberships{/ts} + title="{ts}View all results for memberships{/ts}"> {ts}View all results for memberships{/ts}
{/if} {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} @@ -395,7 +395,7 @@ {if !$table and $summary.addShowAllLink.File}
 {ts}View all results for files{/ts} + title="{ts}View all results for files{/ts}"> {ts}View all results for files{/ts}
{/if} {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} {* END Actions/Results section *} diff --git a/templates/CRM/Event/Form/ParticipantFeeSelection.tpl b/templates/CRM/Event/Form/ParticipantFeeSelection.tpl index 02246d54cba6..f9d3364dae5a 100644 --- a/templates/CRM/Event/Form/ParticipantFeeSelection.tpl +++ b/templates/CRM/Event/Form/ParticipantFeeSelection.tpl @@ -87,7 +87,7 @@ CRM.$(function($) {
{include file="CRM/common/formButtons.tpl" location="bottom"}
{if !$email}
-  {ts}You will not be able to send an automatic email receipt for this payment because there is no email address recorded for this contact. If you want a receipt to be sent when this payment is recorded, click Cancel and then click Edit from the Summary tab to add an email address before recording the payment.{/ts} + {ts}You will not be able to send an automatic email receipt for this payment because there is no email address recorded for this contact. If you want a receipt to be sent when this payment is recorded, click Cancel and then click Edit from the Summary tab to add an email address before recording the payment.{/ts}
{/if} diff --git a/templates/CRM/Event/Page/DashBoard.tpl b/templates/CRM/Event/Page/DashBoard.tpl index 3ca364f09329..d01250ee681b 100644 --- a/templates/CRM/Event/Page/DashBoard.tpl +++ b/templates/CRM/Event/Page/DashBoard.tpl @@ -87,7 +87,7 @@ {if $actionColumn} {include file="CRM/common/tasks.tpl" location="botton"} {if $instanceUrl} - + {/if}
{if $values.isMap} -  {ts}Map{/ts} + {ts}Map{/ts}  |  {/if} {if $values.configure} diff --git a/templates/CRM/Report/Form/Actions.tpl b/templates/CRM/Report/Form/Actions.tpl index 9aee8f669585..34690c1d916d 100644 --- a/templates/CRM/Report/Form/Actions.tpl +++ b/templates/CRM/Report/Form/Actions.tpl @@ -20,7 +20,7 @@
   {ts}Existing report(s) from this template{/ts}   {ts}Existing report(s) from this template{/ts}
diff --git a/templates/CRM/Tag/Page/Tag.tpl b/templates/CRM/Tag/Page/Tag.tpl index e59f24246a76..e0ded1e4bcb4 100644 --- a/templates/CRM/Tag/Page/Tag.tpl +++ b/templates/CRM/Tag/Page/Tag.tpl @@ -463,16 +463,16 @@ <% {rdelim} %> @@ -519,21 +519,21 @@
<% if(!tagset) {ldelim} %> " class="button crm-popup" title="{ts}Create new tag under this one{/ts}"> -   {ts}Add Child{/ts} + {ts}Add Child{/ts} <% {rdelim} %> " class="button crm-popup" title="{ts}Duplicate this tag{/ts}"> -   {ts}Clone Tag{/ts} + {ts}Clone Tag{/ts} <% if(!data.is_reserved || adminReserved) {ldelim} %> <% if(tagsetCount) {ldelim} %> -   {ts}Move Tag{/ts} + {ts}Move Tag{/ts} <% {rdelim} %> <% if(!hasChildren) {ldelim} %> " class="button crm-popup small-popup"> -   {ts}Delete{/ts} + {ts}Delete{/ts} <% {rdelim} %> <% {rdelim} %> @@ -551,16 +551,16 @@
<% if(!reserved || adminReserved) {ldelim} %> " class="button crm-popup small-popup" title="{ts}Combine tags into one{/ts}"> -   {ts}Merge Tags{/ts} + {ts}Merge Tags{/ts} <% if(tagsetCount) {ldelim} %> -   {ts}Move Tags{/ts} + {ts}Move Tags{/ts} <% {rdelim} %> <% if(!hasChildren) {ldelim} %> " class="button crm-popup small-popup"> -   {ts}Delete All{/ts} + {ts}Delete All{/ts} <% {rdelim} %> <% {rdelim} %> From 69d188616e2b5629aead014b675277764e48ca5c Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Thu, 30 Jul 2020 14:46:48 -0400 Subject: [PATCH 5/9] Remove weird styling for "Configure CKEditor" button --- css/civicrm.css | 8 -------- templates/CRM/Admin/Form/Preferences/Display.tpl | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/css/civicrm.css b/css/civicrm.css index 3473e75d6742..996ae6f7f0d3 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -2050,14 +2050,6 @@ input.crm-form-entityref { margin-left: 3px; } -.crm-container .crm-button.crm-icon-button { - padding: 2px 2px 1px 4px; -} - -.crm-container .crm-button.crm-icon-button input { - padding-left: 18px; -} - .crm-container .crm-button.button-crm-i { padding: 2px 0 1px 5px; } diff --git a/templates/CRM/Admin/Form/Preferences/Display.tpl b/templates/CRM/Admin/Form/Preferences/Display.tpl index 049a5ebf9975..44ff0ba7aabb 100644 --- a/templates/CRM/Admin/Form/Preferences/Display.tpl +++ b/templates/CRM/Admin/Form/Preferences/Display.tpl @@ -161,8 +161,8 @@ {$form.editor_id.html}   - - + + {$form.ckeditor_config.html} From 8e778e5becf62aa2fb946ff4f2c2dfe5f24b6d8b Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Thu, 30 Jul 2020 14:48:48 -0400 Subject: [PATCH 6/9] Remove unused button-crm-i CSS --- css/civicrm.css | 8 -------- 1 file changed, 8 deletions(-) diff --git a/css/civicrm.css b/css/civicrm.css index 996ae6f7f0d3..dc06c11d96d1 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -2050,14 +2050,6 @@ input.crm-form-entityref { margin-left: 3px; } -.crm-container .crm-button.button-crm-i { - padding: 2px 0 1px 5px; -} - -.crm-container .crm-button.button-crm-i input { - padding-left: 0; -} - .crm-container .delete-icon { background-position: -176px -96px; } From 6113a0a8908e89a6cdb474aa0fe48ebc485d0dfc Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Mon, 3 Aug 2020 19:19:01 -0400 Subject: [PATCH 7/9] remove IE6-only CSS --- css/civicrm.css | 4 ---- 1 file changed, 4 deletions(-) diff --git a/css/civicrm.css b/css/civicrm.css index dc06c11d96d1..eb4684290e86 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -1835,8 +1835,6 @@ input.crm-form-entityref { .crm-container .crm-button input { background: none; - _background: #6C6C6C; - /* IE6 only */ border: medium none; color: #FFF; cursor: pointer; @@ -1898,8 +1896,6 @@ input.crm-form-entityref { padding: 3px 5px 2px; margin: 0; background: none; - _background: #6C6C6C; - /* IE6 only */ border: none; } From 24a91781b9aad6861bbd3c54d33dc03c650b0f84 Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Thu, 30 Jul 2020 14:55:51 -0400 Subject: [PATCH 8/9] Simplify button padding and set consistent line height --- css/civicrm.css | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/css/civicrm.css b/css/civicrm.css index eb4684290e86..7d843e2b4492 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -1871,11 +1871,19 @@ input.crm-form-entityref { border: 1px solid #3e3e3e; } +.crm-container a.button, +.crm-container a.button:link, +.crm-container a.button:visited, .crm-container span.crm-button { display: block; - float: left !important; + float: left; overflow: hidden; - padding: 1px; + line-height: 135%; +} + +/* Preserving the important but not sure why */ +.crm-container span.crm-button { + float: left !important; } .crm-container button.crm-button { @@ -1893,20 +1901,12 @@ input.crm-form-entityref { .crm-container .crm-button input[type=button], .crm-container .crm-button input.crm-form-submit { - padding: 3px 5px 2px; + padding: 0; margin: 0; background: none; border: none; } -.crm-container a.button, -.crm-container a.button:link, -.crm-container a.button:visited { - display: block; - float: left; - line-height: 135%; -} - .crm-container .crm-button:hover, .crm-container .crm-button:focus, .crm-container input[type=submit]:hover, @@ -2092,15 +2092,6 @@ a.crm-i:hover { color: #86c661; } -.crm-button>.crm-i { - padding-left: 5px; -} - -.crm-container .crm-button .crm-i + input[type="button"], -.crm-container .crm-button .crm-i + input.crm-form-submit { - padding-left: 0; -} - .crm-container a.helpicon { opacity: .8; } From be37c143331a71f07927eecee8c2b7dbddac7d9f Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Thu, 30 Jul 2020 15:32:13 -0400 Subject: [PATCH 9/9] Reset button height in the WP backend --- css/civicrm.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/css/civicrm.css b/css/civicrm.css index 7d843e2b4492..3f9340be8ea2 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -1852,6 +1852,12 @@ input.crm-form-entityref { color: #E6E6DC!important; } +/* Reset WP backend min-height for buttons */ + +.wp-core-ui .crm-container .button { + min-height: 0; +} + .crm-container a.button, .crm-container a.button:link, .crm-container a.button:visited,