diff booket.html @ 26:8c2f3e72d514

Create new view for notifications Create new view for notifications which handles the keyboard shortcuts overlay message and the unsaved changes notification. This ensures that the unsaved changes notification is always visible, even when the save form expander is closed.
author Guido Berhoerster <guido+booket@berhoerster.name>
date Mon, 06 Oct 2014 13:52:50 +0200
parents 6cf1ec2e8955
children 780a8c711ff7
line wrap: on
line diff
--- a/booket.html	Mon Oct 06 12:19:52 2014 +0200
+++ b/booket.html	Mon Oct 06 13:52:50 2014 +0200
@@ -38,27 +38,32 @@
 
   <datalist id="tag-datalist"></datalist>
 
-  <div id="keyboard-shortcuts">
-    <h3>Keyboard Shortcuts</h3>
-    <dl>
-      <dt><kbd>Prefix</kbd>+<kbd>i</kbd></dt>
-      <dd>Select bookmark file to load</dd>
-      <dt><kbd>Prefix</kbd>+<kbd>l</kbd></dt>
-      <dd>Load selected bookmark file</dd>
-      <dt><kbd>Prefix</kbd>+<kbd>s</kbd></dt>
-      <dd>Save bookmark file</dd>
-      <dt><kbd>Prefix</kbd>+<kbd>a</kbd></dt>
-      <dd>Focus bookmark editor</dd>
-      <dt><kbd>Prefix</kbd>+<kbd>e</kbd></dt>
-      <dd>Select bookmark file to import</dd>
-      <dt><kbd>Prefix</kbd>+<kbd>m</kbd></dt>
-      <dd>Import selected file</dd>
-      <dt><kbd>Prefix</kbd>+<kbd>x</kbd></dt>
-      <dd>Export selected file</dd>
-      <dt><kbd>Prefix</kbd>+<kbd>f</kbd></dt>
-      <dd>Focus search field</dd>
-    </dl>
-  </div>
+  <section id="notifications">
+    <div id="keyboard-shortcuts">
+      <h3>Keyboard Shortcuts</h3>
+      <dl>
+        <dt><kbd>Prefix</kbd>+<kbd>i</kbd></dt>
+        <dd>Select bookmark file to load</dd>
+        <dt><kbd>Prefix</kbd>+<kbd>l</kbd></dt>
+        <dd>Load selected bookmark file</dd>
+        <dt><kbd>Prefix</kbd>+<kbd>s</kbd></dt>
+        <dd>Save bookmark file</dd>
+        <dt><kbd>Prefix</kbd>+<kbd>a</kbd></dt>
+        <dd>Focus bookmark editor</dd>
+        <dt><kbd>Prefix</kbd>+<kbd>e</kbd></dt>
+        <dd>Select bookmark file to import</dd>
+        <dt><kbd>Prefix</kbd>+<kbd>m</kbd></dt>
+        <dd>Import selected file</dd>
+        <dt><kbd>Prefix</kbd>+<kbd>x</kbd></dt>
+        <dd>Export selected file</dd>
+        <dt><kbd>Prefix</kbd>+<kbd>f</kbd></dt>
+        <dd>Focus search field</dd>
+      </dl>
+    </div>
+
+    <p class="unsaved-changes-message" hidden="hidden"><strong>There are
+    unsaved changes to your bookmarks.</strong></p>
+  </section>
 
   <template id="tag-input-template">
     <li><label class="top-label">Tag <input type="text" name="tag"
@@ -113,8 +118,6 @@
     <form id="save-form">
       <fieldset class="expander">
         <legend tabindex="0" class="expander-label">Save Bookmarks</legend>
-        <p class="unsaved-changes-message" hidden="hidden"><strong>There are
-        unsaved changes to your bookmarks.</strong></p>
         <a href="#" id="save-link" hidden="hidden"
         download="bookmarks.json"></a>
         <button type="submit" name="save-file"