From 0e44568b3664dda781cf25a4829f8463363f8b15 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 10 Feb 2015 09:14:45 -0500 Subject: [PATCH] Move contact-summary css into its own file --- CRM/Contact/Form/Contact.php | 3 + CRM/Contact/Page/View/Summary.php | 1 + css/civicrm.css | 343 +----------------------------- css/contactSummary.css | 326 ++++++++++++++++++++++++++++ 4 files changed, 340 insertions(+), 333 deletions(-) create mode 100644 css/contactSummary.css diff --git a/CRM/Contact/Form/Contact.php b/CRM/Contact/Form/Contact.php index c8ecfb6393..86247c0dc4 100644 --- a/CRM/Contact/Form/Contact.php +++ b/CRM/Contact/Form/Contact.php @@ -138,6 +138,9 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { $this->_dedupeButtonName = $this->getButtonName('refresh', 'dedupe'); $this->_duplicateButtonName = $this->getButtonName('upload', 'duplicate'); + CRM_Core_Resources::singleton() + ->addStyleFile('civicrm', 'css/contactSummary.css', 2, 'html-header'); + $session = CRM_Core_Session::singleton(); if ($this->_action == CRM_Core_Action::ADD) { // check for add contacts permissions diff --git a/CRM/Contact/Page/View/Summary.php b/CRM/Contact/Page/View/Summary.php index d81d6e7373..9e931cacb6 100644 --- a/CRM/Contact/Page/View/Summary.php +++ b/CRM/Contact/Page/View/Summary.php @@ -129,6 +129,7 @@ class CRM_Contact_Page_View_Summary extends CRM_Contact_Page_View { // Add js for tabs, in-place editing, and jstree for tags CRM_Core_Resources::singleton() ->addScriptFile('civicrm', 'templates/CRM/Contact/Page/View/Summary.js', 2, 'html-header') + ->addStyleFile('civicrm', 'css/contactSummary.css', 2, 'html-header') ->addScriptFile('civicrm', 'packages/jquery/plugins/jstree/jquery.jstree.js', 0, 'html-header', FALSE) ->addStyleFile('civicrm', 'packages/jquery/plugins/jstree/themes/default/style.css', 0, 'html-header') ->addScriptFile('civicrm', 'templates/CRM/common/TabHeader.js', 1, 'html-header') diff --git a/css/civicrm.css b/css/civicrm.css index bbc407c7e7..aaebbef17f 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -694,11 +694,6 @@ input.crm-form-entityref { visibility: hidden; } -#crm-record-log { - padding: 0.8em 0.8em 0em 0em; - text-align: right; -} - .crm-container #access { padding: 0.8em 0.8em 0em 0em; text-align: right; @@ -1761,11 +1756,6 @@ div.grippie { padding: .5em 1em !important; } -/* Styles for Contact Summary start here. dgg */ -#crm-container .primary { - font-weight: bold; -} - #crm-container .ui-tabs-panel { padding: 4px; min-height: 12em; @@ -1777,156 +1767,12 @@ div.grippie { clear: both; } -#crm-container div#crm-contact-thumbnail { - padding: 4px; - float: right; -} - -#crm-container div.contact_panel { - display: block; -} - -#crm-container .upper { - text-transform: uppercase; -} - #crm-container table.caseSelector td.status-urgent { font-weight: bold; text-transform: uppercase; } -#crm-container div.crm-inline-edit { - border: 2px dashed transparent; - background: none; - position: relative; -} - -#crm-container .crm-edit-ready .crm-inline-edit:hover { - cursor: pointer; - border: 2px dashed lightgrey; -} - -#crm-container div.crm-inline-edit.form { - cursor: default; - border: 2px dashed #6665BF; - overflow: auto; -} - -#crm-container .crm-inline-edit.add-new { - min-height: 2.5em; -} - -#crm-container div.crm-inline-edit .crm-edit-help { - display: none; - position: absolute; - right: 0px; - top: 0px; - opacity: .8; - padding: .4em; - border-bottom-left-radius: 1em; -} - -#crm-container .crm-inline-edit.add-new .crm-edit-help { - display: block; - background-color: #EBEBEB; -} - -#crm-container .crm-edit-ready .crm-inline-edit:hover .crm-edit-help { - display: block; - background-color: #DFE1FF; -} - -#crm-container div.crm-inline-edit.form .crm-edit-help { - display: none !important; -} - -#crm-container div.crm-summary-contactname-block { - padding-bottom: 8px; - margin-top: -10px; -} - -#crm-container div.crm-summary-display_name { - font-size: 19px; - padding-bottom: 10px; -} - -#crm-container div.contactCardLeft, -#crm-container div#Top { - width: 49%; - display: block; - float: left; - clear: both; -} - -#crm-container div.contactCardRight { - width: 49%; - display: block; - float: right; -} - -#crm-container div.contact_panel table { - margin-bottom: 0px; -} - -#crm-container div.contactCardLeft .label, -#crm-container div.contactCardRight .label { - font-size: 11px; - vertical-align: top; - margin-right: 10px; -} - -#crm-container div.contactCardLeft .grouplabel, -#crm-container div.contactCardRight .grouplabel { - border-bottom: grey 1px solid; - width: 100%; - font-size: 0.95em; - font-weight: bold; - background-color: #ddd; -} - -#crm-container div.contact_panel .spacer { - padding: 8px; -} - -#crm-container div.contact_panel td { - padding: 4px; - vertical-align: top; - border-bottom: 1px solid #E2E2E2; -} - -#crm-container div.contact_panel td.label { - width: 28%; -} - -#crm-container div.contact_panel td.last { - border-bottom: 0px; -} - -#crm-container #customFields { - width: 100%; -} - -#crm-container #customFields div.contact_panel td.talabel { - padding: 4px 0 0 4px; - border: 0px; -} - -#crm-container #customFields .contact_panel .customFieldGroup { - background-color: #F7F7F7; - line-height: 1.4em; - padding: 4px; - width: 100%; -} - -#crm-container div.contact_panel .crm-address-block { - margin-bottom: 6px; -} -#crm-container .crm-add-address-wrapper { - height: 25px; -} - -.crm-container .crm-clearfix:after, -#crm-container .crm-summary-row:after { +.crm-container .crm-clearfix:after { clear: both; content: "."; display: block; @@ -1941,51 +1787,7 @@ div.grippie { font-size: 11px; } -#crm-container div.crm-summary-row { - background-color: #F4F4ED; - border-top: 1px solid #ffffff; - margin-bottom: 1px; - min-height: 17px; -} - -#crm-container div.crm-summary-row div.crm-label { - background-color: #FAFAFA; - color: #7A7A60; - text-align: left; - width: 122px; - float: left; - padding: 4px; -} - -#crm-container div.crm-summary-row div.crm-content { - padding: 4px; - margin-left: 130px; -} - -#crm-container div.crm-config-option { - float: right; - padding-right: 10px; - padding-top: 5px; -} - -#crm-container span.crm-custom-greeting { - font-size: 9px; -} - -#crm-container table.crm-inline-edit-form td, -#crm-container div.crm-inline-edit-form { - background-color: #efefe5; - white-space: nowrap; -} -#crm-container table.crm-inline-edit-form td.crm-label, -#crm-container div.crm-inline-edit-form .crm-label { - white-space: normal; -} - -#crm-container div.crm-inline-edit-field { - display: inline-block; - padding: 4px 5px; -} +/* reports */ #crm-container div.buttons { text-align: right; @@ -2001,7 +1803,6 @@ div.grippie { vertical-align: top !important; } - #crm-container div.buttons #actions { text-align: left; float: left; @@ -2028,7 +1829,6 @@ div.grippie { border-bottom: solid 2px #ccc; } -/* reports */ #crm-container .report-layout { border: none; } @@ -2305,8 +2105,7 @@ div.grippie { .crm-container .ui-dialog-buttonset .ui-button { padding: 0; } -.crm-container .ui-dialog-buttonset .ui-button .ui-icon, -#crm-contact-actions-list .icon { +.crm-container .ui-dialog-buttonset .ui-button .ui-icon { background-image: url("../i/icons/jquery-ui-FFFFFF.png"); } @@ -2324,8 +2123,7 @@ div.grippie { #crm-participant-wrapper, #crm-event-links-wrapper, #crm-contribpage-links-wrapper, -#crm-create-new-wrapper, -#crm-contact-actions-wrapper { +#crm-create-new-wrapper { position: relative; float: left; } @@ -2347,19 +2145,6 @@ div.grippie { width: 160px; } -#crm-contact-actions-list .crm-contact_activities-list select { - margin-top: 4px; -} - -#crm-contact-actions-list .crm-contact_activities-list, -#crm-contact-actions-list .crm-contact_print-list, -#crm-contact-actions-list .crm-contact_actions-list { - width: 160px; -} - -#crm-contact-actions-list .crm-contact_activities-list ul, -#crm-contact-actions-list .crm-contact_print-list ul, -#crm-contact-actions-list .crm-contact_actions-list ul, #crm-event-links-list .crm-event-info ul, #crm-event-links-list .crm-event-test ul, #crm-event-links-list .crm-event-live ul, @@ -2371,45 +2156,8 @@ div.grippie { #crm-participant-list .crm-participant-listing ul, #crm-create-new-list ul { width: auto; - margin: 0px; - padding: 0px; -} - -#crm-contact-actions-list .crm-contact_activities-list ul { - padding-right: 4px; -} -#crm-contact-actions-list .crm-contact_print-list ul { - padding-left: 4px; -} -#crm-contact-actions-list .crm-contact_actions-list ul { - padding-left: 4px; -} - -#crm-contact-actions-list .crm-contact_activities-list { - float: left; -} -#crm-contact-actions-list .crm-contact_print-list { - float: right; -} -#crm-contact-actions-list .crm-contact_actions-list { - margin-left: 160px; - margin-right: 161px; - border-left: 1px solid #a7a7a7; - border-right: 1px solid #a7a7a7; -} - -/* =================== */ -/* ! contact actions */ -/* =================== */ - - -#crm-contact-actions-wrapper { - width: 85px; - /* fixes ie bug where button is toooooo long */ -} -#crm-contact-actions-list { - width: 495px; - /* fixes ie bug caused by above*/ + margin: 0; + padding: 0; } /* setup for icons */ @@ -2418,13 +2166,14 @@ div.grippie { background-image: url(''); } -.crm-container .ui-icon { +.crm-container .ui-icon, +.crm-container .icon { background-image: url("../i/icons/jquery-ui-52534D.png") } + .crm-container .icon { height: 16px; width: 16px; - background-image: url("../i/icons/jquery-ui-52534D.png"); float: left; text-indent: -10000px; } @@ -3219,12 +2968,10 @@ tbody.scrollContent tr.alternateRow { /*contact summary page */ -#crm-container div.contact_details, -#crm-container #customFields .contact_panel .customFieldGroup { +#crm-container div.contact_details { background-color: transparent; } -#crm-container div.contact_panel td, .crm-container table.crm-info-panel td { border-bottom: 1px solid #FFF; } @@ -3253,11 +3000,6 @@ tbody.scrollContent tr.alternateRow { .crm-container table.selector td { border-right: 1px dotted #DDDDDD; } -.crm-container #customFields div.contact_panel td { - border-bottom: 1px solid #FFFFFF; - padding: 4px; - vertical-align: top; -} .crm-container div.contact_panel td, .crm-container table.crm-info-panel td { @@ -3303,7 +3045,6 @@ tbody.scrollContent tr.alternateRow { /* search results */ - .crm-container .crm-search-tasks, .crm-container .crm-tasks { background-color: #F0F0E8; @@ -3769,70 +3510,6 @@ div.m ul#civicrm-menu, vertical-align: top; } -/* Responsive layout changes */ - -#crm-container .contact_basic_information-section.narrowform table.form-layout-compressed, -#crm-container .contact_basic_information-section.narrowform table.form-layout-compressed tbody, -#crm-container .contact_basic_information-section.narrowform.xnarrowform table.form-layout-compressed tr { - display: block; - width: 100%; -} - -#crm-container .contact_basic_information-section.narrowform table.form-layout-compressed tr { - display: inline-block; - width: 49%; - vertical-align: top; -} - -#crm-container .contact_basic_information-section.narrowform table.form-layout-compressed td { - display: block; - clear: left; - vertical-align: top; - margin-bottom: .5ex; -} - -#crm-container .contact_basic_information-section.narrowform table.form-layout-compressed td.hashelpicon { - position: relative; -} - -#crm-container .contact_basic_information-section.narrowform table.form-layout-compressed td.hashelpicon label { - padding-bottom: 16px; -} - -#crm-container .contact_basic_information-section.narrowform table.form-layout-compressed td .helpicon { - position: absolute; - bottom: -12px; - left: 2px; -} - -#crm-container .contact_basic_information-section.narrowform table.form-layout-compressed td br { - display: none; -} - -#crm-container .contact_basic_information-section.narrowform table.form-layout-compressed td label { - display: block; - box-sizing: border-box; - -moz-box-sizing: border-box; - width: 25%; - float: left; - padding-right: 1%; -} - -#crm-container .contact_basic_information-section.narrowform table.form-layout-compressed td input { - box-sizing: border-box; - -moz-box-sizing: border-box; - width: 75%; -} - -#crm-container #mainTabContainer.narrowpage #contact-summary div.customFieldGroup, -#crm-container #mainTabContainer.narrowpage #contact-summary div.contactCardLeft, -#crm-container #mainTabContainer.narrowpage #contact-summary div.contactCardRight { - box-sizing: border-box; - -moz-box-sizing: border-box; - float: none; - width: 100%; -} - /* editable placeholder containers - share some styles with crm-editable below */ .crm-container .replace-plain, diff --git a/css/contactSummary.css b/css/contactSummary.css new file mode 100644 index 0000000000..6b7a2c74e6 --- /dev/null +++ b/css/contactSummary.css @@ -0,0 +1,326 @@ +/* CiviCRM contact summary page styles */ + +.crm-container .primary { + font-weight: bold; +} + +.crm-container .upper { + text-transform: uppercase; +} + +div#crm-contact-thumbnail { + padding: 4px; + float: right; +} + +.crm-container div.contact_panel { + display: block; +} + +.crm-container div.contact_panel td { + border-bottom: 1px solid #FFF; +} + +#crm-container div.crm-inline-edit { + border: 2px dashed transparent; + background: none; + position: relative; +} + +#crm-container .crm-edit-ready .crm-inline-edit:hover { + cursor: pointer; + border: 2px dashed lightgrey; +} + +#crm-container div.crm-inline-edit.form { + cursor: default; + border: 2px dashed #6665BF; + overflow: auto; +} + +#crm-container .crm-inline-edit.add-new { + min-height: 2.5em; +} + +#crm-container div.crm-inline-edit .crm-edit-help { + display: none; + position: absolute; + right: 0px; + top: 0px; + opacity: .8; + padding: .4em; + border-bottom-left-radius: 1em; +} + +#crm-container .crm-inline-edit.add-new .crm-edit-help { + display: block; + background-color: #EBEBEB; +} + +#crm-container .crm-edit-ready .crm-inline-edit:hover .crm-edit-help { + display: block; + background-color: #DFE1FF; +} + +#crm-container div.crm-inline-edit.form .crm-edit-help { + display: none !important; +} + +#crm-container span.crm-custom-greeting { + font-size: 9px; +} + +#crm-container table.crm-inline-edit-form td, +#crm-container div.crm-inline-edit-form { + background-color: #efefe5; + white-space: nowrap; +} +#crm-container table.crm-inline-edit-form td.crm-label, +#crm-container div.crm-inline-edit-form .crm-label { + white-space: normal; +} + +#crm-container div.crm-inline-edit-field { + display: inline-block; + padding: 4px 5px; +} + +#crm-container div.crm-summary-contactname-block { + padding-bottom: 8px; + margin-top: -10px; +} + +#crm-container div.crm-summary-display_name { + font-size: 19px; + padding-bottom: 10px; +} + +#crm-container div.contactCardLeft, +#crm-container div#Top { + width: 49%; + display: block; + float: left; + clear: both; +} + +#crm-container div.contactCardRight { + width: 49%; + display: block; + float: right; +} + +#crm-container div.contact_panel table { + margin-bottom: 0px; +} + +#crm-container div.contactCardLeft .label, +#crm-container div.contactCardRight .label { + font-size: 11px; + vertical-align: top; + margin-right: 10px; +} + +#crm-container div.contactCardLeft .grouplabel, +#crm-container div.contactCardRight .grouplabel { + border-bottom: grey 1px solid; + width: 100%; + font-size: 0.95em; + font-weight: bold; + background-color: #ddd; +} + +#crm-container div.contact_panel .spacer { + padding: 8px; +} + +#crm-container div.contact_panel td { + padding: 4px; + vertical-align: top; + border-bottom: 1px solid #E2E2E2; +} + +#crm-container div.contact_panel td.label { + width: 28%; +} + +#crm-container div.contact_panel td.last { + border-bottom: 0px; +} + +#crm-container #customFields { + width: 100%; +} + +#crm-container #customFields div.contact_panel td.talabel { + padding: 4px 0 0 4px; + border: 0px; +} + +#crm-container #customFields .contact_panel .customFieldGroup { + line-height: 1.4em; + padding: 4px; + width: 100%; +} + +#crm-container div.contact_panel .crm-address-block { + margin-bottom: 6px; +} +#crm-container .crm-add-address-wrapper { + height: 25px; +} + +.crm-container .crm-summary-row:after { + clear: both; + content: "."; + display: block; + height: 0; + visibility: hidden; +} + +#crm-container div.crm-summary-row { + background-color: #F4F4ED; + border-top: 1px solid #ffffff; + margin-bottom: 1px; + min-height: 17px; +} + +#crm-container div.crm-summary-row div.crm-label { + background-color: #FAFAFA; + color: #7A7A60; + text-align: left; + width: 122px; + float: left; + padding: 4px; +} + +#crm-container div.crm-summary-row div.crm-content { + padding: 4px; + margin-left: 130px; +} + +.crm-container #customFields div.contact_panel td { + border-bottom: 1px solid #FFFFFF; + padding: 4px; + vertical-align: top; +} + +#crm-record-log { + padding: 0.8em 0.8em 0em 0em; + text-align: right; +} + +/* contact actions */ + +#crm-contact-actions-list ul { + width: auto; +} + +#crm-contact-actions-list .crm-contact_activities-list ul { + padding-right: 4px; +} +#crm-contact-actions-list .crm-contact_print-list ul, +#crm-contact-actions-list .crm-contact_actions-list ul { + padding-left: 4px; +} + +#crm-contact-actions-list .crm-contact_activities-list { + float: left; +} +#crm-contact-actions-list .crm-contact_print-list { + float: right; +} +#crm-contact-actions-list .crm-contact_actions-list { + margin-left: 160px; + margin-right: 161px; + border-left: 1px solid #a7a7a7; + border-right: 1px solid #a7a7a7; +} + +#crm-contact-actions-wrapper { + position: relative; + float: left; + width: 85px; + /* fixes ie bug where button is toooooo long */ +} +#crm-contact-actions-list { + width: 495px; + /* fixes ie bug caused by above*/ +} + +#crm-contact-actions-list .crm-contact_activities-list select { + margin-top: 4px; +} + +#crm-contact-actions-list .crm-contact_activities-list, +#crm-contact-actions-list .crm-contact_print-list, +#crm-contact-actions-list .crm-contact_actions-list { + width: 160px; +} + +#crm-contact-actions-list .icon { + background-image: url("../i/icons/jquery-ui-FFFFFF.png"); +} + +/* Responsive layout changes */ + +#crm-container .contact_basic_information-section.narrowform table.form-layout-compressed, +#crm-container .contact_basic_information-section.narrowform table.form-layout-compressed tbody, +#crm-container .contact_basic_information-section.narrowform.xnarrowform table.form-layout-compressed tr { + display: block; + width: 100%; +} + +#crm-container .contact_basic_information-section.narrowform table.form-layout-compressed tr { + display: inline-block; + width: 49%; + vertical-align: top; +} + +#crm-container .contact_basic_information-section.narrowform table.form-layout-compressed td { + display: block; + clear: left; + vertical-align: top; + margin-bottom: .5ex; +} + +#crm-container .contact_basic_information-section.narrowform table.form-layout-compressed td.hashelpicon { + position: relative; +} + +#crm-container .contact_basic_information-section.narrowform table.form-layout-compressed td.hashelpicon label { + padding-bottom: 16px; +} + +#crm-container .contact_basic_information-section.narrowform table.form-layout-compressed td .helpicon { + position: absolute; + bottom: -12px; + left: 2px; +} + +#crm-container .contact_basic_information-section.narrowform table.form-layout-compressed td br { + display: none; +} + +#crm-container .contact_basic_information-section.narrowform table.form-layout-compressed td label { + display: block; + box-sizing: border-box; + -moz-box-sizing: border-box; + width: 25%; + float: left; + padding-right: 1%; +} + +#crm-container .contact_basic_information-section.narrowform table.form-layout-compressed td input { + box-sizing: border-box; + -moz-box-sizing: border-box; + width: 75%; +} + +#crm-container #mainTabContainer.narrowpage #contact-summary div.customFieldGroup, +#crm-container #mainTabContainer.narrowpage #contact-summary div.contactCardLeft, +#crm-container #mainTabContainer.narrowpage #contact-summary div.contactCardRight { + box-sizing: border-box; + -moz-box-sizing: border-box; + float: none; + width: 100%; +} \ No newline at end of file -- 2.25.1