reupload latest seatmap main
This commit is contained in:
@@ -1,54 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>SeatmapClose</title>
|
||||
<style>
|
||||
body {
|
||||
background-color: #e9e9e9;
|
||||
}
|
||||
|
||||
.container {
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
font-size: 1.2vw;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
-moz-transform: translateX(-50%) translateY(-50%);
|
||||
-webkit-transform: translateX(-50%) translateY(-50%);
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
}
|
||||
|
||||
.button {
|
||||
background-color: grey;
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 0.5vw 1vw;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 1.2vw;
|
||||
-webkit-transition-duration: 0.4s;
|
||||
/* Safari */
|
||||
transition-duration: 0.4s;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
||||
<script src="https://zinomedia.de/seatmap_main/seatmap-inject/seatmap-inject.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<!--<span>Buchung abgebrochen. Sie können dieses Fenster nun schließen oder die<br><br><button id="Saalplanbuchung" class="button">Saalplanbuchung erneut laden.</button></span>-->
|
||||
<span>Buchung abgebrochen. Sie können dieses Fenster nun schließen.</button></span>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -32,15 +32,14 @@
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-141047190-1"></script>
|
||||
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
||||
function gtag() { dataLayer.push(arguments); }
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'UA-141047190-1');
|
||||
</script>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -73,7 +72,7 @@
|
||||
<div id="spacer"></div>
|
||||
<div id="border"></div>
|
||||
<div id="spacer"></div>
|
||||
|
||||
|
||||
<!--SEATMAP-->
|
||||
<div class="row" id="seat-map-row">
|
||||
<div class="col-sm-12" id="seat-map">
|
||||
@@ -81,7 +80,7 @@
|
||||
</div>
|
||||
<p id="seatmap_version">0.5.0</p>
|
||||
</div>
|
||||
|
||||
|
||||
<h4 id="screenTooSmall">Displaybreite zu gering: Bitte versuchen Sie, Ihren Bildschirm zu drehen, sofern Sie ein mobiles Endgerät benutzen.<br><br>Cannot display seat map: Screen width too small. Please try to rotate your screen if you are using a mobile device.</h4>
|
||||
<h4 id="IEdetected">Internet Explorer ist veraltet und wird nicht unterstützt. Bitte benutzen Sie einen anderen Browser.<br><br>Internet Explorer is outdated and not supported. Please use another browser.</h4>
|
||||
<!--LOADER-->
|
||||
@@ -90,9 +89,11 @@
|
||||
var $body = $("body");
|
||||
$(document).on({
|
||||
ajaxStart: function() { $body.addClass("loading"); },
|
||||
ajaxStop: function() { $body.removeClass("loading");
|
||||
ajaxStop: function() {
|
||||
$body.removeClass("loading");
|
||||
$('.modal').css("background-image", "url()");
|
||||
$('head').append('<style type="text/css">.modal:before{display: none;}</style>'); }
|
||||
$('head').append('<style type="text/css">.modal:before{display: none;}</style>');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script language="javascript" type="text/javascript" src="seatmap.js"></script>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,7 @@ var idCartModal;
|
||||
var ProductManager;
|
||||
var seatmapWorkflowURL;
|
||||
|
||||
const branch = 'seatmap_main'; // seatmap_testing or seatmap_main
|
||||
const branch = 'seatmap_testing'; // seatmap_testing or seatmap_main
|
||||
var DATA = {
|
||||
'CONFIG': {},
|
||||
};
|
||||
@@ -27,10 +27,11 @@ function set_predefined_config(DATA) {
|
||||
if (typeof DATA.CONFIG['SEATMAP_VERSION'] != 'undefined') {
|
||||
DATA.CONFIG["SEATMAP_VERSION"] = DATA.CONFIG["SEATMAP_VERSION"] + ' (testing)';
|
||||
}
|
||||
DATA.CONFIG['SEATMAP-SERVER']['ROOT_URL'] = 'https://seatmap-testing.zinomedia.de/seatmap-server/seatmap-server.pl';
|
||||
DATA.CONFIG['SEATMAP-SERVER']['ROOT_URL'] = 'https://staging.purchase.tickets.zinomedia.de/seatmap-server/seatmap-server.pl';
|
||||
}
|
||||
else if (branch === 'seatmap_main') {
|
||||
DATA.CONFIG['SEATMAP-SERVER']['ROOT_URL'] = 'https://zinomedia.de/seatmap_main/seatmap-server/seatmap-server.pl';
|
||||
DATA.CONFIG["SEATMAP_VERSION"] = DATA.CONFIG["SEATMAP_VERSION"];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,8 +84,6 @@ if (!String.prototype.repeat) {
|
||||
document.addEventListener("DOMContentLoaded", ready);
|
||||
window.onload = function() {
|
||||
if (DATA.CONFIG['DEBUG']) console.log(getFuncName());
|
||||
|
||||
checkDebug();
|
||||
};
|
||||
|
||||
// EVENT CONTAINER VISIBLE
|
||||
@@ -93,13 +92,20 @@ if ($('.container-fluid').is(':visible')) {
|
||||
detect_die_IE();
|
||||
|
||||
// PARSE PARAM FROM POSTURL, CREATES param and extra_param
|
||||
var decoded_uri = decodeURIComponent(getParamValue('posturl'));
|
||||
let posturl = getParamValue('posturl');
|
||||
console.log('POSTURL: ' + posturl);
|
||||
|
||||
var decoded_uri = decodeURIComponent(posturl);
|
||||
getParamsFromPosturl(decoded_uri);
|
||||
if (DATA.CONFIG['DEBUG']) console.log(param);
|
||||
if (DATA.CONFIG['DEBUG']) console.log(extra_param);
|
||||
|
||||
// REMOVE PARAM FROM URL
|
||||
//window.history.replaceState(null, null, window.location.pathname);
|
||||
|
||||
// GET DATA FROM SERVER AND BUILD SEATMAP
|
||||
seatmapWorkflow(decoded_uri);
|
||||
//seatmapWorkflow(decoded_uri);
|
||||
seatmapWorkflow(posturl);
|
||||
}
|
||||
|
||||
function detect_die_IE() {
|
||||
@@ -118,7 +124,7 @@ function getParamsFromPosturl(decoded_uri) {
|
||||
var checkoutParam = [
|
||||
'APPTE', 'age_consent_is_checked', 'agency', 'cancelAndRedirectTrxState', 'cogid', 'coids', 'discount=A=IE', 'discount=A=IV', 'discountdesc=A=IE', 'discountdesc=A=IV', 'discountfees=A=IE', 'discountfees=A=IV', 'discountprice=A=IE', 'discountprice=A=IV', 'dpa_selection', 'etpgcode', 'flashDetected', 'gid', 'hbx_discount_prices', 'hbx_discounts', 'hbx_offered_pg', 'hbx_perf_codes', 'hbx_perf_sub_codes', 'hbx_pids', 'hbx_requested_pg', 'hbx_selected_tixx', 'hbx_upsell_flag', 'request_type', 'invalid_seats', 'inventory_filtering_action', 'inventory_month', 'inventory_year', 'isCapEnabled', 'is_availability_switch_from_map', 'is_ticket_exchange_request', 'ism_map_current_state_json_data', 'jcarousel_auto_off_val', 'listing_type', 'mainEventPID', 'map_coupon_code', 'mlbamsp', 'oid', 'ooids', 'orderkey', 'orgid', 'p_orgid', 'package_pids', 'parent_offer_id', 'pay_pal_token', 'pid', 'prevtrxstate', 'recapToken', 'redeem_voucher_data_event_mapping', 'replay_request', 'request_action', 's_mem_tkt_ren_retrieval', 'schedule', 'secure_trxn_enabled', 'selected_seat_indexes', 'selected_upsell_option', 'supplierCode', 'supplier_code', 'target_name_value', 'target_prev_trxstate', 'target_trxstate', 'target_url', 'timeout_seconds', 'trxstate', 'upsell_selected', 'user_context', 'valid_coupon_code_message',
|
||||
];
|
||||
var extraParam = ['note'];
|
||||
var extraParam = ['note', 'request_switch'];
|
||||
|
||||
for (var i = 0; i < checkoutParam.length; i++) {
|
||||
let value = getParamValue(checkoutParam[i], decoded_uri);
|
||||
@@ -695,15 +701,6 @@ function getParamValue(paramName, url) {
|
||||
}
|
||||
}
|
||||
|
||||
function checkDebug() {
|
||||
if (DATA.CONFIG['DEBUG']) console.log(getFuncName());
|
||||
|
||||
// if (DATA.CONFIG["DEBUG"]) {
|
||||
// }
|
||||
// else if (!DATA.CONFIG["DEBUG"]) {
|
||||
// }
|
||||
}
|
||||
|
||||
function checkMobile() {
|
||||
console.log(getFuncName());
|
||||
|
||||
@@ -785,16 +782,17 @@ function getFuncName(arg) {
|
||||
}
|
||||
|
||||
// SEATMAP
|
||||
function seatmapWorkflow(decodedURI) {
|
||||
function seatmapWorkflow(URI) {
|
||||
if (DATA.CONFIG['DEBUG']) console.log(getFuncName());
|
||||
|
||||
seatmapWorkflowURL = DATA.CONFIG["SEATMAP-SERVER"]["ROOT_URL"] + "?url=" + decodedURI;
|
||||
if (DATA.CONFIG['DEBUG']) console.log("Get: " + seatmapWorkflowURL);
|
||||
|
||||
jqxhr = $.getJSON(seatmapWorkflowURL, function(DATA) {
|
||||
//seatmapWorkflowURL = DATA.CONFIG["SEATMAP-SERVER"]["ROOT_URL"] + "?url=" + decodedURI;
|
||||
//if (DATA.CONFIG['DEBUG']) console.log("Get: " + seatmapWorkflowURL);
|
||||
//let seatmapWorkflowURLEncoded = DATA.CONFIG["SEATMAP-SERVER"]["ROOT_URL"] + "?url=" + encodeURIComponent(URI);
|
||||
let seatmapWorkflowURLEncoded = DATA.CONFIG["SEATMAP-SERVER"]["ROOT_URL"] + "?url=" + URI;
|
||||
if (DATA.CONFIG['DEBUG']) console.log("Get: " + seatmapWorkflowURLEncoded);
|
||||
|
||||
jqxhr = $.getJSON(seatmapWorkflowURLEncoded, function(DATA) {
|
||||
if (DATA.CONFIG['DEBUG']) console.log("success");
|
||||
|
||||
//replaceUmlautsDATA(DATA);
|
||||
|
||||
// MERGE PREDEFINED AND SERVER SETTINGS
|
||||
set_predefined_config(DATA);
|
||||
@@ -809,9 +807,7 @@ function seatmapWorkflow(decodedURI) {
|
||||
.done(function(DATA) {
|
||||
if (DATA.CONFIG['DEBUG']) console.log("second success");
|
||||
|
||||
// MERGE PREDEFINED AND SERVER SETTINGS
|
||||
//set_predefined_config(DATA);
|
||||
console.log(DATA);
|
||||
if (DATA.CONFIG['DEBUG']) console.log(DATA);
|
||||
|
||||
manipulateHTML(DATA);
|
||||
})
|
||||
@@ -834,22 +830,15 @@ function replaceUmlautsDATA(DATA) {
|
||||
}
|
||||
|
||||
function fillSeatObjData(id, DATA) {
|
||||
|
||||
console.log(DATA);
|
||||
if (DATA.CONFIG['DEBUG']) console.log(getFuncName());
|
||||
|
||||
// Seat Object
|
||||
var seatObj = sc.get(id);
|
||||
console.log(seatObj);
|
||||
console.log(seatObj.settings.status);
|
||||
|
||||
// RETURN IF ALREADY FILLED
|
||||
// if (seatObj.data().filled == true) {
|
||||
// console.log("seatObj already filled -> Return.");
|
||||
// return;
|
||||
// }
|
||||
|
||||
|
||||
if (DATA.CONFIG['DEBUG']) {
|
||||
console.log(DATA);
|
||||
console.log(seatObj);
|
||||
}
|
||||
|
||||
// GET SECTION ID, ROW AND SEATNR FOR IDENTIFICATION
|
||||
var arrID = id.split('_'),
|
||||
@@ -871,13 +860,8 @@ function fillSeatObjData(id, DATA) {
|
||||
// console.log(buyerTypesObj);
|
||||
|
||||
// ROW AND PRODUCT TITLE
|
||||
// var jQueryRow = seatObj.settings.row + 1;
|
||||
// var product = seatObjJSON['SECTIONID_DESC'] + ' Reihe ' + jQueryRow + ' Platz ' + seatObjJSON.SEATNR_PARSED; // SHOWS IN CART
|
||||
var product = seatObjJSON['SECTIONID_DESC'] + ' Reihe ' + seatObjJSON['ROW_PARSED'] + ' Platz ' + seatObjJSON.SEATNR_PARSED; // SHOWS IN CART
|
||||
var productJBox = seatObjJSON['SECTIONID_DESC'] + ' Reihe ' + seatObjJSON['ROW_PARSED'] + ' Platz ' + seatObjJSON.SEATNR_PARSED + ' | ' + seatObj.data().price + DATA.CONFIG["CURRENCY_SYMBOL"]; // SHOWS IN JBOX
|
||||
// var product = seatObjJSON['SECTIONID_DESC'] + ' Reihe ' + jQueryRow + ' Platz ' + seatNr; // SHOWS IN CART
|
||||
// var productJBox = seatObjJSON['SECTIONID_DESC'] + ' Reihe ' + jQueryRow + ' Platz ' + seatNr + ' | ' + seatObj.data().price + DATA.CONFIG["CURRENCY_SYMBOL"]; // SHOWS IN JBOX
|
||||
// var productJBox = seatObjJSON['SECTIONID_DESC'] + ' Reihe ' + seatObjJSON['ROW_PARSED'] + ' Platz ' + seatNr + ' | ' + seatObj.data().price + DATA.CONFIG["CURRENCY_SYMBOL"]; // SHOWS IN JBOX
|
||||
|
||||
// SEAT COLOR
|
||||
var seatColor = pricescalesObj.COLOR;
|
||||
@@ -952,7 +936,7 @@ function manipulateHTML(DATA) {
|
||||
|
||||
document.getElementById("eventDesc").innerHTML = DATA.EVENT.DESC;
|
||||
document.getElementById("datetime_DE").innerHTML = 'Beginn: ' + DATA.EVENT.DATETIME_DE;
|
||||
document.getElementById("venueDesc").innerHTML = 'Ort: ' + DATA.VENUE.DESC;
|
||||
document.getElementById("venueDesc").innerHTML = 'Ort: ' + DATA.VENUE.DESC.toUpperCase();
|
||||
document.getElementById("seatmap_version").innerHTML = 'Version ' + DATA.CONFIG["SEATMAP_VERSION"];
|
||||
|
||||
$('.container-fluid').css('visibility', 'visible');
|
||||
@@ -998,36 +982,18 @@ function generateSeats(DATA, mappingPricescalesSections) {
|
||||
|
||||
// LOOP PRICESCALES
|
||||
for (var pricescalesID in DATA.VENUE.PRICESCALES) {
|
||||
// SECTION_CONFIG OBJECT
|
||||
// OBJECTS
|
||||
var sectionID = mappingPricescalesSections[pricescalesID];
|
||||
var sectionObj = DATA.VENUE.SECTION_CONFIG[sectionID];
|
||||
var pricescalesObj = DATA.VENUE.PRICESCALES[pricescalesID];
|
||||
|
||||
// if (DATA.CONFIG.hasOwnProperty("CUSTOM_PRICESCALES_COLOR")) {
|
||||
|
||||
// console.log(DATA.CONFIG);
|
||||
// var venueCode = DATA.VENUE.CODE;
|
||||
// venueCode.toString();
|
||||
// console.log('venueCode: ' + venueCode);
|
||||
|
||||
// console.log(DATA["CONFIG"][venueCode]["CUSTOM_PRICESCALES_COLOR"]);
|
||||
|
||||
// var resolve2 = resolve(DATA.VENUE.CODE, DATA.CONFIG);
|
||||
// console.log(resolve2);
|
||||
|
||||
//resolve(['object', 'a.property.name.with.periods'], DATA.CONFIG) // returns 42
|
||||
//console.log(Object.byString(DATA, 'CONFIG["INT_TH_3"].MAX_TICKETS_PER_USER'));
|
||||
|
||||
//console.log(DATA.CONFIG["INT_TH3_"]);
|
||||
//console.log(DATA.CONFIG["venue_code"]);
|
||||
if (typeof DATA.CONFIG[DATA.VENUE.CODE]["CUSTOM_PRICESCALES_COLOR"] != "undefined") {
|
||||
console.log("Applying custom colors");
|
||||
if (DATA.CONFIG['DEBUG']) console.log("Applying custom colors");
|
||||
cssProperties = '{' +
|
||||
'background-color: #' + DATA.CONFIG[DATA.VENUE.CODE]["CUSTOM_PRICESCALES_COLOR"][pricescalesObj.ID] + ' !important;' +
|
||||
'}';
|
||||
}
|
||||
else {
|
||||
console.log("Applying colors from XML");
|
||||
if (DATA.CONFIG['DEBUG']) console.log("Applying colors from XML");
|
||||
cssProperties = '{' +
|
||||
'background-color: #' + pricescalesObj.COLOR + ' !important;' +
|
||||
'}';
|
||||
@@ -1320,24 +1286,22 @@ function generateMapMatrix(DATA) {
|
||||
var overallMinMaxXY = getOverallMaxXY(DATA); // return [xMax, xMin, yMax, yMin, rowMax, maxSeats];
|
||||
var sortedSections = sortSeatmaps(DATA);
|
||||
var [mapping, matrixBIG] = bigMatrixDim(sortedSections);
|
||||
console.log('mapping: ');
|
||||
console.log(mapping);
|
||||
console.log('mapping.length: ' + Object.keys(mapping).length);
|
||||
console.log('matrixBIG:');
|
||||
console.log(matrixBIG);
|
||||
|
||||
// var matrixBIG = [
|
||||
// [],
|
||||
// []
|
||||
// ];
|
||||
if (DATA.CONFIG['DEBUG']) {
|
||||
console.log('mapping: ');
|
||||
console.log(mapping);
|
||||
console.log('mapping.length: ' + Object.keys(mapping).length);
|
||||
console.log('matrixBIG:');
|
||||
console.log(matrixBIG);
|
||||
console.log('overallMinMaxXY:');
|
||||
console.log(overallMinMaxXY);
|
||||
console.log("Overall maxmimum seats per row: " + overallMinMaxXY[5]);
|
||||
}
|
||||
|
||||
var seatsUnavailable = new Array();
|
||||
var mappingPricescalesSections = new Array();
|
||||
var jQuerySeatID;
|
||||
|
||||
if (DATA.CONFIG['DEBUG']) console.log('overallMinMaxXY:');
|
||||
if (DATA.CONFIG['DEBUG']) console.log(overallMinMaxXY);
|
||||
if (DATA.CONFIG['DEBUG']) console.log("Overall maxmimum seats per row: " + overallMinMaxXY[5]);
|
||||
|
||||
// LOOP THROUGH SORTED SECTIONS
|
||||
for (var k in sortedSections) {
|
||||
// SECTION OBJ
|
||||
@@ -1363,33 +1327,32 @@ function generateMapMatrix(DATA) {
|
||||
var seatDiff;
|
||||
if (maxSectionSeats != overallMaxSectionSeats) {
|
||||
seatDiff = overallMaxSectionSeats - maxSectionSeats;
|
||||
console.log("seatDiff: " + seatDiff);
|
||||
if (DATA.CONFIG['DEBUG']) console.log("seatDiff: " + seatDiff);
|
||||
if (seatDiff > 0) {
|
||||
if (seatDiff & 1) { // ODD
|
||||
console.log("Odd");
|
||||
offsetLeft = Math.floor(seatDiff / 2);
|
||||
offsetRight = Math.floor((seatDiff / 2)) + (seatDiff % 2);
|
||||
var remainder = seatDiff % 2;
|
||||
console.log("Remainder: " + remainder);
|
||||
|
||||
|
||||
if (DATA.CONFIG['DEBUG']) console.log("Odd & Remainder: " + remainder);
|
||||
}
|
||||
else { // EVEN
|
||||
console.log("Even");
|
||||
offsetRight = seatDiff / 2;
|
||||
offsetLeft = seatDiff / 2;
|
||||
|
||||
if (DATA.CONFIG['DEBUG']) console.log('Even');
|
||||
}
|
||||
console.log("offsetLeft: " + offsetLeft + " offsetRight: " + offsetRight);
|
||||
if (DATA.CONFIG['DEBUG']) console.log("offsetLeft: " + offsetLeft + " offsetRight: " + offsetRight);
|
||||
}
|
||||
}
|
||||
else {
|
||||
seatDiff = 0;
|
||||
}
|
||||
console.log('overallMaxSectionSeats ' + overallMaxSectionSeats + " | maxSectionSeats " + maxSectionSeats + " | seatDiff: " + seatDiff);
|
||||
if (DATA.CONFIG['DEBUG']) console.log('overallMaxSectionSeats ' + overallMaxSectionSeats + " | maxSectionSeats " + maxSectionSeats + " | seatDiff: " + seatDiff);
|
||||
|
||||
// LOOP THROUGH ROWS
|
||||
var rowSection = 0;
|
||||
for (var i in sectionObj.ROWS) {
|
||||
console.log("ROW: " + i);
|
||||
rowSection++;
|
||||
|
||||
// LOOP THROUGH ROW SEATS
|
||||
@@ -1453,15 +1416,15 @@ function generateMapMatrix(DATA) {
|
||||
matrix[seatY].push("_");
|
||||
}
|
||||
}
|
||||
|
||||
console.log('mapping y: ' + mapping[sectionObj.ID]['y']);
|
||||
console.log('mapping x: ' + mapping[sectionObj.ID]['x']);
|
||||
// console.log('matrix: ' + matrix);
|
||||
// console.log('matrixBIG: ' + matrixBIG);
|
||||
|
||||
var y = mapping[sectionObj.ID]['y'];
|
||||
var x = mapping[sectionObj.ID]['x'];
|
||||
matrixBIG[y][x] = matrix;
|
||||
|
||||
if (DATA.CONFIG['DEBUG']) {
|
||||
console.log('mapping y: ' + mapping[sectionObj.ID]['y']);
|
||||
console.log('mapping x: ' + mapping[sectionObj.ID]['x']);
|
||||
}
|
||||
}
|
||||
|
||||
if (DATA.CONFIG['DEBUG']) console.log(matrixBIG);
|
||||
@@ -1483,10 +1446,13 @@ function generateMapMatrix(DATA) {
|
||||
}
|
||||
}
|
||||
|
||||
if (DATA.CONFIG['DEBUG']) console.log(map1d);
|
||||
if (DATA.CONFIG['DEBUG']) console.log(seatsUnavailable);
|
||||
if (DATA.CONFIG['DEBUG']) console.log(mappingPricescalesSections);
|
||||
if (DATA.CONFIG['DEBUG']) console.log(rows);
|
||||
if (DATA.CONFIG['DEBUG']) {
|
||||
console.log(map1d);
|
||||
console.log(seatsUnavailable);
|
||||
console.log(mappingPricescalesSections);
|
||||
console.log(rows);
|
||||
}
|
||||
|
||||
return [map1d, seatsUnavailable, mappingPricescalesSections, rows];
|
||||
}
|
||||
|
||||
@@ -1495,16 +1461,12 @@ function seperateSeatmapsCSS(DATA) {
|
||||
|
||||
// ROW NODES OBJECT
|
||||
var nodes = document.getElementById('seat-map').childNodes;
|
||||
console.log(nodes);
|
||||
console.log(nodes.length);
|
||||
var sortedSections = sortSeatmaps(DATA);
|
||||
|
||||
// IF ONLY 1 SECTION
|
||||
console.log(Object.keys(DATA.VENUE.SEATMAP_CONFIG).length);
|
||||
if (Object.keys(DATA.VENUE.SEATMAP_CONFIG).length == 1) {
|
||||
if (DATA.CONFIG['DEBUG']) console.log("NOT MORE THAN 1 SECTION AVAILABLE. RETURN.");
|
||||
var sectionObj = sortedSections[0][1];
|
||||
console.log(sortedSections);
|
||||
|
||||
// INSERT INDICATOR
|
||||
if (DATA.CONFIG[DATA.VENUE.CODE]["BUEHNE"] === "TOP") {
|
||||
@@ -1623,11 +1585,10 @@ function checkoutGenerateURL(selected_seat_indexes) {
|
||||
|
||||
function checkoutCheckResponse(selected_seat_indexes, DATA) {
|
||||
if (DATA.CONFIG['DEBUG']) console.log(getFuncName());
|
||||
|
||||
console.log(DATA);
|
||||
|
||||
var rootURL = 'https://purchase.tickets.com/buy/TicketPurchase';
|
||||
var rootURLNoSlash = 'purchase.tickets.com/buy/TicketPurchase';
|
||||
var successful;
|
||||
|
||||
|
||||
var parameter = '';
|
||||
for (var property in param) {
|
||||
@@ -1638,55 +1599,61 @@ function checkoutCheckResponse(selected_seat_indexes, DATA) {
|
||||
parameter = parameter.substring(0, parameter.length - 1);
|
||||
parameter = parameter + "&trxstate=148&selected_seat_indexes=" + selected_seat_indexes;
|
||||
|
||||
// console.log(parameter);
|
||||
// var parameter_proxy = "trxstate=148&pid=" + param["pid"] + "&user_context=" + param["user_context"] + "&selected_seat_indexes=" + selected_seat_indexes;
|
||||
// var checkoutURLNoSlash = decodeURIComponent(rootURLNoSlash + '?' + parameter_proxy);
|
||||
var checkoutURLNoSlash = decodeURIComponent(rootURLNoSlash + '?' + parameter);
|
||||
var proxyCheckoutURL = DATA.CONFIG["CORS-ANYWHERE"]["ROOT_URL"] + checkoutURLNoSlash;
|
||||
if (DATA.CONFIG['DEBUG']) console.log('Get: ' + proxyCheckoutURL);
|
||||
// PROXY CHECKOUT URL
|
||||
//var rootURLNoSlash = 'purchase.tickets.com:443/buy/TicketPurchase';
|
||||
let rootURLNoSlash = 'https://purchase.tickets.com/buy/TicketPurchase';
|
||||
//var checkoutURLNoSlash = decodeURIComponent(rootURLNoSlash + '?' + parameter);
|
||||
//var proxyCheckoutURL = DATA.CONFIG["CORS-ANYWHERE"]["ROOT_URL"] + checkoutURLNoSlash;
|
||||
|
||||
|
||||
var checkoutURLNoSlash = encodeURIComponent(rootURLNoSlash + '?' + parameter + '&request_switch=checkoutCheckResponse');
|
||||
let checkoutCheckResponseURI = DATA.CONFIG["SEATMAP-SERVER"]["ROOT_URL"] + "?url=" + checkoutURLNoSlash;
|
||||
|
||||
var checkoutURL;
|
||||
if (param.hasOwnProperty("orderkey")) {
|
||||
console.log("ADD ANOTHER TICKET DETECTED");
|
||||
if (DATA.CONFIG['DEBUG']) console.log("ADD ANOTHER TICKET DETECTED");
|
||||
var parameter_30 = 'user_context=' + param['user_context'] + '&orderkey=' + param['orderkey'] + '&orgid=' + param['orgid'] + '&trxstate=30';
|
||||
checkoutURL = decodeURIComponent(rootURL + '?' + parameter_30);
|
||||
}
|
||||
else {
|
||||
console.log("FIRST TICKET DETECTED");
|
||||
if (DATA.CONFIG['DEBUG']) console.log("FIRST TICKET DETECTED");
|
||||
checkoutURL = decodeURIComponent(rootURL + '?' + parameter);
|
||||
}
|
||||
|
||||
var successful;
|
||||
$.ajax({
|
||||
url: proxyCheckoutURL,
|
||||
// headers: { 'X-Requested-With': 'XMLHttpRequest' },
|
||||
method: 'GET',
|
||||
dataType: 'html',
|
||||
success: function(data) {
|
||||
// if (DATA.CONFIG['DEBUG']) console.log(data);
|
||||
|
||||
data = data.replace(/(?:\r\n|\r|\n|\t| {2,})/g, '');
|
||||
// console.log(data);
|
||||
var errorMsg = data.match(/<input type="hidden" name="no_timeout_error_msg" id="no_timeout_error_msg" value="(.*?)" \/>/)[1];
|
||||
console.log(errorMsg);
|
||||
|
||||
if (errorMsg === '') {
|
||||
successful = true;
|
||||
|
||||
|
||||
if (DATA.CONFIG['DEBUG']) {
|
||||
console.log(DATA);
|
||||
//console.log('proxyCheckoutURL: ' + proxyCheckoutURL);
|
||||
//console.log('checkoutURL:' + checkoutURL);
|
||||
console.log('checkoutCheckResponseURI: ' + checkoutCheckResponseURI);
|
||||
}
|
||||
|
||||
if (DATA.CONFIG['DEBUG']) console.log("DATA['CONFIG']['CHECKOUT-AVAILABILITY-CHECK']: " + DATA['CONFIG']['CHECKOUT-AVAILABILITY-CHECK']);
|
||||
|
||||
if( DATA['CONFIG']['CHECKOUT-AVAILABILITY-CHECK'] == 'enabled' ) {
|
||||
if (DATA.CONFIG['DEBUG']) console.log('CHECKOUT-AVAILABILITY-CHECK enabled');
|
||||
|
||||
$.getJSON(checkoutCheckResponseURI,
|
||||
function(data) {
|
||||
if (DATA.CONFIG['DEBUG']) console.log(data);
|
||||
|
||||
|
||||
if( data['no_timeout_error_msg']['value'] === '' ) {
|
||||
console.log('Good to go');
|
||||
successful = 1;
|
||||
|
||||
ProductManager.clearProduct();
|
||||
$cartBadge.text(ProductManager.getTotalQuantity());
|
||||
$("#" + idCartModal).modal("hide");
|
||||
|
||||
|
||||
// REDIRECT TO TICKET PURCHASE
|
||||
console.log('successfull, now going to: ' + checkoutURL);
|
||||
window.location.replace(checkoutURL);
|
||||
// window.open(checkoutURL, '_blank');
|
||||
// window.location.replace(proxyCheckoutURL);
|
||||
if (DATA.CONFIG['DEBUG']) console.log('successfull, now going to: ' + checkoutURL);
|
||||
//window.location.replace(checkoutURL);
|
||||
}
|
||||
else {
|
||||
successful = false;
|
||||
errorMsg = errorMsg.replace(/\<br\>/g, ' ');
|
||||
|
||||
else if( data['no_timeout_error_msg']['value'] !== '' ) {
|
||||
console.log('We have an error');
|
||||
successful = 0;
|
||||
|
||||
let errorMsg = data['no_timeout_error_msg']['value'].replace(/\<br\>/g, ' ');
|
||||
new jBox('Notice', {
|
||||
content: errorMsg,
|
||||
color: 'red',
|
||||
@@ -1697,18 +1664,58 @@ function checkoutCheckResponse(selected_seat_indexes, DATA) {
|
||||
closeButton: 'box',
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
else if( DATA['CONFIG']['CHECKOUT-AVAILABILITY-CHECK'] == 'disabled' ) {
|
||||
if (DATA.CONFIG['DEBUG']) console.log('CHECKOUT-AVAILABILITY-CHECK disabled');
|
||||
if (DATA.CONFIG['DEBUG']) console.log('Now going to: ' + checkoutURL);
|
||||
window.location.replace(checkoutURL);
|
||||
}
|
||||
|
||||
|
||||
// var successful;
|
||||
// $.ajax({
|
||||
// url: checkoutCheckResponseURI,
|
||||
// method: 'GET',
|
||||
// dataType: 'html',
|
||||
// //headers: { 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'Accept-Language': 'de,en-US;q=0.7,en;q=0.3', 'Host': 'purchase.tickets.com' },
|
||||
// headers: { 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'Accept-Language': 'de,en-US;q=0.7,en;q=0.3' },
|
||||
// success: function(data) {
|
||||
// // CORS PROXY RESPONSE
|
||||
// data = data.replace(/(?:\r\n|\r|\n|\t| {2,})/g, '');
|
||||
// var errorMsg = data.match(/<input type="hidden" name="no_timeout_error_msg" id="no_timeout_error_msg" value="(.*?)" \/>/)[1];
|
||||
// if (DATA.CONFIG['DEBUG']) console.log('errorMsg: ' + errorMsg);
|
||||
|
||||
// if (errorMsg === '') {
|
||||
// successful = true;
|
||||
// ProductManager.clearProduct();
|
||||
// $cartBadge.text(ProductManager.getTotalQuantity());
|
||||
// $("#" + idCartModal).modal("hide");
|
||||
|
||||
// // REDIRECT TO TICKET PURCHASE
|
||||
// if (DATA.CONFIG['DEBUG']) console.log('successfull, now going to: ' + checkoutURL);
|
||||
// window.location.replace(checkoutURL);
|
||||
// }
|
||||
// else {
|
||||
// successful = false;
|
||||
// errorMsg = errorMsg.replace(/\<br\>/g, ' ');
|
||||
// new jBox('Notice', {
|
||||
// content: errorMsg,
|
||||
// color: 'red',
|
||||
// width: '100vw',
|
||||
// responsiveWidth: true,
|
||||
// position: { x: 'center', y: 'top' },
|
||||
// autoClose: 10000,
|
||||
// closeButton: 'box',
|
||||
// });
|
||||
// }
|
||||
|
||||
// }
|
||||
// });
|
||||
|
||||
return successful;
|
||||
}
|
||||
|
||||
function untickSeat(id) {
|
||||
if (DATA.CONFIG['DEBUG']) console.log(getFuncName());
|
||||
console.log(id);
|
||||
document.getElementById(id).click(); // Click on the checkbox
|
||||
}
|
||||
|
||||
function selectRefreshPrice(select) {
|
||||
if (DATA.CONFIG['DEBUG']) console.log(getFuncName());
|
||||
|
||||
@@ -1817,8 +1824,7 @@ function generateSeatmap(DATA) {
|
||||
return 'available';
|
||||
}
|
||||
else if (this.status() == 'unavailable') {
|
||||
//seat has been already booked
|
||||
console.log('unavailable');
|
||||
// SEAT ALREADY BOOKED
|
||||
return 'unavailable';
|
||||
}
|
||||
else {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -100,24 +100,6 @@ div.seatCharts-seat.unavailable {
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
/*div.seatCharts-seat.unavailable:before {*/
|
||||
|
||||
/* background: #037CA9;*/
|
||||
|
||||
/* content: "";*/
|
||||
|
||||
/* width: 10px;*/
|
||||
|
||||
/* height: 5px;*/
|
||||
|
||||
/* position: absolute;*/
|
||||
|
||||
/* top: 5px;*/
|
||||
|
||||
/* left: -5px;*/
|
||||
|
||||
/*}*/
|
||||
|
||||
div.seatCharts-container {
|
||||
/*border-right: 1px dotted #adadad;*/
|
||||
width: auto;
|
||||
@@ -125,9 +107,6 @@ div.seatCharts-container {
|
||||
}
|
||||
|
||||
div.seatCharts-legend {
|
||||
/*padding-left: 0px;*/
|
||||
/*position: absolute;*/
|
||||
/*bottom: 16px;*/
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
@@ -140,7 +119,6 @@ ul.seatCharts-legendList {
|
||||
span.seatCharts-legendDescription {
|
||||
margin-left: 0.5vw;
|
||||
line-height: 1.2vw;
|
||||
/*font-size: 1vw;*/
|
||||
}
|
||||
|
||||
.checkout-button {
|
||||
@@ -157,7 +135,6 @@ span.seatCharts-legendDescription {
|
||||
}
|
||||
|
||||
#spacer {
|
||||
/*margin: 40px 0px 0px 0px;*/
|
||||
margin: 2vw 0vw 0vw 0vw;
|
||||
}
|
||||
|
||||
@@ -193,39 +170,12 @@ div.seatCharts-cell {
|
||||
visibility: hidden;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
/*padding-right: 1vw;*/
|
||||
/*padding-left: 1vw;*/
|
||||
/*margin-right: auto;*/
|
||||
/*margin-left: auto;*/
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.2vw;
|
||||
}
|
||||
|
||||
/*.row {*/
|
||||
|
||||
/* display: -webkit-box;*/
|
||||
|
||||
/* display: -webkit-flex;*/
|
||||
|
||||
/* display: -ms-flexbox;*/
|
||||
|
||||
/* display: flex;*/
|
||||
|
||||
/* flex-wrap: wrap;*/
|
||||
|
||||
/*}*/
|
||||
|
||||
/*.row > [class*='col-'] {*/
|
||||
|
||||
/* display: flex;*/
|
||||
|
||||
/* flex-direction: column;*/
|
||||
|
||||
/*}*/
|
||||
|
||||
.centered {
|
||||
position: fixed;
|
||||
/* or absolute */
|
||||
@@ -235,28 +185,6 @@ h4 {
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
/*SHOPPING CART*/
|
||||
|
||||
/*.badge-notify{*/
|
||||
|
||||
/* background:red;*/
|
||||
|
||||
/* position:relative;*/
|
||||
|
||||
/* top: -20px;*/
|
||||
|
||||
/* right: 10px;*/
|
||||
|
||||
/*}*/
|
||||
|
||||
/*.my-cart-icon-affix {*/
|
||||
|
||||
/* position: fixed;*/
|
||||
|
||||
/* z-index: 999;*/
|
||||
|
||||
/*}*/
|
||||
|
||||
.glyphicon {
|
||||
font-size: 2vw;
|
||||
top: -.2vw;
|
||||
@@ -456,31 +384,4 @@ h5 {
|
||||
.rowBooking {
|
||||
width: 60%;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
/*ONLY IE < 10*/
|
||||
|
||||
/*@media all and (-ms-high-contrast: none),*/
|
||||
/*(-ms-high-contrast: active) {*/
|
||||
/* div.seatCharts-cell {*/
|
||||
/* height: 1.36vw;*/
|
||||
/* width: 1.36vw;*/
|
||||
/* }*/
|
||||
/*}*/
|
||||
|
||||
/*@media (min-width: 531px) and (max-width:770px) {*/
|
||||
/* div.seatCharts-cell {*/
|
||||
/* height: 1.33vw;*/
|
||||
/* width: 1.33vw;*/
|
||||
/* }*/
|
||||
/*}*/
|
||||
|
||||
/*@media (min-width: 400px) and (max-width:530px) {*/
|
||||
/* div.seatCharts-cell {*/
|
||||
/* height: 1.301vw;*/
|
||||
/* width: 1.301vw;*/
|
||||
/* }*/
|
||||
/* .glyphicon {*/
|
||||
/* display: none;*/
|
||||
/* }*/
|
||||
/*}*/
|
||||
}
|
||||
Reference in New Issue
Block a user