Compare commits
4 Commits
f959ad27f5
...
305a9ad0ca
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
305a9ad0ca | ||
|
|
e06fa480dc | ||
|
|
fa0222f1c6 | ||
|
|
8126d7be13 |
20
client/dist/inject.js
vendored
20
client/dist/inject.js
vendored
File diff suppressed because one or more lines are too long
2
client/dist/seatmap.css
vendored
2
client/dist/seatmap.css
vendored
File diff suppressed because one or more lines are too long
20
client/dist/seatmap.js
vendored
20
client/dist/seatmap.js
vendored
File diff suppressed because one or more lines are too long
1
client/package-lock.json
generated
1
client/package-lock.json
generated
@@ -5,6 +5,7 @@
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "client",
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
|
||||
@@ -37,7 +37,9 @@ export function initSendVenueXML(inE: any) {
|
||||
UI.setOptionSelect(seatmapListing, "dropdownSeatmap");
|
||||
|
||||
// Display first seatmapXML
|
||||
const id: string = seatmapListing[0].id[0];
|
||||
// If smap[1] is given by user, display specific seatmap on load
|
||||
const id: string = XMLHelper.getFirstSeatmapIDToLoad();
|
||||
|
||||
jQuery("#dropdownSeatmap").val(id);
|
||||
Communication.needSeatmapXML(id);
|
||||
|
||||
@@ -67,7 +69,7 @@ export function sendSeatmapXML(inE: any) {
|
||||
Legend.convertLegendToDropdown("dropdownLegend");
|
||||
Events.dropdownLegendOnChange("#dropdownLegend");
|
||||
Trims.addTrims();
|
||||
XMLHelper.processSMAP();
|
||||
XMLHelper.showHideVenueCapacity();
|
||||
config.state.panzoom = Panzoom.addPanzoom("#containerSeatmapInner", ".panzoomZoomIn", ".panzoomZoomOut", "#panzoomResetZoom");
|
||||
Cart.setImportantNote();
|
||||
UI.controlLoftloader("hide");
|
||||
|
||||
@@ -83,7 +83,10 @@ export function getSMAP(): string | undefined {
|
||||
return undefined;
|
||||
|
||||
const str: string = jQuery("#seating_map_url a").attr("onclick");
|
||||
const re = /openNewWindow\(\'(\d+)\'/;
|
||||
|
||||
//const re = /openNewWindow\(\'(\d+)\'/;
|
||||
const re = /openNewWindow\(\'(.+?)\'/;
|
||||
|
||||
const found: RegExpMatchArray | null = str.match(re);
|
||||
|
||||
return found ? found[1] : undefined;
|
||||
|
||||
@@ -1,19 +1,43 @@
|
||||
|
||||
import * as I from "../types/types";
|
||||
import { config } from "./config";
|
||||
|
||||
export function processSMAP(): void {
|
||||
export function showHideVenueCapacity(): void {
|
||||
const inputsWithValue = config.state.inputsWithValue!;
|
||||
|
||||
if (!inputsWithValue.smap)
|
||||
return;
|
||||
|
||||
const smapArr: number[] = inputsWithValue.smap.split("").map(Number);
|
||||
// TODO: We are sure that there are always only two elements [number, string], so we can declare it as a tuple?
|
||||
const smapArr = inputsWithValue.smap.split(";");
|
||||
// Form:
|
||||
// 0: = "0" -> Show venue capacity 1=yes 0=no
|
||||
// 1: = "SC02" -> Show specific seat plan when loading for the first time
|
||||
|
||||
if (!smapArr[0])
|
||||
// Convert first SMAP element to Number and hide or show venue capacity data
|
||||
if (!Number(smapArr[0]))
|
||||
jQuery("#eventInfoCapacity").hide();
|
||||
}
|
||||
|
||||
export function getFirstSeatmapIDToLoad() {
|
||||
const inputsWithValue = config.state.inputsWithValue!;
|
||||
const venueXML = config.state.inVenueXML!;
|
||||
const seatmapListing: I.Seatmap[] = venueXML.seatmap_config[0].seatmap;
|
||||
const firstSeatmapID: string = seatmapListing[0].id[0];
|
||||
|
||||
// If SMAP field is missing, return ID of first seatmap
|
||||
if (!inputsWithValue.smap)
|
||||
return firstSeatmapID;
|
||||
|
||||
// If seatmap code is given in SMAP, return corresponding seatmap ID, otherwise return ID of first seatmap
|
||||
const smapArr = inputsWithValue.smap.split(";"); // Form described above
|
||||
if (!smapArr[1])
|
||||
return firstSeatmapID;
|
||||
|
||||
const seatmapID: string | undefined = seatmapListing.find(arr => smapArr[1] === arr.code[0])?.id[0];
|
||||
|
||||
return seatmapID ? seatmapID : firstSeatmapID;
|
||||
}
|
||||
|
||||
export function getSectionDescBySectionID(inSectionID: string): string | undefined {
|
||||
const venueXML: I.VenueXML = config.state.inVenueXML!;
|
||||
const sectionArr: I.Section[] = venueXML.master_config[0].section_config[0].section;
|
||||
|
||||
1
libs/jQuery-Seat-Charts
Submodule
1
libs/jQuery-Seat-Charts
Submodule
Submodule libs/jQuery-Seat-Charts added at f43f2a1884
Reference in New Issue
Block a user