From f57ba633e996361541daa4cb0e1159f8b0f3ea98 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 13 Sep 2019 12:14:21 -0400 Subject: [PATCH] Rename `` to `` --- ext/afform/auditor/backlog.md | 2 +- ext/afform/core/ang/af/{ModelList.js => Form.js} | 8 ++++---- ext/afform/core/ang/af/Model.js | 14 +++++++------- ext/afform/core/ang/af/ModelProp.js | 8 ++++---- ext/afform/core/ang/afField/afField.js | 2 +- ext/afform/docs/sandbox/planning-v0.3.md | 16 ++++++++-------- ext/afform/mock/ang/afex.aff.html | 4 ++-- 7 files changed, 27 insertions(+), 27 deletions(-) rename ext/afform/core/ang/af/{ModelList.js => Form.js} (90%) diff --git a/ext/afform/auditor/backlog.md b/ext/afform/auditor/backlog.md index 3e9a620ca0..1c47199ae8 100644 --- a/ext/afform/auditor/backlog.md +++ b/ext/afform/auditor/backlog.md @@ -7,7 +7,7 @@ validator to catch. Loosely/informally: * HTML partials should be well-formed/parseable XML * Warnings about any unrecognized tags/attributes/classes. -* ``, ``, ``, `` should have suitable relationships. +* ``, ``, ``, `` should have suitable relationships. * `` should reference legit entities. * `` should reference legit fields. * Future consideration: how to validate when it's part of a subform? diff --git a/ext/afform/core/ang/af/ModelList.js b/ext/afform/core/ang/af/Form.js similarity index 90% rename from ext/afform/core/ang/af/ModelList.js rename to ext/afform/core/ang/af/Form.js index ef696de090..48ea2696e6 100644 --- a/ext/afform/core/ang/af/ModelList.js +++ b/ext/afform/core/ang/af/Form.js @@ -1,11 +1,11 @@ (function(angular, $, _) { - // "afModelList" is a basic skeletal directive. - // Example usage: - angular.module('af').directive('afModelList', function() { + // "afForm" is a basic skeletal directive. + // Example usage: + angular.module('af').directive('afForm', function() { return { restrict: 'AE', scope: { - // afModelList: '=', + // afForm: '=', ctrl: '@' }, link: { diff --git a/ext/afform/core/ang/af/Model.js b/ext/afform/core/ang/af/Model.js index 3201e1af67..d3b314ff6c 100644 --- a/ext/afform/core/ang/af/Model.js +++ b/ext/afform/core/ang/af/Model.js @@ -1,27 +1,27 @@ (function(angular, $, _) { // "afModel" is a basic skeletal directive. - // Example usage: ... ... ... + // Example usage: ... ... ... angular.module('af').directive('afModel', function() { return { restrict: 'AE', - require: '^afModelList', + require: '^afForm', scope: { afName: '@' }, - link: function($scope, $el, $attr, afModelListCtrl) { - $scope.afModelListCtrl = afModelListCtrl; + link: function($scope, $el, $attr, afFormCtrl) { + $scope.afFormCtrl = afFormCtrl; // This is faster than waiting for each field directive to register itself $('af-field', $el).each(function() { - afModelListCtrl.registerField($scope.afName, $(this).attr('field-name')) + afFormCtrl.registerField($scope.afName, $(this).attr('field-name')) }); }, controller: function($scope){ this.getDefn = function getDefn() { - return $scope.afModelListCtrl.getEntity($scope.afName); + return $scope.afFormCtrl.getEntity($scope.afName); // return $scope.modelDefn; }; this.getData = function getData() { - return $scope.afModelListCtrl.getData($scope.afName); + return $scope.afFormCtrl.getData($scope.afName); }; this.getName = function() { return $scope.afName; diff --git a/ext/afform/core/ang/af/ModelProp.js b/ext/afform/core/ang/af/ModelProp.js index 2d36e81b06..a1b4b6a156 100644 --- a/ext/afform/core/ang/af/ModelProp.js +++ b/ext/afform/core/ang/af/ModelProp.js @@ -1,6 +1,6 @@ (function(angular, $, _) { // "afModelProp" is a basic skeletal directive. - // Example usage: ... ... + // Example usage: ... ... angular.module('af').directive('afModelProp', function() { // Whitelist of all allowed properties of an af-model // (at least the ones we care about client-side - other's can be added for server-side processing and we'll just ignore them) @@ -13,14 +13,14 @@ }; return { restrict: 'AE', - require: '^afModelList', + require: '^afForm', scope: modelProps, - link: function($scope, $el, $attr, afModelListCtrl) { + link: function($scope, $el, $attr, afFormCtrl) { var ts = $scope.ts = CRM.ts('afform'), entity = _.pick($scope, _.keys(modelProps)); entity.id = null; entity.fields = []; - afModelListCtrl.registerEntity(entity); + afFormCtrl.registerEntity(entity); // $scope.$watch('afModelProp', function(newValue){$scope.myOptions = newValue;}); } }; diff --git a/ext/afform/core/ang/afField/afField.js b/ext/afform/core/ang/afField/afField.js index f826d22dc4..29523ed9ee 100644 --- a/ext/afform/core/ang/afField/afField.js +++ b/ext/afform/core/ang/afField/afField.js @@ -3,7 +3,7 @@ angular.module('afField').directive('afField', function() { return { restrict: 'E', - require: ['^afModel', '^afModelList'], + require: ['^afModel', '^afForm'], templateUrl: '~/afField/afField.html', scope: { fieldName: '@', diff --git a/ext/afform/docs/sandbox/planning-v0.3.md b/ext/afform/docs/sandbox/planning-v0.3.md index c68e71d2a2..203c23cdf2 100644 --- a/ext/afform/docs/sandbox/planning-v0.3.md +++ b/ext/afform/docs/sandbox/planning-v0.3.md @@ -63,7 +63,7 @@ ```html - + @@ -79,13 +79,13 @@ - + ``` -------------- ```html - + - + ``` ------ @@ -130,7 +130,7 @@ - + @@ -140,14 +140,14 @@ - + ``` ------ ```html - + - + ``` diff --git a/ext/afform/mock/ang/afex.aff.html b/ext/afform/mock/ang/afex.aff.html index 5d112bb96b..00e64d0525 100644 --- a/ext/afform/mock/ang/afex.aff.html +++ b/ext/afform/mock/ang/afex.aff.html @@ -1,4 +1,4 @@ - + @@ -29,4 +29,4 @@ - + -- 2.25.1