1 angular.module('egAcqAdmin',
2 ['ngRoute', 'ui.bootstrap', 'egCoreMod','egUiMod'])
4 .config(['$routeProvider','$locationProvider','$compileProvider',
5 function($routeProvider , $locationProvider , $compileProvider) {
7 $locationProvider.html5Mode(true);
8 $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/);
9 var resolver = {delay : function(egStartup) {return egStartup.go()}};
12 '<eg-embed-frame allow-escape="true" min-height="min_height" url="acq_admin_url" handlers="funcs"></eg-embed-frame>';
14 $routeProvider.when('/admin/acq/:noun/:verb/:extra?', {
15 template: eframe_template,
16 controller: 'EmbedAcqCtl',
21 $routeProvider.otherwise({
22 templateUrl : './admin/acq/t_splash',
27 .controller('EmbedAcqCtl',
28 ['$scope','$routeParams','$location','egCore',
29 function($scope , $routeParams , $location , egCore) {
32 ses : egCore.auth.token(),
35 var acq_path = '/eg/';
37 if ($routeParams.noun == 'conify') {
38 acq_path += 'conify/global/acq/' + $routeParams.verb
39 + (typeof $routeParams.extra != 'undefined'
40 ? '/' + $routeParams.extra
45 + $routeParams.noun + '/' + $routeParams.verb
46 + (typeof $routeParams.extra != 'undefined'
47 ? '/' + $routeParams.extra
52 $scope.min_height = 2000; // give lots of space to start
54 // embed URL must include protocol/domain or it will be loaded via
55 // push-state, resulting in an infinitely nested pages.
56 $scope.acq_admin_url =
57 $location.absUrl().replace(/\/eg\/staff.*/, acq_path);
59 console.log('Loading Admin Acq URL: ' + $scope.acq_admin_url);