Civi::resources()
->addVars('api4', $vars)
->addScriptFile('civicrm', 'js/load-bootstrap.js')
+ ->addScriptFile('civicrm', 'bower_components/js-yaml/dist/js-yaml.min.js')
->addScriptFile('civicrm', 'bower_components/google-code-prettify/bin/prettify.min.js')
->addStyleFile('civicrm', 'bower_components/google-code-prettify/bin/prettify.min.css');
$angularModules['ui.sortable'] = include "$civicrm_root/ang/ui.sortable.ang.php";
$angularModules['unsavedChanges'] = include "$civicrm_root/ang/unsavedChanges.ang.php";
$angularModules['statuspage'] = include "$civicrm_root/ang/crmStatusPage.ang.php";
+ $angularModules['api4Explorer'] = include "$civicrm_root/ang/api4Explorer.ang.php";
+ $angularModules['api4'] = include "$civicrm_root/ang/api4.ang.php";
foreach (\CRM_Core_Component::getEnabledComponents() as $component) {
$angularModules = array_merge($angularModules, $component->getAngularModules());
<?php
// Autoloader data for Api4 angular module.
return [
+ 'ext' => 'civicrm',
'js' => [
'ang/api4.js',
'ang/api4/*.js',
<?php
// Autoloader data for Api4 explorer.
return [
+ 'ext' => 'civicrm',
'js' => [
'ang/api4Explorer.js',
- 'ang/api4Explorer/*.js',
- 'ang/api4Explorer/*/*.js',
- 'lib/*.js',
+ 'ang/api4Explorer/Explorer.js',
],
'css' => [
'css/api4-explorer.css',
"select2": {
"url": "https://github.com/colemanw/select2/archive/v3.5-civicrm-1.0.zip"
},
+ "js-yaml": {
+ "url": "https://github.com/nodeca/js-yaml/archive/3.13.1.zip"
+ },
"smartmenus": {
"url": "https://github.com/vadikom/smartmenus/archive/1.1.0.zip",
"ignore": [".gitignore", "Gruntfile.js"]
* @see https://wiki.civicrm.org/confluence/display/CRMDOC/AJAX+Interface
* @see https://wiki.civicrm.org/confluence/display/CRMDOC/Ajax+Pages+and+Forms
*/
-(function($, CRM, undefined) {
+(function($, CRM, _, undefined) {
/**
* @param string path
* @param string|object query
});
});
-}(jQuery, CRM));
+}(jQuery, CRM, _));
// Loads a copy of shoreditch's bootstrap if bootstrap is missing
CRM.$(function($) {
if (!$.isFunction($.fn.dropdown)) {
- CRM.loadScript(CRM.vars.api4.basePath + 'lib/shoreditch/dropdown.js');
- $('head').append('<link type="text/css" rel="stylesheet" href="' + CRM.vars.api4.basePath + 'lib/shoreditch/bootstrap.css" />');
+ //CRM.loadScript(CRM.vars.api4.basePath + 'lib/shoreditch/dropdown.js');
+ //$('head').append('<link type="text/css" rel="stylesheet" href="' + CRM.vars.api4.basePath + 'lib/shoreditch/bootstrap.css" />');
}
-});
\ No newline at end of file
+});