| 1 | (function(angular, $, _) { |
| 2 | |
| 3 | // This directive formats the data in appMeta as a nice table. |
| 4 | // example: <div crm-cxn-perm-table="{appMeta: cxn.app_meta}"></div> |
| 5 | angular.module('crmCxn').directive('crmCxnAdvTable', function crmCxnAdvTable() { |
| 6 | return { |
| 7 | restrict: 'EA', |
| 8 | scope: { |
| 9 | crmCxnAdvTable: '=' |
| 10 | }, |
| 11 | templateUrl: '~/crmCxn/AdvTable.html', |
| 12 | link: function(scope, element, attrs) { |
| 13 | scope.ts = CRM.ts(null); |
| 14 | scope.$watch('crmCxnAdvTable', function(crmCxnAdvTable){ |
| 15 | scope.appMeta = crmCxnAdvTable.appMeta; |
| 16 | }); |
| 17 | } |
| 18 | }; |
| 19 | }); |
| 20 | })(angular, CRM.$, CRM._); |