Api explorer style fixes
authorColeman Watts <coleman@civicrm.org>
Mon, 9 Feb 2015 22:00:42 +0000 (17:00 -0500)
committerColeman Watts <coleman@civicrm.org>
Mon, 9 Feb 2015 22:00:42 +0000 (17:00 -0500)
CRM/Admin/Page/APIExplorer.php
bower.json
templates/CRM/Admin/Page/APIExplorer.js
templates/CRM/Admin/Page/APIExplorer.tpl

index 5a8131a492bedea42a7f761c881f096f465b3499..6ec6be0ad797fbc85268d8ab470aa2d9ab7cc6a9 100644 (file)
@@ -45,7 +45,7 @@ class CRM_Admin_Page_APIExplorer extends CRM_Core_Page {
     CRM_Core_Resources::singleton()
       ->addScriptFile('civicrm', 'templates/CRM/Admin/Page/APIExplorer.js')
       ->addScriptFile('civicrm', 'bower_components/google-code-prettify/bin/prettify.min.js', 99)
-      ->addStyleFile('civicrm', 'bower_components/google-code-prettify/styles/sunburst.css', 99);
+      ->addStyleFile('civicrm', 'bower_components/google-code-prettify/bin/prettify.min.css', 99);
 
     $this->assign('operators', CRM_Core_DAO::acceptedSQLOperators());
 
index 9b8f81b80efcfc0f4c9350e6238d9e0197183bbd..9bf883f363aee3af2a724edd4c9d17e2485e7db0 100644 (file)
@@ -18,7 +18,7 @@
     "jquery": "~1.11",
     "jquery-ui": "~1.11",
     "lodash-compat": "~3.0",
-    "google-code-prettify": "1.0.3"
+    "google-code-prettify": "~1.0"
   },
   "resolutions": {
     "angular": "~1.3.8"
index b071b54a261ef0c6a89445bb7467200616451336..5c2420dbb1bf9b4b6ea7cc8c258254dde2c56f2f 100644 (file)
       q.smarty = "{* Smarty does not have a syntax for array literals; assign complex variables from php *}\n" + q.smarty;
     }
     $.each(q, function(type, val) {
-      $('#api-' + type).removeClass('prettyprinted').text(val);
+      $('#api-' + type).addClass('prettyprint').removeClass('prettyprinted').text(val);
     });
     prettyPrint();
   }
index bf028bf1af483566fb090b12ec4c712e7d9ea816..e4f92c8a1f75f01c71177ec24a3433267b69e37c 100644 (file)
@@ -30,7 +30,7 @@
     border: 0 none;
   }
   #mainTabContainer pre {
-    line-height: 1.3em;
+    line-height: 14px;
     font-size: 11px;
     margin: 0;
     border: 0 none;
     color: #CFCFCF;
   }
   pre ol.linenums li:hover {
-    color: #9c9c9c;
+    color: #828282;
+    background-color: #f2f2f2;
+  }
+  pre li.L1, pre li.L3, pre li.L5, pre li.L7, pre li.L9,
+  #api-generated td + td,
+  #mainTabContainer pre {
+    background-color: #f9f9f9;
   }
   .api-doc-code {
     margin-top: 1em;
       <div id="api-generated-wraper">
         <table id="api-generated" border=1>
           <caption>{ts}Code{/ts}</caption>
-          <tr><td>Rest</td><td><pre class="prettyprint" id="api-rest"></pre></td></tr>
-          <tr><td>Smarty</td><td><pre class="prettyprint linenums" id="api-smarty" title='smarty syntax (for get actions)'></pre></td></tr>
-          <tr><td>Php</td><td><pre class="prettyprint linenums" id="api-php" title='php syntax'></pre></td></tr>
-          <tr><td>Javascript</td><td><pre class="prettyprint linenums" id="api-json" title='javascript syntax'></pre></td></tr>
+          <tr><td>Rest</td><td><pre id="api-rest"></pre></td></tr>
+          <tr><td>Smarty</td><td><pre class="linenums" id="api-smarty" title='smarty syntax (for get actions)'></pre></td></tr>
+          <tr><td>Php</td><td><pre class="linenums" id="api-php" title='php syntax'></pre></td></tr>
+          <tr><td>Javascript</td><td><pre class="linenums" id="api-json" title='javascript syntax'></pre></td></tr>
           {if $config->userSystem->is_drupal}
-            <tr><td>Drush</td><td><pre class="prettyprint" id="api-drush" title='drush syntax'></pre></td></tr>
+            <tr><td>Drush</td><td><pre id="api-drush" title='drush syntax'></pre></td></tr>
           {/if}
           {if $config->userSystem->is_wordpress}
-            <tr><td>WP-CLI</td><td><pre class="prettyprint" id="api-wpcli" title='wp-cli syntax'></pre></td></tr>
+            <tr><td>WP-CLI</td><td><pre id="api-wpcli" title='wp-cli syntax'></pre></td></tr>
           {/if}
         </table>
       </div>