summaryrefslogtreecommitdiff
path: root/www/crm/wp-content/plugins/civicrm/civicrm/ang/crmCxn/AdvTable.js
blob: 3ea2bc39e0df41c13f5e429091857617d84fd139 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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._);