1 angular.module('egBooking',
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 url="booking_url" handlers="funcs"></eg-embed-frame>';
14 $routeProvider.when('/booking/legacy/:noun/:verb', {
15 template: eframe_template,
16 controller: 'EmbedBookingCtl',
21 $routeProvider.otherwise({
22 templateUrl : './t_splash',
27 .controller('EmbedBookingCtl',
28 ['$scope','$routeParams','$location','egCore',
29 function($scope , $routeParams , $location , egCore) {
32 ses : egCore.auth.token(),
35 var booking_path = '/eg/' +
36 $routeParams.noun + '/' + $routeParams.verb + location.search;
38 // embed URL must include protocol/domain or it will be loaded via
39 // push-state, resulting in an infinitely nested pages.
41 $location.absUrl().replace(/\/eg\/staff.*/, booking_path);
43 console.log('Loading Booking URL: ' + $scope.booking_url);