1define("flights/actions", ["require", "jquery", "../abstracts/StateRouter"], function (a) { 2 var b = a("jquery"), 3 c = a("../abstracts/StateRouter"); 4 return { 5 events: { 6 "state:route": "onRoute", 7 "calendar:change": "dateChange", 8 "airline:fetched": "initInfo", 9 "airport:fetched": "initInfo", 10 "render:paging": "renderPaging", 11 "calendar:rebuild": "reBuildCalendar", 12 }, 13 initialize: function () { 14 var d = this; 15 this.listenTo(this.vent, "state:change", function (j, g) { 16 var f = d.layout.$el.find(".fra_js_app_flight_type").find(".btn-primary .fra_icon_btn").text(); 17 var h = d.layout.$el.find(".fra_headline_1_module").text(); 18 var i = d.config.tracking.module.type; 19 var e = { module_type: i, module_name: h, type: f, time: j.time + this.info.tz }; 20 if (j.search) { 21 encodedString = j.search; 22 var div = document.createElement("div"); 23 div.innerHTML = encodedString; 24 decoded_search = div.textContent; 25 decoded_search = decoded_search.substring(0, 1024); 26 27 j.search = decoded_search; 28 29 e.search = j.search; 30 } 31 if (j.filter) { 32 if (j.filter.airline) { 33 e.airlines = j.filter.airline.join(","); 34 } 35 if (j.filter.airport) { 36 e.airports = j.filter.airport.join(","); 37 } 38 } 39 fra.tracking.submitTrackingInformation(e); 40 }); 41 }, 42 onRun: function () { 43 b.log("Flights onRun: ", this); 44 this.data.flights.readFetchOptions(this.config); 45 this.layout.set({ filter: "flightFilter", viewToggle: "viewToggle" }, { unset: false }); 46 this.initInfo(); 47 this.data.flights.doFetch(fra.utils.arrayClone(this.state)); 48 this.layout.set("table", "flightComposite", { unset: false }); 49 this.updateOverviewLink(); 50 this._bindAutoLoadOnScroll(); 51 }, 52 onRoute: function (d) { 53 b.log("Flights onRoute: props, ", d, " App:", this); 54 if (_.isEqual(this.stateAttributes, this.state.attributes)) { 55 if (this.config.module.type === "profile" && this.state.firstFragment()) { 56 fra.integrator.scrollToDomElement(this.layout.el); 57 } 58 return; 59 } 60 this.stateAttributes = fra.utils.deepClone(this.state.attributes); 61 this._alreadyRun = true; 62 this.data.flights.readFetchOptions(this.config); 63 this.layout.set({ filter: "flightFilter", viewToggle: "viewToggle" }, { unset: false }); 64 this.initInfo(); 65 this.data.flights.doFetch(d); 66 this.layout.set("table", "flightComposite", { unset: false }); 67 this.updateOverviewLink(true); 68 this._bindAutoLoadOnScroll(); 69 this.reBuildCalendar(this.get_Date()); 70 this.vent.trigger("type:reRender"); 71 this.vent.trigger("filter:reRender"); 72 if (this.config.module.type === "profile" && this.state.firstFragment()) { 73 fra.integrator.scrollToDomElement(this.layout.el); 74 } 75 }, 76 dateChange: function () { 77 var e = moment(this.get_Time()); 78 var d = moment(this.layout.ui.calendar.val()); 79 e.set("year", d.get("year")); 80 e.set("month", d.get("month")); 81 e.set("date", d.get("date")); 82 this.state.set("time", this.get_Time(e)); 83 }, 84 updateLastUpdate: function (d) { 85 var e; 86 if (this.layout.ui.loups.length > 0 && d !== undefined) { 87 e = moment(d).format(fra.i18n.app.flight.detail.timeFormat); 88 this.layout.ui.loups.text(fra.i18n.app.flight.detail.luops + ": " + e); 89 } 90 }, 91 updateOverviewLink: function (g) { 92 var e = "", 93 f, 94 d, 95 h; 96 97 if (this.layout.ui.overViewButton.length > 0) { 98 if (g) { 99 f = {}; 100 for (d in this.state.attributes) { 101 if (this.state.attributes.hasOwnProperty(d)) { 102 h = this.state.attributes[d]; 103 f[d] = c.encodeProp(d, h); 104 e += "/" + d + "=" + c.encodeProp(d, h); 105 } 106 } 107 this.layout.ui.overViewButton.attr("href", this.config.overview.page.url + "#" + this.appVentPrefix + e); 108 } else { 109 this.layout.ui.overViewButton.attr("href", this.config.overview.page.url); 110 } 111 } 112 }, 113 114 _bindAutoLoadOnScroll: function () { 115 var f = this, 116 e, 117 d = b('<div class="fra_mini_spinner fra_disabled"><div class="fra_loading__blue"></div></div>'); 118 b(window).scroll(function () { 119 e = b(document).height() - b(window).height() - b(window).scrollTop();
120 if (fra.bps.getBreakpoint() < 1 && f.config.module.type === "overview" && e < b(".fra_footer").outerHeight() - 30 && f.state.get("page") < f.info.maxPages) { 121 if (!f.info.loading) { 122 f.info.loading = true; 123 f.layout.regionManager.get("table").currentView.$el.append(d); 124 f.state.set("page", f.state.get("page") + 1); 125 } 126 } 127 }); 128 }, 129 130 initInfo: function () { 131 if (this.data.airlines.hasFetched && this.data.airports.hasFetched && this.layout.set) { 132 this.layout.set("filterInfo", "filterInfo", { unset: false }); 133 } 134 }, 135 renderPaging: function () { 136 this.layout.bindUIElements(); 137 138 if (this.info.maxPages > 1 && this.config.module.type === "profile") { 139 this.layout.ui.overViewButton.removeClass("fra_flight_overview_hide"); 140 } else if (this.info.maxPages > 1 && this.config.module.type === "overview") { 141 this.layout.set("pagination", "pagination", { unset: false }); 142 this.layout.ui.paginationWrapper.addClass("fra_active"); 143 } else { 144 this.layout.ui.paginationWrapper.removeClass("fra_active"); 145 146 this.layout.ui.overViewButton.addClass("fra_flight_overview_hide"); 147 } 148 }, 149 reBuildCalendar: function (d) { 150 if (d !== this.layout.ui.calenderIniter.data("start-date")) { 151 this.layout.ui.calenderIniter.fra_datePicker("destroy"); 152 this.layout.ui.calenderIniter.empty(); 153 this.layout.ui.calenderIniter.data("start-date", d); 154 this.layout.ui.calenderIniter.fra_datePicker(); 155 } 156 }, 157 }; 158}); 159define("flights/utils", [], function () { 160 function a(b) { 161 if (b) { 162 return ( 163 moment(b + "+0200") 164 .tz("Europe/Athens") 165 .utcOffset() / 60 166 ); 167 } else { 168 return moment().tz("Europe/Athens").utcOffset() / 60; 169 } 170 } 171 return { 172 get_Time: function (b) { 173 var c = b || this.state.get("time") || this._getUserTime(); 174 return moment(c).format("YYYY-MM-DDTHH:00:00"); 175 }, 176 get_Hour: function (b) { 177 var c = b || this.state.get("time") || this._getUserTime(); 178 return moment(c).format("hh"); 179 }, 180 get_Date: function (b) { 181 var c = b || this.state.get("time") || this._getUserTime(); 182 return moment(c).format("YYYY-MM-DD"); 183 }, 184 get_FullTime: function (b) { 185 var c = b || this.state.get("time") || this._getUserTime(); 186 var d = a(c); 187 return moment(c).format("YYYY-MM-DDTHH:00:00+0" + d + "00"); 188 }, 189 _getUserTime: function () { 190 return moment().tz("Europe/Athens").format("YYYY-MM-DDTHH:mm:ss"); 191 }, 192 stripOffTimeZone: function (b) { 193 return b.replace("+0200", "").replace("+0300", ""); 194 }, 195 }; 196}); 197define("flights/models/FlightModel", ["require", "backbone", "moment"], function (a) { 198 var c = a("backbone"), 199 b = a("moment"); 200 return c.Model.extend({ 201 initialize: function (d) { 202 this.app = d.app; 203 //this.attributes.codeshare = d.cs ? d.cs.join(", ") : ""; FIX[19/11/24 PODIAS] 204 this.attributes.codeshare = (d.cs && d.cs.length>0)? d.cs.join(", ") : ""; 205 if (d.id) { 206 this.attributes.detailUrl = this.app.config.detail.page.url.replace("{{airline-code}}", d.id); 207 } 208 if (d.sched) { 209 this.attributes.sched_time = b(d.sched).format("HH:mm"); 210 } 211 if (d.esti) { 212 this.attributes.esti_time = b(d.esti).format("HH:mm"); 213 } 214 this.attributes.airlineIcon = this.app.config.airline.icon.replace("{{airline-code}}", d.al); 215 if (d.esti) { 216 if (d.esti !== d.sched) { 217 this.attributes.delayed = true; 218 } 219 } 220 }, 221 parse: function (d) { 222 if (d.sched) { 223 d.sched = d.app.stripOffTimeZone(d.sched); 224 } 225 if (d.esti) { 226 d.esti = d.app.stripOffTimeZone(d.esti); 227 } 228 return d; 229 }, 230 matchAttr: function (d, e) { 231 var f; 232 if (!this.has(d)) { 233 return false; 234 } 235 f = this.get(d); 236 if (_.isArray(e)) { 237 return e.indexOf(f) >= 0; 238 } 239 return f === e; 240 }, 241 }); 242}); 243define("flights/models/FlightCollection", ["require", "jquery", "../../abstracts/utils", "../../abstracts/mixinModelDeps", "backbone", "./FlightModel"], function (b) { 244 var e = b("jquery"), 245 d = b("../../abstracts/utils"), 246 a = b("../../abstracts/mixinModelDeps"), 247 f = b("backbone"), 248 c = b("./FlightModel"); 249 return f.Collection.extend( 250 d.mixin({ 251 model: c, 252 hasFetched: false, 253 fetchOptions: {}, 254 mixin: [a], 255 deps: ["airlines", "airports"], 256 initialize: function (g) { 257 this.app = g.app; 258 this.depSource = this.app.data; 259 this.listenTo(this.app.vent, "state:change", function (i, h) { 260 if (!h.page) { 261 this.app.state.set("page", 1, { silent: true }); 262 } 263 if (h.type) { 264 this.type = h.type; 265 } 266 this.app.updateOverviewLink(true); 267 this.doFetch(i); 268 }); 269 }, 270 parse: function (i) { 271 var h = this; 272 if (i.luops) { 273 this.app.updateLastUpdate(i.luops); 274 this.app.info.tz = i.luops.substring(i.luops.indexOf("+")); 275 i.luops = this.app.stripOffTimeZone(i.luops); 276 } 277 if (!this.app.state.get("time")) { 278 this.app.state.set("time", i.luops, { silent: true }); 279 this.app.vent.trigger("calendar:rebuild", this.app.get_Date()); 280 this.app.vent.trigger("hour:update"); 281 } 282 if (i.results === 0 || i.data.length === 0) { 283 this.app.info.maxPages = 0; 284 this._updateHour([{ sched: this.app.get_Hour() }], this.app.get_Hour()); 285 return false;
286 } 287 if (i.data) { 288 for (var g in i.data) { 289 if (i.data.hasOwnProperty(g)) { 290 i.data[g].app = h.app; 291 } 292 } 293 } 294 this.app.info.maxPages = i.maxpage; 295 this.app.info.pages = Math.ceil(i.results / i.entriesperpage); 296 this.hasFetched = true; 297 this._updateHour(i.data); 298 if (this.fetchOptions.perpage) { 299 return i.data.slice(0, this.fetchOptions.perpage); 300 } else { 301 return i.data; 302 } 303 }, 304 _updateHour: function (i, g) { 305 var h = new Date(this.app.stripOffTimeZone(i[0].sched)); 306 this.app.info.hour = g || h.getHours(); 307 this.app.vent.trigger("hour:update"); 308 }, 309 url: function () { 310 this.type = this.app.state.get("type") === "departure" ? "departure" : "arrival"; 311 return this.app.config.source[this.type]; 312 }, 313 doFetch: function (h) { 314 var g = true, 315 k = true, 316 j = this; 317 var i = e.extend({}, this.fetchOptions, h); 318 if (i.time) { 319 i.time = this.app.get_FullTime(i.time); 320 } 321 this._decomposeFilter(i); 322 delete i.filter; 323 if (i.hasOwnProperty("search")) { 324 i.q = i.search; 325 delete i.search; 326 } 327 if (this.app.state.changed.page && this.app.state.get("page") !== 1 && fra.bps.getBreakpoint() < 1) { 328 g = false;
329 k = false; 330 } else { 331 this.app.layout.ui.itemsOuterContainer.addClass("fra_disabled"); 332 } 333 this.fetch({ 334 data: i, 335 traditional: true, 336 reset: k, 337 remove: g, 338 success: function (l) { 339 if (l.length === 0) { 340 j._showError(); 341 } else { 342 j.app.layout.$el.removeClass("fra_error"); 343 } 344 j.app.info.loading = false; 345 j.app.vent.trigger("render:paging"); 346 j.app.layout.ui.itemsOuterContainer.removeClass("fra_disabled"); 347 j.app.layout.$el.removeClass("fra_js_pre_load"); 348 if (!k) { 349 j.app.layout.regionManager.get("table").currentView.triggerMethod("item:added"); 350 j.app.layout.regionManager.get("table").currentView.$el.find(".fra_mini_spinner").remove(); 351 j.app.vent.trigger("update:dateSeparator"); 352 } 353 }, 354 }).fail(function () { 355 e.log("!! FlightCollection.filterList:failed", arguments); 356 }); 357 }, 358 readFetchOptions: function (g) { 359 this.fetchOptions.perpage = g.perpage; 360 this.fetchOptions.lang = g.lang; 361 }, 362 _decomposeFilter: function (g) { 363 if (this.app.state.get("filter")) { 364 e.each(this.app.state.get("filter"), function (h, i) { 365 g[h] = i; 366 }); 367 return g; 368 } else { 369 return g; 370 } 371 }, 372 _showError: function () { 373 this.app.layout.$el.addClass("fra_error"); 374 this.app.layout.ui.errorContainer.html("<h3>" + fra.i18n.app.flight.noResults + "</h3>"); 375 }, 376 }) 377 ); 378}); 379define("flights/models/Airports", ["require", "backbone", "jquery", "../../abstracts/utils", "../../abstracts/mixinModelXhr"], function (b) { 380 var e = b("backbone"), 381 d = b("jquery"), 382 c = b("../../abstracts/utils"), 383 a = b("../../abstracts/mixinModelXhr"); 384 return e.Model.extend( 385 c.mixin({ 386 fetchImmediately: true, 387 _byId: {}, 388 fetchOptions: { cache: true, expires: false }, 389 hasFetched: false, 390 mixin: [a], 391 cache: [], 392 initialize: function (f) { 393 this.app = f.app; 394 this.url = this.app.config.source.airports; 395 if (this.app.config.revision.airports) { 396 this.fetchOptions.expires = this.app.config.revision.airports; 397 } 398 this.listenTo(this.app.vent, "filter:reset", this.resetList); 399 this.listenTo(this.app.vent, "activate:airport", this.applySelection); 400 }, 401 parse: function (g) { 402 var f = this; 403 if (fra.config.frontEnd && false) { 404 g.data = g.data.slice(0, 6); 405 } 406 _.each(g.data, function (h) { 407 f._byId[h.id] = h; 408 }); 409 this.hasFetched = true; 410 this.app.vent.trigger("airport:fetched"); 411 return g; 412 }, 413 getById: function (f) { 414 return this._byId[f]; 415 }, 416 filter: function (g) { 417 var h = this, 418 f; 419 this.cache = fra.utils.arrayClone(this.get("data")); 420 if (d.isEmptyObject(g)) { 421 this.updateList(); 422 return; 423 } 424 f = fra.config.frontEnd ? "../dummy/json/airportsFiltered.json" : this.app.config.source.airports + "/filter"; 425 d.ajax({ 426 url: f, 427 data: g, 428 dataType: "json", 429 traditional: true, 430 success: function (i) { 431 h.updateList(i); 432 }, 433 fail: function (i) { 434 d.log("!! Airport list failed: ", i); 435 }, 436 }); 437 }, 438 updateList: function (g) { 439 var f; 440 for (f in this.get("data")) { 441 if (!g || d.inArray(this.get("data")[f].id, g) !== -1) { 442 delete this.get("data")[f].hide; 443 } else { 444 this.get("data")[f].hide = true; 445 delete this.get("data")[f].selectedClass; 446 } 447 } 448 this.app.vent.trigger("airports:render"); 449 }, 450 resetList: function () { 451 var f; 452 for (f in this.get("data")) { 453 if (this.get("data").hasOwnProperty(f)) { 454 delete this.get("data")[f].hide; 455 delete this.get("data")[f].selectedClass; 456 } 457 } 458 this.app.vent.trigger("airports:render"); 459 }, 460 revertData: function () { 461 var h, j, g, f; 462 for (h in this.get("data")) { 463 if (this.get("data").hasOwnProperty(h)) { 464 j = this.get("data")[h]; 465 f = this.cache[h]; 466 for (g in j) { 467 if (f[g]) { 468 j[g] = f[g]; 469 } else { 470 delete j[g]; 471 } 472 } 473 } 474 } 475 this.app.vent.trigger("airports:render"); 476 }, 477 applySelection: function (g) { 478 var f, h; 479 for (f in this.get("data")) { 480 if (this.get("data").hasOwnProperty(f)) { 481 h = this.get("data")[f]; 482 if (_.contains(g, h.id)) { 483 this.get("data")[f].selectedClass = "fra_active"; 484 } else { 485 if (this.get("data")[f].selectedClass) { 486 delete this.get("data")[f].selectedClass; 487 } 488 } 489 } 490 } 491 this.app.vent.trigger("airports:render"); 492 }, 493 }) 494 ); 495}); 496define("flights/models/Airlines", ["require", "backbone", "jquery", "../../abstracts/utils", "../../abstracts/mixinModelXhr"], function (b) { 497 var e = b("backbone"), 498 d = b("jquery"), 499 c = b("../../abstracts/utils"), 500 a = b("../../abstracts/mixinModelXhr"); 501 return e.Model.extend( 502 c.mixin({ 503 fetchImmediately: true, 504 _byCode: {}, 505 fetchOptions: { cache: true, expires: false }, 506 hasFetched: false, 507 mixin: [a], 508 cache: [], 509 initialize: function (f) { 510 this.app = f.app; 511 this.url = this.app.config.source.airlines; 512 if (this.app.config.revision.airlines) { 513 this.fetchOptions.expires = this.app.config.revision.airlines; 514 } 515 this.listenTo(this.app.vent, "filter:reset", this.resetList); 516 this.listenTo(this.app.vent, "activate:airline", this.applySelection); 517 }, 518 parse: function (g) { 519 var f = this; 520 if (fra.config.frontEnd && false) { 521 g.data = g.data.slice(0, 6); 522 } 523 _.each(g.data, function (h) { 524 f._byCode[h.id] = h; 525 }); 526 this.hasFetched = true; 527 this.app.vent.trigger("airline:fetched"); 528 return g; 529 }, 530 getByCode: function (f) { 531 return this._byCode[f]; 532 }, 533 filter: function (g) { 534 var h = this, 535 f; 536 this.cache = fra.utils.arrayClone(this.get("data")); 537 if (d.isEmptyObject(g)) { 538 this.updateList(); 539 return; 540 } 541 f = fra.config.frontEnd ? "../dummy/json/airlinesFiltered.json" : this.app.config.source.airlines + "/filter"; 542 d.ajax({ 543 url: f, 544 data: g, 545 dataType: "json", 546 traditional: true, 547 success: function (i) { 548 h.updateList(i); 549 }, 550 fail: function (i) { 551 d.log("!! Airline list failed: ", i); 552 }, 553 }); 554 }, 555 updateList: function (g) { 556 var f; 557 for (f in this.get("data")) { 558 if (!g || d.inArray(this.get("data")[f].id, g) !== -1) { 559 delete this.get("data")[f].hide; 560 } else { 561 this.get("data")[f].hide = true; 562 delete this.get("data")[f].selectedClass; 563 } 564 } 565 this.app.vent.trigger("airlines:render"); 566 }, 567 resetList: function () { 568 var f; 569 for (f in this.get("data")) { 570 if (this.get("data").hasOwnProperty(f)) { 571 delete this.get("data")[f].hide; 572 delete this.get("data")[f].selectedClass; 573 } 574 } 575 this.app.vent.trigger("airlines:render"); 576 }, 577 revertData: function () { 578 var h, j, g, f; 579 for (h in this.get("data")) { 580 if (this.get("data").hasOwnProperty(h)) { 581 j = this.get("data")[h]; 582 f = this.cache[h]; 583 for (g in j) { 584 if (f[g]) { 585 j[g] = f[g]; 586 } else { 587 delete j[g]; 588 } 589 } 590 } 591 } 592 this.app.vent.trigger("airlines:render"); 593 }, 594 applySelection: function (g) { 595 var f, h; 596 for (f in this.get("data")) { 597 if (this.get("data").hasOwnProperty(f)) { 598 h = this.get("data")[f]; 599 if (_.contains(g, h.id)) { 600 this.get("data")[f].selectedClass = "fra_active"; 601 } else { 602 if (this.get("data")[f].selectedClass) { 603 delete this.get("data")[f].selectedClass; 604 } 605 } 606 } 607 } 608 this.app.vent.trigger("airlines:render"); 609 }, 610 }) 611 ); 612}); 613define("flights/views/FlightTypeView", ["require", "jquery", "marionette"], function (a) { 614 var b = a("jquery"), 615 c = a("marionette"); 616 return c.ItemView.extend({ 617 el: ".fra_js_app_flight_type", 618 template: false, 619 ui: { departureBtn: ".fra_js_flight_type_departure", arrivalBtn: ".fra_js_flight_type_arrival" }, 620 events: { "click @ui.departureBtn": "onDepartureClick", "click @ui.arrivalBtn": "onArrivalClick" }, 621 onRender: function () { 622 var d = this.app.state.get("type"); 623 this.setClassOnChange(d); 624 }, 625 initialize: function (d) { 626 this.app = d.app; 627 this.listenTo(this.app.vent, "type:reRender", this.onRender); 628 this.$el = d.app.config.$el.find(this.$el.selector); 629 this.el = this.$el[0]; 630 }, 631 onDepartureClick: function () { 632 this.onChangeType("departure"); 633 }, 634 onArrivalClick: function () { 635 this.onChangeType("arrival"); 636 }, 637 setClassOnChange: function (e) { 638 var d = "btn-primary", 639 f = "btn-tertiary"; 640 if (e === "arrival") { 641 this.ui.arrivalBtn.removeClass(f).addClass(d); 642 this.ui.departureBtn.removeClass(d).addClass(f); 643 } else { 644 this.ui.departureBtn.removeClass(f).addClass(d); 645 this.ui.arrivalBtn.removeClass(d).addClass(f); 646 } 647 }, 648 onChangeType: function (d) { 649 this.setClassOnChange(d); 650 this.app.state.set("page", 1); 651 this.app.state.unset("filter"); 652 this.app.state.unset("search"); 653 this.app.vent.trigger("filter:reset"); 654 this.app.state.set("type", d); 655 }, 656 }); 657}); 658define("flights/templates", ["handlebars"], function (a) { 659 this["JST"] = this["JST"] || {}; 660 if(AirportCodeJsAssign == "SKG") 661 { 662 this["JST"]["arrivalTable"] = a.template({ 663 compiler: [6, ">
663= 2.0.0-beta.1"], 664 main: function (g, d, b, e) { 665 var c, 666 f = d.helperMissing; 667 return ( 668 '\r\n<!-- Table header, hide on XS -->\r\n<!-- tr -->\r\n\r\n<ul class="fra_table_thead hidden-xs">\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 669 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.airline", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 670 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 671 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.flight", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 672 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th visible-lg">\r\n ' + 673 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.codeshare", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 674 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 675 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.origin", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 676 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 677 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.scheduled", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 678 // +'\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' 679 // +((c=(d.i18n||(g&&g.i18n)||f).call(g,"app.flight.rowHead.expected",{name:"i18n",hash:{},data:e}))!=null?c:"") 680 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 681 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.terminal", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 682 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 683 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.status", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 684 "\r\n </li>\r\n</ul>\r\n" 685 ); 686 }, 687 useData: true, 688 }); 689 } 690 else 691 { 692 this["JST"]["arrivalTable"] = a.template({ 693 compiler: [6, ">= 2.0.0-beta.1"], 694 main: function (g, d, b, e) { 695 var c, 696 f = d.helperMissing; 697 return ( 698 '\r\n<!-- Table header, hide on XS -->\r\n<!-- tr -->\r\n\r\n<ul class="fra_table_thead hidden-xs">\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 699 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.airline", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 700 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 701 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.flight", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 702 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th visible-lg">\r\n ' + 703 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.codeshare", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 704 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 705 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.origin", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 706 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 707 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.scheduled", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 708 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 709 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.status", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 710 "\r\n </li>\r\n</ul>\r\n" 711 ); 712 }, 713 useData: true, 714 }); 715 } 716 717 if(AirportCodeJsAssign == "SKG") 718 { 719 this["JST"]["arrivalTableRow"] = a.template({ 720 "1": function (g, e, b, f) { 721 var c, d; 722 return ( 723 '<span class="fra_flight_red">' + 724 ((c = ((d = (d = e.status || (g != null ? g.status : g)) != null ? d : e.helperMissing), typeof d === "function" ? d.call(g, { name: "status", hash: {}, data: f }) : d)) != null ? c : "") + 725 "</span>" 726 ); 727 }, 728 "3": function (f, d, b, e) { 729 var c; 730 return (c = d["if"].call(f, f != null ? f.empty : f, { name: "if", hash: {}, fn: this.program(4, e, 0), inverse: this.program(6, e, 0), data: e })) != null ? c : ""; 731 }, 732 "4": function (e, c, b, d) { 733 return ""; 734 }, 735 "6": function (e, c, b, d) { 736 return "-"; 737 }, 738 "8": function (e, c, b, d) { 739 // return "<strong>"; 740 }, 741 "10": function (e, c, b, d) { 742 // return "</strong>"; 743 }, 744 "12": function (e, c, b, d) { 745 return '<span class="fra_flight_red"><strong>'; 746 }, 747 "14": function (e, c, b, d) { 748 return "</strong></span>"; 749 }, 750 "16": function (g, e, b, f) { 751 var c, d; 752 var url = ((c = ((d = (d = e.detailUrl || (g != null ? g.detailUrl : g)) != null ? d : e.helperMissing), typeof d === "function" ? d.call(g, { name: "detailUrl", hash: {}, data: f }) : d)) != null ? c : ""); 753 var ariaLabel = url.indexOf('/el/') === 0 ? 'Î Ïοβολή λεÏÏομεÏειÏν ÏÏήÏηÏ' : 'View flight details'; 754 return ( 755 ' <li class="fra_row_link">\r\n <a href="' + url + '" aria-label="' + ariaLabel + '"></a>\r\n </li>\r\n'
756 ); 757 }, 758 compiler: [6, ">= 2.0.0-beta.1"], 759 main: function (i, e, b, g) { 760 var c, 761 d, 762 h = e.helperMissing, 763 f = "function"; 764 return ( 765 '<li class="fra_table_td fra_table_td__airline">' + 766 ((c = ((d = (d = e.alname || (i != null ? i.alname : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "alname", hash: {}, data: g }) : d)) != null ? c : "") + 767 '</li>\r\n'+ 768 '<li class="fra_table_td fra_table_td__flightnr fra_table_mobile_spacer">'+ 769 '<strong>'+ 770 ((c = ((d = (d = e.fnr || (i != null ? i.fnr : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "fnr", hash: {}, data: g }) : d)) != null ? c : "") + 771 '</strong>'+ 772 '</li>\r\n'+ 773 '<li class="fra_table_td fra_table_td__codeshare visible-lg">' + 774 ((c = ((d = (d = e.codeshare || (i != null ? i.codeshare : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "codeshare", hash: {}, data: g }) : d)) != null ? c : "") + 775 '</li>\r\n'+ 776 '<li class="fra_table_td visible-xs fra_align_left">' + 777 ((c = e["if"].call(i, i != null ? i.status : i, { name: "if", hash: {}, fn: this.program(1, g, 0), inverse: this.program(3, g, 0), data: g })) != null ? c : "") + 778 '</li>\r\n'+ 779 '<li class="fra_table_td fra_table_td__destination">'+ 780 '<strong>' + 781 ((c = ((d = (d = e.apname || (i != null ? i.apname : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "apname", hash: {}, data: g }) : d)) != null ? c : "") + 782 '</strong>'+ 783 '</li>\r\n'+ 784 '<li class="fra_table_td fra_table_td__time">' + 785 ((c = e["if"].call(i, i != null ? i.delayed : i, { name: "if", hash: {}, fn: this.program(4, g, 0), inverse: this.program(8, g, 0), data: g })) != null ? c : "") + 786 ((c = ((d = (d = e.sched_time || (i != null ? i.sched_time : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "sched_time", hash: {}, data: g }) : d)) != null ? c : "") + 787 ((c = e["if"].call(i, i != null ? i.delayed : i, { name: "if", hash: {}, fn: this.program(4, g, 0), inverse: this.program(10, g, 0), data: g })) != null ? c : "") + 788 ((c = e["if"].call(i, i != null ? i.delayed : i, { name: "if", hash: {}, fn: this.program(14, g, 0), inverse: this.noop, data: g })) != null ? c : "") + 789 '</strong>'+ 790 '</li>\r\n'+ 791 '<li class="visible-xs-inline-block">Terminal</li>\r\n'+ 792 '<li class="fra_table_td">'+ 793 '<strong>' + 794 ((c = ((d = (d = e.terminal || (i != null ? i.terminal : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "terminal", hash: {}, data: g }) : d)) != null ? c : "") + 795 '</strong>'+ 796 '</li>\r\n'+ 797 '<li class="fra_table_td hidden-xs fra_align_left">' + 798 ((c = e["if"].call(i, i != null ? i.status : i, { name: "if", hash: {}, fn: this.program(1, g, 0), inverse: this.program(3, g, 0), data: g })) != null ? c : "") + 799 "</li>\r\n" + 800 ((c = e["if"].call(i, i != null ? i.detailUrl : i, { name: "if", hash: {}, fn: this.program(16, g, 0), inverse: this.noop, data: g })) != null ? c : "") + 801 "\r\n" 802 ); 803 }, 804 useData: true, 805 }); 806 } 807 else 808 { 809 this["JST"]["arrivalTableRow"] = a.template({ 810 "1": function (g, e, b, f) { 811 var c, d; 812 return ( 813 '<span class="fra_flight_red">' + 814 ((c = ((d = (d = e.status || (g != null ? g.status : g)) != null ? d : e.helperMissing), typeof d === "function" ? d.call(g, { name: "status", hash: {}, data: f }) : d)) != null ? c : "") + 815 "</span>" 816 ); 817 }, 818 "3": function (f, d, b, e) { 819 var c; 820 return (c = d["if"].call(f, f != null ? f.empty : f, { name: "if", hash: {}, fn: this.program(4, e, 0), inverse: this.program(6, e, 0), data: e })) != null ? c : ""; 821 }, 822 "4": function (e, c, b, d) { 823 return ""; 824 }, 825 "6": function (e, c, b, d) { 826 return "-"; 827 }, 828 "8": function (e, c, b, d) { 829 // return "<strong>"; 830 }, 831 "10": function (e, c, b, d) { 832 // return "</strong>"; 833 }, 834 "12": function (e, c, b, d) { 835 return '<span class="fra_flight_red"><strong>'; 836 }, 837 "14": function (e, c, b, d) { 838 return "</strong></span>"; 839 }, 840 "16": function (g, e, b, f) { 841 var c, d; 842 var url = 843 (c = 844 ((d = (d = e.detailUrl || (g != null ? g.detailUrl : g)) != null ? d : e.helperMissing), 845 typeof d === 'function' ? d.call(g, {name: 'detailUrl', hash: {}, data: f}) : d)) != null 846 ? c 847 : ''; 848 var ariaLabel = url.indexOf('/el/') === 0 ? 'Î Ïοβολή λεÏÏομεÏειÏν ÏÏήÏηÏ' : 'View flight details'; 849 return ( 850 ' <li class="fra_row_link">\r\n <a href="' + url + '" aria-label="' + ariaLabel + '"></a>\r\n </li>\r\n'
851 ); 852 }, 853 compiler: [6, ">= 2.0.0-beta.1"], 854 main: function (i, e, b, g) { 855 var c, 856 d, 857 h = e.helperMissing, 858 f = "function"; 859 return ( 860 '<li class="fra_table_td fra_table_td__airline">' + 861 ((c = ((d = (d = e.alname || (i != null ? i.alname : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "alname", hash: {}, data: g }) : d)) != null ? c : "") + 862 '</li>\r\n'+ 863 '<li class="fra_table_td fra_table_td__flightnr fra_table_mobile_spacer">'+ 864 '<strong>'+ 865 ((c = ((d = (d = e.fnr || (i != null ? i.fnr : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "fnr", hash: {}, data: g }) : d)) != null ? c : "") + 866 '</strong>'+ 867 '</li>\r\n'+ 868 '<li class="fra_table_td fra_table_td__codeshare visible-lg">' + 869 ((c = ((d = (d = e.codeshare || (i != null ? i.codeshare : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "codeshare", hash: {}, data: g }) : d)) != null ? c : "") + 870 '</li>\r\n'+ 871 '<li class="fra_table_td visible-xs fra_align_left">' + 872 ((c = e["if"].call(i, i != null ? i.status : i, { name: "if", hash: {}, fn: this.program(1, g, 0), inverse: this.program(3, g, 0), data: g })) != null ? c : "") + 873 '</li>\r\n'+ 874 '<li class="fra_table_td fra_table_td__destination">'+ 875 '<strong>' + 876 ((c = ((d = (d = e.apname || (i != null ? i.apname : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "apname", hash: {}, data: g }) : d)) != null ? c : "") + 877 '</strong>'+ 878 '</li>\r\n'+ 879 '<li class="fra_table_td fra_table_td__time">' + 880 ((c = e["if"].call(i, i != null ? i.delayed : i, { name: "if", hash: {}, fn: this.program(4, g, 0), inverse: this.program(8, g, 0), data: g })) != null ? c : "") + 881 ((c = ((d = (d = e.sched_time || (i != null ? i.sched_time : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "sched_time", hash: {}, data: g }) : d)) != null ? c : "") + 882 ((c = e["if"].call(i, i != null ? i.delayed : i, { name: "if", hash: {}, fn: this.program(4, g, 0), inverse: this.program(10, g, 0), data: g })) != null ? c : "") + 883 ((c = e["if"].call(i, i != null ? i.delayed : i, { name: "if", hash: {}, fn: this.program(14, g, 0), inverse: this.noop, data: g })) != null ? c : "") + 884 '</strong>'+ 885 '</li>\r\n'+ 886 '<li class="fra_table_td hidden-xs fra_align_left">' + 887 ((c = e["if"].call(i, i != null ? i.status : i, { name: "if", hash: {}, fn: this.program(1, g, 0), inverse: this.program(3, g, 0), data: g })) != null ? c : "") + 888 "</li>\r\n" + 889 ((c = e["if"].call(i, i != null ? i.detailUrl : i, { name: "if", hash: {}, fn: this.program(16, g, 0), inverse: this.noop, data: g })) != null ? c : "") + 890 "\r\n" 891 ); 892 }, 893 useData: true, 894 }); 895 } 896 897 if(AirportCodeJsAssign == "SKG") 898 { 899 this["JST"]["departureTable"] = a.template({ 900 compiler: [6, ">= 2.0.0-beta.1"], 901 main: function (g, d, b, e) { 902 var c, 903 f = d.helperMissing; 904 return ( 905 '\r\n<!-- Table header, hide on XS -->\r\n<!-- tr -->\r\n\r\n<ul class="fra_table_thead hidden-xs">\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 906 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.airline", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 907 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 908 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.flight", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 909 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th visible-lg">\r\n ' + 910 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.codeshare", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 911 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 912 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.destination", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 913 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 914 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.scheduled", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 915 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 916 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.checkin", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 917 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 918 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.terminal", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 919 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 920 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.gate", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 921 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 922 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.status", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 923 "\r\n </li>\r\n</ul>\r\n" 924 ); 925 }, 926 useData: true, 927 }); 928 } 929 else 930 { 931 this["JST"]["departureTable"] = a.template({ 932 compiler: [6, ">
932= 2.0.0-beta.1"], 933 main: function (g, d, b, e) { 934 var c, 935 f = d.helperMissing; 936 return ( 937 '\r\n<!-- Table header, hide on XS -->\r\n<!-- tr -->\r\n\r\n<ul class="fra_table_thead hidden-xs">\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 938 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.airline", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 939 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 940 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.flight", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 941 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th visible-lg">\r\n ' + 942 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.codeshare", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 943 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 944 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.destination", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 945 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 946 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.scheduled", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 947 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 948 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.checkin", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 949 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 950 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.gate", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 951 '\r\n </li>\r\n <!-- th -->\r\n <li class="fra_table_th">\r\n ' + 952 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.rowHead.status", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 953 "\r\n </li>\r\n</ul>\r\n" 954 ); 955 }, 956 useData: true, 957 }); 958 } 959 if(AirportCodeJsAssign == "SKG") 960 { 961 this["JST"]["departureTableRow"] = a.template({ 962 "1": function (g, e, b, f) { 963 var c, d; 964 return ( 965 '<span class="fra_flight_red">' + 966 ((c = ((d = (d = e.status || (g != null ? g.status : g)) != null ? d : e.helperMissing), typeof d === "function" ? d.call(g, { name: "status", hash: {}, data: f }) : d)) != null ? c : "") + 967 "</span>" 968 ); 969 }, 970 "3": function (f, d, b, e) { 971 var c; 972 return (c = d["if"].call(f, f != null ? f.empty : f, { name: "if", hash: {}, fn: this.program(4, e, 0), inverse: this.program(6, e, 0), data: e })) != null ? c : ""; 973 }, 974 "4": function (e, c, b, d) { 975 return ""; 976 }, 977 "6": function (e, c, b, d) { 978 return "-"; 979 }, 980 "8": function (e, c, b, d) { 981 // return "<strong>"; 982 }, 983 "10": function (e, c, b, d) { 984 // return "</strong>"; 985 }, 986 "12": function (e, c, b, d) { 987 return '<span class="fra_flight_red"><strong>'; 988 }, 989 "14": function (e, c, b, d) { 990 return "</strong></span>"; 991 }, 992 "16": function (g, e, b, f) { 993 var c, d; 994 var url = 995 (c = 996 ((d = (d = e.detailUrl || (g != null ? g.detailUrl : g)) != null ? d : e.helperMissing), 997 typeof d === 'function' ? d.call(g, {name: 'detailUrl', hash: {}, data: f}) : d)) != null 998 ? c 999 : ''; 1000 var ariaLabel = url.indexOf('/el/') === 0 ? 'Î Ïοβολή λεÏÏομεÏειÏν ÏÏήÏηÏ' : 'View flight details'; 1001 return '<li class="fra_row_link">\r\n <a href="' + url + '" aria-label="' + ariaLabel + '"></a>\r\n</li>\r\n'; 1002 }, 1003 compiler: [6, ">= 2.0.0-beta.1"], 1004 main: function (i, e, b, g) { 1005 var c, 1006 d, 1007 h = e.helperMissing, 1008 f = "function"; 1009 return ( 1010 // AIRLINE 1011 '<li class="fra_table_td fra_table_td__airline">' + 1012 ((c = ((d = (d = e.alname || (i != null ? i.alname : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "alname", hash: {}, data: g }) : d)) != null ? c : "") + 1013 '</li>\r\n'+ 1014 1015 // FLIGHT NUMBER 1016 '<li class="fra_table_td fra_table_td__flightnr fra_table_mobile_spacer">'+'' + 1017 '<strong>' + 1018 ((c = ((d = (d = e.fnr || (i != null ? i.fnr : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "fnr", hash: {}, data: g }) : d)) != null ? c : "") + 1019 '</strong>'+ 1020 '</li>\r\n'+ 1021 1022 // CODESHARE 1023 '<li class="fra_table_td fra_table_td__codeshare visible-lg">
1023' + 1024 ((c = ((d = (d = e.codeshare || (i != null ? i.codeshare : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "codeshare", hash: {}, data: g }) : d)) != null ? c : "") + 1025 '</li>\r\n'+ 1026 1027 // DESTINATION 1028 '<li class="fra_table_td visible-xs fra_align_left">' + 1029 ((c = e["if"].call(i, i != null ? i.status : i, { name: "if", hash: {}, fn: this.program(1, g, 0), inverse: this.program(3, g, 0), data: g })) != null ? c : "") + 1030 '</li>\r\n'+ 1031 '<li class="fra_table_td fra_table_td__destination">'+ 1032 '<strong>' + 1033 ((c = ((d = (d = e.apname || (i != null ? i.apname : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "apname", hash: {}, data: g }) : d)) != null ? c : "") + 1034 '</strong>'+ 1035 '</li>\r\n'+ 1036 1037 // SCHEDULED TIME 1038 '<li class="fra_table_td fra_table_td__time">' + 1039 ((c = e["if"].call(i, i != null ? i.delayed : i, { name: "if", hash: {}, fn: this.program(4, g, 0), inverse: this.program(8, g, 0), data: g })) != null ? c : "") + 1040 ((c = ((d = (d = e.sched_time || (i != null ? i.sched_time : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "sched_time", hash: {}, data: g }) : d)) != null ? c : "") + 1041 ((c = e["if"].call(i, i != null ? i.delayed : i, { name: "if", hash: {}, fn: this.program(4, g, 0), inverse: this.program(10, g, 0), data: g })) != null ? c : "") + 1042 '</li>\r\n'+ 1043 1044 // CHECK IN 1045 '<li class="visible-xs-inline-block">Check-in</li>\r\n'+ 1046 '<li class="fra_table_td">'+ 1047 '<strong>' + 1048 ((c = ((d = (d = e.schalter || (i != null ? i.schalter : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "schalter", hash: {}, data: g }) : d)) != null ? c : "") + 1049 '</strong>'+ 1050 '</li>\r\n'+ 1051 1052 // TERMINAL 1053 '<li class="visible-xs-inline-block"> / Terminal</li>\r\n'+ 1054 '<li class="fra_table_td">'+ 1055 '<strong>' + 1056 ((c = ((d = (d = e.terminal || (i != null ? i.terminal : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "terminal", hash: {}, data: g }) : d)) != null ? c : "") + 1057 '</strong>'+ 1058 '</li>\r\n'+ 1059 1060 '<li class="visible-xs" style="margin-top: -4px; list-style: none;" aria-hidden="true"></li>'+ 1061 1062 // GATE 1063 '<li class="visible-xs-inline-block">Gate</li>\r\n'+ 1064 '<li class="fra_table_td">'+ 1065 '<strong>' + 1066 ((c = ((d = (d = e.gate || (i != null ? i.gate : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "gate", hash: {}, data: g }) : d)) != null ? c : "") + 1067 '</strong>'+ 1068 '</li>\r\n'+ 1069 1070 // COMMENTS 1071 '<li class="fra_table_td hidden-xs fra_align_left">' + 1072 ((c = e["if"].call(i, i != null ? i.status : i, { name: "if", hash: {}, fn: this.program(1, g, 0), inverse: this.program(3, g, 0), data: g })) != null ? c : "") + 1073 "</li>\r\n" + 1074 ((c = e["if"].call(i, i != null ? i.detailUrl : i, { name: "if", hash: {}, fn: this.program(16, g, 0), inverse: this.noop, data: g })) != null ? c : "") + 1075 "\r\n" 1076 ); 1077 }, 1078 useData: true, 1079 }); 1080 } 1081 else 1082 { 1083 this["JST"]["departureTableRow"] = a.template({ 1084 "1": function (g, e, b, f) { 1085 var c, d; 1086 return ( 1087 '<span class="fra_flight_red">' + 1088 ((c = ((d = (d = e.status || (g != null ? g.status : g)) != null ? d : e.helperMissing), typeof d === "function" ? d.call(g, { name: "status", hash: {}, data: f }) : d)) != null ? c : "") + 1089 "</span>" 1090 ); 1091 }, 1092 "3": function (f, d, b, e) { 1093 var c; 1094 return (c = d["if"].call(f, f != null ? f.empty : f, { name: "if", hash: {}, fn: this.program(4, e, 0), inverse: this.program(6, e, 0), data: e })) != null ? c : ""; 1095 }, 1096 "4": function (e, c, b, d) { 1097 return ""; 1098 }, 1099 "6": function (e, c, b, d) { 1100 return "-"; 1101 }, 1102 "8": function (e, c, b, d) { 1103 // return "<strong>"; 1104 }, 1105 "10": function (e, c, b, d) { 1106 // return "</strong>"; 1107 }, 1108 "12": function (e, c, b, d) { 1109 return '<span class="fra_flight_red"><strong>'; 1110 }, 1111 "14": function (e, c, b, d) { 1112 return "</strong></span>"; 1113 }, 1114 "16": function (g, e, b, f) { 1115 var c, d; 1116 var url = 1117 (c = 1118 ((d = (d = e.detailUrl || (g != null ? g.detailUrl : g)) != null ? d : e.helperMissing), 1119 typeof d === 'function' ? d.call(g, {name: 'detailUrl', hash: {}, data: f}) : d)) != null 1120 ? c 1121 : ''; 1122 var ariaLabel = url.indexOf('/el/') === 0 ? 'Î Ïοβολή λεÏÏομεÏειÏν ÏÏήÏηÏ' : 'View flight details'; 1123 return '<li class="fra_row_link">\r\n <a href="' + url + '" aria-label="' + ariaLabel + '"></a>\r\n</li>\r\n'; 1124 },
1125 compiler: [6, ">= 2.0.0-beta.1"], 1126 main: function (i, e, b, g) { 1127 var c, 1128 d, 1129 h = e.helperMissing, 1130 f = "function"; 1131 return ( 1132 // AIRLINE 1133 '<li class="fra_table_td fra_table_td__airline">' + 1134 ((c = ((d = (d = e.alname || (i != null ? i.alname : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "alname", hash: {}, data: g }) : d)) != null ? c : "") + 1135 '</li>\r\n'+ 1136 1137 // FLIGHT NUMBER 1138 '<li class="fra_table_td fra_table_td__flightnr fra_table_mobile_spacer">'+'' + 1139 '<strong>' + 1140 ((c = ((d = (d = e.fnr || (i != null ? i.fnr : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "fnr", hash: {}, data: g }) : d)) != null ? c : "") + 1141 '</strong>'+ 1142 '</li>\r\n'+ 1143 1144 // CODESHARE 1145 '<li class="fra_table_td fra_table_td__codeshare visible-lg">' + 1146 ((c = ((d = (d = e.codeshare || (i != null ? i.codeshare : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "codeshare", hash: {}, data: g }) : d)) != null ? c : "") + 1147 '</li>\r\n'+ 1148 1149 // DESTINATION 1150 '<li class="fra_table_td visible-xs fra_align_left">' + 1151 ((c = e["if"].call(i, i != null ? i.status : i, { name: "if", hash: {}, fn: this.program(1, g, 0), inverse: this.program(3, g, 0), data: g })) != null ? c : "") + 1152 '</li>\r\n'+ 1153 '<li class="fra_table_td fra_table_td__destination">'+ 1154 '<strong>' + 1155 ((c = ((d = (d = e.apname || (i != null ? i.apname : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "apname", hash: {}, data: g }) : d)) != null ? c : "") + 1156 '</strong>'+ 1157 '</li>\r\n'+ 1158 1159 // SCHEDULED TIME 1160 '<li class="fra_table_td fra_table_td__time">' + 1161 ((c = e["if"].call(i, i != null ? i.delayed : i, { name: "if", hash: {}, fn: this.program(4, g, 0), inverse: this.program(8, g, 0), data: g })) != null ? c : "") + 1162 ((c = ((d = (d = e.sched_time || (i != null ? i.sched_time : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "sched_time", hash: {}, data: g }) : d)) != null ? c : "") + 1163 ((c = e["if"].call(i, i != null ? i.delayed : i, { name: "if", hash: {}, fn: this.program(4, g, 0), inverse: this.program(10, g, 0), data: g })) != null ? c : "") + 1164 '</li>\r\n'+ 1165 1166 // CHECK IN 1167 '<li class="visible-xs-inline-block">Check-in</li>\r\n'+ 1168 '<li class="fra_table_td">'+ 1169 '<strong>' + 1170 ((c = ((d = (d = e.schalter || (i != null ? i.schalter : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "schalter", hash: {}, data: g }) : d)) != null ? c : "") + 1171 '</strong>'+ 1172 '</li>\r\n'+ 1173 1174 // GATE 1175 '<li class="visible-xs-inline-block">Gate</li>\r\n'+ 1176 '<li class="fra_table_td">'+ 1177 '<strong>' + 1178 ((c = ((d = (d = e.gate || (i != null ? i.gate : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "gate", hash: {}, data: g }) : d)) != null ? c : "") + 1179 '</strong>'+ 1180 '</li>\r\n'+ 1181 1182 // COMMENTS 1183 '<li class="fra_table_td hidden-xs fra_align_left">' + 1184 ((c = e["if"].call(i, i != null ? i.status : i, { name: "if", hash: {}, fn: this.program(1, g, 0), inverse: this.program(3, g, 0), data: g })) != null ? c : "") + 1185 "</li>\r\n" + 1186 ((c = e["if"].call(i, i != null ? i.detailUrl : i, { name: "if", hash: {}, fn: this.program(16, g, 0), inverse: this.noop, data: g })) != null ? c : "") + 1187 "\r\n" 1188 ); 1189 }, 1190 useData: true, 1191 }); 1192 } 1193 1194 this["JST"]["filterForm"] = a.template({ 1195 compiler: [6, ">= 2.0.0-beta.1"], 1196 main: function (g, d, b, e) { 1197 var c, 1198 f = d.helperMissing; 1199 return ( 1200 '<button type="button" name="close" class="fra_filter_close" aria-label="close">\n <svg class="icon" role="presentation">\n <use xlink:href="#icon-close"/>\n </svg>\n</button>\n\n<div class="fra_filter_inner fra_filter_inner__slider">\n <div class="fra_filter_header">\n <h7 class="fra_copy_3 fra_js_header__airports">' + 1201 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.filter.airports", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 1202 '</h7>\n <h7 class="fra_copy_3 fra_js_header__airlines">' + 1203 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.filter.airlines", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 1204 '</h7>\n </div>\n\n <!-- airports overlay -->\n <div class="fra_js_airports_overlay fra_filter_overlay">\n <!-- Filter filter-->\n <div class="fra_filter_input_field">\n <input class="fra_js_airport_search form-control" aria-label="Airport search">\n <button type="button" name="close" class="btn fra_button_close" aria-label="close">\n <svg class="icon" role="presentation">\n <use xlink:href="#icon-close"/>\n </svg>\n </button>\n <button type="button" name="search" class="btn fra_button_search fra_active" aria-label="search">\n <svg class="icon" role="presentation">\n <use xlink:href="#icon-search"/>\n </svg>\n </button>\n </div>\n\n <!-- Airports -->\n <div class="fra_js_flights_airports_list fra_filter_content fra_flight_filter_content" tabindex="0">\n <!-- Marionette render\n\n <ul class="airport">\n <li data-id="BVR" class="fra_js_airport hidden"> ACM Air Charter (BVR)</li>\n <li data-id="NH" class="fra_js_airport"> ANA All Nippon Airways (NH)</li>\n <li data-id="JP" class="fra_js_airport hidden"> Adria Airways (JP)</li>\n <li data-id="A3" class="fra_js_airport hidden"> Aegean Airlines (A3)</li>\n <li data-id="EI" class="fra_js_airport fra_active">Aer Lingus (EI)</li>\n ....\n </ul>\n\n // end of render -->\n </div>\n </div><!-- //airports overlay -->\n <!-- airlines overlay -->\n <div class="fra_js_airlines_overlay fra_filter_overlay">\n <!-- Filter filter-->\n <div class="fra_filter_input_field">\n <input class="fra_js_airline_search form-control" aria-label="Airline search">\n <button type="button" name="close" class="btn fra_button_close" aria-label="close">\n <svg class="icon" role="presentation">\n <use xlink:href="#icon-close"/>\n </svg>\n </button>\n <button type="button" name="search" class="btn fra_button_search fra_active" aria-label="search">\n <svg class="icon" role="presentation">\n <use xlink:href="#icon-search"/>\n </svg>\n </button>\n </div>\n\n <!-- Airliness -->\n <div class="fra_js_flights_airline_list fra_filter_content fra_flight_filter_content" tabindex="0">\n <!-- Marionette render\n\n <ul class="airline">\n <li data-id="BVR" class="fra_js_airline hidden"> ACM Air Charter (BVR)</li>\n <li data-id="NH" class="fra_js_airline"> ANA All Nippon Airways (NH)</li>\n <li data-id="JP" class="fra_js_airline hidden"> Adria Airways (JP)</li>\n <li data-id="A3" class="fra_js_airline hidden"> Aegean Airlines (A3)</li>\n <li data-id="EI" class="fra_js_airline fra_active">Aer Lingus (EI)</li>\n ....\n </ul>\n\n // end of render -->\n\n </div>\n </div><!-- //airlines overlay -->\n\n <div class="fra_filter_btn">\n <!-- Airlines button -->\n <button class="btn btn-secondary fra_btn_icon fra_js_airlines_button" type="button">
1204\n <span class="fra_single_line_clamp fra_icon_btn">\n ' + 1205 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.filter.airlines", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 1206 '\n </span>\n <span class="fra_icon hidden-xs">\n <svg class="icon" role="presentation">\n <use xlink:href="#icon-arrow-right"/>\n </svg>\n </span>\n <span class="fra_icon visible-xs">\n <svg class="icon" role="presentation">\n <use xlink:href="#icon-link"/>\n </svg>\n </span>\n </button>\n <!-- Airports button -->\n <button class="btn btn-secondary fra_btn_icon fra_js_airports_button" type="button">\n <span class="fra_single_line_clamp fra_icon_btn">\n ' + 1207 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.filter.airports", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 1208 '\n </span>\n <span class="fra_icon hidden-xs">\n <svg class="icon" role="presentation">\n <use xlink:href="#icon-arrow-right"/>\n </svg>\n </span>\n <span class="fra_icon visible-xs">\n <svg class="icon" role="presentation">\n <use xlink:href="#icon-link"/>\n </svg>\n </span>\n </button>\n </div>\n\n <div class="fra_filter_submit">\n <button type="button" class="btn btn-primary fra_js_filter_submit">
1208\n <span class="fra_single_line_clamp">' + 1209 ((c = (d.i18n || (g && g.i18n) || f).call(g, "app.flight.filter.submit", { name: "i18n", hash: {}, data: e })) != null ? c : "") + 1210 "</span>\n </button>\n </div>\n</div>" 1211 ); 1212 }, 1213 useData: true, 1214 }); 1215 this["JST"]["filterInfo"] = a.template({ 1216 compiler: [6, ">= 2.0.0-beta.1"], 1217 main: function (e, c, b, d) { 1218 return "<p>sie haben bla bla </p>"; 1219 }, 1220 useData: true, 1221 }); 1222 this["JST"]["flightTile"] = a.template({ 1223 compiler: [6, ">= 2.0.0-beta.1"], 1224 main: function (i, e, b, g) { 1225 var c, 1226 d, 1227 h = e.helperMissing, 1228 f = "function"; 1229 return ( 1230 '<div>\r\n <div class="col-xs-6 col-sm-4 col-md-3 fra_tile_frame">\r\n <a href="#">\r\n <div class="fra_tile_background">\r\n <img src="../dummy/img/flughafen_square.png">\r\n <div class="fra_gradient_overlay"></div>\r\n </div>\r\n <div class="fra_tile_text">\r\n <h4 class="fra_headline_4">' + 1231 ((c = (e.airlineName || (i && i.airlineName) || h).call(i, i != null ? i.al : i, { name: "airlineName", hash: {}, data: g })) != null ? c : "") + 1232 " - " + 1233 ((c = ((d = (d = e.al || (i != null ? i.al : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "al", hash: {}, data: g }) : d)) != null ? c : "") + 1234 ((c = ((d = (d = e.fnr || (i != null ? i.fnr : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "fnr", hash: {}, data: g }) : d)) != null ? c : "") + 1235 '</h4>\r\n <p class="fra_headline_9">' + 1236 ((c = (e.airportName || (i && i.airportName) || h).call(i, i != null ? i.iata : i, { name: "airportName", hash: {}, data: g })) != null ? c : "") + 1237 "</p>\r\n <p> " + 1238 ((c = (e.formatTime || (i && i.formatTime) || h).call(i, i != null ? i.std : i, { name: "formatTime", hash: {}, data: g })) != null ? c : "") + 1239 " - " + 1240 ((c = ((d = (d = e.status || (i != null ? i.status : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "status", hash: {}, data: g }) : d)) != null ? c : "") + 1241 "</p>\r\n </div>\r\n </a>\r\n </div>\r\n</div>" 1242 ); 1243 }, 1244 useData: true, 1245 }); 1246 this["JST"]["list"] = a.template({ 1247 "1": function (h, c, f, e, g, i) { 1248 var b, 1249 d, 1250 k = c.helperMissing, 1251 j = "function"; 1252 return ( 1253 '<li class="fra_js_' + 1254 ((b = this.lambda(i[1] != null ? i[1].type : i[1], h)) != null ? b : "") + 1255 " " + 1256 ((b = ((d = (d = c.selectedClass || (h != null ? h.selectedClass : h)) != null ? d : k), typeof d === j ? d.call(h, { name: "selectedClass", hash: {}, data: e }) : d)) != null ? b : "") + 1257 " " + 1258 ((b = c["if"].call(h, h != null ? h.hide : h, { name: "if", hash: {}, fn: this.program(2, e, 0, g, i), inverse: this.noop, data: e })) != null ? b : "") + 1259 '" data-id="' + 1260 ((b = ((d = (d = c.id || (h != null ? h.id : h)) != null ? d : k), typeof d === j ? d.call(h, { name: "id", hash: {}, data: e }) : d)) != null ? b : "") + 1261 '">' + 1262 ((b = ((d = (d = c.name || (h != null ? h.name : h)) != null ? d : k), typeof d === j ? d.call(h, { name: "name", hash: {}, data: e }) : d)) != null ? b : "") + 1263 " (" + 1264 ((b = ((d = (d = c.id || (h != null ? h.id : h)) != null ? d : k), typeof d === j ? d.call(h, { name: "id", hash: {}, data: e }) : d)) != null ? b : "") + 1265 ")</li>" 1266 ); 1267 }, 1268 "2": function (e, c, b, d) { 1269 return "hidden"; 1270 }, 1271 compiler: [6, ">= 2.0.0-beta.1"], 1272 main: function (h, c, f, e, g, i) { 1273 var b, d, j; 1274 b = ((d = (d = c.items || (h != null ? h.items : h)) != null ? d : c.helperMissing), (j = { name: "items", hash: {}, fn: this.program(1, e, 0, g, i), inverse: this.noop, data: e }), typeof d === "function" ? d.call(h, j) : d); 1275 if (!c.items) { 1276 b = c.blockHelperMissing.call(h, b, j); 1277 } 1278 if (b != null) { 1279 return b; 1280 } else { 1281 return ""; 1282 } 1283 }, 1284 useData: true, 1285 useDepths: true, 1286 }); 1287 this["JST"]["pagination"] = a.template({ 1288 "1": function (i, e, b, g) { 1289 var c, 1290 d, 1291 h = e.helperMissing, 1292 f = "function"; 1293 return ( 1294 " <li" + 1295 ((c = e["if"].call(i, i != null ? i.active : i, { name: "if", hash: {}, fn: this.program(2, g, 0), inverse: this.noop, data: g })) != null ? c : "") + 1296 '><a href="#" data-page="' + 1297 ((c = ((d = (d = e.page || (i != null ? i.page : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "page", hash: {}, data: g }) : d)) != null ? c : "") + 1298 '">' + 1299 ((c = ((d = (d = e.page || (i != null ? i.page : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "page", hash: {}, data: g }) : d)) != null ? c : "") + 1300 "</a></li>\r\n" 1301 ); 1302 }, 1303 "2": function (e, c, b, d) { 1304 return ' class="fra_active"'; 1305 }, 1306 compiler: [6, ">
1306= 2.0.0-beta.1"], 1307 main: function (i, g, d, h) { 1308 var e, 1309 f, 1310 c, 1311 b = '<ul class="pagination">\r\n'; 1312 e = ((f = (f = g.items || (i != null ? i.items : i)) != null ? f : g.helperMissing), (c = { name: "items", hash: {}, fn: this.program(1, h, 0), inverse: this.noop, data: h }), typeof f === "function" ? f.call(i, c) : f); 1313 if (!g.items) { 1314 e = g.blockHelperMissing.call(i, e, c); 1315 } 1316 if (e != null) { 1317 b += e; 1318 } 1319 return b + "</ul>"; 1320 }, 1321 useData: true, 1322 }); 1323 this["JST"]["paginationTime"] = a.template({ 1324 "1": function (i, e, b, g) { 1325 var c, 1326 d, 1327 h = e.helperMissing, 1328 f = "function"; 1329 return ( 1330 " <li" + 1331 ((c = e["if"].call(i, i != null ? i.active : i, { name: "if", hash: {}, fn: this.program(2, g, 0), inverse: this.noop, data: g })) != null ? c : "") + 1332 ' role="presentation">\n <a href="#" data-time="' + 1333 ((c = ((d = (d = e.time || (i != null ? i.time : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "time", hash: {}, data: g }) : d)) != null ? c : "") + 1334 '" tabindex="-1" role="menuitem">\n ' + 1335 ((c = ((d = (d = e.formattedHour || (i != null ? i.formattedHour : i)) != null ? d : h), typeof d === f ? d.call(i, { name: "formattedHour", hash: {}, data: g }) : d)) != null ? c : "") + 1336 "<span>:00</span>\n </a>\n </li>\n" 1337 ); 1338 }, 1339 "2": function (e, c, b, d) { 1340 return ' class="fra_active"'; 1341 }, 1342 compiler: [6, ">= 2.0.0-beta.1"], 1343 main: function (h, c, g, f) { 1344 var b, 1345 d, 1346 k, 1347 j = c.helperMissing, 1348 i = "function", 1349 e = 1350 '<div class="dropdown">\n <button aria-expanded="true" data-toggle="dropdown" id="fra_time_pagination" type="button" class="btn btn-default dropdown-toggle fra_btn_icon">\n <span class="fra_single_line_clamp fra_icon_btn fra_js_flight_time">' + 1351 ((b = ((d = (d = c.actualTime || (h != null ? h.actualTime : h)) != null ? d : j), typeof d === i ? d.call(h, { name: "actualTime", hash: {}, data: f }) : d)) != null ? b : "") + 1352 '</span>\n <span class="icon-wrapper">\n <svg role="presentation" class="icon">\n <use xlink:href="#icon-dropdown"></use>\n </svg>\n </span>\n </button>\n <ul aria-labelledby="fra_time_pagination" role="menu" class="dropdown-menu">\n'; 1353 b = ((d = (d = c.items || (h != null ? h.items : h)) != null ? d : j), (k = { name: "items", hash: {}, fn: this.program(1, f, 0), inverse: this.noop, data: f }), typeof d === i ? d.call(h, k) : d); 1354 if (!c.items) { 1355 b = c.blockHelperMissing.call(h, b, k); 1356 } 1357 if (b != null) { 1358 e += b; 1359 } 1360 return e + " </ul>\n</div>"; 1361 }, 1362 useData: true, 1363 }); 1364 return this["JST"]; 1365}); 1366define("flights/views/TimePaginationView", ["require", "jquery", "underscore", "marionette", "moment", "../templates"], function (a) { 1367 var b = a("jquery"), 1368 e = a("underscore"), 1369 d = a("marionette"), 1370 h = a("moment"), 1371 i = a("../templates"), 1372 f, 1373 c, 1374 g; 1375 return d.ItemView.extend({ 1376 template: i.paginationTime, 1377 className: "fra_js_pagination", 1378 parentElementTag: "section", 1379 filterContainer: ".fra_js_flight_filter_form", 1380 openedDropdownClass: "fra_dropdown_open", 1381 ui: { toggleArea: ".dropdown", itemWrapper: ".dropdown-menu", items: ".dropdown-menu a" }, 1382 events: { "click @ui.items": "onClick", "click @ui.toggleArea": "onToggleOpen" }, 1383 itemsPerScreen: 24, 1384 serializeData: function () { 1385 var k = [], 1386 n = this.app.get_Date() + "T00:00:00", 1387 p = this.app.get_Time(), 1388 j = h(p).format("HH"), 1389 q, 1390 m, 1391 l, 1392 o; 1393 for (q = 0; q < this.itemsPerScreen; q++) { 1394 m = h(n).add(q, "hours"); 1395 l = this.app.get_Time(m); 1396 o = m.format("HH"); 1397 k.push({ time: l, formattedHour: o, active: q === parseInt(j, 10) }); 1398 } 1399 return { items: k, actualTime: h(p).format("HH:mm") }; 1400 }, 1401 initialize: function (j) { 1402 this.app = j.app; 1403 this.listenTo(this.app.vent, "state:change:time", this.render); 1404 this.listenTo(this.app.vent, "hour:update", this.render); 1405 }, 1406 onClick: function (k) { 1407 var j = b(k.currentTarget); 1408 k.preventDefault(); 1409 this.app.state.set("page", 1, { silent: true }); 1410 this.app.vent.trigger("reRender:page"); 1411 this.app.state.set("time", j.data("time")); 1412 }, 1413 onToggleOpen: function () { 1414 if (!fra.integrator.isDesktopSize()) { 1415 if (!this.ui.toggleArea.hasClass(fra.config.overlay.openOverlayClass) && !f.hasClass(fra.config.overlay.openOverlayClass)) { 1416 c.addClass(fra.config.overlay.openOverlayClass); 1417 f.addClass(fra.config.overlay.openOverlayClass); 1418 c.addClass(this.openedDropdownClass); 1419 this.outsideClick.bind(); 1420 } 1421 if (this.ui.toggleArea.hasClass("open") && c.hasClass(fra.config.overlay.openOverlayClass)) { 1422 this.onToggleClose(); 1423 } 1424 } 1425 }, 1426 onToggleClose: function () { 1427 f.removeClass(fra.config.overlay.openOverlayClass); 1428 c.removeClass(fra.config.overlay.openOverlayClass); 1429 c.removeClass(this.openedDropdownClass); 1430 }, 1431 onRender: function () { 1432 g = this; 1433 f = b("#" + fra.config.overlay.headerID); 1434 c = this.ui.toggleArea.closest(this.parentElementTag); 1435 this.app.layout.bindUIElements(); 1436 this.outsideClick = fra.utils.outsideHandler( 1437 this.ui.toggleArea, 1438 function (j) { 1439 this.outsideClick.unbind(); 1440 this.onToggleClose(); 1441 }, 1442 { ctx: this, checkPos: true } 1443 ); 1444 }, 1445 }); 1446}); 1447define("flights/views/HeaderSearchView", ["require", "jquery", "marionette"], function (a) { 1448 var b = a("jquery"), 1449 c = a("marionette"); 1450 return c.ItemView.extend({ 1451 el: ".fra_js_flight_search__wrapper", 1452 template: false, 1453 ui: { form: "form", container: ".fra_flight_search_container", input: ".fra_flight_search_input", clear: ".fra_flight_search_clear", button: ".fra_js_flight_search_button", suggestions: ".fra_flight_search_suggestions" }, 1454 events: { "click @ui.input": "onClickInput", "click @ui.clear": "clearInput", "click @ui.button": "onSearchSubmit", "submit @ui.form": "onSearchSubmit", "keyup @ui.input": "onKeyUp" }, 1455 minChars: 3, 1456 suggestionItem: "li", 1457 searchActive: false, 1458 lastValue: "", 1459 initialize: function (d) { 1460 this.app = d.app; 1461 this.$el = d.app.config.$el.find(this.$el.selector); 1462 this.el = this.$el[0]; 1463 this.listenTo(this.app.vent, "filter:reset", function () { 1464 if (!this.app.state.get("search")) { 1465 this.clearField(); 1466 this.ui.button.removeClass("fra_active"); 1467 } else { 1468 this.ui.button.removeClass("fra_active"); 1469 } 1470 }); 1471 this.listenTo(this.app.vent, "filter:reRender", function () { 1472 if (this.app.state.get("search") || this.app.state.get("filter")) { 1473 this.ui.button.addClass("fra_active"); 1474 } else { 1475 this.ui.button.removeClass("fra_active"); 1476 } 1477 }); 1478 this.listenTo(this.app.vent, "filterInfo:render", function () { 1479 if (this.app.state.get("search") || this.app.state.get("filter")) { 1480 this.ui.button.addClass("fra_active"); 1481 } else { 1482 this.ui.button.removeClass("fra_active"); 1483 } 1484 }); 1485 }, 1486 onClickInput: function () { 1487 if (!this.searchActive) { 1488 fra.filterFunc.filterPopup(this.$el); 1489 this.outsideClick.bind(); 1490 this.searchActive = true; 1491 this.onKeyUp(); 1492 } 1493 }, 1494 onRender: function () { 1495 this.outsideClick = fra.utils.outsideHandler(this.ui.container, this._closeSuggestions, { ctx: this, checkPos: true }); 1496 }, 1497 clearField: function () { 1498 this.ui.input.val(""); 1499 this._closeSuggestions(); 1500 }, 1501 onKeyUp: function (f) { 1502 var d = this, 1503 g = d.ui.input.val(); 1504 f = f || { keyCode: -1 }; 1505 if (f.keyCode === 27) { 1506 if (this.ui.input.val() === "") { 1507 this._closeSuggestions(); 1508 return; 1509 } 1510 this.ui.suggestions.find(".fra_flight_search_list_item").filter(".fra_active").removeClass("fra_active"); 1511 } 1512 if (f.keyCode === 38) { 1513 this.moveHighlight("up"); 1514 } 1515 if (f.keyCode === 40) { 1516 this.moveHighlight("down"); 1517 } 1518 if (g.length < this.minChars) { 1519 d.ui.suggestions.empty(); 1520 } else { 1521 this.ui.suggestions.show(); 1522 this._getResults(g); 1523 } 1524 }, 1525 moveHighlight: function (f) { 1526 var g = this.ui.suggestions.find(".fra_flight_search_list_item"), 1527 e = g.filter(".fra_active"), 1528 d = g.index(e); 1529 e.removeClass("fra_active"); 1530 if (f === "down") { 1531 d++; 1532 } 1533 if (f === "up") { 1534 d--; 1535 } 1536 if (d <= -1) { 1537 return; 1538 } 1539 g.eq(d).addClass("fra_active"); 1540 this.highlighted = g.eq(d).text(); 1541 }, 1542 clearInput: function () { 1543 this.ui.input.val(""); 1544 this.ui.input.focus(); 1545 this.onKeyUp(); 1546 }, 1547 onSearchSubmit: function (g) { 1548 var f, 1549 d = this.ui.suggestions.find(".fra_flight_search_list_item").filter(".fra_active"); 1550 g.preventDefault(); 1551 if (d.length > 0) { 1552 d.trigger("click"); 1553 return; 1554 } 1555 f = this.ui.input.val(); 1556 this._resetAllFilters(); 1557 this._closeSuggestions(); 1558 if (f) { 1559 this.app.state.set("search", f); 1560 } else { 1561 this.app.vent.trigger("state:change", this.app.state.attributes, {}); 1562 } 1563 this.app.vent.trigger("filter:reset"); 1564 this.app.vent.trigger("filterInfo:render"); 1565 this.ui.input.val(f); 1566 }, 1567 _suggestionsSearch: function (d, h) { 1568 var f = ""; 1569 var g = this; 1570 var l; 1571 var i = false;
1572 var m = h.data; 1573 var k = new RegExp("(" + d + ")", "gi"); 1574 var j; 1575 var e = []; 1576 _.each(m, function (n) { 1577 if (n.type !== f) { 1578 f = n.type; 1579 l = b("<" + g.suggestionItem + ">") 1580 .addClass("fra_flight_search_list_divider") 1581 .html(fra.i18n.app.flight.search[f]); 1582 e.push(l); 1583 } 1584 j = "" + n.display.replace(k, "<span>$1</span>") + ""; 1585 l = b("<" + g.suggestionItem + ">") 1586 .data("type", n.type) 1587 .data("key", n.key) 1588 .data("display", n.display) 1589 .addClass("fra_flight_search_list_item") 1590 .on("click", b.proxy(g._clickSuggestionItem, g)) 1591 .html(j); 1592 if (n.display === g.highlighted) { 1593 l.addClass("fra_active"); 1594 i = true; 1595 } 1596 e.push(l); 1597 }); 1598 g.ui.suggestions.empty(); 1599 if (e.length > 0) { 1600 g.ui.suggestions.append(e); 1601 } 1602 if (!i) { 1603 delete this.highlighted; 1604 } 1605 }, 1606 _clickSuggestionItem: function (j) { 1607 var h = this; 1608 var f = b(j.currentTarget); 1609 var d = f.data("key"); 1610 var g = f.data("type"); 1611 var i = f.data("display"); 1612 h.ui.input.val(i); 1613 this._resetAllFilters(); 1614 if (g === "Airport") { 1615 this.app.state.set("filter", { airport: [d] }); 1616 this.app.vent.trigger("activate:airport", [d]); 1617 } else { 1618 if (g === "Airline") { 1619 this.app.state.set("filter", { airline: [d] }); 1620 this.app.vent.trigger("activate:airline", [d]); 1621 } else { 1622 this.app.state.set("search", d); 1623 } 1624 } 1625 this.app.vent.trigger("filterInfo:render"); 1626 this._closeSuggestions(); 1627 h.ui.input.val(i); 1628 }, 1629 _closeSuggestions: function () { 1630 this.outsideClick.unbind(); 1631 this.searchActive = false; 1632 this.lastValue = ""; 1633 this.ui.suggestions.empty().hide(); 1634 this.ui.input.blur(); 1635 this.ui.input.val(""); 1636 fra.filterFunc.filterPopup(this.$el, true); 1637 }, 1638 _getResults: function (f) { 1639 var d = this.app.state.get("type") === "departure" ? "departure" : "arrival"; 1640 var e = this; 1641 if (this.lastValue === f) { 1642 return; 1643 } 1644 this.lastValue = f; 1645 b.ajax({ url: this.app.config.source.search[d], data: { lang: this.app.config.lang, q: f }, context: e }).done(function (g) { 1646 this._suggestionsSearch(f, g); 1647 }); 1648 }, 1649 _resetAllFilters: function () { 1650 this.app.state.unset("filter", { silent: true }); 1651 this.app.vent.trigger("filter:reset"); 1652 this.app.state.unset("search", { silent: true }); 1653 this.app.state.set("page", 1, { silent: true }); 1654 this.app.vent.trigger("reRender:page"); 1655 }, 1656 }); 1657}); 1658define("flights/views/FilterAirlines", ["require", "jquery", "marionette", "../templates"], function (a) { 1659 var c = a("jquery"), 1660 d = a("marionette"), 1661 b = a("../templates"); 1662 return d.ItemView.extend({ 1663 template: b.list, 1664 getTemplate22: function () { 1665 return this.type === "departure" ? b.departureTableRow : b.arrivalTableRow; 1666 }, 1667 tagName: "ul", 1668 initialize: function (e) { 1669 this.app = e.app; 1670 this.model = new Backbone.Model({ type: "airline", items: this.app.data.airlines.get("data"), app: e.app }); 1671 this.listenTo(this.app.vent, "airlines:render", this.render); 1672 this.listenTo(this.app.vent, "airlines:reset", this.updateModel); 1673 this.listenTo(this.app.vent, "airlines:updateModel", this.updateModel); 1674 }, 1675 onRender: function () { 1676 this.app.vent.trigger("setup:filter:search", "airline"); 1677 }, 1678 updateModel: function () { 1679 var e = this.app; 1680 this.model = new Backbone.Model({ type: "airline", items: this.app.data.airlines.get("data"), app: e }); 1681 this.render(); 1682 }, 1683 }); 1684}); 1685define("flights/views/FilterAirports", ["require", "jquery", "marionette", "../templates"], function (a) { 1686 var c = a("jquery"), 1687 d = a("marionette"), 1688 b = a("../templates"); 1689 return d.ItemView.extend({ 1690 template: b.list, 1691 tagName: "ul", 1692 initialize: function (e) { 1693 this.app = e.app; 1694 this.model = new Backbone.Model({ type: "airport", items: this.app.data.airports.get("data"), app: e.app }); 1695 this.listenTo(this.app.vent, "airports:render", this.render); 1696 this.listenTo(this.app.vent, "airports:reset", this.updateModel); 1697 }, 1698 onRender: function () { 1699 this.app.vent.trigger("setup:filter:search", "airport"); 1700 }, 1701 updateModel: function () { 1702 var e = this.app; 1703 this.model = new Backbone.Model({ type: "airport", items: this.app.data.airports.get("data"), app: e }); 1704 this.render(); 1705 }, 1706 }); 1707}); 1708define("flights/views/FilterFormView", ["require", "jquery", "../../abstracts/AbstractLayout", "./FilterAirlines", "./FilterAirports", "../templates"], function (b) { 1709 var e = b("jquery"), 1710 d = b("../../abstracts/AbstractLayout"), 1711 g = b("./FilterAirlines"), 1712 f = b("./FilterAirports"), 1713 c = b("../templates"), 1714 a = { filterOverlay: "fra_filter_overlay", filterAirportOverlay: "fra_js_airports_overlay", airlineOverlay: "fra_overlay_active" }; 1715 return d.extend({ 1716 template: c.filterForm, 1717 className: "fra_filter__container", 1718 dragging: false, 1719 regions: { airlines: ".fra_js_flights_airline_list", airports: ".fra_js_flights_airports_list" }, 1720 views: { airlines: g, airports: f }, 1721 ui: { 1722 filterForm: "#type", 1723 sort: "input[name='sort-order']", 1724 submit: ".fra_js_filter_submit", 1725 close: ".fra_filter_close", 1726 filterSlider: ".fra_filter_inner__slider", 1727 airlineOpener: ".fra_js_airlines_button", 1728 airlineOverlay: ".fra_js_airlines_overlay", 1729 airlineItems: ".fra_js_airline", 1730 airlineInput: ".fra_js_airline_search", 1731 airportOpener: ".fra_js_airports_button", 1732 airportOverlay: ".fra_js_airports_overlay", 1733 airportItems: ".fra_js_airport", 1734 airportInput: ".fra_js_airport_search", 1735 clearButton: ".fra_button_close", 1736 searchButton: ".fra_button_search", 1737 }, 1738 events: function () { 1739 return fra.integrator.isTouchDevice() && this.dragging 1740 ? { 1741 "touchend @ui.submit": "onSubmit", 1742 "touchend @ui.airlineItems": "toggleActive", 1743 "touchend @ui.airportItems": "toggleActive", 1744 "touchend @ui.close": function () { 1745 this.trigger("filter:close"); 1746 this.app.vent.trigger("filter:close"); 1747 }, 1748 "touchend @ui.airlineOpener": "airlineOpen", 1749 "touchend @ui.airportOpener": "airportOpen", 1750 } 1751 : { 1752 "click @ui.submit": "onSubmit", 1753 "click @ui.airlineItems": "toggleActive", 1754 "click @ui.airportItems": "toggleActive", 1755 "click @ui.close": function () { 1756 this.trigger("filter:close"); 1757 this.app.vent.trigger("filter:close"); 1758 }, 1759 "click @ui.airlineOpener": "airlineOpen", 1760 "click @ui.airportOpener": "airportOpen", 1761 "click @ui.clearButton": "clearInput", 1762 }; 1763 }, 1764 onBeforeInitialize: function (h) { 1765 this.app = h.app; 1766 }, 1767 _initialize: function (h) { 1768 this.model = new Backbone.Model(this.opt); 1769 this.listenTo(this.app.vent, "filter:reset", this.filterReset); 1770 this.listenTo(this.app.vent, "setup:filter:search", this.bindFilterSearch); 1771 this.listenTo(this.app.vent, "filter:close", this.clearInput); 1772 this.listenTo(this.app.vent, "filter:reRender", this.render); 1773 }, 1774 toggleActive: function (h) { 1775 h.preventDefault(); 1776 e(h.currentTarget).toggleClass(this.app.config.stateClass.active); 1777 }, 1778 onSubmit: function (i) { 1779 var h = {}; 1780 i.preventDefault();
1781 h = this.getSelectedFilter(); 1782 this.trigger("filter:submit", h); 1783 this.app.vent.trigger("filterInfo:render"); 1784 }, 1785 airlineOpen: function () { 1786 var h = this.getSelectedFilter(); 1787 delete h.airline; 1788 this.app.data.airlines.filter(h); 1789 this.ui.filterSlider.addClass(a.airlineOverlay); 1790 this.clearInput("airline"); 1791 this.airportApply(); 1792 }, 1793 airportOpen: function () { 1794 var h = this.getSelectedFilter(); 1795 delete h.airport; 1796 this.app.data.airports.filter(h); 1797 this.ui.filterSlider.removeClass(a.airlineOverlay); 1798 this.clearInput("airport"); 1799 this.airlineApply(); 1800 }, 1801 airlineApply: function () { 1802 var h = this.getSelectedFilter().airline; 1803 this.app.data.airlines.applySelection(h); 1804 }, 1805 airportApply: function () { 1806 var h = this.getSelectedFilter().airport; 1807 this.app.data.airports.applySelection(h); 1808 }, 1809 bindFilterSearch: function (i) { 1810 var j = this.$el.find(".fra_js_" + i + "_search"), 1811 h = this; 1812 this.bindUIElements(); 1813 j.on("keyup", function (k) { 1814 h.inputHandler(i, k); 1815 }); 1816 }, 1817 inputHandler: function (i, j) { 1818 var h = this.$el.find(".fra_js_" + i + "_search"), 1819 k; 1820 j = j || { keyCode: -1 }; 1821 if (j.keyCode === 27) { 1822 h.val(""); 1823 } 1824 if (h.val() !== "") { 1825 this.ui.clearButton.addClass("fra_active"); 1826 this.ui.searchButton.removeClass("fra_active"); 1827 } else { 1828 this.ui.clearButton.removeClass("fra_active"); 1829 this.ui.searchButton.addClass("fra_active"); 1830 } 1831 k = fra.utils.stringReplaceAll(h.val(), " ", ""); 1832 k = fra.utils.stringReplaceAll(k, "-", ""); 1833 k = k.toLowerCase(); 1834 this.ui[i + "Items"].each(function () { 1835 var m = e(this), 1836 l, 1837 n; 1838 l = fra.utils.stringReplaceAll(m.text(), " ", ""); 1839 l = fra.utils.stringReplaceAll(l, "-", ""); 1840 l = l.toLowerCase(); 1841 n = l.indexOf(k); 1842 if (n === -1) { 1843 m.addClass("fra_hidden"); 1844 } else { 1845 m.removeClass("fra_hidden"); 1846 } 1847 }); 1848 }, 1849 clearInput: function (h) { 1850 if (h && typeof h !== "string") { 1851 if ( 1852 e(h.target) 1853 .closest("." + a.filterOverlay) 1854 .hasClass(a.filterAirportOverlay) 1855 ) { 1856 h = "airport"; 1857 } else { 1858 h = "airline"; 1859 } 1860 } 1861 if (!h) { 1862 this.ui.airportInput.val(""); 1863 this.ui.airlineInput.val(""); 1864 this.inputHandler("airport"); 1865 this.inputHandler("airline"); 1866 } else { 1867 this.ui[h + "Input"].val(""); 1868 this.inputHandler(h); 1869 } 1870 }, 1871 onRender: function () { 1872 var i, 1873 j, 1874 h = e("body"); 1875 this.set({ airlines: "airlines", airports: "airports" }, { unset: false }); 1876 this.bindUIElements(); 1877 i = this.app.state.get("filter"); 1878 if (i) { 1879 this.preFilter = i; 1880 } 1881 if (this.app.state.get("filter")) { 1882 j = false; 1883 if (this.app.state.get("filter").airline) { 1884 j = true; 1885 this.app.data.airlines.applySelection(this.app.state.get("filter").airline); 1886 this.app.vent.trigger("airlines:render"); 1887 } 1888 if (this.app.state.get("filter").airport) { 1889 j = true; 1890 this.app.data.airports.applySelection(this.app.state.get("filter").airport); 1891 this.app.vent.trigger("airports:render"); 1892 } 1893 if (j) { 1894 this.app.vent.trigger("filterInfo:render"); 1895 } 1896 } 1897 if (fra.integrator.isTouchDevice()) { 1898 h.on("touchmove", function () { 1899 this.dragging = true; 1900 }); 1901 h.on("touchstart", function () { 1902 this.dragging = false; 1903 }); 1904 } 1905 }, 1906 getSelectedFilter: function () { 1907 var h = {}, 1908 i; 1909 this.bindUIElements(); 1910 this.ui.airlineItems.filter("." + this.app.config.stateClass.active).each(function () { 1911 var j = e(this); 1912 var k = j.data("id"); 1913 if (!h.airline) { 1914 h.airline = []; 1915 } 1916 h.airline.push(k); 1917 }); 1918 this.ui.airportItems.filter("." + this.app.config.stateClass.active).each(function () { 1919 var j = e(this); 1920 var k = j.data("id"); 1921 if (!h.airport) { 1922 h.airport = []; 1923 } 1924 h.airport.push(k); 1925 }); 1926 i = this.ui.sort.filter(":checked"); 1927 if (i.length > 0) { 1928 h.sort = i.val(); 1929 } 1930 return h; 1931 }, 1932 filterReset: function () { 1933 this.app.vent.trigger("airlines:reset"); 1934 this.app.vent.trigger("airports:reset"); 1935 this.ui.filterSlider.removeClass(a.airlineOverlay); 1936 }, 1937 }); 1938}); 1939define("flights/views/HeaderFilterView", ["require", "jquery", "marionette", "./FilterFormView"], function (a) { 1940 var c = a("jquery"), 1941 d = a("marionette"), 1942 b = a("./FilterFormView"); 1943 return d.ItemView.extend({ 1944 el: ".fra_js_filter_popup__wrapper", 1945 template: false, 1946 ui: { container: ".fra_filter_popup__wrapper", opener: ".fra_js_flight_filter_btn" }, 1947 events: function () { 1948 return fra.integrator.isTouchDevice() ? { "touchstart @ui.opener": "openFilter" } : { "click @ui.opener": "openFilter" }; 1949 }, 1950 initialize: function (e) { 1951 this.app = e.app; 1952 this.$el = e.app.config.$el.find(this.$el.selector); 1953 this.el = this.$el[0]; 1954 }, 1955 filterView: null, 1956 openFilter: function (f) { 1957 f.preventDefault(); 1958 this.app.vent.trigger("filter:open"); 1959 if (!this.filterView) { 1960 this.filterView = new b({ app: this.app }); 1961 this.filterView.render(); 1962 this.listenTo(this.filterView, "filter:submit", this.onFilterSubmit); 1963 this.listenTo(this.filterView, "filter:close", this.closeFilter); 1964 this.listenTo(this.app.vent, "filter:close", this.closeFilter); 1965 this.ui.container.append(this.filterView.el); 1966 } 1967 fra.filterFunc.filterPopup(this.$el); 1968 }, 1969 closeFilter: function () { 1970 fra.filterFunc.filterPopup(this.$el, true); 1971 }, 1972 onFilterSubmit: function (e) { 1973 this.closeFilter(); 1974 if (c.isEmptyObject(e)) { 1975 this.app.state.unset("filter"); 1976 } else { 1977 this.app.state.set("filter", e); 1978 } 1979 }, 1980 }); 1981}); 1982define("flights/views/HeaderLayout", ["require", "jquery", "../../abstracts/AbstractLayout", "./FlightTypeView", "./TimePaginationView", "./HeaderSearchView", "./HeaderFilterView"], function (d) { 1983 var g = d("jquery"), 1984 f = d("../../abstracts/AbstractLayout"), 1985 c = d("./FlightTypeView"), 1986 b = d("./TimePaginationView"), 1987 a = d("./HeaderSearchView"), 1988 e = d("./HeaderFilterView"); 1989 return f.extend({ 1990 el: ".fra_js_flight_filter_form", 1991 template: false, 1992 regions: { type: ".fra_js_flight_type", timePagination: ".fra_js_time_pagination", search: ".fra_js_flight_search", filter: ".fra_js_flight_filter" }, 1993 views: { type: c, timePagination: b, search: a, filter: e }, 1994 onBeforeInitialize: function (h) { 1995 this.app = h.app;
1996 this.$el = h.app.config.$el.find(this.$el.selector); 1997 this.el = this.$el[0]; 1998 }, 1999 onBeforeShow: function () { 2000 this.set({ type: "type", timePagination: "timePagination", search: "search", filter: "filter" }, { unset: false }); 2001 }, 2002 }); 2003}); 2004define("abstracts/mixinViewCollectionState", ["require", "jquery"], function (a) { 2005 var b = a("jquery"); 2006 return { 2007 defaultStateClass: { loading: "loading", error: "error" }, 2008 collectionEvents: { request: "collectionLoading", retry: "collectionRetry", sync: "collectionLoaded", error: "collectionError" }, 2009 initialize: function () { 2010 if (!this.stateClass) { 2011 this.stateClass = this.defaultStateClass; 2012 } 2013 if (!this.stateEl) { 2014 this.stateEl = this.$el; 2015 } 2016 }, 2017 collectionLoading: function () { 2018 if (!this.isRendered) { 2019 return; 2020 } 2021 this.stateEl.addClass(this.stateClass.loading); 2022 }, 2023 collectionRetry: function () {}, 2024 collectionLoaded: function () { 2025 if (!this.isRendered) { 2026 return; 2027 } 2028 this.stateEl.removeClass(this.stateClass.loading); 2029 }, 2030 collectionError: function () { 2031 b.log("collectionError", arguments); 2032 if (!this.isRendered) { 2033 return; 2034 } 2035 this.stateEl.addClass(this.stateClass.error); 2036 }, 2037 }; 2038}); 2039define("flights/views/FlightTableRowView", ["require", "marionette", "jquery", "../templates"], function (a) { 2040 var d = a("marionette"), 2041 c = a("jquery"), 2042 b = a("../templates"); 2043 return d.ItemView.extend({ 2044 getTemplate: function () { 2045 return this.type === "departure" ? b.departureTableRow : b.arrivalTableRow; 2046 }, 2047 tagName: "ul", 2048 className: "fra_table_row", 2049 ui: { detailPageLink: ".fra_row_link a" }, 2050 events: { click: "rowClicked" }, 2051 opt: { rowLinkClass: "fra_row_inner_link" }, 2052 rowClicked: function (f) { 2053 if (c(f.target).hasClass(this.opt.rowLinkClass) || c(f.target).closest("li").hasClass(this.opt.rowLinkClass)) { 2054 return; 2055 } else { 2056 f.stopPropagation(); 2057 this.ui.detailPageLink[0].click(); 2058 } 2059 }, 2060 serializeData22: function () { 2061 var e = this.serializeModel(this.model); 2062 e.scheduledTime = this._formatTime(e.scheduled); 2063 if (e.estimated) { 2064 e.estimatedTime = this._formatTime(e.estimated); 2065 } 2066 return e; 2067 }, 2068 _formatTime: function (e) { 2069 var g; 2070 var f = e.getMinutes(); 2071 g = f.toString(); 2072 if (f < 10) { 2073 g = "0" + g; 2074 } 2075 f = e.getHours(); 2076 g = f.toString() + ":" + g; 2077 if (f < 10) { 2078 g = "0" + g; 2079 } 2080 return g; 2081 }, 2082 initialize: function (e) { 2083 this.app = e.app; 2084 this.type = e.type; 2085 }, 2086 }); 2087}); 2088define("flights/views/FlightTableView", ["require", "marionette", "../../abstracts/utils", "../../abstracts/mixinViewCollectionState", "./FlightTableRowView", "../templates"], function (b) { 2089 var f = b("marionette"), 2090 d = b("../../abstracts/utils"), 2091 e = b("../../abstracts/mixinViewCollectionState"), 2092 a = b("./FlightTableRowView"), 2093 c = b("../templates"); 2094 return f.CompositeView.extend( 2095 d.mixin({ 2096 getTemplate: function () { 2097 this.tableType = this.collection.type; 2098 return this.collection.type === "departure" ? c.departureTable : c.arrivalTable; 2099 }, 2100 className: "fra_table_responsive", 2101 childView: a, 2102 childViewOptions: function (h, g) { 2103 return { type: this.collection.type, index: g }; 2104 }, 2105 mixin: [e], 2106 tableType: undefined, 2107 initialize: function (g) { 2108 this.app = g.app; 2109 this.stopListening(this.collection, "reset", this._renderChildren); 2110 this.listenTo(this.collection, "reset", this._renderTable); 2111 }, 2112 _renderTable: function () { 2113 if (this.isRendered || this._isRendering) { 2114 if (this.tableType !== this.collection.type) { 2115 this.render(); 2116 } else { 2117 this._renderChildren(); 2118 } 2119 } 2120 }, 2121 }) 2122 ); 2123}); 2124define("flights/views/FlightCompositeView", ["require", "jquery", "underscore", "moment", "../templates", "../../abstracts/view/AbstractCompositeView", "./FlightTableRowView"], function (d) { 2125 var f = d("jquery"), 2126 c = d("underscore"), 2127 g = d("moment"), 2128 e = d("../templates"), 2129 b = d("../../abstracts/view/AbstractCompositeView"), 2130 a = d("./FlightTableRowView"); 2131 return b.extend({ 2132 _App: null, 2133 _events: { "view:switch:child": "_switchView" }, 2134 _childViews: { list: a }, 2135 _templates: { list: e.departureTable }, 2136 _childTemplates: {}, 2137 _className: { list: "fra_table_flights" }, 2138 _ui: { masonryContainer: ".fra_js_masonry_container", btn: ".fra_table_thead" }, 2139 childViewOptions: {}, 2140 additionalTemplates: { dateSeparator: '<div class="fra_table_row fra_table_text fra_js_date_separator"><div class="fra_table_td"><span>{{day}}, </span>{{date}}</div></div>' }, 2141 _initialize: function (h) { 2142 this._App = h.app; 2143 this.childViewOptions.type = this.app.config.type; 2144 this.templates.list = this.app.config.type === "departure" ? e.departureTable : e.arrivalTable; 2145 this.collection = this.app.data.flights; 2146 this.listenTo(this.app.vent, "init:type", this.updateType); 2147 this.listenTo(this.app.vent, "state:change:type", this.updateType); 2148 this.listenTo(this.app.vent, "update:dateSeparator", this.addDateIfNeeded); 2149 }, 2150 _onRenderCollection: function () { 2151 this.addDateIfNeeded(); 2152 }, 2153 updateType: function (h) { 2154 this.templates.list = h === "departure" ? e.departureTable : e.arrivalTable; 2155 this.childViewOptions.type = h; 2156 this.render(); 2157 }, 2158 addDateIfNeeded: function () { 2159 var n = 0; 2160 var o = new fra.utils.miniTemplating(this.additionalTemplates.dateSeparator).compiled; 2161 var h = this._getChildrenSorted(); 2162 2163 this.$el.find(".fra_js_date_separator").remove(); 2164 2165 for (var j = 0; j < h.length; j++) { 2166 var m = h[j]; 2167 var k = m.model.get("sched"); 2168 var q = g(k); 2169 2170 var l = q.date(); 2171 if (l !== n) {
2172 fra.config.datePicker.todayFormat = "LL"; 2173 var i = { 2174 day: my_weekname[q.day()], 2175 date: q.format(fra.config.datePicker.todayFormat), 2176 }; 2177 2178 i["date"] = i["date"].replace("January", my_monthname[0]); 2179 i["date"] = i["date"].replace("February", my_monthname[1]); 2180 i["date"] = i["date"].replace("March", my_monthname[2]); 2181 i["date"] = i["date"].replace("April", my_monthname[3]); 2182 i["date"] = i["date"].replace("May", my_monthname[4]); 2183 i["date"] = i["date"].replace("June", my_monthname[5]); 2184 i["date"] = i["date"].replace("July", my_monthname[6]); 2185 i["date"] = i["date"].replace("August", my_monthname[7]); 2186 i["date"] = i["date"].replace("September", my_monthname[8]); 2187 i["date"] = i["date"].replace("October", my_monthname[9]); 2188 i["date"] = i["date"].replace("November", my_monthname[10]); 2189 i["date"] = i["date"].replace("December", my_monthname[11]); 2190 2191 var p = o(i); 2192 m.$el.before(p); 2193 m.$el.addClass("fra_table_row__border"); 2194 n = l; 2195 } 2196 } 2197 }, 2198 _getChildrenSorted: function () { 2199 var j = c.values(this.children._indexByModel); 2200 j.sort(function (l, n) { 2201 var m = parseInt(l.replace(/[^0-9]/g, "")); 2202 var k = parseInt(n.replace(/[^0-9]/g, "")); 2203 if (m < k) { 2204 return -1; 2205 } 2206 if (m > k) { 2207 return 1; 2208 } 2209 return 0; 2210 }); 2211 var i = []; 2212 for (var h = 0; h < j.length; h++) { 2213 i.push(this.children.findByCid(j[h])); 2214 } 2215 return i; 2216 }, 2217 }); 2218}); 2219define("flights/views/PaginationView", ["require", "jquery", "underscore", "marionette", "../templates"], function (b) { 2220 var d = b("jquery"), 2221 a = b("underscore"), 2222 e = b("marionette"), 2223 c = b("../templates"); 2224 return e.ItemView.extend({ 2225 template: c.pagination, 2226 className: "fra_js_pagination", 2227 ui: { items: ".pagination a" }, 2228 events: { "click @ui.items": "onClick" }, 2229 serializeData: function () { 2230 var h = [], 2231 f, 2232 g, 2233 j = this.app.info.pages; 2234 var i = this.app.state.get("page"); 2235 if (i - 3 > 0) { 2236 f = i - 3; 2237 } else { 2238 f = 1; 2239 g = j >= 7 ? 7 : j; 2240 } 2241 if (!g) { 2242 if (i + 3 <= j) { 2243 g = i + 3; 2244 } else { 2245 f = j < 7 ? 1 : j - 6; 2246 g = j; 2247 } 2248 } 2249 for (; f <= g; f++) { 2250 h.push({ page: f, active: f === i }); 2251 } 2252 return { items: h }; 2253 }, 2254 initialize: function (f) { 2255 this.app = f.app; 2256 this.listenTo(this.app.vent, "state:change:page", this.render); 2257 this.listenTo(this.app.vent, "reRender:page", this.render); 2258 }, 2259 onClick: function (g) { 2260 var f = d(g.currentTarget); 2261 g.preventDefault(); 2262 this.app.state.set("page", f.data("page")); 2263 }, 2264 onRender: function () { 2265 this.updateNextPrevButton(); 2266 }, 2267 updateNextPrevButton: function () { 2268 var f = this.app.state.get("page"); 2269 this.app.layout.ui.pagePrev.data("page", f - 1); 2270 this.app.layout.ui.pageNext.data("page", f + 1); 2271 if (f <= 1) { 2272 this.app.layout.ui.pagePrev.addClass("hidden"); 2273 } else { 2274 this.app.layout.ui.pagePrev.removeClass("hidden"); 2275 } 2276 if (f >= this.app.info.pages) { 2277 this.app.layout.ui.pageNext.addClass("hidden"); 2278 } else { 2279 this.app.layout.ui.pageNext.removeClass("hidden"); 2280 } 2281 this.app.layout.ui.pagePrev.off(fra.integrator.isTouchDevice() ? "touchstart" : "click"); 2282 this.app.layout.ui.pageNext.off(fra.integrator.isTouchDevice() ? "touchstart" : "click"); 2283 this.app.layout.ui.pagePrev.on(fra.integrator.isTouchDevice() ? "touchstart" : "click", a.bind(this.onClick, this)); 2284 this.app.layout.ui.pageNext.on(fra.integrator.isTouchDevice() ? "touchstart" : "click", a.bind(this.onClick, this)); 2285 }, 2286 }); 2287}); 2288define("flights/views/FilterInfo", ["require", "jquery", "marionette"], function (a) { 2289 var b = a("jquery"), 2290 c = a("marionette"); 2291 return c.ItemView.extend({ 2292 template: new fra.utils.miniTemplating(fra.i18n.app.flight.filterInfo).compiled, 2293 tagName: "div", 2294 initialize: function (d) { 2295 this.app = d.app; 2296 this.model = new Backbone.Model({}); 2297 this.listenTo(this.app.vent, "filter:reset", this.render); 2298 this.listenTo(this.app.vent, "filterInfo:render", this.render); 2299 }, 2300 onBeforeRender: function () { 2301 this._updateModel(); 2302 }, 2303 onRender: function () { 2304 if (this.model.get("search") || this.model.get("region") || this.model.get("airline") || this.model.get("airport")) { 2305 this.app.layout.ui.filterInfoContainer.show(); 2306 this.app.layout.ui.filterInfoContainer.addClass("fra_active"); 2307 if (this.app.state.get("filter")) { 2308 this.app.layout.ui.flightFilterBtn.addClass("fra_active"); 2309 } else { 2310 this.app.layout.ui.flightFilterBtn.removeClass("fra_active"); 2311 } 2312 } else { 2313 this.app.layout.ui.filterInfoContainer.hide(); 2314 this.app.layout.ui.filterInfoContainer.removeClass("fra_active"); 2315 this.app.layout.ui.flightFilterBtn.removeClass("fra_active"); 2316 } 2317 }, 2318 _updateModel: function () { 2319 var d, j, k, g, l, m, f; 2320 this.model.set("type", fra.i18n.app.flight[this.app.state.get("type")]); 2321 this.model.set("hour", this.app.get_Hour()); 2322 this.model.set("search", this.app.state.get("search")); 2323 if (this.app.state.get("filter")) { 2324 if (this.app.state.get("filter").region) { 2325 l = []; 2326 for (f in this.app.state.get("filter").region) { 2327 if (this.app.state.get("filter").region.hasOwnProperty(f)) { 2328 l.push(this._getRegionNameByCode(this.app.state.get("filter").region[f])); 2329 } 2330 } 2331 m = l.join(", "); 2332 this.model.set("region", m); 2333 } else { 2334 this.model.unset("region"); 2335 } 2336 if (this.app.state.get("filter").airport) { 2337 k = []; 2338 for (f in this.app.state.get("filter").airport) { 2339 if (this.app.state.get("filter").airport.hasOwnProperty(f)) { 2340 var e = this.app.state.get("filter").airport[f]; 2341 k.push(this.app.data.airports.getById(e).name); 2342 } 2343 } 2344 g = k.join(", "); 2345 this.model.set("airport", g); 2346 } else { 2347 this.model.unset("airport"); 2348 } 2349 if (this.app.state.get("filter").airline) { 2350 d = []; 2351 for (f in this.app.state.get("filter").airline) { 2352 if (this.app.state.get("filter").airline.hasOwnProperty(f)) { 2353 var h = this.app.state.get("filter").airline[f]; 2354 d.push(this.app.data.airlines.getByCode(h).name); 2355 } 2356 } 2357 j = d.join(", "); 2358 this.model.set("airline", j); 2359 } else { 2360 this.model.unset("airline"); 2361 } 2362 } else { 2363 this.model.unset("region"); 2364 this.model.unset("airport"); 2365 this.model.unset("airline"); 2366 } 2367 if (this.model.get("search")) { 2368 if (this.model.get("region") || this.model.get("airline") || this.model.get("airport")) { 2369 this.model.set("search", this.model.get("search") + ", "); 2370 } 2371 } 2372 if (this.model.get("region")) { 2373 if (this.model.get("airline") || this.model.get("airport")) { 2374 this.model.set("region", this.model.get("region") + ", "); 2375 } 2376 } 2377 if (this.model.get("airline")) { 2378 if (this.model.get("airport")) { 2379 this.model.set("airline", this.model.get("airline") + ", "); 2380 } 2381 } 2382 if (this.model.get("search")) { 2383 this.model.set("filter", fra.i18n.app.flight.search.search); 2384 } else { 2385 this.model.set("filter", fra.i18n.app.flight.filter.filter); 2386 } 2387 }, 2388 _getRegionNameByCode: function (e) { 2389 var f = fra.i18n.app.flight.filter; 2390 for (var d in f) { 2391 if (f.hasOwnProperty(d)) { 2392 if (f[d].hasOwnProperty("code")) { 2393 if (f[d].code === e) { 2394 return f[d].name; 2395 } 2396 } 2397 } 2398 } 2399 return false;
2400 }, 2401 }); 2402}); 2403define("flights/views/RootLayout", ["require", "jquery", "../../abstracts/AbstractLayout", "./HeaderLayout", "./FlightTableView", "./FlightCompositeView", "./PaginationView", "./FilterInfo", "../../abstracts/view/ViewToggle"], function ( 2404 b 2405) { 2406 var e = b("jquery"), 2407 c = b("../../abstracts/AbstractLayout"), 2408 g = b("./HeaderLayout"), 2409 d = b("./FlightTableView"), 2410 a = b("./FlightCompositeView"), 2411 h = b("./PaginationView"), 2412 f = b("./FilterInfo"), 2413 i = b("../../abstracts/view/ViewToggle"); 2414 return c.extend({ 2415 el: ".fra_js_app_flight", 2416 regions: { filter: ".fra_js_flight_filter__container", table: ".fra_js_flight_table__container", viewToggle: ".fra_js_toggle", pagination: ".fra_js_page_pagination", filterInfo: ".fra_filter_info__text" }, 2417 views: { flightFilter: g, flightTable: { view: d }, flightComposite: a, viewToggle: { view: i, options: { App: null, createInstance: true } }, pagination: h, filterInfo: f }, 2418 ui: { 2419 calendar: ".fra_flight_calendar", 2420 calenderIniter: ".fra_date_picker", 2421 timeNext: ".fra_js_time_next", 2422 timePrev: ".fra_js_time_prev", 2423 pageNext: ".fra_js_page_next", 2424 pagePrev: ".fra_js_page_prev", 2425 overViewButton: ".fra_js_flight_load_overView", 2426 flightFilterBtn: ".fra_js_flight_filter_btn", 2427 filterInfoContainer: ".fra_filter_info__container", 2428 filterReset: ".fra_js_filter_reset", 2429 viewToggleWrapper: ".fra_container__right", 2430 calendarContainer: ".fra_date_filter .fra_filter_popup__wrapper", 2431 calenderIcon: ".fra_js_filter_popup", 2432 calenderSubmit: ".fra_date_filter .fra_filter_submit", 2433 calenderDate: ".fra_date_filter .fra_selected_day", 2434 paginationWrapper: ".fra_pagination_wrapper", 2435 itemsOuterContainer: ".fra_js_flight_items_outer_container", 2436 loups: ".fra_js_flight_luops", 2437 errorContainer: ".fra_request_error__container", 2438 }, 2439 events: { 2440 "click @ui.filterReset": function () { 2441 this.app.state.unset("filter"); 2442 this.app.state.unset("search"); 2443 this.app.vent.trigger("filter:reset"); 2444 }, 2445 }, 2446 onBeforeInitialize: function (j) { 2447 this.app = j.app; 2448 this.views.flightTable.options = { collection: j.app.data.flights }; 2449 }, 2450 }); 2451}); 2452define("flights/app", [ 2453 "require", 2454 "exports", 2455 "module", 2456 "jquery", 2457 "../abstracts/AbstractApplication", 2458 "./actions", 2459 "./utils", 2460 "./models/FlightCollection", 2461 "./models/Airports", 2462 "./models/Airlines", 2463 "./views/RootLayout", 2464 "../abstracts/StateRouter", 2465], function (d, f, b) { 2466 var g = d("jquery"), 2467 i = d("../abstracts/AbstractApplication"), 2468 a = d("./actions"), 2469 j = d("./utils"), 2470 k = d("./models/FlightCollection"), 2471 l = d("./models/Airports"), 2472 c = d("./models/Airlines"), 2473 h = d("./views/RootLayout"), 2474 m = d("../abstracts/StateRouter"); 2475 var e = i.extend({ 2476 setup: { 2477 appName: "Flights", 2478 appVentPrefix: "flights", 2479 layout: h, 2480 actions: [a, j], 2481 data: { airlines: c, airports: l, flights: k }, 2482 setting: { timeBarUpdating: false }, 2483 info: { tz: "" }, 2484 afterInitialize: function () {}, 2485 _onStart: function (n) { 2486 var p = this, 2487 o; 2488 if (!fra.config.frontEnd) { 2489 this.config.source.search = { departure: this.config.source.departure + "/search", arrival: this.config.source.arrival + "/search" }; 2490 this.config.source.departure = this.config.source.departure + "/filter"; 2491 this.config.source.arrival = this.config.source.arrival + "/filter"; 2492 } else { 2493 this.config.source.search.departure = this.config.source.search.departuretest; 2494 this.config.source.search.arrival = this.config.source.search.arrivaltest; 2495 } 2496 this.appVentPrefix = this.config.module.name || this.appVentPrefix; 2497 this.state = m.create(this.appVentPrefix, { 2498 type: { dataType: "string", defaults: this.config.type, validate: /(departure|arrival)/i }, 2499 time: "string", 2500 search: "string", 2501 filter: "object", 2502 page: { dataType: "number", defaults: 1 }, 2503 }); 2504 this.state.connectWith(this.vent); 2505 this.state.check(); 2506 this.state.on("change", function (q) { 2507 p.stateAttributes = fra.utils.deepClone(p.state.attributes); 2508 }); 2509 o = this.state.get("type"); 2510 if (o !== this.config.type) { 2511 p.vent.trigger("init:type", o); 2512 } 2513 this.layout.bindUIElements();
2514 this.layout.ui.calenderSubmit.on("click", function () { 2515 var q = p.layout.ui.calendarContainer.find('input[name="fra_selected_day"]'); 2516 p.layout.ui.calendar.val(q.val()); 2517 p.vent.trigger("calendar:change", p.layout.ui.calendar); 2518 }); 2519 this.vent.on("filter:open", function () { 2520 p.layout.ui.calendarContainer.removeClass("fra_active"); 2521 }); 2522 this.vent.on("all", function (q, r) { 2523 g.log("~Flights DEBUG: Event Caught: " + q, " param: ", r); 2524 }); 2525 }, 2526 }, 2527 }); 2528 return e; 2529}); 2530(function () { 2531 if (typeof fra_jquery === "function") { 2532 define("jquery", function () { 2533 return fra_jquery; 2534 }); 2535 } 2536 if (typeof Handlebars === "object") { 2537 define("handlebars", function () { 2538 return Handlebars; 2539 }); 2540 } 2541 if (typeof moment === "function") { 2542 define("moment", function () { 2543 return moment; 2544 }); 2545 } 2546 if (fra.config.requirejsConfig) { 2547 requirejs.config(fra.config.requirejsConfig); 2548 } 2549})(); 2550define("flights/main", ["require", "./app", "jquery"], function (c) { 2551 var d = c("./app"), 2552 e = c("jquery"), 2553 a = e(".fra_js_app_flight"), 2554 b, 2555 f; 2556 a.each(function () { 2557 b = e(this).data("moduleName"); 2558 f = new d({ appName: b }); 2559 f.start({ $el: e(this), app: f }); 2560 f.run(); 2561 }); 2562}); 2563require(["flights/main"]);
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.