Add separate stylesheet for search forms
authorColeman Watts <coleman@civicrm.org>
Mon, 9 Mar 2015 17:51:20 +0000 (13:51 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 10 Mar 2015 00:54:18 +0000 (20:54 -0400)
CRM/Core/Form/Search.php
CRM/Financial/Form/BatchTransaction.php
css/civicrm.css
css/searchForm.css [new file with mode: 0644]

index ed97121dd71e2280825b6f54e733c6cffdccfef8..74fc820fb7d686265beccfa15449db02eb37cec7 100644 (file)
@@ -101,7 +101,9 @@ class CRM_Core_Form_Search extends CRM_Core_Form {
       $this->assign('includeWysiwygEditor', TRUE);
     }
 
-    $resources->addScriptFile('civicrm', 'js/crm.searchForm.js', 1, 'html-header');
+    $resources
+      ->addScriptFile('civicrm', 'js/crm.searchForm.js', 1, 'html-header')
+      ->addStyleFile('civicrm', 'css/searchForm.css', 1, 'html-header');
 
     $this->addButtons(array(
       array(
index b4592c364e1eea5b51ea1743eec1bd1eee9fd971..df5ea259e3525a6a0838e5142065ca499b320321 100644 (file)
@@ -48,6 +48,9 @@ class CRM_Financial_Form_BatchTransaction extends CRM_Contribute_Form {
   protected $_batchStatusId;
 
   public function preProcess() {
+    // This reuses some styles from search forms
+    CRM_Core_Resources::singleton()->addStyleFile('civicrm', 'css/searchForm.css', 1, 'html-header');
+
     self::$_entityID = CRM_Utils_Request::retrieve('bid', 'Positive') ? CRM_Utils_Request::retrieve('bid', 'Positive') : $_POST['batch_id'];
     $this->assign('entityID', self::$_entityID);
     if (isset(self::$_entityID)) {
index dac9ffd0711ded0d69c68405a8be5a10b0447744..77886eb8c8c425b6708c6c2361b294e8ae5a677a 100644 (file)
@@ -1220,20 +1220,6 @@ input.crm-form-entityref {
   content: "\00BB";
 }
 
-.crm-container div#searchForm {
-  height: auto;
-  width: 100%;
-}
-
-.crm-container div#searchForm table.form-layout {
-  border-spacing: 0;
-}
-
-.crm-container div#searchForm table.form-layout td {
-  padding: 4px;
-  border: 1px solid #DDDDDD;
-}
-
 /* editor specific classes */
 #crm-container dd.editor {
   margin-top: 0.7em;
diff --git a/css/searchForm.css b/css/searchForm.css
new file mode 100644 (file)
index 0000000..1b8567b
--- /dev/null
@@ -0,0 +1,15 @@
+/* Styles specific to search forms and search results */
+
+.crm-container div#searchForm {
+  height: auto;
+  width: 100%;
+}
+
+.crm-container div#searchForm table.form-layout {
+  border-spacing: 0;
+}
+
+.crm-container div#searchForm table.form-layout td {
+  padding: 4px;
+  border: 1px solid #DDDDDD;
+}
\ No newline at end of file