1LimoLabsIcabbiApp 2 .config(function(cfpLoadingBarProvider) { 3 cfpLoadingBarProvider.includeBar = false; 4 cfpLoadingBarProvider.loadingBarTemplate = '<div id="loading-bar"><div class="bar"><div class="peg"></div></div></div><div class="loadding-hide-div"></div>'; 5 cfpLoadingBarProvider.includeSpinner = false; 6 cfpLoadingBarProvider.spinnerTemplate = '<div id="preview-area"><div class="spinner"> <div class="spinner-container container1"><div class="circle1"></div> <div class="circle2"></div> <div class="circle3"></div><div class="circle4"></div></div><div class="spinner-container container2"> <div class="circle1"></div><div class="circle2"></div><div class="circle3"></div> <div class="circle4"></div> </div> <div class="spinner-container container3"> <div class="circle1"></div> <div class="circle2"></div><div class="circle3"></div> <div class="circle4"></div></div></div></div><div class="loadding-hide-div"></div>'; 7 8 }); 9 10LimoLabsIcabbiApp.config(['$stateProvider', '$urlRouterProvider', '$urlMatcherFactoryProvider', 'CONFIG', 'toastrConfig', 'datetimepickerSettingsProvider', 11 function($stateProvider, $urlRouterProvider, $urlMatcherFactoryProvider, CONFIG, toastrConfig, datetimepickerSettingsProvider) { 12 13 datetimepickerSettingsProvider.templateUrl = CONFIG.plugin_folder_url + CONFIG.view_folder_path + "/appTpl/datetime-picker-template.html"; 14 15 if (!isPluginPage()) { 16 return; 17 } 18 19 var link = CONFIG.plugin_folder_url + CONFIG.view_folder_path; 20 21 $urlMatcherFactoryProvider.strictMode(false); 22 23 $urlRouterProvider.otherwise('/booking/'); 24 25 $stateProvider.state('booking', { 26 abstract: true, 27 templateUrl: link + 'appTpl/booking-container.html' 28 }) 29 30 .state('booking.widget', { 31 url: '/booking/{promoCode:string}', 32 views: { 33 booking: { 34 templateUrl: link + 'appTpl/widget_form.html' 35 }, 36 checkout: { 37 templateUrl: link + 'appTpl/checkout-form.html' 38 }, 39 navigation: { 40 templateUrl: link + 'appTpl/navigation.html' 41 }, 42 'vehicles-map': { 43 templateUrl: link + 'appTpl/vehicles-map.html' 44 } 45 }, 46 }) 47 48 .state('booking.widget.select-vehicle', { 49 url: '/select-vehicle', 50 templateUrl: link + 'appTpl/select-vehicle-form.html' 51 }) 52 53 .state('booking.widget.select-vehicle.checkout', { 54 url: '/checkout', 55 template: '<div></div>' 56 }) 57 58 .state('review', { 59 templateUrl: link + 'appTpl/booking-container.html', 60 abstract: true 61 }) 62 63 .state('review.show', { 64 url: '/review', 65 views: { 66 review: { 67 templateUrl: link + 'appTpl/review-form.html' 68 }, 69 navigation: { 70 templateUrl: link + 'appTpl/navigation.html' 71 }, 72 'guest-track-taxi': { 73 templateUrl: link + 'appTpl/route-preview-guest.html' 74 } 75 } 76 }) 77 78 .state('review.ride', { 79 url: '/review-ride/{booking_source:int}/{company_id:int}/{perma_id:string}/{driver_id:int}', 80 views: { 81 review: { 82 templateUrl: link + 'appTpl/review-ride.html' 83 }, 84 'thank-you': { 85 templateUrl: link + 'appTpl/review-thank-you.html' 86 }, 87 } 88 }) 89 90 .state('review.thankyou', { 91 url: '/review-ride/thank-you', 92 views: { 93 review: { 94 templateUrl: link + 'appTpl/review-thank-you.html' 95 } 96 } 97 }) 98 99 .state('admin', { 100 abstract: true, 101 templateUrl: link + 'appTpl/booking-container.html' 102 }) 103 104 .state('admin.login', { 105 url: '/admin/login', 106 views: { 107 admin: { 108 templateUrl: link + 'appTpl/admin-login.html' 109 }, 110 navigation: { 111 templateUrl: link + 'appTpl/navigation.html' 112 } 113 } 114 }).state('admin.register', { 115 url: '/admin/register', 116 views: { 117 admin: { 118 templateUrl: link + 'appTpl/admin-register.html' 119 }, 120 navigation: { 121 templateUrl: link + 'appTpl/navigation.html' 122 } 123 } 124 }).state('admin.account', { 125 url: '/admin/account', 126 views: { 127 admin: { 128 templateUrl: link + 'appTpl/admin-account.html' 129 }, 130 navigation: { 131 templateUrl: link + 'appTpl/navigation.html' 132 } 133 } 134 }).state('admin.reservations', { 135 url: '/admin/reservations', 136 views: { 137 admin: { 138 templateUrl: link + 'appTpl/admin-bookings.html' 139 }, 140 navigation: { 141 templateUrl: link + 'appTpl/navigation.html' 142 } 143 } 144 }).state('admin.payment', { 145 url: '/admin/payment', 146 views: { 147 admin: { 148 templateUrl: link + 'appTpl/admin-payment-info.html' 149 }, 150 navigation: { 151 templateUrl: link + 'appTpl/navigation.html' 152 } 153 } 154 }).state('admin.card-process-success', { 155 url: '/admin/card-process-success', 156 views: { 157 admin: { 158 templateUrl: link + 'appTpl/card-process-success.html' 159 }, 160 navigation: { 161 templateUrl: link + 'appTpl/navigation.html' 162 } 163 } 164 }).state('admin.card-process-failure', { 165 url: '/admin/card-process-failure', 166 views: { 167 admin: { 168 templateUrl: link + 'appTpl/card-process-failure.html' 169 }, 170 navigation: { 171 templateUrl: link + 'appTpl/navigation.html' 172 } 173 } 174 }).state('admin.resetpassword', { 175 url: '/admin/resetpassword?auth&user&id', 176 views: { 177 admin: { 178 templateUrl: link + 'appTpl/admin-resetpassword.html' 179 } 180 } 181 }); 182 183 angular.extend(toastrConfig, { 184 allowHtml: false, 185 closeButton: true, 186 closeHtml: '<button>×</button>', 187 containerId: 'toast-container', 188 extendedTimeOut: 1000, 189 iconClasses: { 190 error: 'toast-error', 191 info: 'toast-info', 192 success: 'toast-success', 193 warning: 'toast-warning' 194 }, 195 maxOpened: 0, 196 messageClass: 'toast-message', 197 newestOnTop: true, 198 onHidden: null, 199 onShown: null, 200 positionClass: 'toast-top-right', 201 tapToDismiss: true, 202 target: 'body', 203 timeOut: 5000, 204 titleClass: 'toast-title', 205 toastClass: 'toast' 206 }); 207 208 } 209]); 210 211function configureTemplateFactory($provide) { 212 // Set a suffix outside the decorator function 213 var cacheBuster = Date.now().toString(); 214 215 function templateFactoryDecorator($delegate) { 216 var fromUrl = angular.bind($delegate, $delegate.fromUrl); 217 $delegate.fromUrl = function(url, params) { 218 if (url !== null && angular.isDefined(url) && angular.isString(url)) { 219 url += (url.indexOf("?") === -1 ? "?" : "&"); 220 url += "v=" + cacheBuster; 221 } 222 223 return fromUrl(url, params); 224 }; 225 226 return $delegate; 227 } 228 229 $provide.decorator('$templateFactory', ['$delegate', templateFactoryDecorator]); 230} 231 232LimoLabsIcabbiApp.config(['$provide', configureTemplateFactory]); 233 234 235function companyInterceptor($httpProvider) { 236 $httpProvider.interceptors.push(function($q, CompanyService) { 237 return { 238 request: function(config) { 239 if (config.params) { 240 if (config.params.icabbi_action == 'token' || config.params.icabbi_action == 'register') { 241 config.params.active_company_id = CompanyService.getDefaultCompany() ? CompanyService.getDefaultCompany().id : null; 242 } else { 243 config.params.active_company_id = (CompanyService.getActiveCompany() ? CompanyService.getActiveCompany().id : null); 244 } 245 } 246 return config; 247 } 248 }; 249 });
250} 251 252LimoLabsIcabbiApp.config(['$httpProvider', companyInterceptor]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.