From 3f98995adabf8359c8e90c1329db5a30d4f8f8a4 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 7 Jan 2015 11:42:10 -0500 Subject: [PATCH] CRM-15789 - Cleanup editable icons/styles --- css/civicrm.css | 94 ++++++++---------- i/edit.png | Bin 946 -> 0 bytes .../Form/Edit/CommunicationPreferences.js.tpl | 53 ++++++++++ .../Form/Edit/CommunicationPreferences.tpl | 53 ++-------- .../Form/Inline/CommunicationPreferences.tpl | 66 ++++-------- 5 files changed, 123 insertions(+), 143 deletions(-) delete mode 100644 i/edit.png create mode 100644 templates/CRM/Contact/Form/Edit/CommunicationPreferences.js.tpl diff --git a/css/civicrm.css b/css/civicrm.css index 340ffc20ab..609ddf2afe 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -217,38 +217,6 @@ input.crm-form-entityref { color: #3E3E3E; } -.crm-container .replace-plain, -.crm-container textarea, -.crm-container select.crm-form-multiselect { - border: 1px solid #999; -} - -.crm-container .replace-plain { - cursor: pointer; - background: rgba(255,255,255,0.6); - min-height: 2em; - position: relative; - padding: 2px; -} - -.crm-container .replace-plain:focus, -.crm-container .replace-plain:hover { - box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); - background: rgba(255,255,255,0.8); -} - -.crm-container .replace-plain .icon.ui-icon-pencil { - position: absolute; - top: .5em; - right: .5em; -} - -.crm-container .replace-plain a:active .icon.ui-icon-pencil, -.crm-container .replace-plain:focus .icon.ui-icon-pencil, -.crm-container .replace-plain:hover .icon.ui-icon-pencil { - background-image: url("../i/icons/jquery-ui-2786C2.png"); -} - /* ** class for hiding the text box; it is used in the OtherActivity template @@ -715,13 +683,6 @@ input.crm-form-entityref { padding: 4px; } -.crm-container div.view-data { - padding: .25em .5em .25em .5em; - border: 1px solid DimGray; - width: auto; - background-color: #ffffff; -} - .crm-container .crm-footer { font-size: 0.8em; } @@ -3995,6 +3956,40 @@ div.m ul#civicrm-menu, width: 100%; } +/* editable placeholder containers - share some styles with crm-editable below */ + +.crm-container .replace-plain, +.crm-container textarea, +.crm-container select.crm-form-multiselect { + border: 1px solid #999; +} + +.crm-container .replace-plain { + cursor: pointer; + background: rgba(255,255,255,0.6); + min-height: 1.4em; + position: relative; + padding: .4em 1.5em .3em .4em; +} + +.crm-container .replace-plain p { + padding: .2em 0; + margin: 0; +} + +.crm-container .replace-plain:focus, +.crm-container .replace-plain:hover { + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + background: rgba(255,255,255,0.8); +} + +.crm-container .replace-plain:before { + content: ""; + position: absolute; + top: .4em; + right: .5em; +} + /* in place edit */ .crm-container .crm-editable-enabled { white-space: nowrap; @@ -4016,21 +4011,25 @@ div.m ul#civicrm-menu, } .crm-container span.crm-editable-textarea-enabled { - display: inline-block !important; width: 96%; } .crm-container span.crm-editable-enabled { display: inline-block !important; } -.crm-container .crm-editable-placeholder { +.crm-container .crm-editable-placeholder, +.crm-container .replace-plain:before { background: url("../i/icons/jquery-ui-3E3E3E.png") -66px -114px no-repeat; text-indent: -10000px; display: block; - width: 12px; + height: 16px; + width: 16px; opacity: .5; } +.crm-container .replace-plain a:active:before, +.crm-container .replace-plain:focus:before, +.crm-container .replace-plain:hover:before, .crm-container .crm-editable-enabled:hover .crm-editable-placeholder { background-image: url("../i/icons/jquery-ui-2786C2.png"); opacity: 1; @@ -4041,12 +4040,6 @@ div.m ul#civicrm-menu, opacity: 0.8; } -.crm-container .crm-editable-error, -.crm-container .crm-editable-error input { - background: red!important; - opacity: 0.8; -} - .crm-container h2.crm-editable-enabled input { min-height: 1.4em; } @@ -4071,15 +4064,12 @@ div.m ul#civicrm-menu, .crm-editable-form button { position: absolute; bottom: -22px; + left: 0; text-align: center; height: 23px; width: 32px; } -.crm-editable-form button[type=submit] { - left: 0; -} - .crm-editable-form button[type=cancel] { left: 32px; } diff --git a/i/edit.png b/i/edit.png deleted file mode 100644 index a8b69f73fe3ed52ad616c4fbc6fca2679a9e8c1d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 946 zcmV;j15NyiP)!SI-Y;XMNwpXV^<{*aN^_Vx3-ct!@s`>bqi46H0{3;+Ry)quaBJ~J?XSj52m z8_4<2#PIAXBg0pVFh+JBcH2kypF44Kam~GP<{HE8o0k~?0tl-C3?KJ1F#oy8!0>~O z;s49O3@@au7-U_78NS`V&T#4b=bvxiykyw3V+~N@9|nK`V#22X|HH`)th}5I3|}}H z-hbp{_@d#*AS5Hjz|8QMfrW*Y;mV~eKvn;Mn2iA-fG}L}_r(bYW{z7x&A^!b#K7>5 zM~y+yA(Vmh|4#-!9$tnc2M;mayK^3>l9deH=U0|9du%fr$es{1a&N2Ofs^ zGM)^AQql}8zy!d^%*gQO^-E5WZXgx`Vs3x{Vu3~JPf*mnxX8f5{*Zz3k06l4&hY9x zJA-IYEW@ua9~gfB`pNL=<0l3tMkZjIVT8Gy7a)M(Uib&{(%&CIhBN~M2QR~y=T8~l z2wO97{9|VL`T7k|BO}8A2nZd^1@wcFmECVAWI1(5D0*HkP2*F7gh&7GP8B`2R8JGoxfHwbT z_$|Q8z{<`B^!tAXHa2DkW@Z)!E-p@{@TgdZTeog9+`n_30U&@_?%sL$VbzK?JRm1B zG6Q1=6j*LX{7Jy;#>&w?K3pF07*qoM6N<$g5Dym0RR91 diff --git a/templates/CRM/Contact/Form/Edit/CommunicationPreferences.js.tpl b/templates/CRM/Contact/Form/Edit/CommunicationPreferences.js.tpl new file mode 100644 index 0000000000..b28187eaf3 --- /dev/null +++ b/templates/CRM/Contact/Form/Edit/CommunicationPreferences.js.tpl @@ -0,0 +1,53 @@ +{* + +--------------------------------------------------------------------+ + | CiviCRM version 4.6 | + +--------------------------------------------------------------------+ + | Copyright CiviCRM LLC (c) 2004-2014 | + +--------------------------------------------------------------------+ + | This file is a part of CiviCRM. | + | | + | CiviCRM is free software; you can copy, modify, and distribute it | + | under the terms of the GNU Affero General Public License | + | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | + | | + | CiviCRM is distributed in the hope that it will be useful, but | + | WITHOUT ANY WARRANTY; without even the implied warranty of | + | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | + | See the GNU Affero General Public License for more details. | + | | + | You should have received a copy of the GNU Affero General Public | + | License and the CiviCRM Licensing Exception along | + | with this program; if not, contact CiviCRM LLC | + | at info[AT]civicrm[DOT]org. If you have questions about the | + | GNU Affero General Public License or the licensing of CiviCRM, | + | see the CiviCRM license FAQ at http://civicrm.org/licensing | + +--------------------------------------------------------------------+ +*} +{literal} + +{/literal} diff --git a/templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl b/templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl index 07ddfcfdff..cb9c83ecc7 100644 --- a/templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl +++ b/templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl @@ -57,7 +57,9 @@ {$form.email_greeting_id.html|crmAddClass:big} {if !empty($email_greeting_display) and $action eq 2} -
{$email_greeting_display}  
+
+ {$email_greeting_display} +
{/if} {/if} @@ -65,7 +67,9 @@ {$form.postal_greeting_id.html|crmAddClass:big} {if !empty($postal_greeting_display) and $action eq 2} -
{$postal_greeting_display}  
+
+ {$postal_greeting_display} +
{/if} {/if} @@ -73,7 +77,9 @@ {$form.addressee_id.html|crmAddClass:big} {if !empty($addressee_display) and $action eq 2} -
{$addressee_display}  
+
+ {$addressee_display} +
{/if} {/if} @@ -125,43 +131,4 @@ - - -{literal} - -{/literal} +{include file="CRM/Contact/Form/Edit/CommunicationPreferences.js.tpl"} diff --git a/templates/CRM/Contact/Form/Inline/CommunicationPreferences.tpl b/templates/CRM/Contact/Form/Inline/CommunicationPreferences.tpl index 629a62e00a..66230db102 100644 --- a/templates/CRM/Contact/Form/Inline/CommunicationPreferences.tpl +++ b/templates/CRM/Contact/Form/Inline/CommunicationPreferences.tpl @@ -65,9 +65,10 @@
{$form.preferred_mail_format.label} + {help id="id-emailFormat" file="CRM/Contact/Form/Contact.hlp"}
- {$form.preferred_mail_format.html} {help id="id-emailFormat" file="CRM/Contact/Form/Contact.hlp"} + {$form.preferred_mail_format.html}
{/if} @@ -90,9 +91,11 @@ {$form.email_greeting_id.html|crmAddClass:big} - - {$email_greeting_display}   - + {if !empty($email_greeting_display)} +
+ {$email_greeting_display} +
+ {/if} {if !empty($form.email_greeting_custom)}
{$form.email_greeting_custom.html|crmAddClass:big} @@ -110,9 +113,11 @@ {$form.postal_greeting_id.html|crmAddClass:big} - - {$postal_greeting_display}   - + {if !empty($postal_greeting_display)} +
+ {$postal_greeting_display} +
+ {/if} {if !empty($form.postal_greeting_custom)}
{$form.postal_greeting_custom.html|crmAddClass:big} @@ -129,9 +134,11 @@ {$form.addressee_id.html|crmAddClass:big} - - {$addressee_display}   - + {if !empty($addressee_display)} +
+ {$addressee_display} +
+ {/if} {if !empty($form.addressee_custom)}
{$form.addressee_custom.html|crmAddClass:big} @@ -143,41 +150,4 @@ - -{literal} - -{/literal} +{include file="CRM/Contact/Form/Edit/CommunicationPreferences.js.tpl"} \ No newline at end of file -- 2.25.1