Commit c8297314 authored by colemanw's avatar colemanw

Api explorer style fixes

parent a6ec24c4
......@@ -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());
......
......@@ -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"
......
......@@ -481,7 +481,7 @@
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();
}
......
......@@ -30,7 +30,7 @@
border: 0 none;
}
#mainTabContainer pre {
line-height: 1.3em;
line-height: 14px;
font-size: 11px;
margin: 0;
border: 0 none;
......@@ -90,7 +90,13 @@
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;
......@@ -165,15 +171,15 @@
<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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment