2d2193959a82c64023e7bdf9ea04512ddf641067
[civicrm-core.git] / ang / crmCxn.js
1 (function (angular, $, _) {
2
3 angular.module('crmCxn', [
4 'crmUtil', 'ngRoute', 'ngSanitize', 'ui.utils', 'crmUi', 'dialogService'
5 ]);
6
7 angular.module('crmCxn').config([
8 '$routeProvider',
9 function ($routeProvider) {
10 $routeProvider.when('/cxn', {
11 templateUrl: '~/crmCxn/ManageCtrl.html',
12 controller: 'CrmCxnManageCtrl',
13 resolve: {
14 apiCalls: function(crmApi){
15 var reqs = {};
16 reqs.cxns = ['Cxn', 'get', {sequential: 1}];
17 reqs.appMetas = ['CxnApp', 'get', {sequential: 1, return: ['id', 'title', 'desc', 'appId', 'appUrl', 'perm']}];
18 reqs.cfg = ['Cxn', 'getcfg', {}];
19 reqs.sysCheck = ['System', 'check', {}]; // FIXME: filter on checkCxnOverrides
20 return crmApi(reqs);
21 }
22 }
23 });
24 }
25 ]);
26
27 })(angular, CRM.$, CRM._);