diff --git a/client/src/inject.ts b/client/src/inject.ts
index 614c762..62ac291 100644
--- a/client/src/inject.ts
+++ b/client/src/inject.ts
@@ -93,6 +93,10 @@ function messagesHandler(e: any) {
window.location.href = inUrl;
break;
}
+ case "child_closeDialog": {
+ jQuery(".ui-dialog-titlebar-close").click();
+ break;
+ }
default:
break;
diff --git a/client/src/modules/ui.ts b/client/src/modules/ui.ts
index a27f670..03ba313 100644
--- a/client/src/modules/ui.ts
+++ b/client/src/modules/ui.ts
@@ -24,7 +24,7 @@ export function setEventInfo(inEventInfo: I.EventInfo, inInputswithValue: I.Inpu
}
export function createDialog(): void {
- jQuery("#dialogSeatmap").append($("")
+ jQuery("#dialogSeatmap").append($("")
.attr("src", "https://staging.tickets.zinomedia.de/"))
.dialog({
modal: true,
@@ -35,11 +35,9 @@ export function createDialog(): void {
show: true,
resizable: false,
title: "",
- width: "99%",
+ width: "100%",
height: "auto",
- close: () => {
- jQuery('html, body').css('overflow', 'auto');
- }
+ close: () => jQuery("html, body").css("overflow", "auto"),
});
jQuery("#openSeatmap").on("click", () => {
@@ -124,6 +122,7 @@ export function addPanzoom(inSelector: string, inBtnZoomIn: string | null = null
maxScale: 5,
animate: false,
overflow: "hidden",
+ startScale: "0.66"
});
container.parentElement!.addEventListener('wheel', panzoom.zoomWithWheel);
diff --git a/client/src/seatmap.ts b/client/src/seatmap.ts
index a73d3e4..0b8fcd1 100644
--- a/client/src/seatmap.ts
+++ b/client/src/seatmap.ts
@@ -24,6 +24,7 @@ export let state: I.State = {
isValidSeatSelection: false
}
+
function messagesHandler(inE: any) {
if (typeof (inE.data) !== 'string')
return;
@@ -403,6 +404,19 @@ function initModalCart() {
}
}
+window.onresize = function() {
+ const innerHeight = window.innerHeight;
+ if (innerHeight < 576) {
+ console.log("small");
+ jQuery("#containerEventInfoRow").hide();
+ panzoom?.reset();
+ }
+ else if (innerHeight >= 576) {
+ jQuery("#containerEventInfoRow").show();
+ panzoom?.reset();
+ }
+}
+
window.addEventListener('load', function () {
Utils.inject(config.urlJSCStaging, "js", "head");
Utils.inject(config.urlCSSJSCStaging, "css", "body");
@@ -414,6 +428,17 @@ window.addEventListener('load', function () {
Utils.waitForElement("#modalCart-overlay", initModalCart);
// Utils.waitForElement("#modalCart-overlay", () => jQuery("#modalCart-overlay").hide());
+
+
+
+
+ const btnCloseModal = jQuery("#btnCloseModal").get(0);
+
+ if (btnCloseModal) {
+ btnCloseModal.addEventListener("click", function () {
+ Communication.sendEventToParent("child_closeDialog");
+ });
+ }
const btnCart = jQuery("#modalCart .uabb-button").get(0);
if (btnCart) {