Skip to content

Commit

Permalink
Merge pull request #21 from ReceiptManager/dev
Browse files Browse the repository at this point in the history
Fix supermarked overlay on large lists
  • Loading branch information
Dielee authored Aug 6, 2021
2 parents 98816b2 + b016845 commit e38452a
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 30 deletions.
55 changes: 30 additions & 25 deletions Frontend/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -602,35 +602,40 @@ function updateResponseJson (itemId, mode, t)
responseChanged(t)
}

function closeDrawer(t)
{
var drawer = t.shadowRoot.getElementById("drawer")
var mainContent = t.shadowRoot.getElementById("mainElement")

if (!drawer.opened)
function closeDrawer(t) {
var drawer = t.shadowRoot.getElementById("drawer");
var mainContent = t.shadowRoot.getElementById("mainElement");

if (!drawer.opened) {
mainContent.style.visibility = null;
t.shadowRoot.getElementById("appHeader").style.zIndex = 1
var appMenu = t.shadowRoot.getElementById("appMenu")
if (appMenu)
{
mainContent.style.visibility = null
appMenu.style.visibility = "unset";
}
}

function openDrawer(t)
{
if (menuIcon != "arrow-back")
{
t.shadowRoot.getElementById("drawer").open()
t.shadowRoot.getElementById("mainElement").style.visibility = "hidden"
}
else
{
historyPage.shadowRoot.getElementById("mainContainerHistory").style.display = null
historyPage.shadowRoot.getElementById("mainContainerDetails").style.display = "none"
historyPage.responseJson = null

window.scrollTo(0,0)
}

setMenuIcon("menu")
mainPage.inputMode = false
mainPage.requestUpdate()
function openDrawer(t) {
if (menuIcon != "arrow-back") {
t.shadowRoot.getElementById("drawer").open();
t.shadowRoot.getElementById("mainElement").style.visibility = "hidden";
var appMenu = t.shadowRoot.getElementById("appMenu")
if (appMenu)
{
appMenu.style.visibility = "hidden";
}

t.shadowRoot.getElementById("appHeader").style.zIndex = -5
} else {
historyPage.shadowRoot.getElementById("mainContainerHistory").style.display = null;
historyPage.shadowRoot.getElementById("mainContainerDetails").style.display = "none";
historyPage.responseJson = null;
window.scrollTo(0, 0);
setMenuIcon("menu");
mainPage.inputMode = false;
mainPage.requestUpdate();
}
}

Expand Down
1 change: 0 additions & 1 deletion Frontend/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,6 @@ class MainElement extends LitElement {
padding-bottom: 60px;
margin-top: 70px;
position: absolute;
z-index: -1;
padding-right: 10px;
width: calc(100% - 25px);
}
Expand Down
7 changes: 4 additions & 3 deletions Frontend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class MainElement extends LitElement {
<paper-spinner id="loadingSpinner" class="loadingSpinner"></paper-spinner>
<div class="bodyContainer" id="bodyContainer" style="opacity: 100%">
<app-header reveals>
<app-header reveals id="appHeader">
<app-toolbar class="appToolbar">
<paper-icon-button icon="${menuIcon}" id="menuButton" @click="${() => openDrawer(this)}"></paper-icon-button>
<div main-title>${translated.title}</div>
Expand Down Expand Up @@ -181,7 +181,7 @@ class MainElement extends LitElement {
bottom: 28px;
top: unset;
height: 20px;
z-index: -1;
z-index: 3;
}
.loadingSpinner {
Expand Down Expand Up @@ -209,14 +209,15 @@ class MainElement extends LitElement {
left: 0;
width: 100%;
height: 100px;
z-index: 1;
}
.bodyContainer {
inset: 0px;
width: 100%;
position: absolute;
background-color: rgba(255,255,255,200);
z-index: 2;
z-index: 5;
opacity: 20%;
}
Expand Down
1 change: 0 additions & 1 deletion Frontend/scann.js
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,6 @@ checkValidAndSave(e)
padding-bottom: 60px;
margin-top: 70px;
position: absolute;
z-index: -1;
}
.itemsListContainer
Expand Down

0 comments on commit e38452a

Please sign in to comment.