1var g_id_performance = 0; 2var g_count_basket = 0; 3var g_performance = null; 4 5var animationName = "fadeIn"; 6var animationNameTien = "flash"; 7var animationEnd = "webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend"; 8 9function ZrusPerformanceURL() { 10 if (typeof (window.history.pushState) != "undefined") { 11 window.history.replaceState('object or string', document.title, window.location.pathname); 12 } 13} 14 15// Otvorenie vyskakovacie okna pre n-predstavenie 16function NPerformance_load(id_performance, count_basket) { 17 18 if (location.href.indexOf("iframe") == -1) { 19 if (location.href.indexOf("utm_source") == -1) { 20 if (typeof (window.history.pushState) != "undefined") { 21 window.history.replaceState('object or string', document.title, window.location.pathname + '?idp=' + id_performance); 22 } 23 } 24 } 25 else { 26 //if (!(QueryString["fb"] == "")) { 27 if ($("#performance_link_" + id_performance).length != 0) { 28 $("#modalVyberPocetMiest20 .modal-dialog").css({ top: 10 }); 29 ScrollPorthole(0); 30 } 31 //} 32 } 33 34 var url_fronta = "https://static.ticketportal." + lokalita + "/fronta.ashx?typ=2&idp=" + id_performance + "&id=" + FrontID; 35 36 $.ajax({
37 url: url_fronta, 38 dataType: "text", 39 cache: false, 40 statusCode: { 41 404: function () { alert('Page not found.'); }, 42 500: function () { alert('Internal server error.'); } 43 } 44 }).done(function (data) { 45 46 if (data != "null") { 47 if (data.split(" ")[0] == "False") { 48 ZobrazFrontu(Number(data.split(" ")[1]), id_performance, count_basket, 1); 49 return; 50 } 51 } 52 53 54 $.ajax({ 55 url: absoluteUri + "Event/PerformanceUser/" + id_performance, 56 dataType: "json", 57 cache: false, 58 statusCode: { 59 404: function () { alert('Page not found.'); }, 60 500: function () { alert('Internal server error.'); } 61 } 62 }).done(function (data) { 63 64 if (data.Succeeded) { 65 66 if (data.ReturnedObject.ID_PerformanceCategory == 99) { 67 window.location = absoluteUri + "performance/" + data.ReturnedObject.ID; 68 return; 69 } 70 71 72 if (data.ReturnedObject.MaxRezWWW == 0) { 73 NMiest_setState("occupied"); 74 $('#modalVyberPocetMiest20').modal('show'); 75 return; 76 } 77 else { 78 NMiest_setState("normal"); 79 } 80 81 82 83 /*if (typeof (ga) != "undefined") { 84 ga('set', 'page', window.location.pathname + "#performance"); 85 ga('send', 'pageview'); 86 }*/ 87 88 // Tu treba spracovat priority 89 if (SpracujPriority(data.ReturnedObject) == true) { 90 window["PriorityData"] = data.ReturnedObject; 91 //window["PriorityCountBasket"] 92 return; 93 } 94 else { 95 $('#modalVyberPocetMiest20').modal('show'); 96 } 97 var performance = data.ReturnedObject; 98 g_performance = performance; 99 g_id_performance = performance.ID; 100 g_count_basket = 0; 101 102 103 if (isnull(g_performance.Resale.Nsektor[0])) { 104 $("#resaleNseats").addClass("hidden"); 105 } 106 else { 107 $("#resaleNseats").removeClass("hidden"); 108 var pocet = g_performance.Resale.Nsektor[0]; 109 110 var HTML = new Array(); 111 HTML.push("<option value='0' selected='selected'>Zvolte pocet vstupenek? Max. " + pocet + "ks</option>"); 112 for (var i = 1; i <= pocet; i++) 113 HTML.push("<option value='" + i + "' >" + i + "</option>"); 114 $("#resaleNseats-count").html(HTML.join(' ')); 115 } 116 117 if (performance.Description != "") { 118 $("#mod_v20_vz_desc").removeClass("hidden"); 119 $("#mod_v20_vz_desc2").text(performance.Description); 120 } 121 else { 122 $("#mod_v20_vz_desc").addClass("hidden"); 123 } 124 125 126 $('#NPerformance_Name').html(performance.Event.Name); 127 $('#NPerformance_date').html(performance.FormattedDatetimeDescription); 128 $('#NPerformance_venue').html(performance.Venue.Name); 129 130 if (lokalita == 'cz') 131 $("#NPerformance_Organizator").html(lang["lbOrganizator"] + ": " + performance.Organizator.Nazov + ", " + performance.Organizator.ICO_Adresa + '<a target="_blank" href="https://ares.gov.cz/ekonomicke-subjekty?ico=' + performance.Organizator.ICO + '"> ' + lang["btnDetail"] + ' <i class="fa fa-external-link" style="font-size:14px;"></i></a>'); 132 else 133 $("#NPerformance_Organizator").html(lang["lbOrganizator"] + ": " + performance.Organizator.Nazov + ", " + performance.Organizator.ICO_Adresa); 134 135 //$('#NPerformance_priceSeat').html(Format_mena(performance.PriceCategories[0].Price)); 136 137 138 if (true /*typeof (performance.Discounts) != "undefined" && performance.Discounts != null && performance.Discounts.length != 0*/) { 139 $("#modalVyberPocetMiest20 .vyber-zlavy").removeClass("hidden"); 140 $("#modalVyberPocetMiest20 .vyber-poctu-miest").addClass("hidden"); 141 142 var HTML = new Array(); 143 144 $("#modalVyberPocetMiest20 .pokracuj-kosik-btn").attr("onclick", "Nperf_dis_add();"); 145 146 147 for (var iz = 0; iz < performance.Discounts.length; iz++) { 148 var dis = performance.Discounts[iz]; 149 150 var s = dis.suma; 151 152 if (dis.ID_zlava == 0) { 153 s = performance.PriceCategories[0].Price; 154 } 155 else { 156 if (dis.percento != 0) { 157 s = performance.PriceCategories[0].Price * (1.0 - (dis.percento / 100.0)); 158 } 159 if (dis.suma < 0) 160 s = performance.PriceCategories[0].Price + dis.suma; 161 } 162 163 164 HTML.push('<div class="list-group-item">'); 165 HTML.push(' <div class="item auto">'); 166 HTML.push(' <div class="title h4">' + dis.typ_zlavy + '</div>'); 167 HTML.push(' <p class="text">' + dis.popis + '</p>'); 168 HTML.push(' </div>'); 169 HTML.push(' <div class="item initial text-nowrap select-count">'); 170 HTML.push(' <select class="form-control" name="dis_' + g_id_performance + '_' + dis.ID_zlava + '" id="dis_' + g_id_performance + '_' + dis.ID_zlava + '" suma="' + s + '" ManipulacnyPoplatok="' + dis.ManipulacnyPoplatok + '" onchange="Nperf_dis_sel();">'); 171 for (var pocet = 0; pocet <= performance.MaxRezWWW; pocet++) 172 HTML.push(' <option value="' + pocet + '" ' + (pocet == dis.pocet_kosik ? ' selected="selected" ' : '') + '>
172' + pocet + '</option>'); 173 174 HTML.push(' </select>'); 175 HTML.push(' </div>'); 176 HTML.push(' <div class="item initial price text-nowrap">' + Format_mena(s) + '</div>'); 177 HTML.push('</div>'); 178 } 179 180 HTML.push('<p id="manipulacny_poplatok_root" class="price-sumar hidden">'); 181 HTML.push(' <span class="">' + lang["PoplatokDorucenie_HT"] + '</span > '); 182 HTML.push(' <span id="manipulacny_poplatok_value" class="text-nowrap">' + 0 + '</span>'); 183 HTML.push('</p>'); 184 185 HTML.push('<p class="price-sumar">'); 186 HTML.push(' <span class="">' + lang["lbSpolu"] + '</span > '); 187 HTML.push(' <span id="lbSpolu_value" class="text-nowrap">' + Format_mena(0) + '</span>'); 188 HTML.push('</p>'); 189 190 $("#modalVyberPocetMiest20 .vyber-zlavy .list-group-discounts").html(HTML.join('')); 191 Nperf_dis_sel(); 192 193 } 194 else { 195 $("#modalVyberPocetMiest20 .vyber-zlavy").addClass("hidden"); 196 $("#modalVyberPocetMiest20 .vyber-poctu-miest").removeClass("hidden"); 197 $("#modalVyberPocetMiest20 .pokracuj-kosik-btn").attr("onclick", "window.location = linkIframe(absoluteUri + 'basket');"); 198 } 199 200 201 202 if (typeof (count_basket) == "undefined") 203 count_basket = 0; 204 205 if (count_basket != 0) { 206 $("#NPerformance_count_" + count_basket).addClass("active"); 207 $("#NPerformance_SumPrice").html("" + count_basket + lang["lbKusov"] + " = " + Format_mena(performance.PriceCategories[0].Price * count_basket)); 208 $("#NPerformance_SumPrice")[0].style.color = ""; 209 210 var $zaplatitBtn = $('.modal-footer .pokracuj-kosik-btn'); 211 var $sumar = $(".spolu-sumar"); 212 213 $zaplatitBtn.removeAttr("disabled"); 214 $sumar.parent().addClass("text-zlta"); 215 216 $sumar.addClass("animated " + animationName).one(animationEnd, function () { 217 //sem co sa stane po animacii 218 $sumar.removeClass(animationName) 219 }); 220 221 $sumar.addClass("animated " + animationName).one(animationEnd, function () { 222 //sem co sa stane po animacii 223 $sumar.removeClass(animationName) 224 }); 225 226 g_count_basket = count_basket; 227 } 228 else { 229 $("#NPerformance_SumPrice").html("1" + lang["lbKusov"] + " = " + Format_mena(performance.PriceCategories[0].Price)); 230 $("#NPerformance_SumPrice")[0].style.color = "black"; 231 } 232 233 if (typeof (balicek_pocet_miest) != "undefined" && balicek_pocet_miest != 0) { 234 minSeatCount = balicek_pocet_miest; 235 maxSeatCount = balicek_pocet_miest; 236 } 237 238 var min = 1; 239 var max = g_performance.MaxRezWWW; 240 241 242 if (typeof (minSeatCount) != 'undefined' && typeof (maxSeatCount) != "undefined") { 243 max = g_performance.MaxRezWWW < maxSeatCount ? maxSeatCount : maxSeatCount; 244 min = minSeatCount; 245 } 246 247 if (max > 8) { 248 for (var i = 9; i <= 12; i++) { 249 $("#NPerformance_count_" + i).removeClass("hidden"); 250 } 251 252 if (max > 12) { 253 for (var ii = 13; ii <= 16; ii++) { 254 $("#NPerformance_count_" + ii).removeClass("hidden"); 255 } 256 } 257 else { 258 for (var iii = 13; iii <= 16; iii++) { 259 $("#NPerformance_count_" + iii).addClass("hidden"); 260 } 261 } 262 } 263 else { 264 for (var i = 9; i < 12; i++) { 265 $("#NPerformance_count_" + i).addClass("hidden"); 266 } 267 } 268 269 for (var i = 1; i <= 16; i++) { 270 if (i <= max && i >= min) 271 $("#NPerformance_count_" + i).removeAttr("disabled"); 272 else 273 $("#NPerformance_count_" + i).attr("disabled", "disabled"); 274 } 275 276 } 277 else { 278 alert(data.Message); 279 } 280 }); 281 });
282} 283 284function Nperf_dis_sel() { 285 var selects = $("#modalVyberPocetMiest20 .list-group-discounts select"); 286 287 var pocet = 0; 288 var cena = 0; 289 var manipulak = 0; 290 291 for (var i = 0; i < selects.length; i++) { 292 var p = Number($(selects[i]).val()); 293 pocet += p; 294 cena = cena + p * Number($(selects[i]).attr("suma")); 295 manipulak = manipulak + p * Number($(selects[i]).attr("ManipulacnyPoplatok")); 296 } 297 298 if (manipulak == 0) { 299 $("#manipulacny_poplatok_root").addClass("hidden"); 300 } 301 else { 302 $("#manipulacny_poplatok_root").removeClass("hidden"); 303 $("#manipulacny_poplatok_value").html(Format_mena(manipulak)); 304 } 305 306 $("#modalVyberPocetMiest20 .list-group-discounts .price-sumar #lbSpolu_value").html(Format_mena(cena + manipulak)); 307 308 var pp = g_performance.MaxRezWWW - pocet; 309 310 311 for (var i = 0; i < selects.length; i++) { 312 var p = Number($(selects[i]).val()); 313 314 for (var ii = 0; ii < selects[i].options.length; ii++) { 315 var option = selects[i].options[ii]; 316 317 if (Number(option.value) > (pp+p) && option.value != p) { 318 option.style.display = 'none'; 319 } 320 else { 321 option.style.display = ''; 322 } 323 } 324 } 325 326 if (pocet > 0) 327 $("#modalVyberPocetMiest20 .pokracuj-kosik-btn").removeAttr("disabled"); 328 else 329 $("#modalVyberPocetMiest20 .pokracuj-kosik-btn").attr("disabled", "disabled"); 330} 331 332function Nperf_dis_add() { 333 var selects = $("#modalVyberPocetMiest20 .list-group-discounts select"); 334 var data = ""; 335 336 for (var i = 0; i < selects.length; i++) { 337 var p = Number($(selects[i]).val()); 338 var id_zlava = Number(selects[i].id.split('_')[2]); 339 if (p > 0) 340 data = data + (data != "" ? ";" : "") + id_zlava + "," + p; 341 } 342 343 if (data == "") { 344 window.location = linkIframe(absoluteUri + "basket"); 345 } 346 347 $.ajax({
348 url: absoluteUri + "Event/SetNPerfDiscount/" + g_performance.ID + "?d=" + data, 349 dataType: "json", 350 cache: false, 351 statusCode: { 352 404: function () { alert('Page not found.'); }, 353 500: function () { alert('Internal server error.'); } 354 } 355 }).done(function (data) { 356 if (data.Succeeded) { 357 if (typeof (fbq) != "undefined" && fbq != null) 358 fbq('track', 'AddToCart'); 359 window.location = linkIframe(absoluteUri + "basket"); 360 } 361 else 362 alert(data.Message); 363 }); 364} 365 366function oznac_spravny_pocet(pocet) { 367 $("#modalVyberPocetMiest20 .btn.btn-default.active").removeClass("active"); 368 $("#NPerformance_count_" + pocet).addClass("active"); 369} 370 371function NPerformance_setCount(count) { 372 373 //alert("Pre plánovanú odstávku systému nie je možne oznaÄovaÅ¥ miesta do koÅ¡Ãka."); 374 //return; 375 376 var pocet_teraz = 0; 377 378 if (typeof (Basket) != "undefined") 379 if (isnull(Basket[g_id_performance]) == false) 380 pocet_teraz = Basket[g_id_performance].length; 381 382 if (typeof ($("#NPerformance_count_" + count).attr("disabled")) != "undefined" && $("#NPerformance_count_" + count).attr("disabled") == "disabled") { 383 setTimeout("oznac_spravny_pocet(" + pocet_teraz + ");", 10); 384 385 if (typeof (event) != "undefined" && typeof (event.stopPropagation) != "undefined") 386 event.stopPropagation(); 387 388 return false; 389 } 390 391 if (count == 8) { 392 $("#modalVyberPocetMiest20_8msg").removeClass("hidden"); 393 } 394 else { 395 $("#modalVyberPocetMiest20_8msg").addClass("hidden"); 396 } 397 398 $.ajax({
399 url: absoluteUri + "Event/SetNSeats/" + g_id_performance + "/" + count + "?ug=" + user_guid, 400 dataType: "json", 401 cache: false, 402 statusCode: { 403 404: function () { alert('Page not found.'); }, 404 500: function () { alert('Internal server error.'); } 405 } 406 }).done(function (data) { 407 408 if (data.Succeeded == true) { 409 410 ReloadBasket(data.ReturnedObject.Basket); 411 //$('#basketko').html('<i class="fa fa-shopping-cart"></i><span class="basket-counter" data-count="0">' + data.ReturnedObject.NumberOfBasket + '</span>'); 412 $(".basket-counter").html(data.ReturnedObject.NumberOfBasket); 413 414 if (g_count_basket != 0) 415 $("#NPerformance_count_" + g_count_basket).removeClass("active"); 416 417 $("#NPerformance_count_" + data.ReturnedObject.NumberOfPerformance).addClass("active"); 418 $("#NPerformance_SumPrice").html("" + data.ReturnedObject.NumberOfPerformance + lang["lbKusov"] + " = " + Format_mena(g_performance.PriceCategories[0].Price * data.ReturnedObject.NumberOfPerformance)); 419 $("#NPerformance_SumPrice")[0].style.color = ""; 420 animuj("#NPerformance_SumPrice", "flipInX", false); 421 //$("#NPerformance_SumPrice").addClass("animated flipInX"); 422 423 424 var cena = g_performance.PriceCategories[0].Price * data.ReturnedObject.NumberOfPerformance; 425 var mena = lokalita == 'sk' ? "EUR" : (lokalita == 'cz' ? "CZK" : (lokalita == 'pl' ? "PLN" : "HUF")); 426 if (typeof (fbq) != "undefined") { 427 fbq('track', 'AddToCart', { 428 content_name: g_performance.EventName, 429 //content_category: 'Apparel & Accessories > Shoes', 430 content_ids: [g_performance.Event.EventOut.ID_Out], 431 content_type: 'product', 432 value: cena, 433 currency: mena 434 }); 435 } 436 437 // DNX-1704: GA4 add_to_cart (no-op bez window.tpDL â aktivne len na stage) 438 if (typeof (tpDataLayer) != "undefined") { 439 tpDataLayer.addToCart(g_id_performance, g_performance.PriceCategories[0].Price, data.ReturnedObject.NumberOfPerformance || 1); 440 } 441 442 if (typeof (exponea) != "undefined" && typeof (exponea.track) != "undefined") { 443 exponea.track('AddToCart', { 444 'EventName': g_performance.Event.Name, 445 'EventPlace': g_performance.Venue.Name, 446 'EventCity': g_performance.Venue.City.Name, 447 'EventNote': g_performance.FormattedDatetimeDescription 448 }); 449 } 450 exponea_cart_update(data.ReturnedObject.ID_mp, data.ReturnedObject.akcia); 451 452 453 if (g_count_basket == 0) { 454 var $zaplatitBtn = $('.modal-footer .pokracuj-kosik-btn'); 455 var $sumar = $(".spolu-sumar"); 456 457 $zaplatitBtn.removeAttr("disabled"); 458 $sumar.parent().addClass("text-zlta"); 459 460 $sumar.addClass("animated " + animationName).one(animationEnd, function () { 461 //sem co sa stane po animacii 462 $sumar.removeClass(animationName) 463 }); 464 } 465 changeBasketValue(); 466 g_count_basket = data.ReturnedObject.NumberOfPerformance; 467 468 469 } 470 else { 471 if (data.Message != "NONE") 472 alert(data.Message); 473 } 474 }); 475} 476 477var __pp_prednostny = false; 478var __pmuc = ''; 479 480 481 482// Bazeny 483function PerformanceN_load(id_performance, pp_prednostny) { 484 if (isnull(pp_prednostny)) 485 __pp_prednostny = false; 486 else 487 __pp_prednostny = pp_prednostny; 488 489 delete window["PovoleneSektory"]; 490 var url_fronta = "https://static.ticketportal." + lokalita + "/fronta.ashx?typ=2&idp=" + id_performance + "&id=" + FrontID; 491 492 $.ajax({
493 url: url_fronta, 494 dataType: "text", 495 cache: false, 496 statusCode: { 497 404: function () { alert('Page not found.'); }, 498 500: function () { alert('Internal server error.'); } 499 } 500 }).done(function (data) { 501 502 if (data != "null") { 503 if (data.split(" ")[0] == "False") { 504 ZobrazFrontu(Number(data.split(" ")[1]), id_performance, count_basket, 2); 505 return; 506 } 507 } 508 509 var performanceurl = absoluteUri + "Event/PerformanceNS/" + id_performance; 510 511 $.ajax({ 512 url: performanceurl, 513 dataType: "json", 514 cache: false, 515 statusCode: { 516 404: function () { alert('Page not found.'); }, 517 500: function () { alert('Internal server error.'); } 518 } 519 }).done(function (data) { 520 if (data.Succeeded) { 521 performance = data.ReturnedObject; 522 g_performance = performance; 523 $("#modalVyberPocetMiestNS").modal("show"); 524 525 526 527 Bazeny_transform_data(); 528 529 if (isnull(performance.Basket) == false) 530 Bazeny_basket_transform_data(performance.Basket); 531 532 Bazeny(); 533 534 if (data.ReturnedObject.Blocks.length == 0) { 535 NMiest_setState2("occupied"); 536 } 537 else { 538 NMiest_setState2("normal"); 539 } 540 } 541 }); 542 }); 543} 544 545 546var ns_basket = null; 547function Bazeny_transform_data() { 548 performance["B"] = new Array(); 549 performance["S"] = new Array(); 550 performance["D"] = new Array(); 551 for (var i = 0; i < performance.Blocks.length; i++) { 552 var blok = performance.Blocks[i]; 553 performance.B[blok.ID] = blok; 554 555 for (var j = 0; j < blok.Sektors.length; j++) { 556 var sektor = blok.Sektors[j]; 557 performance.S[sektor.ID] = sektor; 558 } 559 } 560 for (var i = 0; i < performance.Discounts.length; i++) { 561 var discount = performance.Discounts[i]; 562 performance.D[discount.ID_zlava] = discount; 563 } 564} 565 566function Bazeny_basket_transform_data(basket) { 567 568 var p_basket = basket.Performance_count[performance.ID]; 569 basket["NS"] = new Array(); 570 571 if (isnull(p_basket) == false) { 572 for (var i = 0; i < p_basket.length; i++) { 573 var item = p_basket[i]; 574 var key = "" + item.ID_Sector + "_" + item.ID_Discount; 575 576 if (basket.NS[key] == null) { 577 basket.NS[key] = { 578 ID_Sector: item.ID_Sector, 579 ID_Discount: item.ID_Discount, 580 Sector: performance.S[item.ID_Sector].Name, 581 Discount: item.ID_Discount == 0 ? "" : performance.D[item.ID_Discount].typ_zlavy, 582 Count: 0, 583 Price: 0 584 }; 585 } 586 587 basket.NS[key].Count++; 588 basket.NS[key].Price += item.Cena; 589 } 590 } 591 ns_basket = basket; 592} 593function Bazeny() { 594 var p = performance; 595 $("#NSPerformance_Name").html(p.Event.Name); 596 $("#NSPerformance_date").html(p.FormattedDatetimeDescription); 597 $("#NSPerformance_venue").html((p.Venue.Name.indexOf(p.Venue.City.Name) != -1 && lokalita != 'cz' ? p.Venue.Name.replace(p.Venue.City.Name, '').replace(", ", "") : p.Venue.Name) + ", " + p.Venue.Address + (p.Venue.Address.indexOf(p.Venue.City.Name) == -1 ? ", " + p.Venue.City.Name : "")); 598 599 ns_bloky(); 600} 601 602function ns_bloky() { 603 604 var HTML = new Array(); 605 var c = 0; 606 for (var i = 0; i < performance.Blocks.length; i++) { 607 var blok = performance.Blocks[i]; 608 HTML.push('<option value="' + blok.ID + '">' + blok.Name + '</option>'); 609 c++; 610 } 611 $("#NSPerfBlocks").html(HTML.join('')); 612 613 614 if (c == 1 || g_performance.Venue.VenueViewType == "NSectors2") 615 $("#NSPerfBlocks_root").addClass("hidden"); 616 else 617 $("#NSPerfBlocks_root").removeClass("hidden"); 618 619 setTimeout("ns_sektory();", 10); 620} 621 622function ns_sektory() { 623 624 if (g_performance.Venue.VenueViewType == "NSectors2") 625 $("#title-sectors").html(lang["Vyberte"]); 626 627 var id_blok = $('#NSPerfBlocks').find(":selected").val(); 628 var blok = performance.B[id_blok]; 629 630 var HTML = new Array(); 631 for (var i = 0; i < blok.Sektors.length; i++) { 632 var sektor = blok.Sektors[i]; 633 HTML.push('<option value="' + sektor.ID + '">' + sektor.Name + '</option>'); 634 635 if (i == 0) { 636 if (sektor.Description != null && sektor.Description != "") 637 $("#title-sectors").parent().find(".text").html(sektor.Description); 638 } 639 } 640 $("#NSPerfSektors").html(HTML.join(''));
641 642 if (g_performance.Venue.VenueViewType == "NSectors2") 643 $("#NSPerfSektors").width(200); 644 645 if (g_performance.Venue.VenueViewType == "NSectors2") 646 setTimeout("ns_zlavy2();", 10); 647 else 648 setTimeout("ns_zlavy();", 10); 649} 650 651function ns_zlavy() { 652 if (g_performance.Venue.VenueViewType == "NSectors2") { 653 ns_zlavy2(); 654 return; 655 } 656 657 id_sektor = $("#NSPerfSektors").find(":selected").val(); 658 var sektor = performance.S[id_sektor]; 659 660 if (sektor.Description != null && sektor.Description != "") 661 $("#title-sectors").parent().find(".text").html(sektor.Description); 662 663 var HTML = new Array(); 664 HTML.push('<div class="item auto">'); 665 HTML.push(' <div class="title h4"><b>' + lang["lbPocet"] + '</b></div>'); 666 HTML.push(' <p class="text"></p>'); 667 HTML.push('</div>'); 668 669 var key = sektor.ID + "_0"; 670 var count = isnull(ns_basket) ? 0 : (ns_basket.NS[key] == null ? 0 : ns_basket.NS[key].Count); 671 var ma_v_kosiku = count > 0 ? true : false; 672 673 HTML.push('<div class="d-flex align-items-center p-2 pl-0 pr-0">'); 674 HTML.push(' <div class="me-auto p-2 pl-0 pr-0">' + (isnull(sektor.SektorZakladnaCena) ? lang["ZakladneVstupne"] : sektor.SektorZakladnaCena) + '</div>'); 675 HTML.push(' <select class="form-control" id="NS_sektor_' + sektor.ID + '_' + 0 + '" style="width:auto">'); 676 NS_options(HTML, sektor.MaxRez, count); 677 HTML.push('</select>'); 678 HTML.push('<div class="item initial price text-nowrap tw-0 p-1 pl-0 pr-0" style="padding-left:10px;min-width:90px;">' + Format_mena(sektor.Price) + '</div>'); 679 HTML.push('</div>'); 680 681 for (var i = 0; i < performance.Discounts.length; i++) { 682 var discount = performance.Discounts[i]; 683 if (discount.ID_sedadlo_kat == sektor.ID_Price_category) { 684 HTML.push('<div class="d-flex align-items-center p-2 pl-0 pr-0">'); 685 HTML.push(' <div class="me-auto p-2 pl-0 pr-0">' + discount.typ_zlavy + '</div>'); 686 HTML.push(' <select class="form-control" id="NS_sektor_' + sektor.ID + '_' + discount.ID_zlava + '" style="width:auto">'); 687 key = sektor.ID + "_" + discount.ID_zlava; 688 count = isnull(ns_basket) ? 0 : (ns_basket.NS[key] == null ? 0 : ns_basket.NS[key].Count); 689 ma_v_kosiku = ma_v_kosiku ? true : (count > 0 ? true : false); 690 NS_options(HTML, sektor.MaxRez, count); 691 HTML.push('</select>'); 692 if (discount.suma != 0) 693 HTML.push('<div class="item initial price text-nowrap tw-0 p-1 pl-0 pr-0" style="padding-left:10px;min-width:90px;">' + Format_mena(discount.suma) + '</div>'); 694 else 695 HTML.push('<div class="item initial price text-nowrap tw-0 p-1 pl-0 pr-0" style="padding-left:10px;min-width:90px;">' + Format_mena(sektor.Price * (discount.percento / 100.0)) + '</div>'); 696 HTML.push('</div>'); 697 } 698 } 699 700 if (ma_v_kosiku) 701 $("#ns-btn-add").html('<i class="fa fa-pencil"></i> ' + lang["btnUpravit"]); 702 else 703 $("#ns-btn-add").html('<i class="fa fa-plus"></i> ' + lang["btnPridat"]); 704 705 706 $("#NSdiscounts").html(HTML.join('')); 707 NS_Basket(ns_basket); 708} 709 710function ns_zlavy2() { 711 id_sektor = $("#NSPerfSektors").find(":selected").val(); 712 var sektor = performance.S[id_sektor]; 713 714 if (sektor.Description != null && sektor.Description != "") 715 $("#ns2_desc").html(sektor.Description); 716 //$("#title-sectors").parent().find(".text").html(sektor.Description); 717 718 var HTML = new Array(); 719 HTML.push('<div class="item auto">'); 720 HTML.push(' <div class="title h4"><b>' + lang["lbPocet"] + '</b></div>'); 721 HTML.push(' <p class="text"></p>'); 722 HTML.push('</div>'); 723 724 var key = sektor.ID + "_0"; 725 var count = isnull(ns_basket) ? 0 : (ns_basket.NS[key] == null ? 0 : ns_basket.NS[key].Count); 726 var ma_v_kosiku = count > 0 ? true : false; 727 728 HTML.push('<div class="d-flex align-items-center p-2 pl-0 pr-0">'); 729 HTML.push(' <div class="me-auto p-2 pl-0 pr-0">' + (isnull(sektor.SektorZakladnaCena) ? lang["ZakladneVstupne"] : sektor.SektorZakladnaCena) + '</div>'); 730 731 HTML.push('<div class="form-group product-count" style="margin-bottom:0px">'); 732 HTML.push(' <ul class="list-inline">'); 733 HTML.push(' <li>'); 734 HTML.push(' <button id="minus" class="btn btn-link" type="button" onclick="NSCount_minus(' + sektor.ID + ',0)"><i class="fa fa-minus" style="color:#2196f3"></i></button>'); 735 HTML.push(' </li>'); 736 HTML.push(' <li class="numberli">');
737 HTML.push(' <span id="productCounter_' + sektor.ID + '_0" class="product-value" data-count="0">' + count + '</span>'); 738 HTML.push(' </li>'); 739 HTML.push(' <li>'); 740 HTML.push(' <button id="plus" class="btn btn-link" type="button" onclick="NSCount_plus(' + sektor.ID + ', 0, ' + sektor.MaxRez + ')"><i class="fa fa-plus" style="color:#2196f3"></i></button>'); 741 HTML.push(' </li>'); 742 HTML.push(' </ul>'); 743 HTML.push('</div>'); 744 745 HTML.push('<div class="item initial price text-nowrap tw-0 p-1 pl-0 pr-0" style="padding-left:10px;min-width:90px;">' + Format_mena(sektor.Price) + '</div>'); 746 HTML.push('</div>'); 747 748 for (var i = 0; i < performance.Discounts.length; i++) { 749 var discount = performance.Discounts[i]; 750 if (discount.ID_sedadlo_kat == sektor.ID_Price_category) { 751 HTML.push('<div class="d-flex align-items-center p-2 pl-0 pr-0">'); 752 HTML.push(' <div class="me-auto p-2 pl-0 pr-0">' + discount.typ_zlavy + '</div>'); 753 //HTML.push(' <select class="form-control" id="NS_sektor_' + sektor.ID + '_' + discount.ID_zlava + '" style="width:auto">'); 754 //key = sektor.ID + "_" + discount.ID_zlava; 755 //count = isnull(ns_basket) ? 0 : (ns_basket.NS[key] == null ? 0 : ns_basket.NS[key].Count); 756 //ma_v_kosiku = ma_v_kosiku ? true : (count > 0 ? true : false); 757 //NS_options(HTML, sektor.MaxRez, count); 758 759 HTML.push('<div class="form-group product-count">'); 760 HTML.push(' <ul class="list-inline">'); 761 HTML.push(' <li>'); 762 HTML.push(' <button id="minus" class="btn btn-link" type="button" onclick="NSCount_minus(' + sektor.ID + ',' + discount.ID_zlava + ')"><i class="fa fa-minus" style="color:#2196f3"></i></button>'); 763 HTML.push(' </li>'); 764 HTML.push(' <li class="numberli">');
765 HTML.push(' <span id="productCounter_' + sektor.ID + '_' + discount.ID_zlava + '" class="product-value" data-count="0">' + count + '</span>'); 766 HTML.push(' </li>'); 767 HTML.push(' <li>'); 768 HTML.push(' <button id="plus" class="btn btn-link" type="button" onclick="NSCount_plus(' + sektor.ID + ', ' + discount.ID_zlava + ', ' + sektor.MaxRez + ')"><i class="fa fa-plus" style="color:#2196f3"></i></button>'); 769 HTML.push(' </li>'); 770 HTML.push(' </ul>'); 771 HTML.push('</div>'); 772 773 774 HTML.push('</select>'); 775 if (discount.suma != 0) 776 HTML.push('<div class="item initial price text-nowrap tw-0 p-1 pl-0 pr-0" style="padding-left:10px;min-width:90px;">' + Format_mena(discount.suma) + '</div>'); 777 else 778 HTML.push('<div class="item initial price text-nowrap tw-0 p-1 pl-0 pr-0" style="padding-left:10px;min-width:90px;">' + Format_mena(sektor.Price * (discount.percento/100.0)) + '</div>'); 779 HTML.push('</div>'); 780 } 781 } 782 783 if (ma_v_kosiku) 784 $("#ns-btn-add").html('<i class="fa fa-pencil"></i> ' + lang["btnUpravit"]); 785 else 786 $("#ns-btn-add").html('<i class="fa fa-plus"></i> ' + lang["btnPridat"]); 787 788 789 $("#NSdiscounts").html(HTML.join('')); 790 NS_Basket(ns_basket); 791} 792 793function NSCount_minus(id_sektor, id_zlava) { 794 var val = Number($("#productCounter_" + id_sektor + "_" + id_zlava).html()); 795 val = val - 1; 796 if (val < 0) 797 val = 0; 798 $("#productCounter_" + id_sektor + "_" + id_zlava).html(val); 799} 800 801function NSCount_plus(id_sektor, id_zlava, max) { 802 var val = Number($("#productCounter_" + id_sektor + "_" + id_zlava).html()); 803 val = val + 1; 804 if (val > max) 805 val = max; 806 $("#productCounter_" + id_sektor + "_" + id_zlava).html(val); 807} 808 809 810function NS_options(HTML, max, value) { 811 for (var i = 0; i <= max; i++) 812 HTML.push('<option ' + (value == i ? ' selected="selected"' : '') + ' value="' + i + '">' + i + "</option>"); 813} 814 815var count_basket_1 = 0; 816var count_basket_2 = 0; 817function NS_add() { 818 id_sektor = Number($("#NSPerfSektors").find(":selected").val()); 819 820 var data = ""; 821 if (g_performance.Venue.VenueViewType == "NSectors2") { 822 823 var id_zlava = 0; 824 var p = Number($("#productCounter_" + id_sektor + "_" + id_zlava).html()); 825 if (p > 0) 826 data = data + (data != "" ? ";" : "") + id_zlava + "," + p; 827 828 var sektor = performance.S[id_sektor]; 829 for (var i = 0; i < performance.Discounts.length; i++) { 830 var discount = performance.Discounts[i]; 831 if (discount.ID_sedadlo_kat == sektor.ID_Price_category) { 832 var id_zlava = discount.ID_zlava; 833 var p = Number($("#productCounter_" + id_sektor + "_" + id_zlava).html()); 834 if (p > 0) 835 data = data + (data != "" ? ";" : "") + id_zlava + "," + p; 836 } 837 } 838 839 } 840 else { 841 var selects = $("#NSdiscounts select"); 842 843 for (var i = 0; i < selects.length; i++) { 844 var p = Number($(selects[i]).val()); 845 var id_zlava = Number(selects[i].id.split('_')[3]); 846 if (p > 0) 847 data = data + (data != "" ? ";" : "") + id_zlava + "," + p; 848 } 849 } 850 851 if (data == "") { 852 return; 853 } 854 855 count_basket_1 = 0; 856 if (isnull(ns_basket) == false && isnull(ns_basket.Performance_count[performance.ID]) == false) 857 count_basket_1 = ns_basket.Performance_count[performance.ID].length; 858 859 $.ajax({
860 url: absoluteUri + "Event/SetNPerfDiscount/" + performance.ID + "?d=" + data + "&s=" + id_sektor, 861 dataType: "json", 862 cache: false, 863 statusCode: { 864 404: function () { alert('Page not found.'); }, 865 500: function () { alert('Internal server error.'); } 866 } 867 }).done(function (data) { 868 if (data.Succeeded) { 869 Bazeny_basket_transform_data(data.ReturnedObject.Basket); 870 871 count_basket_2 = 0; 872 if (isnull(ns_basket) == false && isnull(ns_basket.Performance_count[performance.ID]) == false) 873 count_basket_2 = ns_basket.Performance_count[performance.ID].length; 874 875 if (count_basket_2 > count_basket_1) { 876 $('.counter').find('span').text(count_basket_2 - count_basket_1); 877 $('#NS_mob_add_message').text(lang["bazeny_polozka_pridana"]); 878 } 879 if (count_basket_2 < count_basket_1) { 880 $('.counter').find('span').text(count_basket_1 - count_basket_2); 881 $('#NS_mob_add_message').text(lang['bazeny_polozka_odobrata']); 882 } 883 884 NS_Basket(ns_basket); 885 } 886 else 887 alert(data.Message); 888 }); 889} 890 891function NS_del(id_sector, id_discount) { 892 893 count_basket_1 = 0; 894 if (isnull(ns_basket) == false && isnull(ns_basket.Performance_count[performance.ID]) == false) 895 count_basket_1 = ns_basket.Performance_count[performance.ID].length; 896 897 var data = "" + id_discount + ',0'; 898 899 for (var key in ns_basket.NS) { 900 var ids = Number(key.split('_')[0]); 901 var idd = Number(key.split('_')[1]); 902 if (ids = id_sector && idd != id_discount) 903 data += ";" + idd + ',' + ns_basket.NS[key].Count; 904 } 905 906 907 $.ajax({
908 url: absoluteUri + "Event/SetNPerfDiscount/" + performance.ID + "?d=" + data + "&s=" + id_sektor, 909 dataType: "json", 910 cache: false, 911 statusCode: { 912 404: function () { alert('Page not found.'); }, 913 500: function () { alert('Internal server error.'); } 914 } 915 }).done(function (data) { 916 if (data.Succeeded) { 917 Bazeny_basket_transform_data(data.ReturnedObject.Basket); 918 919 count_basket_2 = 0; 920 if (isnull(ns_basket) == false && isnull(ns_basket.Performance_count[performance.ID]) == false) 921 count_basket_2 = ns_basket.Performance_count[performance.ID].length; 922 923 if (count_basket_2 > count_basket_1) { 924 $('.counter').find('span').text(count_basket_2 - count_basket_1); 925 $('#NS_mob_add_message').text(lang["bazeny_polozka_pridana"]); 926 } 927 if (count_basket_2 < count_basket_1) { 928 $('.counter').find('span').text(count_basket_1 - count_basket_2); 929 $('#NS_mob_add_message').text(lang["bazeny_polozka_odobrata"]); 930 } 931 ns_zlavy(); 932 //NS_Basket(ns_basket); 933 } 934 else 935 alert(data.Message); 936 }); 937} 938 939function NS_Basket(basket) { 940 var HTML = new Array(); 941 var c = 0; 942 if (isnull(basket) == false && isnull(basket.NS) == false) { 943 for (var i in basket.NS) { 944 var item = basket.NS[i]; 945 HTML.push('<tr>'); 946 HTML.push(' <td>'); 947 HTML.push(' <div class="td-mobile-head">'); 948 HTML.push(' <div>1.</div>'); 949 HTML.push(' <div class="visible-xs hidden-sm">event</div>'); 950 HTML.push(' <a class="visible-xs hidden-sm" onclick="NS_del(' + item.ID_Sektor + ',' + (isnull(item.id_zlava) ? 0 : item.ID_zlava) + ');" href="javascript:;"><i class="fa fa-close"></i></a>'); 951 HTML.push(' </div>'); 952 HTML.push(' </td>'); 953 HTML.push(' <td data-heading="' + lang["HTO_tab_nazov"] + '">' + item.Sector + '</td>'); 954 HTML.push(' <td data-heading="' + lang["lbPocet"] + '">' + item.Count + '</td>'); 955 HTML.push(' <td data-heading="' + lang["lbZlava"] + '">'); 956 HTML.push(' <span>' + item.Discount + '</span>'); 957 HTML.push(' </td>'); 958 HTML.push(' <td class="price text-nowrap" data-heading="' + lang["lbCena"] + '">' + Format_mena(item.Price) + '</td>'); 959 HTML.push(' <td class="remove hidden-xs"><a onclick="NS_del(' + item.ID_Sector + ',' + (isnull(item.ID_Discount) ? 0 : item.ID_Discount) + ');" href="javascript:;"><i class="fa fa-close"></i></a></td>'); 960 HTML.push('</tr>'); 961 c++; 962 } 963 } 964 965 if (c > 0) 966 $("#modalVyberPocetMiestNS .selected-tickets, #modalVyberPocetMiestNS .modal-footer").removeClass("hidden"); 967 else 968 $("#modalVyberPocetMiestNS .selected-tickets, #modalVyberPocetMiestNS .modal-footer").addClass("hidden"); 969 970 971 $("#NS_basket").html(HTML.join('')); 972} 973 974 975var H_max_x = 0; 976var H_max_y = 0; 977var iDnes_msg = ""; 978 979function createA(url, name) { 980 return "<a style='text-decoration:underline' target='_blank' href='" + (isnull(url) ? "" : (url.indexOf('http') == -1 ? 'http://' + url : url)) + "'>" + name + "</a>"; 981} 982 983function FormatPocetMiest(pocet) { 984 if (pocet == 1) return "1 " + lang["Miesto"].toLowerCase(); 985 if (pocet > 1 && pocet < 5) return pocet + " " + lang["2az4Miesta"].toLowerCase(); 986 return pocet + " " + lang["5aViacMiest"].toLowerCase(); 987} 988 989function SpracujPriority(data, wd) { 990 window["TFP_Price"] = null; 991 window["seatMsgCount"] = ""; 992 window["PriorityIbaNaPartnerskej"] = true; 993 delete priority_error; 994 995 if (window.location.href.indexOf(".cz/vip") != -1) { 996 return false; 997 } 998 999 // Ak nema priority 1000 if (data.Priority == null || data.Priority.length == 0 || wd == true) { 1001 //$("#modalHladisko").modal('show'); 1002 return false; 1003 } else { 1004 1005 1006 var UserVerified = false; 1007 var isPartnerVerified = false; 1008 var isPrioritySektor = false; 1009 var ibaPartner = true; 1010 var priority_verified = null; 1011 1012 1013 for (var i in data.Priority) { 1014 if (data.Priority.hasOwnProperty(i)) { 1015 if (data.Priority[i].UserVerified) { 1016 UserVerified = true; 1017 priority_verified = data.Priority[i]; 1018 } 1019 if (data.Priority[i].PrioritySektors != null && data.Priority[i].PrioritySektors.length > 0) { 1020 isPrioritySektor = true; 1021 } 1022 if (data.Priority[i].Partners != null) { // Preskakovanie partnerov 1023 for (var j in data.Priority[i].Partners) { 1024 if (data.Priority[i].Partners.hasOwnProperty(j)) { 1025 if (data.Priority[i].Partners[j].Skip == true && data.Priority[i].Partners[j].ID_Partner == data.UserIDPartner) { 1026 data.Priority[i].UserVerified = true; 1027 //data.Priority[i].PrioritySektors = null; 1028 priority_verified = data.Priority[i]; 1029 UserVerified = true; 1030 isPartnerVerified = true; 1031 ibaPartner = false; 1032 1033 if (isnull(data.Priority[i].Partners[j].minSeatCount) == false) { 1034 priority_verified.minSeatCount = data.Priority[i].Partners[j].minSeatCount; 1035 } 1036 if (isnull(data.Priority[i].Partners[j].maxSeatCount) == false) { 1037 priority_verified.maxSeatCount = data.Priority[i].Partners[j].maxSeatCount; 1038 } 1039 } 1040 } 1041 } 1042 } 1043 } 1044 } 1045 1046 1047 ibaPartner = jeKiosk ? true : ibaPartner; 1048 1049 1050 if (UserVerified) { 1051 1052 1053 1054 // Zobrazi login dialog 1055 if (uil == false && isPartnerVerified == false) { 1056 $("#modalLoginRegNewPasswNewEmail").modal("show"); 1057 $("#login-js-message").html('<div class="alert alert-danger alert-dismissable"><button type="button" class="close danger" data-dismiss="alert" aria-hidden="true">Ã</button>' + lang["priority_prihlasenie_msg"] + '</div>'); 1058 return true; 1059 } 1060 1061 if (isnull(window["minSeatCount_TFP"]) == false && isnull(window["maxSeatCount_TFP"]) == false) { 1062 priority_verified.maxSeatCount = window["maxSeatCount_TFP"]; 1063 priority_verified.minSeatCount = window["minSeatCount_TFP"]; 1064 } 1065 1066 if (priority_verified.minSeatCount != null && priority_verified.UserCountVerified != 0) 1067 priority_verified.minSeatCount *= priority_verified.UserCountVerified; 1068 if (priority_verified.maxSeatCount != null && priority_verified.UserCountVerified != 0) 1069 priority_verified.maxSeatCount *= priority_verified.UserCountVerified; 1070 1071 if (priority_verified.maxSeatCount == null && priority_verified.minSeatCount != null) 1072 seatMsgCount = lang["VybMin"] + " " + FormatPocetMiest(priority_verified.minSeatCount); 1073 if (priority_verified.maxSeatCount != null && priority_verified.minSeatCount == null) 1074 seatMsgCount = lang["VybMax"] + " " + FormatPocetMiest(priority_verified.maxSeatCount); 1075 if (priority_verified.maxSeatCount != null && priority_verified.minSeatCount != null) { 1076 if (priority_verified.maxSeatCount == priority_verified.minSeatCount) 1077 seatMsgCount = lang["Vyberte"] + " " + FormatPocetMiest(priority_verified.maxSeatCount); 1078 else 1079 seatMsgCount = lang["Vyberte"] + " " + priority_verified.minSeatCount + " " + lang["Lbaz"] + " " + FormatPocetMiest(priority_verified.maxSeatCount); 1080 } 1081 1082 if (seatMsgCount != "") 1083 seatMsgCount = "<span id='modal_hladisko_priority_msg' style='color:red; float:right;'>" + seatMsgCount + "</span>"; 1084 1085 $("#hladisko-basket-btn").attr("disabled", "disabled"); 1086 1087 window["minSeatCount"] = priority_verified.minSeatCount; 1088 window["maxSeatCount"] = priority_verified.maxSeatCount; 1089 1090 if (priority_verified.TFP_Price != null && priority_verified.TFP_Price != "null" && priority_verified.TFP_Price != 0) 1091 window["TFP_Price"] = priority_verified.TFP_Price; 1092 } 1093 1094 // Pouzivatel ma overene heslo a zaroven na priority nie je zadany sektor 1095 if (UserVerified && isPrioritySektor == false) { 1096 1097 // Zobrazi login dialog 1098 if (uil == false && isPartnerVerified == false) { 1099 $("#modalLoginRegNewPasswNewEmail").modal("show"); 1100 $("#login-js-message").html('<div class="alert alert-danger alert-dismissable"><button type="button" class="close danger" data-dismiss="alert" aria-hidden="true">Ã</button>' + lang["priority_prihlasenie_msg"] + '</div>'); 1101 return true; 1102 } 1103 1104 //$("#modalHladisko").modal('show'); 1105 return false; 1106 } 1107 1108 // Pouzivatel ma verifikovane heslo ale zaroven existuje priority ktore zaheslovava iba zvolene sektory 1109 if (UserVerified && isPrioritySektor == true) { 1110 // Zobrazi login dialog 1111 if (uil == false && isPartnerVerified == false) { 1112 $("#modalLoginRegNewPasswNewEmail").modal("show"); 1113 $("#login-js-message").html('<div class="alert alert-danger alert-dismissable"><button type="button" class="close danger" data-dismiss="alert" aria-hidden="true">Ã</button>' + lang["priority_prihlasenie_msg"] + '</div>'); 1114 return true; 1115 } 1116 1117 var ibaZvolenySektor = false; 1118 1119 1120 for (var i in data.Priority) { 1121 if (data.Priority[i].UserVerified == true && data.Priority[i].PrioritySektors != null && data.Priority[i].IbaZvolenySektor) { 1122 ibaZvolenySektor = true; 1123 } 1124 } 1125 1126 var dic_povolene = new Array(); 1127 1128 if (ibaZvolenySektor == false) { 1129 for (var i in data.Priority[0].PerformanceSektors) { 1130 dic_povolene[data.Priority[0].PerformanceSektors[i]] = 1; 1131 } 1132 } 1133 1134 for (var i in data.Priority) { 1135 if (data.Priority[i].UserVerified == false && data.Priority[i].PrioritySektors != null) { 1136 for (var j in data.Priority[i].PrioritySektors) 1137 delete dic_povolene[data.Priority[i].PrioritySektors[j]]; 1138 } 1139 } 1140 1141 for (var i in data.Priority) { 1142 if (data.Priority[i].UserVerified == true && data.Priority[i].PrioritySektors != null) { 1143 for (var j in data.Priority[i].PrioritySektors) { 1144 if (data.Priority[i].PrioritySektors.hasOwnProperty(j)) { 1145 dic_povolene[data.Priority[i].PrioritySektors[j]] = 1; 1146 } 1147 } 1148 } 1149 } 1150 1151 window["PovoleneSektory"] = dic_povolene; 1152 //$("#modalHladisko").modal('show'); 1153 return false; 1154 } 1155
1156 //Idnes Kod 1157 if (!UserVerified && typeof (iDnesKod) != "undefined" && iDnesKod != null) { 1158 var ikod = iDnesKod; 1159 iDnesKod = null; 1160 window["PriorityData"] = data; 1161 var id_priority = 0; 1162 1163 for (var i in data.Priority) { 1164 for (var j in data.Priority[i].Partners) { 1165 if (data.Priority[i].Partners[j].ID_Partner == 338) 1166 id_priority = data.Priority[i].ID; 1167 } 1168 } 1169 1170 if (id_priority == 0) id_priority = data.Priority[0].ID; 1171 1172 priority_error = "-1" + "|" + lang["PriorityIdnesInePredstavenie"] + " " + data.EventName + " " + data.DatetimeDescription; 1173 OdosliPriorityIDnes(data.ID, id_priority, ikod); 1174 return; 1175 } 1176 1177 // Ak su vsetky priority pre partnerov, a zaroven nie som ten partner a niektore sektory nie su zaheslovane 1178 if (!UserVerified && isPrioritySektor == true) { 1179 var zobrazSektory = true; 1180 1181 for (var i in data.Priority) { 1182 if (data.Priority[i].PrioritySektors == null) 1183 zobrazSektory = false; 1184 if (data.Priority[i].Partners == null) 1185 zobrazSektory = false; 1186 for (var j in data.Priority[i].Partners) { 1187 if (data.Priority[i].Partners[j].ID_Partner == data.UserIDPartner || data.Priority[i].Partners[j].Skip == true) 1188 zobrazSektory = false; 1189 } 1190 } 1191 1192 if (zobrazSektory) 1193 window["PrioritySektorPreskocit"] = true; 1194 } 1195 1196 // Idnes kuzlo 1197 var povolVsetkoPreWWW = false; 1198 if (data.UserIDPartner != 338) { 1199 1200 var idnes = [1741, 1842, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010, 2011, 2012, 2013, 2014, 2181, 2206, 2208, 2210, 2211, 2218, 2229, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 2240, 2241, 2242, 2251, 2252, 2253, 2258, 2259, 2260, 2261, 2262, 2267, 2174, 2358, 2357]; 1201 1202 for (var i in data.Priority) { 1203 1204 for (var ii = 0; ii < idnes.length; ii++) { 1205 if (data.Priority[i].ID == idnes[ii]) 1206 povolVsetkoPreWWW = true; 1207 } 1208 } 1209 } 1210 1211 1212 // Vsetky priority su na sektory, ide zobrazit ostatne sektory 1213 if (window.PrioritySektorPreskocit == true) { 1214 var allPrioritySektor = true; 1215 for (var i in data.Priority) { 1216 if (data.Priority.hasOwnProperty(i)) { 1217 if (!(data.Priority[i].PrioritySektors != null && data.Priority[i].PrioritySektors.length > 0)) 1218 allPrioritySektor = false; 1219 } 1220 } 1221 1222 if (allPrioritySektor) { 1223 var dic_povolene = new Array(); 1224 for (var i in data.Priority[0].PerformanceSektors) { 1225 if (data.Priority[0].PerformanceSektors.hasOwnProperty(i)) { 1226 dic_povolene[data.Priority[0].PerformanceSektors[i]] = 1; 1227 } 1228 } 1229 1230 if (povolVsetkoPreWWW == false) { 1231 for (var i in data.Priority) { 1232 if (data.Priority[i].UserVerified == false && data.Priority[i].PrioritySektors != null) { 1233 for (var j in data.Priority[i].PrioritySektors) { 1234 if (data.Priority[i].PrioritySektors.hasOwnProperty(j)) { 1235 delete dic_povolene[data.Priority[i].PrioritySektors[j]]; 1236 } 1237 } 1238 } 1239 } 1240 } 1241 1242 window["PovoleneSektory"] = dic_povolene; 1243 //$("#modalHladisko").modal('show'); 1244 return false; 1245 } 1246 else { 1247 if (povolVsetkoPreWWW) 1248 return false; 1249 } 1250 } 1251 else { 1252 if (povolVsetkoPreWWW) 1253 return false; 1254 } 1255 1256 1257 1258 // Zobrazi login dialog 1259 if (uil == false && isPartnerVerified == false) { 1260 $("#modalLoginRegNewPasswNewEmail").modal("show"); 1261 $("#login-js-message").html('<div class="alert alert-danger alert-dismissable"><button type="button" class="close danger" data-dismiss="alert" aria-hidden="true">Ã</button>' + lang["priority_prihlasenie_msg"] + '</div>'); 1262 return true; 1263 } 1264 1265 // Pouzivatel nema overene heslo pre priority 1266 if (!UserVerified) { 1267 1268 // Zistit ci nie je nahodene priority pre reklamneho partnera ineho ako ma pouzivatel a ten reklamny partner ma preskakovat == false 1269 for (var i in data.Priority) { 1270 if (data.Priority.hasOwnProperty(i)) { 1271 data.Priority[i]["LockPartner"] = false; 1272 data.Priority[i]["LockPartnerWWW"] = ''; 1273 if (data.Priority[i].Partners != null) { 1274 for (var j in data.Priority[i].Partners) { 1275 if (data.Priority[i].Partners.hasOwnProperty(j)) { 1276 if (data.Priority[i].Partners[j].Skip == false && data.Priority[i].Partners[j].ID_Partner != data.UserIDPartner) { 1277 data.Priority[i].LockPartner = true; 1278 data.Priority[i].LockPartnerWWW += (data.Priority[i].LockPartnerWWW == '' ? createA(data.Priority[i].Partners[j].PartnerWeb, data.Priority[i].Partners[j].Name) : ', ' + createA(data.Priority[i].Partners[j].PartnerWeb, data.Priority[i].Partners[j].Name)); 1279 } 1280 if (/*data.Priority[i].Partners[j].Skip == false &&*/ data.Priority[i].Partners[j].ID_Partner == data.UserIDPartner) { 1281 data.Priority[i].LockPartner = false; 1282 data.Priority[i].LockPartnerWWW = ''; 1283 break; 1284 } 1285 } 1286 } 1287 } 1288 } 1289 } 1290 1291 var LockAllPartners = true; 1292 var wwwLockPartners = ''; 1293 for (var i in data.Priority) { 1294 if (data.Priority.hasOwnProperty(i)) { 1295 if (data.Priority[i].LockPartner == false) 1296 LockAllPartners = false; 1297 else 1298 wwwLockPartners += (wwwLockPartners == '' ? data.Priority[i].LockPartnerWWW : ', ' + data.Priority[i].LockPartnerWWW); 1299 } 1300 } 1301 1302 var HTML = []; 1303 1304 var poradie = 1; 1305 1306 if (LockAllPartners || jeKiosk) { 1307 GenerujPriorityPartnerWarrning(HTML, wwwLockPartners); 1308 } 1309 else { 1310 1311 for (var i in data.Priority) { 1312 if (data.Priority.hasOwnProperty(i)) { 1313 if (!(data.Priority[i].LockPartner == true)) 1314 GenerujPriority(data.Priority[i], HTML, poradie++, data.Priority.length); 1315 } 1316 } 1317 1318 var onlySektorspriority = true; 1319 for (var i in data.Priority) { 1320 if (data.Priority.hasOwnProperty(i)) { 1321 if (data.Priority[i].PrioritySektors == null) 1322 onlySektorspriority = false; 1323 } 1324 if (data.Priority[i].ZakazBezpPiority) 1325 onlySektorspriority = false; 1326 } 1327 1328 if (onlySektorspriority) 1329 GenerujPriorityBezSektorPriority(HTML); 1330 1331 window["PriorityIbaNaPartnerskej"] = false; 1332 } 1333 1334 if (window["PriorityIbaNaPartnerskej"] == true) 1335 $("#modalPriorityTickets button.btn-success").html(lang["PriorityOnlyPartnerBtn"]); 1336 else 1337 $("#modalPriorityTickets button.btn-success").html(lang["btnPotvrdit"]); 1338 1339 for (var i in data.Priority) { 1340 if (data.Priority.hasOwnProperty(i)) { 1341 data.Priority[i].ValidDateJSON = JsonToolsToDate(data.Priority[i].ValidDateJSON); 1342 } 1343 } 1344 1345 var maxValidDate = new Date(0); 1346 for (var i in data.Priority) { 1347 if (data.Priority.hasOwnProperty(i)) { 1348 if (data.Priority[i].ValidDateJSON > maxValidDate && data.Priority[i].LockPartner == false) 1349 maxValidDate = data.Priority[i].ValidDateJSON; 1350 } 1351 } 1352 1353 var popis_j = false; 1354 for (var i in data.Priority) { 1355 if (data.Priority[i].ID == 746 || data.Priority[i].ID == 747 || data.Priority[i].ID == 750) 1356 popis_j = true; 1357 } 1358 1359 if (popis_j) { 1360 $("#PriorityTopInfoMessage").html("Vážený zákaznÃk, práve prebieha prednostný predaj pre držiteľov prÃstupového hesla."); 1361 } 1362 else { 1363 if (maxValidDate >= new Date(data.EndWwwSale)) 1364 $("#PriorityTopInfoMessage").html(lang["PriorityPopis2"]); 1365 else 1366 $("#PriorityTopInfoMessage").html(lang["PriorityPopis"].replace('%ValidDate%', DateToString(maxValidDate, true))); 1367 } 1368 1369 $("#modalPriorityTickets").find("#accordion").html(HTML.join('\r\n')); 1370 $("#modalPriorityTickets").modal('show'); 1371 1372 if (poradie == 2) { 1373 $("#modalPriorityTickets #collapse1").addClass("in"); 1374 } 1375 return true; 1376 } 1377 } 1378} 1379 1380var pocet_fronta = 0, id_performance_fronta = 0, count_basket_fronta = 0, T_reload_fronta = 30, typ_predstavenie_fronta = 0; 1381 1382 1383var timer_stavy_fronta = null; 1384 1385var sold_percentage = 0; 1386var available_count = 0; 1387 1388function LogStavyMiest(id_performance) { 1389 $.ajax({
1390 url: absoluteUri + "Event/VenueSeatStateCounts/" + id_performance, 1391 dataType: "json", 1392 cache: false 1393 }).done(function (d) { 1394 sold_percentage = d.sold_percentage; 1395 available_count = d.available_count; 1396 1397 $("#sold-percentage").html(sold_percentage); 1398 $("#available-count").html(available_count); 1399 //$("#wait-block-summary").removeClass("hidden"); 1400 1401 }).fail(function (xhr) { 1402 console.log("Stavy miest " + id_performance + ": chyba " + xhr.status); 1403 }); 1404} 1405 1406function StartStavyMiest(id_performance) { 1407 StopStavyMiest(); 1408 LogStavyMiest(id_performance); 1409 timer_stavy_fronta = setInterval(function () { LogStavyMiest(id_performance); }, 15000); 1410} 1411 1412function StopStavyMiest() { 1413 if (timer_stavy_fronta != null) { 1414 clearInterval(timer_stavy_fronta); 1415 timer_stavy_fronta = null; 1416 } 1417} 1418 1419function ZobrazFrontu(pocet, id_performance, count_basket, typ_predstavenia) { 1420 $("#waiting-queue").modal("show"); 1421 $("#queue-order").html(pocet); 1422 $("#queue-order-2").html(pocet); 1423 1424 pocet_fronta = pocet; 1425 id_performance_fronta = id_performance; 1426 count_basket = count_basket; 1427 typ_predstavenie_fronta = typ_predstavenia; 1428 1429 StartStavyMiest(id_performance); 1430 1431 setTimeout("reload_fronta();", T_reload_fronta * 1000); 1432} 1433 1434function reload_fronta() { 1435 1436 var url = "https://static.ticketportal." + lokalita + "/fronta.ashx?typ=3&idp=" + id_performance_fronta + "&id=" + FrontID; 1437 if (lokalita == "empik") 1438 url = "https://static.empikbilety.pl/fronta.ashx?typ=3&idp=" + id_performance_fronta + "&id=" + FrontID; 1439 1440 $.ajax({
1441 url: url, 1442 dataType: "text", 1443 cache: false, 1444 statusCode: { 1445 404: function () { alert('Page not found.'); }, 1446 500: function () { alert('Internal server error.'); } 1447 } 1448 }).done(function (data) { 1449 1450 if (typeof (ga) != "undefined") { 1451 ga('send', 'pageview'); 1452 } 1453 1454 if (data != "null") { 1455 if (data.split(" ")[0] == "False") { 1456 if (Number(data.split(" ")[1]) == -1) { 1457 $("#waiting-queue .btn-danger").html(lang["ReloadPage"]); 1458 $("#fronta_errbox").removeClass("hidden"); 1459 $("#fronta_errbox").html(lang["frontaError1"]); 1460 $("#fronta_errbox").css({ "position": "absolute", "top": "275px", "font-weight" : "bold", "color": "red" }); 1461 $("#fronta_cnt_poradie").addClass("hidden"); 1462 $("#waiting-queue .btn-danger").removeAttr("onclick"); 1463 $("#queue-order").html("-"); 1464 $("#queue-order-2").html("-"); 1465 $("#waiting-queue .btn-danger").click(function () { 1466 location.reload(); 1467 }); 1468 StopStavyMiest(); 1469 return; 1470 } 1471 1472 $("#queue-order").html(Number(data.split(" ")[1])); 1473 $("#queue-order-2").html(Number(data.split(" ")[1])); 1474 Refresh_cookie(); 1475 setTimeout("reload_fronta();", T_reload_fronta * 1000); 1476 } 1477 else { 1478 $("#waiting-queue").modal("hide"); 1479 StopStavyMiest(); 1480 if (typ_predstavenie_fronta == 0) 1481 Performance_load(id_performance_fronta, count_basket_fronta); 1482 if (typ_predstavenie_fronta == 1) 1483 NPerformance_load(id_performance_fronta, count_basket_fronta); 1484 if (typ_predstavenie_fronta == 2) 1485 PerformanceN_load(id_performance_fronta, false); 1486 } 1487 } 1488 else { 1489 $("#waiting-queue").modal("hide"); 1490 StopStavyMiest(); 1491 if (typ_predstavenie_fronta == 0) 1492 Performance_load(id_performance_fronta, count_basket_fronta); 1493 if (typ_predstavenie_fronta == 1) 1494 NPerformance_load(id_performance_fronta, count_basket_fronta); 1495 if (typ_predstavenie_fronta == 2) 1496 PerformanceN_load(id_performance_fronta, false); 1497 } 1498 }); 1499} 1500 1501function Refresh_cookie() { 1502 1503 var url = "https://www.ticketportal." + lokalita + "/Event/Empty/" + FrontID; 1504 if (lokalita == "empik") 1505 url = "https://www.empikbilety.pl/Event/Empty/" + FrontID; 1506 1507 $.ajax({
1508 url: url, 1509 dataType: "text", 1510 cache: false, 1511 statusCode: { 1512 404: function () { alert('Page not found.'); }, 1513 500: function () { alert('Internal server error.'); } 1514 } 1515 }).done(function (data) { }); 1516} 1517 1518var _wd = false; 1519 1520function remove_hash_from_url() { 1521 var uri = window.location.toString(); 1522 if (uri.indexOf("#") > 0) { 1523 var clean_uri = uri.substring(0, uri.indexOf("#")); 1524 window.history.replaceState({}, document.title, clean_uri); 1525 } 1526} 1527 1528function ParseQuery() { 1529 var d = window.location.href.split("?"); 1530 var ret = new Array(); 1531 if (d.length > 1 && d[1].length != 0) { 1532 var query = d[1].split("&"); 1533 1534 for (var i in query) { 1535 var s = query[i].split("="); 1536 if (s.length == 2) 1537 ret[s[0]] = s[1]; 1538 else 1539 ret[s[0]] = ""; 1540 } 1541 } 1542 return ret; 1543} 1544 1545function Spracuj_balicek(id) { 1546 1547 var pokracuj = true; 1548 1549 if (typeof (id) != "undefined" && typeof (balicek_vstupeniek) != "undefined") { 1550 if (balicek_vstupeniek.Verzia == 2) { 1551 for (var ii = 0; ii < balicek_vstupeniek.Predstavenia.length; ii++) { 1552 if (balicek_vstupeniek.Predstavenia[ii].ID_predstavenie == id) { 1553 if (balicek_vstupeniek.Predstavenia[ii].povinneOznacenie == false) 1554 pokracuj = false; 1555 } 1556 } 1557 } 1558 } 1559 else { 1560 return; 1561 } 1562 1563 1564 if (pokracuj == false) { 1565 var buff = new Array(); 1566 var pocet_povinne = 0; 1567 var pocet_nepovinne = 0; 1568 var pocet_nepovinne_aktualne = 0; 1569 var jeNepovinne = false; 1570 1571 // Ulozime si pocet miest pre kazde predstavenie 1572 for (var id_predstavenie in Basket) { 1573 for (var i = 0; i < Basket[id_predstavenie].length; i++) { 1574 var miesto = Basket[id_predstavenie][i]; 1575 if (miesto.BelongsTo == null) { 1576 if (buff[id_predstavenie] == null) 1577 buff[id_predstavenie] = 1; 1578 else 1579 buff[id_predstavenie] = buff[id_predstavenie] + 1; 1580 } 1581 } 1582 } 1583 1584 // Zistime kolko je z coho v kosiku 1585 for (var id_predstavenie in buff) { 1586 for (var ii = 0; ii < balicek_vstupeniek.Predstavenia.length; ii++) { 1587 if (balicek_vstupeniek.Predstavenia[ii].ID_predstavenie == id_predstavenie && balicek_vstupeniek.Predstavenia[ii].povinneOznacenie == true) { 1588 pocet_povinne += buff[id_predstavenie]; 1589 } 1590 if (balicek_vstupeniek.Predstavenia[ii].ID_predstavenie == id_predstavenie && balicek_vstupeniek.Predstavenia[ii].povinneOznacenie == false && id_predstavenie != id) { 1591 pocet_nepovinne += buff[id_predstavenie]; 1592 } 1593 if (balicek_vstupeniek.Predstavenia[ii].ID_predstavenie == id_predstavenie && balicek_vstupeniek.Predstavenia[ii].povinneOznacenie == false && id_predstavenie == id) { 1594 pocet_nepovinne_aktualne += buff[id_predstavenie]; 1595 } 1596 } 1597 } 1598 1599 for (var i = 0; i < balicek_vstupeniek.Predstavenia.length; i++) { 1600 if (balicek_vstupeniek.Predstavenia[i].ID_predstavenie == id && balicek_vstupeniek.Predstavenia[i].povinneOznacenie == false) 1601 jeNepovinne = true; 1602 } 1603 1604 1605 if (jeNepovinne) { 1606 var max_pocet = (pocet_povinne - pocet_nepovinne) + pocet_nepovinne_aktualne; 1607 seatMsgCount = lang["VybMax"] + " " + FormatPocetMiest(max_pocet); 1608 1609 if (seatMsgCount != "") 1610 seatMsgCount = "<span id='modal_hladisko_priority_msg' style='color:red; float:right;'>" + seatMsgCount + "</span>"; 1611 1612 $("#hladisko-basket-btn").attr("disabled", "disabled"); 1613 1614 window["minSeatCount"] = 0; 1615 window["maxSeatCount"] = max_pocet; 1616 } 1617 } 1618 else { 1619 if (typeof (balicek_pocet_miest) != "undefined" && balicek_pocet_miest != 0) { 1620 1621 seatMsgCount = lang["Vyberte"] + " " + FormatPocetMiest(balicek_pocet_miest); 1622 1623 if (seatMsgCount != "") 1624 seatMsgCount = "<span id='modal_hladisko_priority_msg' style='color:red; float:right;'>" + seatMsgCount + "</span>"; 1625 1626 $("#hladisko-basket-btn").attr("disabled", "disabled"); 1627 1628 window["minSeatCount"] = balicek_pocet_miest; 1629 window["maxSeatCount"] = balicek_pocet_miest; 1630 } 1631 } 1632} 1633 1634window.onCurrencyChange = function (currencyCode) { 1635 console.log('Currency changed to:', currencyCode); 1636 var result = null; 1637 1638 1639 $.ajax({
1640 url: absoluteUri + "Event/PerformanceChangeCurrency/" + g_performance.ID + "/" + currencyCode, 1641 dataType: "json", 1642 async: false, 1643 cache: false, 1644 statusCode: { 1645 404: function () { alert('Page not found.'); }, 1646 500: function () { alert('Internal server error.'); } 1647 } 1648 }).done(function (data) { 1649 if (data.Succeeded) { 1650 Performance_load(g_performance.ID); 1651 result = true; 1652 } 1653 else { 1654 alert(data.Message); 1655 result = false; 1656 } 1657 }); 1658 1659 return result; 1660}; 1661 1662function Performance_load(id_performance, count_basket, dom, wd, pp_prednostny, pmuc) { 1663 if (isnull(pmuc) || pmuc == false) 1664 __pmuc = ''; 1665 else 1666 __pmuc = window["upgrade_guid"]; 1667 1668 if (isnull(pp_prednostny)) 1669 __pp_prednostny = false; 1670 else 1671 __pp_prednostny = pp_prednostny; 1672 1673 if (__pp_prednostny) 1674 $("#hladisko-basket-btn .text").html(lang["RychlyNakup_Pokracuj"]); 1675 1676 if (isnull(wd)) 1677 _wd = false; 1678 else 1679 _wd = wd; 1680 if (_wd == true) 1681 count_basket = 0; 1682 else 1683 $("#modal-control-body").css("display", ""); 1684 1685 var query = ParseQuery(); 1686 1687 if (window.location.href.indexOf("reloadperformance") == -1) { 1688 if (location.href.indexOf("iframe") == -1) { 1689 //Ak nie je na iframe doplni idp do url 1690 if (location.href.indexOf("utm_source") == -1) { 1691 if (typeof (window.history.pushState) != "undefined" && _wd == false && IsMobile() == false) { 1692 window.history.replaceState('object or string', document.title, window.location.pathname + '?idp=' + id_performance + (bid != null ? "&bid=" + bid : "") + (isnull(query["t"]) == false ? "&t=" + query["t"] : "")); 1693 } 1694 } 1695 } 1696 else { 1697 if (!(QueryString["fb"] == "") && !(QueryString["noembeded"] == "")) { 1698 $("#modalHladisko .modal-dialog").css({ top: 10 }); 1699 $("#modalPriorityTickets").css({ top: 10 }); 1700 ScrollPorthole(0); 1701 } 1702 } 1703 } 1704 1705 reset_hladisko(); 1706 1707 if (__pmuc == '') { 1708 delete window["minSeatCount"]; 1709 delete window["maxSeatCount"]; 1710 } 1711 delete window["PovoleneSektory"]; 1712 1713 var url_fronta = "https://static.ticketportal." + lokalita + "/fronta.ashx?typ=2&idp=" + id_performance + "&id=" + FrontID; 1714 if (lokalita == "bg") 1715 url_fronta = "https://static.ticketportal.sk/fronta.ashx?typ=2&idp=" + id_performance + "&id=" + FrontID; 1716 1717 $.ajax({
1718 url: url_fronta, 1719 dataType: "text", 1720 cache: false, 1721 statusCode: { 1722 404: function () { alert('Page not found.'); }, 1723 500: function () { alert('Internal server error.'); } 1724 } 1725 }).done(function (data) { 1726 1727 if (data != "null") { 1728 if (data.split(" ")[0] == "False") { 1729 ZobrazFrontu(Number(data.split(" ")[1]), id_performance, count_basket, 0); 1730 return; 1731 } 1732 } 1733 1734 var vymena = false; 1735 if (typeof (id_miesto_vymena) != "undefined" && typeof (id_rezervacia_vymena) != "undefined" && id_miesto_vymena != null && id_rezervacia_vymena != null) 1736 vymena = true; 1737 1738 var performanceurl = absoluteUri + "Event/Performance/" + id_performance + (_wd == true || vymena == true ? "?wd=1" : ""); 1739 if (typeof (id_rezervacia_vymena) != "undefined" && isnull(id_rezervacia_vymena) == false) { 1740 if (performanceurl.indexOf("?") == -1) 1741 performanceurl += "?idrvymena=" + id_rezervacia_vymena; 1742 else 1743 performanceurl += "&idrvymena=" + id_rezervacia_vymena; 1744 } 1745 1746 1747 if (__pmuc != '') { 1748 performanceurl += (performanceurl.includes('?') ? '&' : '?') + 'pmuc=' + __pmuc; 1749 } 1750 1751 $.ajax({
1752 url: performanceurl, 1753 dataType: "json", 1754 cache: false, 1755 statusCode: { 1756 404: function () { alert('Page not found.'); }, 1757 500: function () { alert('Internal server error.'); } 1758 } 1759 }).done(function (data) { 1760 1761 /*if (typeof (ga) != "undefined" && _wd == false) { 1762 ga('set', 'page', window.location.pathname + "#performance"); 1763 ga('send', 'pageview'); 1764 }*/ 1765 1766 if (data.Succeeded) { 1767 lang = window["lang"]; 1768 data = data.ReturnedObject; 1769 1770 1771 1772 1773 1774 var buff = new Array(); 1775 for (var i in data.SpecialSeatsDescription) { 1776 var _lang = i; 1777 for (var ii = 0; ii < data.SpecialSeatsDescription[i].length;ii++) { 1778 buff[data.SpecialSeatsDescription[i][ii]] = _lang; 1779 } 1780 } 1781 data.SpecialSeatsDescription = buff; 1782 1783 1784 if (isnull(data.Resale) == false) { 1785 var seats = new Array(); 1786 for (var i in data.Resale.Seats) 1787 seats[data.Resale.Seats[i].ID] = data.Resale.Seats[i]; 1788 data.Resale.Seats = seats; 1789 } 1790 1791 1792 zobrazKruh = data.TvarSedadiel == 2; 1793 1794 if (data.ID_PerformanceCategory == 99) { 1795 window.Location = absoluteUri + "/performance/" + data.ID; 1796 return; 1797 } 1798 1799 if (data.nepredavatSamostatne && typeof (balicek_vstupeniek) != "undefined") { 1800 $.ajax({
1801 url: absoluteUri + "RedirectBalicek/" + id_performance, 1802 cache: false, 1803 statusCode: { 1804 404: function () { alert('Page not found.'); }, 1805 500: function () { alert('Internal server error.'); } 1806 } 1807 }).done(function (data) { 1808 if (data != "") { 1809 window.Location = data; 1810 return; 1811 } 1812 }); 1813 } 1814 1815 1816 if (data.IsNSeatVenue) 1817 return NPerformance_load(data.ID, count_basket); 1818 1819 // Ak sa jedna o bazeny hladisko sa nezobrazuje 1820 if (data.Venue.VenueViewType == "NSectors" || data.Venue.VenueViewType == "NSectors2") { 1821 PerformanceN_load(data.ID, pp_prednostny); 1822 return; 1823 } 1824 1825 var preskoc = false; 1826 if (data.ID == 1353832 && id_reklamny_partner == 0) { 1827 preskoc = true; 1828 window["seatMsgCount"] = ""; 1829 } 1830 1831 1832 // jazykova lista 1833 1834 curr_dictionary = { 1835 "CZK": "KÄ", 1836 "EUR": "â¬", 1837 "USD": "$" 1838 }; 1839 1840 var sys_lang = new Array(); 1841 var perf_curr = new Array(); 1842 var allow_curr = null; 1843 for (var i = 0; i < data.SystemLanguages.length; i++) 1844 sys_lang.push(data.SystemLanguages[i].Code + "|" + data.SystemLanguages[i].Name); 1845 for (var i = 0; i < data.Currencies.length; i++) { 1846 perf_curr.push(data.Currencies[i].toLowerCase() + "|" + data.Currencies[i] + " " + curr_dictionary[data.Currencies[i]]); 1847 allow_curr = allow_curr == null ? false : true 1848 } 1849 userMena = data.userBasket.Currency; 1850 1851 if (window.LCSwitcher) { 1852 LCSwitcher.init({ 1853 language: data.userLanguage.Code, //document.documentElement.getAttribute('lang'), 1854 languages: sys_lang, 1855 currencies: perf_curr, 1856 languageChangeUrl: '/Home/ChangeLanguage?code={CODE}', 1857 allowCurrencyChange: allow_curr, 1858 debug: false, 1859 currency: data.userBasket.Currency.toLowerCase() 1860 }); 1861 } 1862 1863 1864 // Zobrazi login dialog 1865 if (uil == false && data.SSOVerifyRequired == true) { 1866 $("#modalLoginRegNewPasswNewEmail").modal("show"); 1867 $("#login-js-message").html('<div class="alert alert-danger alert-dismissable"><button type="button" class="close danger" data-dismiss="alert" aria-hidden="true">Ã</button>' + lang["ssoverified_prihlasenie_msg"] + '</div>'); 1868 return true; 1869 } 1870 1871 1872 // Tu treba spracovat priority 1873 if (__pp_prednostny == false && preskoc == false && SpracujPriority(data, _wd) == true) { 1874 window["PriorityData"] = data; 1875 //window["PriorityCountBasket"] 1876 1877 setTimeout('$(".modal-body.modal-body-priority .panel-body .form-group div.col-md-6").addClass("hidden-xs");', 200); 1878 return; 1879 } else { 1880 1881 // Ak je mobil a iframe -> Redirect 1882 if ((navigator.userAgent.match(/Android/i) 1883 || navigator.userAgent.match(/iPhone/i) 1884 || navigator.userAgent.match(/iPad/i) 1885 || navigator.userAgent.match(/iPod/i) 1886 || navigator.userAgent.match(/BlackBerry/i) 1887 || navigator.userAgent.match(/webOS/i)) && location.href.indexOf("iframe") && _wd == false) { 1888 //window.location = linkIframe(absoluteUri + "Performance/" + id_performance); 1889 //return; 1890 } 1891 1892 window["TFP_Price"] = null; 1893 window["seatMsgCount"] = ""; 1894 1895 $("#modalHladisko").modal('show'); 1896 } 1897 Spracuj_balicek(data.ID); 1898 1899 if (typeof (id_miesto_vymena) != "undefined" && id_miesto_vymena != null) { 1900 var max_pocet = 1; 1901 seatMsgCount = lang["VybMax"] + " " + FormatPocetMiest(max_pocet); 1902 1903 if (seatMsgCount != "") 1904 seatMsgCount = "<span id='modal_hladisko_priority_msg' style='color:red; float:right;'>" + seatMsgCount + "</span>"; 1905 1906 $("#hladisko-basket-btn").attr("disabled", "disabled"); 1907 $("#hladisko-basket-btn .text").html(lang["VymenitMiesto"]); 1908 1909 window["minSeatCount"] = 0; 1910 window["maxSeatCount"] = max_pocet; 1911 } 1912 1913 1914 g_performance = data; 1915 var wd_html = ""; 1916 if (data.WD_EnableForPrevadzkovatel == true && (data.WD_EnableForCateg == true || data.WD_EnableForSectors) && data.WD_EnableForFree) { 1917 var wd_html = GenerujWatchdog(data.ID); 1918 } 1919
1920 if (data.Venue.Name.indexOf(data.Venue.City.Name) != -1 && lokalita != 'cz') 1921 { 1922 data.Venue.Name = data.Venue.Name.replace(", " + data.Venue.City.Name, ''); 1923 data.Venue.Name = data.Venue.Name.replace("," + data.Venue.City.Name, ''); 1924 data.Venue.Name = data.Venue.Name.replace(data.Venue.City.Name, ''); 1925 } 1926 1927 let orgHtml = ""; 1928 1929 if (lokalita == 'cz') { 1930 orgHtml = ". " + lang["lbOrganizator"] + ": " + data.Organizator.Nazov 1931 + ", " + lang["ICO"] + ": " + data.Organizator.ICO 1932 + ' <a target="_blank" href="https://ares.gov.cz/ekonomicke-subjekty?ico=' 1933 + data.Organizator.ICO.replaceAll(' ', '') + '"> ' + lang["btnDetail"] 1934 + ' <i class="fa fa-external-link" style="font-size:14px;"></i></a>'; 1935 } else { 1936 orgHtml = ". " + lang["lbOrganizator"] + ": " + data.Organizator.Nazov 1937 + ", " + lang["ICO"] + ": " + data.Organizator.ICO; 1938 } 1939 1940 $('#myModalHladiskoLabel').html( 1941 data.Event.Name 1942 + ' - <span class="normal" style="font-weight: normal">' 1943 + data.FormattedDatetimeDescription 1944 + '</span>' 1945 + (data && data.Venue && data.Venue.City && data.Venue.City.Name 1946 ? ", " + data.Venue.City.Name 1947 : "") 1948 + ' <span style="font-weight: normal;">' + orgHtml + '</span>' 1949 ); 1950 1951 var reset = window.location.href.indexOf("reloadperformance") > 0 ? "?reset" : ""; 1952 1953 if (data.Venue.HasSvg && typeof SVGRect != "undefined") { 1954 $.ajax({
1955 url: absoluteUri + "Event/VenueSvgData/" + data.Venue.ID + "/0" + reset, 1956 dataType: "json", 1957 cache: false, 1958 statusCode: { 1959 404: function () { alert('Page not found.'); }, 1960 500: function () { alert('Internal server error.'); } 1961 } 1962 }).done(function (svg_data) { 1963 if (svg_data.Succeeded) { 1964 1965 H_max_x = svg_data.ReturnedObject.Rozmer_x; 1966 H_max_y = svg_data.ReturnedObject.Rozmer_y; 1967 1968 if (svg_data.ReturnedObject.Sektory == null) { 1969 if (svg_data.ReturnedObject.SVG[0] == '?') 1970 svg_data.ReturnedObject.SVG = svg_data.ReturnedObject.SVG.substring(1); 1971 1972 $('#hladisko-canvas-container').html("<canvas id='canvas' width='100px' height='100px' style='position:absolute;top:0px;left:0px;'></canvas><div>" + svg_data.ReturnedObject.SVG + "</div>"); 1973 } 1974 else { 1975 $('#hladisko-canvas-container').html("<canvas id='canvas' width='100px' height='100px' style='position:absolute;top:0px;left:0px;'></canvas><svg id='_svg' width='1000' height='1000' style='position:absolute;top:0px;left:0px' xmlns='http://www.w3.org/2000/svg' version='1.2'>" + svg_data.ReturnedObject.Kategorie + svg_data.ReturnedObject.Sektory + svg_data.ReturnedObject.Grafika1 + svg_data.ReturnedObject.Grafika2 + svg_data.ReturnedObject.Foto + "</svg>"); 1976 } 1977 1978 1979 //--- Nacitanie info o obrazkoch v galerii --- 1980 $.ajax({
1981 url: absoluteUri + "Event/VenueSvgFoto/" + data.Venue.ID, 1982 cache: false, 1983 statusCode: { 1984 404: function () { alert('Page not found.'); }, 1985 500: function () { alert('Internal server error.'); } 1986 } 1987 }).done(function (svg_gallery_data) { 1988 eval(svg_gallery_data); 1989 }); 1990 //---- end --- 1991 1992 1993 1994 1995 1996 Performance_read_data("HasLayoutHasImage"); 1997 } 1998 else { 1999 alert('Internal server error.'); 2000 } 2001 }); 2002 } else { 2003 2004 //if (lokalita == "hu" && data.ID == 465680) { 2005 // data.Venue.Image = "https://static.ticketportal.hu/images/predstavenie/465680/hladisko/20220223elfogyott.jpg"; 2006 //} 2007 var ix = data.Venue.Image == null ? -1 : data.Venue.Image.indexOf("x$x"); 2008 if (ix != -1) { 2009 var imageName = data.Venue.Image.substring(ix + 3); 2010 data.Venue.Image = "https://static.ticketportal." + lokalita + "/images/predstavenie/" + data.ID + "/hladisko/" + imageName; 2011 } 2012 2013 2014 2015 if (data.Venue.VenueViewType == "NoLayoutHasImage" || data.Venue.VenueViewType == "HasLayoutHasImage") { 2016 Image_x = data.Venue.Image_x; 2017 Image_y = data.Venue.Image_y; 2018 2019 var w_h = $(window).height(); 2020 var k = 1.0; 2021 if (w_h > Image_x) { 2022 k = w_h / Image_x; 2023 Image_x = Image_x * k; 2024 Image_y = Image_y * k; 2025 } 2026 2027 $('#hladisko-canvas-container').html("<canvas id='canvas' width='100px' height='100px' style='position:absolute;top:0px;left:0px;display:none'></canvas><img id='imgMap' usemap='#stage' src='" + data.Venue.Image + "' width='" + data.Venue.Image_x + "' height='" + data.Venue.Image_y + "'><map name='stage'>" + GenerateMap() + "</map><button onclick='ZobrazCeleHladisko_obrazok();' type='button' class='btn btn-link hidden' id='ZobrazCeleHladisko_obrazok_link2' style='z-index:10000000; position:absolute;'><i class='fa fa-close hidden'></i> <span class='hidden-sm'>" + lang["lbHladiskoZobrazitCele"] + "</span></button>"); 2028 Performance_read_data(g_performance.Venue.VenueViewType); 2029 } 2030 2031 if (data.Venue.VenueViewType == "NoLayoutNoImage" || data.Venue.VenueViewType == "HasLayoutN
2031oImage") { 2032 $('#hladisko-canvas-container').html("<canvas id='canvas' width='100px' height='100px' style='position:absolute;top:0px;left:0px;'></canvas>"); 2033 Performance_read_data(g_performance.Venue.VenueViewType); 2034 } 2035 } 2036 } 2037 else { 2038 if (isnull(data.Message) == false && data.Message != "") { 2039 if (data.ResultStatus == "Unauthorized" && data.ReturnedObject != null && data.ReturnedObject.SSOVerifyRequired == true) { 2040 alert(data.Message); 2041 } 2042 else { 2043 if (data.ResultStatus == "Unauthorized") { 2044 $("#modalLoginRegNewPasswNewEmail").modal("show"); 2045 $("#formLogin").prepend('<div class="alert alert-danger">' + data.Message + '</div>'); 2046 } 2047 else { 2048 alert(data.Message); 2049 } 2050 } 2051 } 2052 } 2053 }); 2054 }); 2055} 2056 2057function Performance_read_data(nastavenie) { 2058 2059 var reset = window.location.href.indexOf("reloadperformance") > 0 ? "&reset" : ""; 2060 2061 $.ajax({
2062 url: absoluteUri + "Event/VenueData/" + g_performance.Venue.ID + "?NastavenieHladiska=" + nastavenie + (_wd ? "&wd=1" : "") + reset, 2063 cache: false, 2064 statusCode: { 2065 404: function () { alert('Page not found.'); }, 2066 500: function () { alert('Internal server error.'); } 2067 } 2068 }).done(function (javisko_data) { 2069 eval(javisko_data); 2070 2071 var maVyz = (g_performance.Venue.HasLayout == false ? "1" : "0") 2072 if (g_performance.Venue.VenueViewType.indexOf("NoLayout") != -1) 2073 maVyz = "1"; 2074 2075 var linkmiesta = absoluteUri + "Event/VenueSeatStateData/" + g_performance.ID + "?noVyzor=" + maVyz + (_wd ? "&wd=1" : "") + (__pmuc != '' ? "&pmuc=" + __pmuc : ""); 2076 window["linkmiesta"] = linkmiesta; 2077 2078 $.ajax({ 2079 url: linkmiesta, 2080 cache: false, 2081 statusCode: { 2082 404: function () { alert('Page not found.'); }, 2083 500: function () { alert('Internal server error.'); } 2084 } 2085 }).done(function (predstavenie_data) { 2086 eval(predstavenie_data); 2087 2088 2089 $.ajax({
2090 url: absoluteUri + "Event/BasketSimple", 2091 cache: false, 2092 statusCode: { 2093 404: function () { alert('Page not found.'); }, 2094 500: function () { alert('Internal server error.'); } 2095 } 2096 }).done(function (basket_data) { 2097 2098 GenerujBasket(basket_data); 2099 Generate_kateg(); 2100 remove_hash_from_url(); 2101 2102 if (g_performance.Venue.HasSvg && typeof SVGRect != "undefined") 2103 JaviskoSVG_init(); 2104 else { 2105 if (g_performance.Venue.VenueViewType == "NoLayoutHasImage" || g_performance.Venue.VenueViewType == "HasLayoutHasImage") 2106 JaviskoObrazokInit(); 2107 else { 2108 if (g_performance.Venue.VenueViewType == "NoLayoutNoImage" || g_performance.Venue.VenueViewType == "HasLayoutNoImage") 2109 JaviskoSmallinit(); 2110 } 2111 } 2112 2113 if (typeof (isQuickPurcharse) != "undefined" && isQuickPurcharse == true && qp_bascent_count == 0) 2114 SpracujRychlyNakup(null); 2115 2116 if (typeof (isQuickPurcharse) != "undefined" && isQuickPurcharse == true && __isIframe__) 2117 document.getElementById("modalRychlaPlatba316").style.display = "none"; 2118 }); 2119 }); 2120 }); 2121} 2122 2123var k_all = new Array(); 2124var k_nezobrazovat = new Array(); 2125var oznacene = new Array(); 2126 2127 2128function GenerujBasket(basket_data) { 2129 2130 if (basket_data.ResultStatus == 1) { 2131 Basket = new Array(); 2132 var pocet = 0; 2133 2134 if (basket_data.ReturnedObject.Count != 0) { 2135 for (var i in basket_data.ReturnedObject.items) { 2136 if (basket_data.ReturnedObject.items.hasOwnProperty(i)) { 2137 var item = basket_data.ReturnedObject.items[i]; 2138 2139 if (typeof (Basket[item.ID_Predstavenie]) == 'undefined' || Basket[item.ID_Predstavenie] == null) 2140 Basket[item.ID_Predstavenie] = new Array(); 2141 2142 Basket[item.ID_Predstavenie].push({ id_predstavenie: item.ID_Predstavenie, ID_Miesto_Javisko: item.ID_Miesto_Javisko, Cena: item.Cena, ID_Miesto_sluzba: item.ID_Miesto_sluzba }); 2143 pocet++; 2144 } 2145 } 2146 } 2147 2148 if (is_mobile) { 2149 if (pocet > 0) { 2150 var $infoKosik = $('.kosik-box'); 2151 var $vyberPocetVst = $('.vyber-pocet-vst'); 2152 $infoKosik.removeClass("hidden").removeClass($vyberPocetVst).addClass("animated " + animationNameKosik).one(animationEnd, function () { });
2153 $("#hladisko_basket_2").html("<i class='fa fa-shopping-cart'><span> " + pocet + " </span></i>"); 2154 } 2155 } 2156 else { 2157 $('#hladisko-basket-all-count').html(" (" + pocet + ")"); 2158 2159 if (pocet > 0) 2160 $("#hladisko-basket-btn").removeClass("disabled"); 2161 } 2162 } 2163} 2164 2165function Generate_kateg() { 2166 k_all = new Array(); 2167 2168 for (var i in g_performance.PriceCategories) { 2169 if (g_performance.PriceCategories.hasOwnProperty(i)) { 2170 k_all[g_performance.PriceCategories[i].ID] = [g_performance.PriceCategories[i].Color, g_performance.PriceCategories[i].Name, g_performance.PriceCategories[i].Price, 1]; //??? 1? 2171 } 2172 } 2173 2174 var buff = new Array(); 2175 for (var i in g_performance.PriceCategories) { 2176 if (g_performance.PriceCategories.hasOwnProperty(i)) { 2177 buff.push(g_performance.PriceCategories[i]); 2178 } 2179 } 2180 2181 g_performance.PriceCategories = new Array(); 2182 2183 for (var i in buff) { 2184 if (buff.hasOwnProperty(i)) { 2185 g_performance.PriceCategories[buff[i].ID] = buff[i]; 2186 } 2187 } 2188 2189 for (var i in g_performance.PriceCategories) { 2190 if (g_performance.PriceCategories.hasOwnProperty(i)) { 2191 k_nezobrazovat[g_performance.PriceCategories[i].ID] = g_performance.PriceCategories[i].DonNotShowCateg == true ? 0 : 1; 2192 } 2193 } 2194 2195 2196 oznacene = new Array(); 2197 var pocet = 0; 2198 var cena = 0; 2199 for (var i in Basket[g_performance.ID]) { 2200 if (Basket[g_performance.ID].hasOwnProperty(i)) { 2201 var obj = Basket[g_performance.ID][i]; 2202 2203 if (obj.ID_Miesto_sluzba == null) { 2204 oznacene[obj.ID_Miesto_Javisko] = 1; 2205 pocet++; 2206 cena += obj.Cena; 2207 } 2208 } 2209 } 2210 2211 // Priority kontrola 2212 if (typeof (minSeatCount) != 'undefined' && typeof (maxSeatCount) != "undefined") { 2213 ok = true; 2214 2215 if (minSeatCount != null && pocet < minSeatCount) 2216 ok = false; 2217 2218 if (maxSeatCount != null && pocet > maxSeatCount) 2219 ok = false; 2220 2221 if (ok) { 2222 $("#hladisko-basket-btn").removeAttr("disabled"); 2223 if ($("#modal_hladisko_priority_msg").length != 0) 2224 $("#modal_hladisko_priority_msg")[0].style.color = "green"; 2225 } 2226 else { 2227 $("#hladisko-basket-btn").attr("disabled", "disabled"); 2228 if ($("#modal_hladisko_priority_msg").length != 0) 2229 $("#modal_hladisko_priority_msg")[0].style.color = "red"; 2230 } 2231 } 2232 // 2233 2234 if (is_mobile) { 2235 $('#hladisko-nsektor-basket-pocet').html("" + pocet); 2236 $('#hladisko-nsektor-basket-cena').html(Format_mena(cena, userMena)); 2237 } 2238 else { 2239 $('#hladisko-pocet').html("" + pocet); 2240 $('#hladisko-cena').html(Format_mena(cena, userMena)); 2241 } 2242} 2243 2244function zavry_sektory() { 2245 $("#miniHladisko-box").hide("fast", function () { 2246 if ($('#press-unpack').hasClass("unpack")) { 2247 $('#press-unpack').removeClass("unpack"); 2248 $('#press-unpack').addClass("pack"); 2249 } 2250 }); 2251} 2252 2253$(function () { 2254 // ak klik na tab tak init masonry 2255 $(document).on('shown.bs.tab', 'a[data-toggle="tab"]', function (e) { 2256 console.log(e.target) // activated tab 2257 $(".grid").masonry(); 2258 }) 2259 2260 $('.modalVyberPocetMiest .btn-group label').on('click', function () { 2261 var $zaplatitBtn = $('.modal-footer .pokracuj-kosik-btn'); 2262 var $sumar = $(".spolu-sumar"); 2263 2264 $zaplatitBtn.removeAttr("disabled"); 2265 $sumar.parent().addClass("text-zlta"); 2266 2267 $sumar.addClass("animated " + animationName).one(animationEnd, function () { 2268 //sem co sa stane po animacii 2269 $sumar.removeClass(animationName) 2270 }); 2271 }) 2272 2273 $(".modal-body.hladisko-body").scroll(function () { 2274 $(".modal-body.control-body").addClass("scrollTop"); 2275 }); 2276 2277 2278 /* klasiske bootstrap navbar menu v mobile namiesto tabs (nahradzujem za responsive-tabs) 2279 2280 $('#navbarDetail-selectVal').text($('#navbarDetail ul li.active a').text()) 2281 2282 $('#navbarDetail-selectVal').text(function () { 2283 this.text() = "aaaa" 2284 }) 2285 */ 2286}) 2287 2288function AnimateBasket() { 2289 var $tienModalneho = $('.modal-backdrop.fade.in');
2290 var $navbarHeight = $('.navigacia-only-back').outerHeight(); 2291 //$('.zrusit-vyber').toggleClass('hidden') 2292 // odsunie backdrop modalneho okna 2293 $tienModalneho.css({ 2294 // 'margin-top': $navbarHeight 2295 }) 2296 2297 // zablika s kosikom v hornej liste 2298 $('#basketko').addClass("animated " + animationNameTien).one(animationEnd, function () { 2299 // ked doblika tak uprace po sebe 2300 $('#basketko').removeClass("animated " + animationNameTien); 2301 });; 2302 2303 $('#hladisko-basket-btn').addClass("animated" + animationNameTien).one(animationEnd, function () { 2304 $('#hladisko-basket-btn').removeClass("animated " + animationNameTien); 2305 }) 2306} 2307 2308// rotacia chevron(sipka) ked klik na .vyber-sektor 2309$('.vyber-sektor').on('click', function () { 2310 if ($('.list-group-item.select i').hasClass("fa-chevron-down")) { 2311 $('.list-group-item.select i').removeClass("fa-chevron-down"); 2312 $('.list-group-item.select i').addClass("fa-chevron-up"); 2313 } else { 2314 $('.list-group-item.select i').removeClass("fa-chevron-up"); 2315 $('.list-group-item.select i').addClass("fa-chevron-down"); 2316 } 2317}) 2318 2319// zobrazit/zmazat krizik (ked ma byt sruseny vyber sektora) 2320$('.zoznam-sektorov a.list-group-item').on('click', function () { 2321 $('.vyber-sektor .vyber-sektor-zrusit').removeClass('hidden') 2322}) 2323 2324 2325function GenerujWatchdog(id_performance) 2326{ 2327 var html = '<div onclick="Performance_WatchdogInit(' + id_performance + ')" class="wd-icon-2"><svg viewBox="0 0 110 110" class="watchdog-svg"><path d="M103.29 36.363c-3.334-4.908-12.568-4.473-18.212-6.55-2.564-7.866-4.77-16.09-4.27-27.03h-.567c-5.426 2.35-6.907 8.65-7.965 15.375-2.964.438-6.41 1.938-8.818 1.984-.623-5.346-.775-11.178-.86-17.078-8.448 2.188-10.493 10.754-10.52 21.352-6.457 6.674-5.87 22.64-2.56 32.44-3.848 1.394-8.004 2.65-12.527 3.702-4.21.97-9.824 2.87-13.942 2.264-1.573-.232-4.283-1.863-5.977-2.842-6.046-3.453-8.75-9.123-11.95-14.793-1.194 14.463 6.773 19.776 15.366 24.467-2.667 12.703-5.818 24.92-8.54 37.563h5.976c3.338-13.355 11.268-22.113 28.174-21.91.647 7.31 1.518 14.41 1.99 21.91h5.406c.037-5.383.546-10.018 1.706-15.072.896-3.895 2.292-10.74 6.26-10.818 3.745-.07 6 7.08 7.114 10.818 1.573 5.248 2.176 10.014 3.132 15.072h4.834c-1.32-15.268-3.092-30.1-4.266-45.52 3.514 1.148 8.813 1.148 10.814-1.44-7.664-.567-13.203-3.292-13.665-11.095 2.27 2.684 5.01 6.85 9.68 7.973 7.62 1.826 16.224.354 19.343-4.912-.665-1.412-1.052-3.254-1.13-5.61-3.31-.483-7.028-.567-9.68-1.706-.44-.17-.936-2.615-.283-3.135 4.04-2.615 9.14-4.14 15.654-4.27 1.7 4.574-4.33 8.436-4.49 9.123-.296 1.367-.367 3.328.794 5.395 6.63-.163 6.76-11.555 3.98-15.657zm-35.14.62c-2.06 0-3.735-1.67-3.735-3.737 0-2.045 1.675-3.73 3.734-3.73 2.06 0 3.73 1.685 3.73 3.73 0 2.067-1.67 3.736-3.73 3.736z"></path></svg><span>' + lang["WD_Objednat"] + '</span>'; 2328 return html; 2329} 2330function Performance_WatchdogInit(id_performance) 2331{ 2332 if (uil == false) { 2333 if (typeof (sessionStorage) != "undefined") 2334 sessionStorage["kode"] = "WatchDogInit(" + id_performance + ")"; 2335 } 2336 2337 $("#modalHladisko").modal("hide"); 2338 WatchDogInit(id_performance); 2339} 2340 2341var neotvarajHladisko = false; 2342 2343if (typeof (sessionStorage) != "undefined") { 2344 if (typeof (sessionStorage) != "undefined") { 2345 if (isnull(sessionStorage["kode"]) == false) { 2346 neotvarajHladisko = true; 2347 2348 $(document).ready(function () { 2349 eval(sessionStorage["kode"]); 2350 sessionStorage.removeItem("kode"); 2351 }); 2352 } 2353 } 2354} 2355
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.