| Line 390... |
Line 390... |
| 390 |
$xh->tag('i', "info_outline");
|
390 |
$xh->tag('i', "info_outline");
|
| 391 |
$xh->close(); // a
|
391 |
$xh->close(); // a
|
| 392 |
$xh->tag('span' , " ");
|
392 |
$xh->tag('span' , " ");
|
| 393 |
$xh->add_attribute("id", "wlSearchBtn" . $row['id']);
|
393 |
$xh->add_attribute("id", "wlSearchBtn" . $row['id']);
|
| 394 |
$xh->add_attribute("type", "submit");
|
394 |
$xh->add_attribute("type", "submit");
|
| 395 |
$xh->add_attribute("name", "submit");
|
395 |
$xh->add_attribute("name", "submitBtn");
|
| 396 |
$xh->add_attribute("value", "discogsSearch");
|
396 |
$xh->add_attribute("value", "discogsSearch");
|
| 397 |
$xh->add_attribute("class", "btn btn-sm btn-success rounded px-1");
|
397 |
$xh->add_attribute("class", "btn btn-sm btn-success rounded px-1");
|
| 398 |
$xh->tag('button');
|
398 |
$xh->tag('button');
|
| 399 |
$xh->add_attribute("class", "material-icons");
|
399 |
$xh->add_attribute("class", "material-icons");
|
| 400 |
$xh->add_attribute("title", "Search for Store Offers");
|
400 |
$xh->add_attribute("title", "Search for Store Offers");
|
| Line 428... |
Line 428... |
| 428 |
$str .= trim(' window.dataLayer.push({ "event" : "trackEvent", "eventCategory" : "Wishlist", "eventAction" : "Delete", "eventLabel" : ""});');
|
428 |
$str .= trim(' window.dataLayer.push({ "event" : "trackEvent", "eventCategory" : "Wishlist", "eventAction" : "Delete", "eventLabel" : ""});');
|
| 429 |
$str .= trim(' deleteWishlist(id, e, title, artist);');
|
429 |
$str .= trim(' deleteWishlist(id, e, title, artist);');
|
| 430 |
$str .= trim(' } else if (e && tr && e.id.startsWith("wlInfoBtn")) {');
|
430 |
$str .= trim(' } else if (e && tr && e.id.startsWith("wlInfoBtn")) {');
|
| 431 |
$str .= trim(' window.dataLayer.push({ "event" : "trackEvent", "eventCategory" : "Album Info", "eventAction" : "Click", "eventLabel" : ""});');
|
431 |
$str .= trim(' window.dataLayer.push({ "event" : "trackEvent", "eventCategory" : "Album Info", "eventAction" : "Click", "eventLabel" : ""});');
|
| 432 |
$str .= trim(' } else if (e && tr && e.id.startsWith("wlSearchBtn")) {');
|
432 |
$str .= trim(' } else if (e && tr && e.id.startsWith("wlSearchBtn")) {');
|
| 433 |
/* bugbug Merge with htmlTools.php (search_term)*/
|
- |
|
| 434 |
$str .= trim(' var title = tr.getAttribute("data-title");');
|
433 |
$str .= trim(' var title = tr.getAttribute("data-title");');
|
| 435 |
$str .= trim(' var artist = tr.getAttribute("data-artist");');
|
434 |
$str .= trim(' var artist = tr.getAttribute("data-artist");');
|
| 436 |
$str .= trim(' var barcode = tr.getAttribute("data-barcode");');
|
435 |
$str .= trim(' var barcode = tr.getAttribute("data-barcode");');
|
| 437 |
$str .= trim(' var searchTitle = tr.getAttribute("data-search-title");');
|
436 |
$str .= trim(' var searchTitle = tr.getAttribute("data-search-title");');
|
| 438 |
$str .= trim(' document.getElementById("discogsTitle").value = title;');
|
437 |
$str .= trim(' document.getElementById("discogsTitle").value = title;');
|
| 439 |
$str .= trim(' document.getElementById("discogsArtist").value = artist;');
|
438 |
$str .= trim(' document.getElementById("discogsArtist").value = artist;');
|
| 440 |
$str .= trim(' document.getElementById("discogsBarcode").value = barcode;');
|
439 |
$str .= trim(' document.getElementById("discogsBarcode").value = barcode;');
|
| 441 |
$str .= trim(' progressBar(searchTitle);');
|
440 |
$str .= trim(' progressBar(searchTitle);');
|
| - |
|
441 |
$str .= trim(' if (window.google_tag_manager && window.ga && ga.create) {');
|
| - |
|
442 |
$str .= trim(' event.preventDefault();');
|
| - |
|
443 |
$str .= trim(' var form = event.target.closest("form");');
|
| - |
|
444 |
$str .= trim(' var input = document.createElement("input");');
|
| - |
|
445 |
$str .= trim(' input.setAttribute("type", "hidden");');
|
| - |
|
446 |
$str .= trim(' input.setAttribute("name", "submitBtn");');
|
| - |
|
447 |
$str .= trim(' input.setAttribute("value", "discogsSearch");');
|
| - |
|
448 |
$str .= trim(' form.appendChild(input);');
|
| - |
|
449 |
$str .= trim(' window.dataLayer.push({ "event" : "search", "search_term" : title + " by " + (artist.length == 0 ? "Various Artists" : artist), "eventCallback": function () {form.submit();}});');
|
| - |
|
450 |
$str .= trim(' }');
|
| 442 |
$str .= trim(' }');
|
451 |
$str .= trim(' }');
|
| 443 |
$str .= trim(' });');
|
452 |
$str .= trim(' });');
|
| 444 |
$str .= trim('});');
|
453 |
$str .= trim('});');
|
| 445 |
$xh->insert_code($str);
|
454 |
$xh->insert_code($str);
|
| 446 |
$xh->close(); // script
|
455 |
$xh->close(); // script
|
| Line 536... |
Line 545... |
| 536 |
$xh->add_attribute("class", "modal-footer bg-secondary");
|
545 |
$xh->add_attribute("class", "modal-footer bg-secondary");
|
| 537 |
$xh->tag('div');
|
546 |
$xh->tag('div');
|
| 538 |
$xh->add_attribute("id", "saveEditedWl");
|
547 |
$xh->add_attribute("id", "saveEditedWl");
|
| 539 |
$xh->add_attribute("type", "button");
|
548 |
$xh->add_attribute("type", "button");
|
| 540 |
$xh->add_attribute("class", "btn btn-success");
|
549 |
$xh->add_attribute("class", "btn btn-success");
|
| 541 |
$xh->add_attribute("name", "submit");
|
550 |
$xh->add_attribute("name", "submitBtn");
|
| 542 |
$xh->add_attribute("value", "Save");
|
551 |
$xh->add_attribute("value", "Save");
|
| 543 |
$xh->tag('button', "Save");
|
552 |
$xh->tag('button', "Save");
|
| 544 |
$xh->add_attribute("nonce", base64_encode($_SESSION["nonce"]));
|
553 |
$xh->add_attribute("nonce", base64_encode($_SESSION["nonce"]));
|
| 545 |
$xh->tag('script');
|
554 |
$xh->tag('script');
|
| 546 |
$str = trim('document.addEventListener("DOMContentLoaded", function() {');
|
555 |
$str = trim('document.addEventListener("DOMContentLoaded", function() {');
|