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

@ -70,7 +70,14 @@ function Main()
if (this.queryCur == 'add') if (this.queryCur == 'add')
{ {
this.add.show(); if (window.showAdd != undefined && window.showAdd)
{
this.add.show();
}
else
{
window.location.hash = this.queryPrev;
}
} }
else else
{ {

View File

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