drupal-civicrm/sites/all/modules/civicrm/ang/crmCxn.js

26 lines
816 B
JavaScript
Raw Permalink Normal View History

2018-01-14 15:10:16 +02:00
(function (angular, $, _) {
angular.module('crmCxn', CRM.angRequires('crmCxn'));
angular.module('crmCxn').config([
'$routeProvider',
function ($routeProvider) {
$routeProvider.when('/cxn', {
templateUrl: '~/crmCxn/ManageCtrl.html',
controller: 'CrmCxnManageCtrl',
resolve: {
apiCalls: function(crmApi){
var reqs = {};
reqs.cxns = ['Cxn', 'get', {sequential: 1}];
reqs.appMetas = ['CxnApp', 'get', {sequential: 1, return: ['id', 'title', 'desc', 'appId', 'appUrl', 'links', 'perm']}];
reqs.cfg = ['Cxn', 'getcfg', {}];
reqs.sysCheck = ['System', 'check', {}]; // FIXME: filter on checkCxnOverrides
return crmApi(reqs);
}
}
});
}
]);
})(angular, CRM.$, CRM._);