Feat: Decks page.
This commit is contained in:
@@ -14,12 +14,34 @@ export default class PageMtgGames extends TableBasePage {
|
||||
|
||||
initialize() {
|
||||
this.sharedInitialize();
|
||||
}
|
||||
hookupFilters() {
|
||||
/*
|
||||
this.sharedHookupFilters();
|
||||
this.hookupFilterActive();
|
||||
*/
|
||||
}
|
||||
|
||||
loadRowTable(rowJson) {
|
||||
if (rowJson == null) return;
|
||||
if (_verbose) { Utils.consoleLogIfNotProductionEnvironment("applying data row: ", rowJson); }
|
||||
}
|
||||
getJsonRow(row) {
|
||||
return;
|
||||
}
|
||||
initialiseRowNew(tbody, row) {
|
||||
}
|
||||
postInitialiseRowNewCallback(tbody) {
|
||||
}
|
||||
|
||||
hookupTableMain() {
|
||||
super.hookupTableMain();
|
||||
// this.hookupTableMainRows();
|
||||
this.hookupTcgGames();
|
||||
// PageMtgGames.hideNewGameForm();
|
||||
}
|
||||
hookupTcgGames() {
|
||||
this.initGamesPage();
|
||||
}
|
||||
initGamesPage() {
|
||||
console.log("hookupTableMain PageMtgGames");
|
||||
// Initialize form submission
|
||||
const newGameForm = document.getElementById('newGameForm');
|
||||
if (newGameForm) {
|
||||
@@ -55,7 +77,7 @@ export default class PageMtgGames extends TableBasePage {
|
||||
newGameButton.addEventListener('click', PageMtgGames.showNewGameForm);
|
||||
}
|
||||
const cancelNewGameButtons = document.querySelectorAll(
|
||||
'#newGameForm .form-actions .btn-tcg.btn-tcg-secondary'
|
||||
'#newGameForm .form-actions .btn-tcg.btn-tcg-secondary'
|
||||
+ ','
|
||||
+ '#newGameModal .modal-content .modal-header .modal-close'
|
||||
);
|
||||
@@ -69,7 +91,7 @@ export default class PageMtgGames extends TableBasePage {
|
||||
static showNewGameForm() {
|
||||
const modal = document.getElementById('newGameModal');
|
||||
if (modal) {
|
||||
modal.classList.remove('hidden');
|
||||
modal.classList.remove(flagIsCollapsed);
|
||||
document.body.style.overflow = 'hidden';
|
||||
|
||||
// Focus on first input
|
||||
@@ -82,7 +104,7 @@ export default class PageMtgGames extends TableBasePage {
|
||||
static hideNewGameForm() {
|
||||
const modal = document.getElementById('newGameModal');
|
||||
if (modal) {
|
||||
modal.classList.add('hidden');
|
||||
modal.classList.add(flagIsCollapsed);
|
||||
document.body.style.overflow = '';
|
||||
|
||||
// Reset form
|
||||
@@ -182,7 +204,7 @@ export default class PageMtgGames extends TableBasePage {
|
||||
if (errorLabel) {
|
||||
errorLabel.textContent = message;
|
||||
}
|
||||
errorOverlay.classList.remove('hidden');
|
||||
errorOverlay.classList.remove(flagIsCollapsed);
|
||||
errorOverlay.style.display = 'flex';
|
||||
} else {
|
||||
// Fallback to alert
|
||||
|
||||
Reference in New Issue
Block a user