Add handling for hiding add-button in web version.

This commit is contained in:
kor 2018-08-10 03:26:29 +12:00
parent 78394f6902
commit dc834b4251
2 changed files with 16 additions and 6 deletions

View File

@ -69,10 +69,17 @@ function Main()
}
if (this.queryCur == 'add')
{
if (window.showAdd != undefined && window.showAdd)
{
this.add.show();
}
else
{
window.location.hash = this.queryPrev;
}
}
else
{
this.view.display(this.db.filter(this.queryCur));
}

View File

@ -311,12 +311,15 @@ function View()
{
let menuContent = ``;
if (window.showAdd != undefined && window.showAdd)
{
// ADD
menuContent += `<a href='#add'>`;
menuContent += `<div class="menu-item"><b>a</b>dd</div>`;
menuContent += `</a>`;
menuContent += `<div class="menu-spacer"></div>`;
}
// TYPE
menuContent += `<a href='#'>`;