diff --git a/css/opencase.css b/css/opencase.css new file mode 100644 index 0000000..29b3e88 --- /dev/null +++ b/css/opencase.css @@ -0,0 +1,64 @@ +/* this part is for the wider theme and will be removed */ +a.site-branding__logo img { + max-width: 100px; +} + +/* Module-specific from here. */ +div.region.region-primary-menu { + display:none; +} + +.field--name-contact-details a { + border-bottom: none; +} + +.region-sidebar-second .view-content li, .region-sidebar-second .views-row { + border-bottom: 1px solid lightgrey; + padding-bottom: 20px; + padding-top: 20px; +} + +.sidebar .region-sidebar-second h2 { + font-size: 1.6em; + text-align: center; + border-bottom: 1px solid grey; +} + +.sidebar .views-field.views-field-type, .field--name-type{ + padding-bottom: 12px; + font-size: 1.4em; + text-align: center; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} + +.sidebar .field__label, .sidebar .field--type-entity-reference .field__label { + font-size: 1em; + font-weight: bold; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} + +.sidebar .views-element-container .field { + padding-bottom: 15px; +} + +.sidebar .views-element-container .field .field__item { + font-size: 1.1em; +} + +.region-sidebar-second .view-content li, .region-sidebar-second .views-row { + border-bottom: 10px solid #e6e6d3; + padding-bottom: 20px; + padding-top: 10px; + padding-right: 10px; + padding-left: 10px; + background: #eeeedb; +} + +.region-sidebar-second .views-element-container.block { + padding-right: 10px; + padding-left: 10px; +} + +.zencrm_creationlinks { + padding: 10px 10px 10px 20px; +} diff --git a/js/opencase.js b/js/opencase.js new file mode 100644 index 0000000..7086516 --- /dev/null +++ b/js/opencase.js @@ -0,0 +1,4 @@ +(function ($, Drupal) { + $(".field--name-contact-details a").contents().unwrap(); + $('#edit-search-api-fulltext').attr('autocomplete', 'off'); +})(jQuery, Drupal); diff --git a/modules/zencrm_entities/src/Entity/Hat.php b/modules/zencrm_entities/src/Entity/Hat.php index f1e73e9..a5e180a 100644 --- a/modules/zencrm_entities/src/Entity/Hat.php +++ b/modules/zencrm_entities/src/Entity/Hat.php @@ -190,7 +190,7 @@ class Hat extends ContentEntityBase implements HatInterface { 'display_name' => 'entity_reference_1' ]]) ->setDisplayOptions('view', [ - 'label' => 'inline', + 'label' => 'above', 'weight' => 0, 'settings' => ['link' => 'false'] ]) diff --git a/zencrm.info.yml b/zencrm.info.yml index e41cab6..2378539 100644 --- a/zencrm.info.yml +++ b/zencrm.info.yml @@ -6,3 +6,5 @@ package: 'Zen CRM' dependencies: - zencrm_entities - zencrm_search +libraries: + - zencrm/opencase-lib diff --git a/zencrm.libraries.yml b/zencrm.libraries.yml new file mode 100644 index 0000000..de55277 --- /dev/null +++ b/zencrm.libraries.yml @@ -0,0 +1,7 @@ +opencase-lib: + version: 1.x + css: + theme: + css/opencase.css: {} + js: + js/opencase.js: {} diff --git a/zencrm.module b/zencrm.module index 20421e4..d5ece5e 100644 --- a/zencrm.module +++ b/zencrm.module @@ -33,3 +33,7 @@ function zencrm_theme() { ], ]; } + +function zencrm_page_attachments(array &$page) { + $page['#attached']['library'][] = 'zencrm/opencase-lib'; +}