summaryrefslogtreecommitdiff
path: root/ext/fg
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-11-15 14:12:48 -0500
committerGitHub <noreply@github.com>2020-11-15 14:12:48 -0500
commit2e3169f68ced13f437982a67d468b6e18cfb6825 (patch)
treef22c21b24fd83e3eaded51c2a33f24c8be8856b4 /ext/fg
parent37af524015ce900af2f9ac2a7cb4efe9a79a55ee (diff)
Popup navigation style updates (#1035)
* Add close function to Display * Add new sidebar with navigation and close buttons * Set up new navigation functionality * Remove old navigation
Diffstat (limited to 'ext/fg')
-rw-r--r--ext/fg/float.html17
-rw-r--r--ext/fg/js/float.js6
2 files changed, 17 insertions, 6 deletions
diff --git a/ext/fg/float.html b/ext/fg/float.html
index dc3e159a..818bee32 100644
--- a/ext/fg/float.html
+++ b/ext/fg/float.html
@@ -15,17 +15,13 @@
</head>
<body>
+<div class="content-outer">
<div class="content" id="content"><div class="content-body" id="content-body">
<span tabindex="-1" id="content-scroll-focus"></span>
<div id="spinner" hidden><img src="/mixed/img/spinner.gif"></div>
- <div id="navigation-header" class="navigation-header" hidden><div class="navigation-header-actions">
- <button class="action-button action-previous" data-icon="source-term" title="Source term (Alt + B)"></button>
- <button class="action-button action-next" data-icon="source-term" title="Next term (Alt + F)"></button>
- </div></div><div class="navigation-header-spacer"></div>
-
<div class="scan-disable" id="query-parser-container" hidden>
<div class="search-option" id="query-parser-mode-container" hidden>
<select id="query-parser-mode-select"></select>
@@ -52,6 +48,17 @@
</div>
</div></div>
+<div class="content-sidebar" id="content-sidebar" hidden><div class="content-sidebar-inner">
+ <div class="content-sidebar-top">
+ <button class="sidebar-button danger" id="close-button" title="Close popup"><span class="sidebar-button-icon" data-icon="cross"></span></button>
+ <button class="sidebar-button" disabled id="navigate-previous-button" title="Previous definition (Alt + B)"><span class="sidebar-button-icon" data-icon="left-chevron"></span></button>
+ <button class="sidebar-button" disabled id="navigate-next-button" title="Next definition (Alt + F)"><span class="sidebar-button-icon" data-icon="right-chevron"></span></button>
+ </div>
+ <div class="content-sidebar-bottom">
+ <!--<button class="sidebar-button" id="profile-button"><span class="sidebar-button-icon" data-icon="profile"></span></button>-->
+ </div>
+</div></div>
+</div>
<!-- Scripts -->
<script src="/mixed/js/core.js"></script>
diff --git a/ext/fg/js/float.js b/ext/fg/js/float.js
index 9f58439f..bc555ffd 100644
--- a/ext/fg/js/float.js
+++ b/ext/fg/js/float.js
@@ -63,7 +63,7 @@ class DisplayFloat extends Display {
}
onEscape() {
- this._invokeOwner('closePopup');
+ this.close();
}
async getDocumentTitle() {
@@ -83,6 +83,10 @@ class DisplayFloat extends Display {
return data.data;
}
+ close() {
+ this._invokeOwner('closePopup');
+ }
+
// Message handling
_onWindowMessage(e) {