1st working discussed prototype

This commit is contained in:
zino
2021-05-06 13:39:24 +02:00
parent 62b7b22f4c
commit 51157645d6
3 changed files with 33 additions and 5 deletions

View File

@@ -93,6 +93,10 @@ function messagesHandler(e: any) {
window.location.href = inUrl; window.location.href = inUrl;
break; break;
} }
case "child_closeDialog": {
jQuery(".ui-dialog-titlebar-close").click();
break;
}
default: default:
break; break;

View File

@@ -24,7 +24,7 @@ export function setEventInfo(inEventInfo: I.EventInfo, inInputswithValue: I.Inpu
} }
export function createDialog(): void { export function createDialog(): void {
jQuery("#dialogSeatmap").append($("<iframe id='iframeSeatmap' scrolling='no' frameborder='0' marginwidth='0' marginheight='0' allowfullscreen width='100%' height='" + window.outerHeight + "px' />") jQuery("#dialogSeatmap").append($("<iframe id='iframeSeatmap' scrolling='no' frameborder='0' marginwidth='0' marginheight='0' allowfullscreen width='100%' />")
.attr("src", "https://staging.tickets.zinomedia.de/")) .attr("src", "https://staging.tickets.zinomedia.de/"))
.dialog({ .dialog({
modal: true, modal: true,
@@ -35,11 +35,9 @@ export function createDialog(): void {
show: true, show: true,
resizable: false, resizable: false,
title: "", title: "",
width: "99%", width: "100%",
height: "auto", height: "auto",
close: () => { close: () => jQuery("html, body").css("overflow", "auto"),
jQuery('html, body').css('overflow', 'auto');
}
}); });
jQuery("#openSeatmap").on("click", () => { jQuery("#openSeatmap").on("click", () => {
@@ -124,6 +122,7 @@ export function addPanzoom(inSelector: string, inBtnZoomIn: string | null = null
maxScale: 5, maxScale: 5,
animate: false, animate: false,
overflow: "hidden", overflow: "hidden",
startScale: "0.66"
}); });
container.parentElement!.addEventListener('wheel', panzoom.zoomWithWheel); container.parentElement!.addEventListener('wheel', panzoom.zoomWithWheel);

View File

@@ -24,6 +24,7 @@ export let state: I.State = {
isValidSeatSelection: false isValidSeatSelection: false
} }
function messagesHandler(inE: any) { function messagesHandler(inE: any) {
if (typeof (inE.data) !== 'string') if (typeof (inE.data) !== 'string')
return; 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 () { window.addEventListener('load', function () {
Utils.inject(config.urlJSCStaging, "js", "head"); Utils.inject(config.urlJSCStaging, "js", "head");
Utils.inject(config.urlCSSJSCStaging, "css", "body"); Utils.inject(config.urlCSSJSCStaging, "css", "body");
@@ -415,6 +429,17 @@ window.addEventListener('load', function () {
// Utils.waitForElement("#modalCart-overlay", () => jQuery("#modalCart-overlay").hide()); // 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); const btnCart = jQuery("#modalCart .uabb-button").get(0);
if (btnCart) { if (btnCart) {
btnCart.addEventListener("click", function () { btnCart.addEventListener("click", function () {