fix: remove console.log statements from item sheet
This commit is contained in:
parent
3efbac9e84
commit
c1f9db6095
1 changed files with 2 additions and 14 deletions
|
@ -110,7 +110,7 @@ export class DS4ItemSheet extends foundry.applications.sheets.ItemSheetV2 {
|
||||||
context.enrichedDescription = "";
|
context.enrichedDescription = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("DS4ItemSheet: _prepareContext completed for item:", this.item.name);
|
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,22 +253,16 @@ export class DS4ItemSheet extends foundry.applications.sheets.ItemSheetV2 {
|
||||||
|
|
||||||
/** @override */
|
/** @override */
|
||||||
async _onRender(context, options) {
|
async _onRender(context, options) {
|
||||||
console.log("DS4ItemSheet: _onRender called for item:", this.item.name);
|
|
||||||
await super._onRender(context, options);
|
await super._onRender(context, options);
|
||||||
|
|
||||||
console.log("DS4ItemSheet: About to initialize tabs");
|
|
||||||
// Initialize first tab as active
|
// Initialize first tab as active
|
||||||
this._initializeTabs();
|
this._initializeTabs();
|
||||||
console.log("DS4ItemSheet: Tabs initialized");
|
|
||||||
|
|
||||||
console.log("DS4ItemSheet: _onRender completed, <prose-mirror> elements handle editor activation automatically");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** @override */
|
/** @override */
|
||||||
async _onClose(options) {
|
async _onClose(options) {
|
||||||
console.log("DS4ItemSheet: _onClose called");
|
|
||||||
await super._onClose(options);
|
await super._onClose(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,12 +270,10 @@ export class DS4ItemSheet extends foundry.applications.sheets.ItemSheetV2 {
|
||||||
* Initialize tab state - show first tab, hide others
|
* Initialize tab state - show first tab, hide others
|
||||||
*/
|
*/
|
||||||
_initializeTabs() {
|
_initializeTabs() {
|
||||||
console.log("DS4ItemSheet: _initializeTabs called");
|
|
||||||
const nav = this.element.querySelector(".ds4-sheet-tab-nav");
|
const nav = this.element.querySelector(".ds4-sheet-tab-nav");
|
||||||
const sheet = this.element.querySelector(".ds4-sheet-body");
|
const sheet = this.element.querySelector(".ds4-sheet-body");
|
||||||
|
|
||||||
if (!nav || !sheet) {
|
if (!nav || !sheet) {
|
||||||
console.warn("DS4ItemSheet: Could not find nav or sheet elements");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -289,8 +281,6 @@ export class DS4ItemSheet extends foundry.applications.sheets.ItemSheetV2 {
|
||||||
const navItems = nav.querySelectorAll(".ds4-sheet-tab-nav__item");
|
const navItems = nav.querySelectorAll(".ds4-sheet-tab-nav__item");
|
||||||
const tabContents = sheet.querySelectorAll(".ds4-sheet-tab");
|
const tabContents = sheet.querySelectorAll(".ds4-sheet-tab");
|
||||||
|
|
||||||
console.log("DS4ItemSheet: Found", navItems.length, "nav items and", tabContents.length, "tab contents");
|
|
||||||
|
|
||||||
// Remove active class from all items first
|
// Remove active class from all items first
|
||||||
navItems.forEach(item => item.classList.remove("active"));
|
navItems.forEach(item => item.classList.remove("active"));
|
||||||
tabContents.forEach(content => content.classList.remove("active"));
|
tabContents.forEach(content => content.classList.remove("active"));
|
||||||
|
@ -305,7 +295,7 @@ export class DS4ItemSheet extends foundry.applications.sheets.ItemSheetV2 {
|
||||||
targetTab = targetNavItem?.dataset.tab;
|
targetTab = targetNavItem?.dataset.tab;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("DS4ItemSheet: Setting active tab to:", targetTab);
|
|
||||||
|
|
||||||
// Set target tab navigation as active
|
// Set target tab navigation as active
|
||||||
if (targetNavItem && targetTab) {
|
if (targetNavItem && targetTab) {
|
||||||
|
@ -315,9 +305,7 @@ export class DS4ItemSheet extends foundry.applications.sheets.ItemSheetV2 {
|
||||||
const activeTabContent = sheet.querySelector(`.ds4-sheet-tab[data-tab="${targetTab}"]`);
|
const activeTabContent = sheet.querySelector(`.ds4-sheet-tab[data-tab="${targetTab}"]`);
|
||||||
if (activeTabContent) {
|
if (activeTabContent) {
|
||||||
activeTabContent.classList.add("active");
|
activeTabContent.classList.add("active");
|
||||||
console.log("DS4ItemSheet: Tab content activated:", activeTabContent);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log("DS4ItemSheet: _initializeTabs completed");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue