summaryrefslogtreecommitdiff
path: root/www/crm/wp-content/plugins/civicrm/civicrm/ang/crmCxn/AdvTable.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/crm/wp-content/plugins/civicrm/civicrm/ang/crmCxn/AdvTable.js')
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/ang/crmCxn/AdvTable.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/ang/crmCxn/AdvTable.js b/www/crm/wp-content/plugins/civicrm/civicrm/ang/crmCxn/AdvTable.js
new file mode 100644
index 00000000..3ea2bc39
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/ang/crmCxn/AdvTable.js
@@ -0,0 +1,20 @@
+(function(angular, $, _) {
+
+ // This directive formats the data in appMeta as a nice table.
+ // example: <div crm-cxn-perm-table="{appMeta: cxn.app_meta}"></div>
+ angular.module('crmCxn').directive('crmCxnAdvTable', function crmCxnAdvTable() {
+ return {
+ restrict: 'EA',
+ scope: {
+ crmCxnAdvTable: '='
+ },
+ templateUrl: '~/crmCxn/AdvTable.html',
+ link: function(scope, element, attrs) {
+ scope.ts = CRM.ts(null);
+ scope.$watch('crmCxnAdvTable', function(crmCxnAdvTable){
+ scope.appMeta = crmCxnAdvTable.appMeta;
+ });
+ }
+ };
+ });
+})(angular, CRM.$, CRM._);