revised xmlhelper
This commit is contained in:
@@ -3,6 +3,7 @@ import * as Communication from "./communication";
|
||||
import { config } from "./config";
|
||||
import * as Events from "./events";
|
||||
import * as Panzoom from "./panzoom";
|
||||
import * as CartButtons from "./cartButtons";
|
||||
|
||||
export function setOptionSelect(inSeatmapListing: I.Seatmap[], inId: string): void {
|
||||
const seatmapDropdown: HTMLElement | null = document.getElementById(inId);
|
||||
@@ -78,4 +79,21 @@ export function changeVenueImage(): void {
|
||||
export function fadeInCartModal(): void {
|
||||
jQuery("#modalCart-overlay").fadeIn(300);
|
||||
Communication.sendEventToParent("child_hide_dialog_titlebar");
|
||||
}
|
||||
|
||||
export function generatePricescaleCSS(): string {
|
||||
const venueXML: I.VenueXML = config.state.inVenueXML!;
|
||||
const venuePricescalesArr: I.Pricescale2[] = venueXML.venue[0].pricescales[0].pricescale;
|
||||
|
||||
return venuePricescalesArr.map(arr => {
|
||||
const ID: string = arr.id[0];
|
||||
let color: string = `#${arr.color[0]} !important`; // Update: Colors are always defined: fallback colors exist in system so every XML provides them
|
||||
return `._${ID} { background-color: ${color}; }`;
|
||||
}).join("\r\n");
|
||||
}
|
||||
|
||||
export function adjustUIToLoading(): void {
|
||||
CartButtons.showHideBtnCartLoading("show");
|
||||
jQuery("#modalCart i").hide();
|
||||
jQuery("#modalCart .uabb-button-text").addClass("dot-pulse");
|
||||
}
|
||||
Reference in New Issue
Block a user