API Explorer minor fix
authorColeman Watts <coleman@civicrm.org>
Wed, 25 Feb 2015 14:21:01 +0000 (09:21 -0500)
committerColeman Watts <coleman@civicrm.org>
Wed, 25 Feb 2015 14:21:01 +0000 (09:21 -0500)
CRM/Admin/Page/APIExplorer.php
templates/CRM/Admin/Page/APIExplorer.js

index c99f410095d3fb89d7eb93fdcbf080664acdaf1d..bb3d070c684c2f59863efbcbfa4e1ae382fd89d0 100644 (file)
@@ -210,7 +210,7 @@ class CRM_Admin_Page_APIExplorer extends CRM_Core_Page {
     // Add unformatted code blocks back in
     if ($code && !empty($code[1])) {
       foreach ($code[1] as $block) {
-        $text = preg_replace('#<pre></pre>#', "<pre class='prettyprint'>$block</pre>", $text, 1);
+        $text = preg_replace('#<pre></pre>#', "<pre>$block</pre>", $text, 1);
       }
     }
     return $text;
index 7fe6b73221f5a92706017918e507944167eeced2..3a635df59ecb5592211b2c151b63041d1eea35e9 100644 (file)
         entityDoc = result.doc;
         CRM.utils.setOptions($('#doc-action').prop('disabled', false).removeClass('loading'), result.actions);
         $('#doc-result').html(result.doc);
+        prettyPrint('#doc-result pre');
       });
   }
 
           if (result.code) {
             $('#doc-result').append(docCodeTpl(result));
           }
-          prettyPrint('.api-doc-code pre');
+          prettyPrint('#doc-result pre');
         });
     } else {
       $('#doc-result').html(entityDoc);
+      prettyPrint('#doc-result pre');
     }
   }