From: Coleman Watts Date: Mon, 9 Feb 2015 22:00:42 +0000 (-0500) Subject: Api explorer style fixes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c8297314790a26b9e90eb9da49783056b491911d;p=civicrm-core.git Api explorer style fixes --- diff --git a/CRM/Admin/Page/APIExplorer.php b/CRM/Admin/Page/APIExplorer.php index 5a8131a492..6ec6be0ad7 100644 --- a/CRM/Admin/Page/APIExplorer.php +++ b/CRM/Admin/Page/APIExplorer.php @@ -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()); diff --git a/bower.json b/bower.json index 9b8f81b80e..9bf883f363 100644 --- a/bower.json +++ b/bower.json @@ -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" diff --git a/templates/CRM/Admin/Page/APIExplorer.js b/templates/CRM/Admin/Page/APIExplorer.js index b071b54a26..5c2420dbb1 100644 --- a/templates/CRM/Admin/Page/APIExplorer.js +++ b/templates/CRM/Admin/Page/APIExplorer.js @@ -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(); } diff --git a/templates/CRM/Admin/Page/APIExplorer.tpl b/templates/CRM/Admin/Page/APIExplorer.tpl index bf028bf1af..e4f92c8a1f 100644 --- a/templates/CRM/Admin/Page/APIExplorer.tpl +++ b/templates/CRM/Admin/Page/APIExplorer.tpl @@ -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 @@
- - - - + + + + {if $config->userSystem->is_drupal} - + {/if} {if $config->userSystem->is_wordpress} - + {/if}
{ts}Code{/ts}
Rest
Smarty
Php
Javascript
Rest
Smarty
Php
Javascript
Drush
Drush
WP-CLI
WP-CLI