drakosfire commited on
Commit
b1df057
1 Parent(s): b613fc6

add id=pages to class pages, updated pageContainer to target id=pages, removed redundant event listerners

Browse files
Files changed (1) hide show
  1. storeUI.html +4 -11
storeUI.html CHANGED
@@ -542,7 +542,7 @@ div[contenteditable="true"] p::first-letter {
542
  </div>
543
  </div>
544
  <div class="page-container" id="pageContainer">
545
- <div class="brewRenderer">
546
  <h1>Describe your creature</h1>
547
  <textarea id="user-description" class="user-description-textarea"
548
  hx-post="/update-stats" hx-trigger="change"
@@ -552,7 +552,7 @@ div[contenteditable="true"] p::first-letter {
552
  <button id="parseHTML">Parse HTML</button>
553
  <button id="resetButton">Reset</button>
554
  <button onclick="printPageContainer()">Print to PDF</button>
555
- <div class="pages">
556
  <div id="page-1" class="page" data-page-id="page-0">
557
  <div class="columnWrapper">
558
  <div class="block monster frame wide">
@@ -577,7 +577,7 @@ div[contenteditable="true"] p::first-letter {
577
  document.addEventListener("DOMContentLoaded", function() {
578
  const blockContainer = document.getElementById('blockContainer');
579
  let blockContainerPage = document.getElementById('block-page');
580
- const pageContainer = document.getElementById('pageContainer');
581
  const trashArea = document.getElementById('trashArea');
582
  const resetButton = document.getElementById('resetButton');
583
  let currentPage = pageContainer.querySelector('.block.monster.frame.wide');
@@ -666,7 +666,7 @@ div[contenteditable="true"] p::first-letter {
666
  });
667
  // Print Function
668
  window.printPageContainer = function() {
669
- var pageContainer = document.getElementById('pageContainer');
670
  if (pageContainer) {
671
  var printContents = pageContainer.innerHTML;
672
  var originalContents = document.body.innerHTML;
@@ -1293,13 +1293,6 @@ div[contenteditable="true"] p::first-letter {
1293
  console.log('Trash leave event');
1294
  }
1295
 
1296
- currentPage.addEventListener('dragover', handleDragOver);
1297
- currentPage.addEventListener('drop', handleDrop);
1298
-
1299
- trashArea.addEventListener('dragover', handleTrashOver);
1300
- trashArea.addEventListener('dragleave', handleTrashLeave);
1301
- trashArea.addEventListener('drop', handleTrashDrop);
1302
-
1303
  function handleReset() {
1304
  console.log('Reset button clicked');
1305
 
 
542
  </div>
543
  </div>
544
  <div class="page-container" id="pageContainer">
545
+ <div class="brewRenderer" id="brewRenderer">
546
  <h1>Describe your creature</h1>
547
  <textarea id="user-description" class="user-description-textarea"
548
  hx-post="/update-stats" hx-trigger="change"
 
552
  <button id="parseHTML">Parse HTML</button>
553
  <button id="resetButton">Reset</button>
554
  <button onclick="printPageContainer()">Print to PDF</button>
555
+ <div class="pages" id="pages">
556
  <div id="page-1" class="page" data-page-id="page-0">
557
  <div class="columnWrapper">
558
  <div class="block monster frame wide">
 
577
  document.addEventListener("DOMContentLoaded", function() {
578
  const blockContainer = document.getElementById('blockContainer');
579
  let blockContainerPage = document.getElementById('block-page');
580
+ const pageContainer = document.getElementById('pages');
581
  const trashArea = document.getElementById('trashArea');
582
  const resetButton = document.getElementById('resetButton');
583
  let currentPage = pageContainer.querySelector('.block.monster.frame.wide');
 
666
  });
667
  // Print Function
668
  window.printPageContainer = function() {
669
+ var pageContainer = document.getElementById('pages');
670
  if (pageContainer) {
671
  var printContents = pageContainer.innerHTML;
672
  var originalContents = document.body.innerHTML;
 
1293
  console.log('Trash leave event');
1294
  }
1295
 
 
 
 
 
 
 
 
1296
  function handleReset() {
1297
  console.log('Reset button clicked');
1298