bug fix
This commit is contained in:
parent
e1a46a20ca
commit
8d09556e38
@ -603,19 +603,20 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="tr">
|
<div class="tr">
|
||||||
<div>
|
<div>
|
||||||
sm-button
|
sm-button
|
||||||
<span class="highlight">variant="primary"</span>
|
<span class="highlight">variant="primary"</span>
|
||||||
or
|
or
|
||||||
<span class="highlight">type="submit"</span>
|
<span class="highlight">type="submit"</span>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
Whenever enter is pressed inside an active <span class="highlight">sm-input</span>, this will fire click event. <br>
|
Whenever enter is pressed inside an active <span class="highlight">sm-input</span>, this
|
||||||
|
will fire click event. <br>
|
||||||
This will also change state depending opon validation conditions.
|
This will also change state depending opon validation conditions.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="tr">
|
<div class="tr">
|
||||||
<div>
|
<div>
|
||||||
sm-button
|
sm-button
|
||||||
<span class="highlight">type="reset"</span>
|
<span class="highlight">type="reset"</span>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
@ -628,11 +629,13 @@
|
|||||||
<h1 class="page__title">Hamburger menu</h1>
|
<h1 class="page__title">Hamburger menu</h1>
|
||||||
<section class="grid auto-grid-2 gap-3">
|
<section class="grid auto-grid-2 gap-3">
|
||||||
<div class="grid gap-1">
|
<div class="grid gap-1">
|
||||||
<img class="screenshot" loading="lazy" src="assets/ham-menu-closed.png" alt="Hamburger menu closed">
|
<img class="screenshot" loading="lazy" src="assets/ham-menu-closed.png"
|
||||||
|
alt="Hamburger menu closed">
|
||||||
<h4>Hamburger menu closed</h4>
|
<h4>Hamburger menu closed</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid gap-1">
|
<div class="grid gap-1">
|
||||||
<img class="screenshot" loading="lazy" src="assets/ham-menu-open.png" alt="Hamburger menu opened">
|
<img class="screenshot" loading="lazy" src="assets/ham-menu-open.png"
|
||||||
|
alt="Hamburger menu opened">
|
||||||
<h4>Hamburger menu open</h4>
|
<h4>Hamburger menu open</h4>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@ -1898,7 +1901,7 @@
|
|||||||
</code>
|
</code>
|
||||||
</pre>
|
</pre>
|
||||||
</section>
|
</section>
|
||||||
</article>
|
</article>
|
||||||
</main>
|
</main>
|
||||||
<template id="nav_item_template">
|
<template id="nav_item_template">
|
||||||
<li>
|
<li>
|
||||||
@ -2015,35 +2018,16 @@
|
|||||||
getRef("notification_drawer").clearAll();
|
getRef("notification_drawer").clearAll();
|
||||||
notify("We are back online.", "success");
|
notify("We are back online.", "success");
|
||||||
});
|
});
|
||||||
|
let zIndex = 10
|
||||||
// function required for popups or modals to appear
|
// function required for popups or modals to appear
|
||||||
class Stack {
|
function showPopup(popupId, pinned) {
|
||||||
constructor() {
|
|
||||||
this.items = [];
|
|
||||||
}
|
|
||||||
push(element) {
|
|
||||||
this.items.push(element);
|
|
||||||
}
|
|
||||||
pop() {
|
|
||||||
if (this.items.length == 0)
|
|
||||||
return "Underflow";
|
|
||||||
return this.items.pop();
|
|
||||||
}
|
|
||||||
peek() {
|
|
||||||
return this.items[this.items.length - 1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let popupStack = new Stack(),
|
|
||||||
zIndex = 10;
|
|
||||||
|
|
||||||
async function showPopup(popup, pinned) {
|
|
||||||
zIndex++
|
zIndex++
|
||||||
getRef(popup).setAttribute('style', `z-index: ${zIndex}`)
|
getRef(popupId).setAttribute('style', `z-index: ${zIndex}`)
|
||||||
popupStack = getRef(popup).show({ pinned, popupStack })
|
getRef(popupId).show({ pinned })
|
||||||
return getRef(popup);
|
return getRef(popupId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// hides the popup or modal
|
// hides the popup or modal
|
||||||
function hidePopup() {
|
function hidePopup() {
|
||||||
if (popupStack.peek() === undefined)
|
if (popupStack.peek() === undefined)
|
||||||
return;
|
return;
|
||||||
@ -2228,7 +2212,7 @@
|
|||||||
else {
|
else {
|
||||||
pageId = targetPage.includes('#') ? targetPage.split('#')[1] : targetPage
|
pageId = targetPage.includes('#') ? targetPage.split('#')[1] : targetPage
|
||||||
}
|
}
|
||||||
if(!appPages.includes(pageId)) return
|
if (!appPages.includes(pageId)) return
|
||||||
document.querySelector('.page:not(.hide-completely)').classList.add('hide-completely')
|
document.querySelector('.page:not(.hide-completely)').classList.add('hide-completely')
|
||||||
document.querySelector('.list__item--active').classList.remove('list__item--active')
|
document.querySelector('.list__item--active').classList.remove('list__item--active')
|
||||||
getRef(pageId).classList.remove('hide-completely')
|
getRef(pageId).classList.remove('hide-completely')
|
||||||
|
|||||||
@ -407,35 +407,16 @@
|
|||||||
getRef("notification_drawer").clearAll();
|
getRef("notification_drawer").clearAll();
|
||||||
notify("We are back online.", "success");
|
notify("We are back online.", "success");
|
||||||
});
|
});
|
||||||
|
let zIndex = 10
|
||||||
// function required for popups or modals to appear
|
// function required for popups or modals to appear
|
||||||
class Stack {
|
function showPopup(popupId, pinned) {
|
||||||
constructor() {
|
|
||||||
this.items = [];
|
|
||||||
}
|
|
||||||
push(element) {
|
|
||||||
this.items.push(element);
|
|
||||||
}
|
|
||||||
pop() {
|
|
||||||
if (this.items.length == 0)
|
|
||||||
return "Underflow";
|
|
||||||
return this.items.pop();
|
|
||||||
}
|
|
||||||
peek() {
|
|
||||||
return this.items[this.items.length - 1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let popupStack = new Stack(),
|
|
||||||
zIndex = 10;
|
|
||||||
|
|
||||||
async function showPopup(popup, pinned) {
|
|
||||||
zIndex++
|
zIndex++
|
||||||
getRef(popup).setAttribute('style', `z-index: ${zIndex}`)
|
getRef(popupId).setAttribute('style', `z-index: ${zIndex}`)
|
||||||
popupStack = getRef(popup).show({ pinned, popupStack })
|
getRef(popupId).show({ pinned })
|
||||||
return getRef(popup);
|
return getRef(popupId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// hides the popup or modal
|
// hides the popup or modal
|
||||||
function hidePopup() {
|
function hidePopup() {
|
||||||
if (popupStack.peek() === undefined)
|
if (popupStack.peek() === undefined)
|
||||||
return;
|
return;
|
||||||
@ -617,7 +598,7 @@
|
|||||||
else {
|
else {
|
||||||
pageId = targetPage.includes('#') ? targetPage.split('#')[1] : targetPage
|
pageId = targetPage.includes('#') ? targetPage.split('#')[1] : targetPage
|
||||||
}
|
}
|
||||||
if(!appPages.includes(pageId)) return
|
if (!appPages.includes(pageId)) return
|
||||||
document.querySelector('.page:not(.hide-completely)').classList.add('hide-completely')
|
document.querySelector('.page:not(.hide-completely)').classList.add('hide-completely')
|
||||||
document.querySelector('.list__item--active').classList.remove('list__item--active')
|
document.querySelector('.list__item--active').classList.remove('list__item--active')
|
||||||
getRef(pageId).classList.remove('hide-completely')
|
getRef(pageId).classList.remove('hide-completely')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user