summaryrefslogtreecommitdiff
path: root/www/crm/wp-content/plugins/civicrm/civicrm/ang/crmExample.js
diff options
context:
space:
mode:
authorYaco <franco@reevo.org>2020-06-04 11:01:00 -0300
committerYaco <franco@reevo.org>2020-06-04 11:01:00 -0300
commitfc7369835258467bf97eb64f184b93691f9a9fd5 (patch)
treedaabd60089d2dd76d9f5fb416b005fbe159c799d /www/crm/wp-content/plugins/civicrm/civicrm/ang/crmExample.js
first commit
Diffstat (limited to 'www/crm/wp-content/plugins/civicrm/civicrm/ang/crmExample.js')
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/ang/crmExample.js45
1 files changed, 45 insertions, 0 deletions
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/ang/crmExample.js b/www/crm/wp-content/plugins/civicrm/civicrm/ang/crmExample.js
new file mode 100644
index 00000000..138ce8f1
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/ang/crmExample.js
@@ -0,0 +1,45 @@
+(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._);