From: Tim Otten Date: Thu, 5 Feb 2015 21:51:59 +0000 (-0800) Subject: CRM_Admin_Page_APIExplorer - Change syntax highlighting theme. Add offline support. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=37d79aed21a6b7d9043b5b446c0ad30eb8079a64;p=civicrm-core.git CRM_Admin_Page_APIExplorer - Change syntax highlighting theme. Add offline support. The default theme has a very strong pair of alternating background colors which feels distracting. --- diff --git a/CRM/Admin/Page/APIExplorer.php b/CRM/Admin/Page/APIExplorer.php index be46d3eda0..723c32d1ae 100644 --- a/CRM/Admin/Page/APIExplorer.php +++ b/CRM/Admin/Page/APIExplorer.php @@ -44,8 +44,8 @@ class CRM_Admin_Page_APIExplorer extends CRM_Core_Page { public function run() { CRM_Core_Resources::singleton() ->addScriptFile('civicrm', 'templates/CRM/Admin/Page/APIExplorer.js') - ->addScriptUrl('//cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.min.js', 99) - ->addStyleUrl('//cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.min.css', 99); + ->addScriptFile('civicrm', 'bower_components/google-code-prettify/bin/prettify.min.js', 99) + ->addStyleFile('civicrm', 'bower_components/google-code-prettify/styles/sunburst.css', 99); $this->assign('operators', CRM_Core_DAO::acceptedSQLOperators()); diff --git a/bower.json b/bower.json index 61f93dacde..9b8f81b80e 100644 --- a/bower.json +++ b/bower.json @@ -17,7 +17,8 @@ "d3": "3.4.11", "jquery": "~1.11", "jquery-ui": "~1.11", - "lodash-compat": "~3.0" + "lodash-compat": "~3.0", + "google-code-prettify": "1.0.3" }, "resolutions": { "angular": "~1.3.8"