Delete outdated/unused crmExample Angular module
authorColeman Watts <coleman@civicrm.org>
Wed, 25 Nov 2020 15:46:13 +0000 (10:46 -0500)
committerColeman Watts <coleman@civicrm.org>
Wed, 25 Nov 2020 15:46:13 +0000 (10:46 -0500)
Civi/Angular/Manager.php
ang/crmExample.ang.php [deleted file]
ang/crmExample.js [deleted file]
ang/crmExample/example.html [deleted file]

index d19c8c328ee586649d9ee9589a3f3e9474d8bab8..1223e3d851250f96713a208aa20a6cc8560e660a 100644 (file)
@@ -105,7 +105,6 @@ class Manager {
       $angularModules['crmAttachment'] = include "$civicrm_root/ang/crmAttachment.ang.php";
       $angularModules['crmAutosave'] = include "$civicrm_root/ang/crmAutosave.ang.php";
       $angularModules['crmCxn'] = include "$civicrm_root/ang/crmCxn.ang.php";
-      // $angularModules['crmExample'] = include "$civicrm_root/ang/crmExample.ang.php";
       $angularModules['crmResource'] = include "$civicrm_root/ang/crmResource.ang.php";
       $angularModules['crmRouteBinder'] = include "$civicrm_root/ang/crmRouteBinder.ang.php";
       $angularModules['crmUi'] = include "$civicrm_root/ang/crmUi.ang.php";
diff --git a/ang/crmExample.ang.php b/ang/crmExample.ang.php
deleted file mode 100644 (file)
index 763f1ea..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-// This file declares an Angular module which can be autoloaded
-// in CiviCRM. See also:
-// http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_angularModules
-
-return [
-  'ext' => 'civicrm',
-  'js' => ['ang/crmExample.js'],
-  'partials' => ['ang/crmExample'],
-  'requires' => ['crmUtil', 'ngRoute', 'ui.utils', 'crmUi', 'crmResource'],
-];
diff --git a/ang/crmExample.js b/ang/crmExample.js
deleted file mode 100644 (file)
index 138ce8f..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-(function(angular, $, _) {
-
-  angular.module('crmExample', CRM.angRequires('crmExample'));
-
-  angular.module('crmExample').config([
-    '$routeProvider',
-    function($routeProvider) {
-      $routeProvider.when('/example', {
-        templateUrl: '~/crmExample/example.html',
-        controller: 'ExampleCtrl'
-      });
-    }
-  ]);
-
-  angular.module('crmExample').controller('ExampleCtrl', function ExampleCtrl($scope) {
-    $scope.ts = CRM.ts(null);
-
-    //$scope.examples = {
-    //  blank1: {value: '', required: false},
-    //  blank2: {value: '', required: true},
-    //  filled1: {value:'2014-01-02', required: false},
-    //  filled2: {value:'2014-02-03', required: true}
-    //};
-
-    //$scope.examples = {
-    //  blank1: {value: '', required: false},
-    //  blank2: {value: '', required: true},
-    //  filled1: {value:'12:34', required: false},
-    //  filled2: {value:'10:09', required: true}
-    //};
-
-    $scope.examples = {
-      blank: {value: '', required: false},
-      //blankReq: {value: '', required: true},
-      filled: {value:'2014-01-02 03:04', required: false},
-      //filledReq: {value:'2014-02-03 05:06', required: true},
-      missingDate: {value:' 05:06', required: false},
-      //missingDateReq: {value:' 05:06', required: true},
-      missingTime: {value:'2014-03-04 ', required: false}
-      //missingTimeReq: {value:'2014-03-04 ', required: true}
-    };
-
-  });
-
-})(angular, CRM.$, CRM._);
diff --git a/ang/crmExample/example.html b/ang/crmExample/example.html
deleted file mode 100644 (file)
index 458d4f8..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<form name="exampleForm" novalidate>
-  <table>
-    <thead>
-    <tr>
-      <th>Name</th>
-      <th>Value</th>
-      <th>Input</th>
-      <th>ngModel</th>
-    </tr>
-    </thead>
-
-    <tbody>
-
-    <tr ng-repeat="(exName, example) in examples">
-      <td>{{exName}}</td>
-      <td>{{example.value}}</td>
-      <td>
-        <div class="crmMailing-schedule-outer" crm-mailing-radio-date="schedule" ng-model="example.value"
-             name="{{exName}}">
-
-          <div class="crmMailing-schedule-inner">
-            <div>
-              <input ng-model="schedule.mode" type="radio" name="send_{{exName}}" value="now" id="schedule-send-now">
-              <label for="schedule-send-now">{{:: ts('Send immediately') }}</label>
-            </div>
-            <div>
-              <input ng-model="schedule.mode" type="radio" name="send_{{exName}}" value="at" id="schedule-send-at">
-              <label for="schedule-send-at">{{:: ts('Send at:') }}</label>
-              <input crm-ui-datepicker ng-model="schedule.datetime" ng-required="schedule.mode == 'at'">
-            </div>
-          </div>
-        </div>
-      </td>
-      <td>
-        <pre>{{exampleForm[exName]|json}}</pre>
-      </td>
-    </tr>
-
-    </tbody>
-  </table>
-
-</form>