From c1b9955f72106c5e597bc90a5be3805124877f2a Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 12 Sep 2019 18:31:22 -0400 Subject: [PATCH] Rename afformCore to afCore --- ext/afform/core/CRM/Afform/AfformScanner.php | 2 +- .../core/ang/{afformCore.ang.php => afCore.ang.php} | 10 +++++----- ext/afform/core/ang/{afformCore.css => afCore.css} | 0 ext/afform/core/ang/{afformCore.js => afCore.js} | 6 +++--- ext/afform/core/ang/{afformCore => afCore}/Api3Ctrl.js | 2 +- ext/afform/core/ang/{afformCore => afCore}/Api3Ctrl.md | 0 .../core/ang/{afformCore => afCore}/Api4Action.js | 2 +- .../core/ang/{afformCore => afCore}/Api4Action.md | 0 ext/afform/core/ang/{afformCore => afCore}/Api4Ctrl.js | 2 +- .../core/templates/afform/AfformAngularModule.tpl | 4 ++-- ext/afform/docs/crud.md | 2 +- ext/afform/docs/writing.md | 2 +- ext/afform/html/ang/afHtmlAdmin.aff.json | 2 +- ext/afform/html/ang/afHtmlEditor.aff.json | 2 +- ext/afform/html/ang/afHtmlList.aff.json | 2 +- 15 files changed, 19 insertions(+), 19 deletions(-) rename ext/afform/core/ang/{afformCore.ang.php => afCore.ang.php} (67%) rename ext/afform/core/ang/{afformCore.css => afCore.css} (100%) rename ext/afform/core/ang/{afformCore.js => afCore.js} (69%) rename ext/afform/core/ang/{afformCore => afCore}/Api3Ctrl.js (95%) rename ext/afform/core/ang/{afformCore => afCore}/Api3Ctrl.md (100%) rename ext/afform/core/ang/{afformCore => afCore}/Api4Action.js (91%) rename ext/afform/core/ang/{afformCore => afCore}/Api4Action.md (100%) rename ext/afform/core/ang/{afformCore => afCore}/Api4Ctrl.js (96%) diff --git a/ext/afform/core/CRM/Afform/AfformScanner.php b/ext/afform/core/CRM/Afform/AfformScanner.php index 3611d1b5af..2c5f86c1f3 100644 --- a/ext/afform/core/CRM/Afform/AfformScanner.php +++ b/ext/afform/core/CRM/Afform/AfformScanner.php @@ -16,7 +16,7 @@ class CRM_Afform_AfformScanner { const FILE_REGEXP = '/\.aff\.(json|html)$/'; - const DEFAULT_REQUIRES = 'afformCore'; + const DEFAULT_REQUIRES = 'afCore'; /** * @var CRM_Utils_Cache_Interface diff --git a/ext/afform/core/ang/afformCore.ang.php b/ext/afform/core/ang/afCore.ang.php similarity index 67% rename from ext/afform/core/ang/afformCore.ang.php rename to ext/afform/core/ang/afCore.ang.php index ff3e7a48f9..9e9f4c505e 100644 --- a/ext/afform/core/ang/afformCore.ang.php +++ b/ext/afform/core/ang/afCore.ang.php @@ -5,13 +5,13 @@ return [ 'js' => [ - 'ang/afformCore.js', - 'ang/afformCore/*.js', - 'ang/afformCore/*/*.js', + 'ang/afCore.js', + 'ang/afCore/*.js', + 'ang/afCore/*/*.js', ], - 'css' => ['ang/afformCore.css'], + 'css' => ['ang/afCore.css'], 'requires' => ['crmUi', 'crmUtil', 'api4', 'checklist-model'], - 'partials' => ['ang/afformCore'], + 'partials' => ['ang/afCore'], 'settings' => [], 'basePages' => [], ]; diff --git a/ext/afform/core/ang/afformCore.css b/ext/afform/core/ang/afCore.css similarity index 100% rename from ext/afform/core/ang/afformCore.css rename to ext/afform/core/ang/afCore.css diff --git a/ext/afform/core/ang/afformCore.js b/ext/afform/core/ang/afCore.js similarity index 69% rename from ext/afform/core/ang/afformCore.js rename to ext/afform/core/ang/afCore.js index bdb6856a1b..7d43c99dcc 100644 --- a/ext/afform/core/ang/afformCore.js +++ b/ext/afform/core/ang/afCore.js @@ -1,9 +1,9 @@ (function(angular, $, _) { // Declare a list of dependencies. - angular.module('afformCore', CRM.angRequires('afformCore')); + angular.module('afCore', CRM.angRequires('afCore')); - // Use `afformCoreDirective(string name)` to generate an AngularJS directive. - angular.module('afformCore').service('afformCoreDirective', function($routeParams, crmApi4, crmStatus, crmUiAlert) { + // Use `afCoreDirective(string name)` to generate an AngularJS directive. + angular.module('afCore').service('afCoreDirective', function($routeParams, crmApi4, crmStatus, crmUiAlert) { return function(camelName, meta, d) { d.restrict = 'AE'; d.scope = {}; diff --git a/ext/afform/core/ang/afformCore/Api3Ctrl.js b/ext/afform/core/ang/afCore/Api3Ctrl.js similarity index 95% rename from ext/afform/core/ang/afformCore/Api3Ctrl.js rename to ext/afform/core/ang/afCore/Api3Ctrl.js index a7a7f64215..98ce88d25d 100644 --- a/ext/afform/core/ang/afformCore/Api3Ctrl.js +++ b/ext/afform/core/ang/afCore/Api3Ctrl.js @@ -1,6 +1,6 @@ (function(angular, $, _) { - angular.module('afformCore').directive('afApi3Ctrl', function() { + angular.module('afCore').directive('afApi3Ctrl', function() { return { restrict: 'EA', scope: { diff --git a/ext/afform/core/ang/afformCore/Api3Ctrl.md b/ext/afform/core/ang/afCore/Api3Ctrl.md similarity index 100% rename from ext/afform/core/ang/afformCore/Api3Ctrl.md rename to ext/afform/core/ang/afCore/Api3Ctrl.md diff --git a/ext/afform/core/ang/afformCore/Api4Action.js b/ext/afform/core/ang/afCore/Api4Action.js similarity index 91% rename from ext/afform/core/ang/afformCore/Api4Action.js rename to ext/afform/core/ang/afCore/Api4Action.js index 01b335c610..da8ed8d22b 100644 --- a/ext/afform/core/ang/afformCore/Api4Action.js +++ b/ext/afform/core/ang/afCore/Api4Action.js @@ -1,6 +1,6 @@ (function(angular, $, _) { - angular.module('afformCore').directive('afApi4Action', function($parse, crmStatus, crmApi4) { + angular.module('afCore').directive('afApi4Action', function($parse, crmStatus, crmApi4) { return { restrict: 'A', scope: { diff --git a/ext/afform/core/ang/afformCore/Api4Action.md b/ext/afform/core/ang/afCore/Api4Action.md similarity index 100% rename from ext/afform/core/ang/afformCore/Api4Action.md rename to ext/afform/core/ang/afCore/Api4Action.md diff --git a/ext/afform/core/ang/afformCore/Api4Ctrl.js b/ext/afform/core/ang/afCore/Api4Ctrl.js similarity index 96% rename from ext/afform/core/ang/afformCore/Api4Ctrl.js rename to ext/afform/core/ang/afCore/Api4Ctrl.js index 7bc7abdf4d..48fcbf4fb5 100644 --- a/ext/afform/core/ang/afformCore/Api4Ctrl.js +++ b/ext/afform/core/ang/afCore/Api4Ctrl.js @@ -1,6 +1,6 @@ (function(angular, $, _) { - angular.module('afformCore').directive('afApi4Ctrl', function() { + angular.module('afCore').directive('afApi4Ctrl', function() { return { restrict: 'EA', scope: { diff --git a/ext/afform/core/templates/afform/AfformAngularModule.tpl b/ext/afform/core/templates/afform/AfformAngularModule.tpl index 2853b84125..4a04137884 100644 --- a/ext/afform/core/templates/afform/AfformAngularModule.tpl +++ b/ext/afform/core/templates/afform/AfformAngularModule.tpl @@ -8,8 +8,8 @@ {literal} (function(angular, $, _) { angular.module('{/literal}{$afform.camel}{literal}', CRM.angRequires('{/literal}{$afform.camel}{literal}')); - angular.module('{/literal}{$afform.camel}{literal}').directive('{/literal}{$afform.camel}{literal}', function(afformCoreDirective) { - return afformCoreDirective({/literal}{$afform.camel|json},{$afform.metaJson}{literal}, { + angular.module('{/literal}{$afform.camel}{literal}').directive('{/literal}{$afform.camel}{literal}', function(afCoreDirective) { + return afCoreDirective({/literal}{$afform.camel|json},{$afform.metaJson}{literal}, { template: {/literal}{$afform.layout|json}{literal} }); }); diff --git a/ext/afform/docs/crud.md b/ext/afform/docs/crud.md index 47e54064e2..7ba2f3c09d 100644 --- a/ext/afform/docs/crud.md +++ b/ext/afform/docs/crud.md @@ -9,7 +9,7 @@ $ cv api4 afform.get +w name=helloWorld "0": { "name": "helloWorld", "requires": [ - "afformCore" + "afCore" ], "title": "", "description": "", diff --git a/ext/afform/docs/writing.md b/ext/afform/docs/writing.md index fc3ab06ae2..7ed5a41c93 100644 --- a/ext/afform/docs/writing.md +++ b/ext/afform/docs/writing.md @@ -30,7 +30,7 @@ http://dmaster.localhost/civicrm/hello-world/#/?cid=123 ``` How do we use the `cid` to get information about the contact? Update `helloWorld.aff.html` to fetch data with -`Contact.get` API and call the [af-api3](https://github.com/totten/afform/blob/master/ang/afformCore/Api3Ctrl.md) utility: +`Contact.get` API and call the [af-api3](https://github.com/totten/afform/blob/master/ang/afCore/Api3Ctrl.md) utility: ```html
diff --git a/ext/afform/html/ang/afHtmlAdmin.aff.json b/ext/afform/html/ang/afHtmlAdmin.aff.json index cddb2b6368..f058774297 100644 --- a/ext/afform/html/ang/afHtmlAdmin.aff.json +++ b/ext/afform/html/ang/afHtmlAdmin.aff.json @@ -1,5 +1,5 @@ { "title": "Afform HTML Administration", "server_route": "civicrm/admin/afform-html", - "requires":["afformCore", "afMoncao", "afHtmlEditor", "afHtmlList"] + "requires":["afCore", "afMoncao", "afHtmlEditor", "afHtmlList"] } diff --git a/ext/afform/html/ang/afHtmlEditor.aff.json b/ext/afform/html/ang/afHtmlEditor.aff.json index 3f7f53f4b2..d55381fed3 100644 --- a/ext/afform/html/ang/afHtmlEditor.aff.json +++ b/ext/afform/html/ang/afHtmlEditor.aff.json @@ -1,4 +1,4 @@ { "title": "Afform HTML Editor", - "requires":["afformCore", "afMoncao"] + "requires":["afCore", "afMoncao"] } diff --git a/ext/afform/html/ang/afHtmlList.aff.json b/ext/afform/html/ang/afHtmlList.aff.json index a207554928..7293f8e83f 100644 --- a/ext/afform/html/ang/afHtmlList.aff.json +++ b/ext/afform/html/ang/afHtmlList.aff.json @@ -1,4 +1,4 @@ { "title": "Afform HTML List", - "requires":["afformCore"] + "requires":["afCore"] } -- 2.25.1