From dc834b42514e52b736b380dca588447adae11012 Mon Sep 17 00:00:00 2001 From: kor Date: Fri, 10 Aug 2018 03:26:29 +1200 Subject: [PATCH] Add handling for hiding add-button in web version. --- docs/logic/main.js | 9 ++++++++- docs/logic/view.js | 13 ++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/docs/logic/main.js b/docs/logic/main.js index e648eba..35e8e1f 100644 --- a/docs/logic/main.js +++ b/docs/logic/main.js @@ -70,7 +70,14 @@ function Main() if (this.queryCur == 'add') { - this.add.show(); + if (window.showAdd != undefined && window.showAdd) + { + this.add.show(); + } + else + { + window.location.hash = this.queryPrev; + } } else { diff --git a/docs/logic/view.js b/docs/logic/view.js index bfb26ac..15fc2d1 100644 --- a/docs/logic/view.js +++ b/docs/logic/view.js @@ -311,12 +311,15 @@ function View() { let menuContent = ``; - // ADD - menuContent += ``; - menuContent += ``; - menuContent += ``; + if (window.showAdd != undefined && window.showAdd) + { + // ADD + menuContent += ``; + menuContent += ``; + menuContent += ``; - menuContent += ``; + menuContent += ``; + } // TYPE menuContent += ``;