From 65b864822c40c7f0134513eafd2734ca62f7d42b Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 26 Aug 2014 19:07:22 +0100 Subject: [PATCH] Select2 style fixes for public pages --- css/civicrm.css | 5 ++++- css/joomla.css | 4 ++++ js/Common.js | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/css/civicrm.css b/css/civicrm.css index de80d4e50e..d05160db2e 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -3686,7 +3686,9 @@ div.m ul#civicrm-menu, } /* Style autocomplete results */ .crm-container .select2-results { + font-size: 12px; padding: 0; + text-align: left; } .crm-container .select2-results li, .crm-container .select2-results .crm-select2-row, @@ -4241,7 +4243,8 @@ span.crm-status-icon { padding-top: 6px; } -.crm-container.crm-public .select2-container { +.crm-container.crm-public .select2-container, +.crm-container.crm-public .select2-results { font-size: 14px; } .crm-container.crm-public .select2-container .select2-choice { diff --git a/css/joomla.css b/css/joomla.css index 2bf04eb8ad..c6a39b16c1 100644 --- a/css/joomla.css +++ b/css/joomla.css @@ -359,6 +359,9 @@ ul#civicrm-menu li#crm-qsearch { width: auto; padding: 2px 4px; } +.crm-container .select2-search input { + width: 100%; +} .crm-container textarea, .crm-container input { height: auto; @@ -366,3 +369,4 @@ ul#civicrm-menu li#crm-qsearch { .crm-container input[type=submit] { height: auto; } + diff --git a/js/Common.js b/js/Common.js index 3b17b31203..f194ebecd6 100644 --- a/js/Common.js +++ b/js/Common.js @@ -925,6 +925,10 @@ CRM.strings = CRM.strings || {}; $(function () { $.blockUI.defaults.message = null; + if ($('#crm-container').hasClass('crm-public')) { + $.fn.select2.defaults.dropdownCssClass = $.ui.dialog.prototype.options.dialogClass = 'crm-container crm-public'; + } + // Trigger crmLoad on initial content for consistency. It will also be triggered for ajax-loaded content. $('.crm-container').trigger('crmLoad'); -- 2.25.1