Răsfoiți Sursa

Add tooltips to all sidebars for the buttons.

Lee Morgan 5 ani în urmă
părinte
comite
bacbffc092

+ 20 - 1
views/dashboardPage/css/dashboard.css

@@ -269,4 +269,23 @@ Multi-strand use classes
         .fileUpload::file-selector-button:hover{
             background: rgb(201, 201, 201);
             color: black;
-        }
+        }
+
+.tooltipContainer{
+    position: relative;
+}
+
+    .tooltipContainer:hover .tooltip{
+        visibility: visible;
+    }
+
+    .tooltip{
+        visibility: hidden;
+        background: rgb(0, 27, 45);
+        color:rgb(255, 99, 107);
+        padding: 5px;
+        position: absolute;
+        bottom: 35px;
+        right: -5px;
+        z-index: 10;
+    }

+ 2 - 1
views/dashboardPage/ejs/sidebars/editIngredient.ejs

@@ -1,10 +1,11 @@
 <div id="editIngredient">
     <div class="sidebarIconButtons mobileHide">
-        <button class="iconButton" onclick="controller.closeSidebar()">
+        <button class="iconButton tooltipContainer" onclick="controller.closeSidebar()">
             <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                 <line x1="5" y1="12" x2="19" y2="12"></line>
                 <polyline points="12 5 19 12 12 19"></polyline>
             </svg>
+            <span class="tooltip">CLOSE</span>
         </button>
     </div>
 

+ 2 - 1
views/dashboardPage/ejs/sidebars/editRecipe.ejs

@@ -1,10 +1,11 @@
 <div id="editRecipe">
     <div class="sidebarIconButtons">
-        <button class="iconButton" onclick="controller.closeSidebar()">
+        <button class="iconButton tooltipContainer" onclick="controller.closeSidebar()">
             <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                 <line x1="5" y1="12" x2="19" y2="12"></line>
                 <polyline points="12 5 19 12 12 19"></polyline>
             </svg>
+            <span class="tooltip">CLOSE</span>
         </button>
     </div>
 

+ 6 - 3
views/dashboardPage/ejs/sidebars/ingredientDetails.ejs

@@ -1,24 +1,27 @@
 <div id="ingredientDetails">
     <div class="sidebarIconButtons mobileHide">
-        <button class="iconButton" onclick="controller.closeSidebar()">
+        <button class="iconButton tooltipContainer" onclick="controller.closeSidebar()">
             <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                 <line x1="5" y1="12" x2="19" y2="12"></line>
                 <polyline points="12 5 19 12 12 19"></polyline>
             </svg>
+            <span class="tooltip">CLOSE</span>
         </button>
 
-        <button id="editIngBtn" class="iconButton">
+        <button id="editIngBtn" class="iconButton tooltipContainer">
             <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                 <path d="M12 20h9"></path>
                 <path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path>
             </svg>
+            <span class="tooltip">EDIT</span>
         </button>
 
-        <button id="removeIngBtn" class="iconButton">
+        <button id="removeIngBtn" class="iconButton tooltipContainer">
             <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                 <polyline points="3 6 5 6 21 6"></polyline>
                 <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>
             </svg>
+            <span class="tooltip">DELETE</span>
         </button>
     </div>
 

+ 2 - 1
views/dashboardPage/ejs/sidebars/newIngredient.ejs

@@ -1,10 +1,11 @@
 <div id="newIngredient">
     <div class="sidebarIconButtons">
-        <button class="iconButton" onclick="controller.closeSidebar()">
+        <button class="iconButton tooltipContainer" onclick="controller.closeSidebar()">
             <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                 <line x1="5" y1="12" x2="19" y2="12"></line>
                 <polyline points="12 5 19 12 12 19"></polyline>
             </svg>
+            <span class="tooltip">CLOSE</span>
         </button>
     </div>
 

+ 2 - 1
views/dashboardPage/ejs/sidebars/newOrder.ejs

@@ -1,10 +1,11 @@
 <div id="newOrderIngredientList">
     <div class="sidebarIconButtons">
-        <button class="iconButton" onclick="controller.closeSidebar()">
+        <button class="iconButton tooltipContainer" onclick="controller.closeSidebar()">
             <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                 <line x1="5" y1="12" x2="19" y2="12"></line>
                 <polyline points="12 5 19 12 12 19"></polyline>
             </svg>
+            <span class="tooltip">CLOSE</span>
         </button>
     </div>
 

+ 2 - 1
views/dashboardPage/ejs/sidebars/newRecipe.ejs

@@ -1,10 +1,11 @@
 <div id="addRecipe">
     <div class="sidebarIconButtons">
-        <button class="iconButton" onclick="controller.closeSidebar()">
+        <button class="iconButton tooltipContainer" onclick="controller.closeSidebar()">
             <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                 <line x1="5" y1="12" x2="19" y2="12"></line>
                 <polyline points="12 5 19 12 12 19"></polyline>
             </svg>
+            <span class="tooltip">CLOSE</span>
         </button>
     </div>
 

+ 2 - 1
views/dashboardPage/ejs/sidebars/newTransaction.ejs

@@ -1,10 +1,11 @@
 <div id="newTransaction" class="newTransaction">
     <div class="sidebarIconButtons">
-        <button class="iconButton" onclick="controller.closeSidebar()">
+        <button class="iconButton tooltipContainer" onclick="controller.closeSidebar()">
             <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                 <line x1="5" y1="12" x2="19" y2="12"></line>
                 <polyline points="12 5 19 12 12 19"></polyline>
             </svg>
+            <span class="tooltip">CLOSE</span>
         </button>
     </div>
 

+ 4 - 2
views/dashboardPage/ejs/sidebars/orderDetails.ejs

@@ -1,17 +1,19 @@
 <div id="orderDetails">
     <div class="sidebarIconButtons">
-        <button class="iconButton" onclick="controller.closeSidebar()">
+        <button class="iconButton tooltipContainer" onclick="controller.closeSidebar()">
             <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                 <line x1="5" y1="12" x2="19" y2="12"></line>
                 <polyline points="12 5 19 12 12 19"></polyline>
             </svg>
+            <span class="tooltip">CLOSE</span>
         </button>
 
-        <button id="removeOrderBtn" class="iconButton">
+        <button id="removeOrderBtn" class="iconButton tooltipContainer">
             <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                 <polyline points="3 6 5 6 21 6"></polyline>
                 <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>
             </svg>
+            <span class="tooltip">DELETE</span>
         </button>
     </div>
 

+ 2 - 1
views/dashboardPage/ejs/sidebars/orderFilter.ejs

@@ -1,10 +1,11 @@
 <div id="orderFilter">
     <div class="sidebarIconButtons">
-        <button class="iconButton" onclick="controller.closeSidebar()">
+        <button class="iconButton tooltipContainer" onclick="controller.closeSidebar()">
             <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                 <line x1="5" y1="12" x2="19" y2="12"></line>
                 <polyline points="12 5 19 12 12 19"></polyline>
             </svg>
+            <span class="tooltip">CLOSE</span>
         </button>
     </div>
 

+ 10 - 5
views/dashboardPage/ejs/sidebars/recipeDetails.ejs

@@ -1,38 +1,43 @@
 <div id="recipeDetails">
     <div class="sidebarIconButtons">
-        <button class="iconButton" onclick="controller.closeSidebar()">
+        <button class="iconButton tooltipContainer" onclick="controller.closeSidebar()">
             <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                 <line x1="5" y1="12" x2="19" y2="12"></line>
                 <polyline points="12 5 19 12 12 19"></polyline>
             </svg>
+            <span class="tooltip">CLOSE</span>
         </button>
 
-        <button id="showRecipeBtn" class="iconButton" style="display:none">
+        <button id="showRecipeBtn" class="iconButton tooltipContainer" style="display:none">
             <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                 <path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"></path>
                 <line x1="1" y1="1" x2="23" y2="23"></line>
             </svg>
+            <span class="tooltip">SHOW</span>
         </button>
 
-        <button id="hideRecipeBtn" class="iconButton">
+        <button id="hideRecipeBtn" class="iconButton tooltipContainer">
             <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                 <path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>
                 <circle cx="12" cy="12" r="3"></circle>
             </svg>
+            <span class="tooltip">HIDE</span>
         </button>
 
-        <button id="editRecipeBtn" class="iconButton">
+        <button id="editRecipeBtn" class="iconButton tooltipContainer">
             <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                 <path d="M12 20h9"></path>
                 <path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path>
             </svg>
+            <span class="tooltip">EDIT</span>
         </button>
 
-        <button id="removeRecipeBtn" class="iconButton">
+        <button id="removeRecipeBtn" class="iconButton tooltipContainer">
             <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                 <polyline points="3 6 5 6 21 6"></polyline>
                 <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>
             </svg>
+            <span class="tooltip">DELETE</span>
         </button>
     </div>
 

+ 4 - 2
views/dashboardPage/ejs/sidebars/transactionDetails.ejs

@@ -1,17 +1,19 @@
 <div id="transactionDetails" class="transactionDetails">
     <div class="sidebarIconButtons">
-        <button class="iconButton" onclick="controller.closeSidebar()">
+        <button class="iconButton tooltipContainer" onclick="controller.closeSidebar()">
             <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                 <line x1="5" y1="12" x2="19" y2="12"></line>
                 <polyline points="12 5 19 12 12 19"></polyline>
             </svg>
+            <span class="tooltip">CLOSE</span>
         </button>
 
-        <button id="removeTransBtn" class="iconButton">
+        <button id="removeTransBtn" class="iconButton tooltipContainer">
             <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                 <polyline points="3 6 5 6 21 6"></polyline>
                 <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>
             </svg>
+            <span class="tooltip">DELETE</span>
         </button>
     </div>
 

+ 2 - 1
views/dashboardPage/ejs/sidebars/transactionFilter.ejs

@@ -1,10 +1,11 @@
 <div id="transactionFilter" class="transactionFilter">
     <div class="sidebarIconButtons">
-        <button class="iconButton" onclick="controller.closeSidebar()">
+        <button class="iconButton tooltipContainer" onclick="controller.closeSidebar()">
             <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                 <line x1="5" y1="12" x2="19" y2="12"></line>
                 <polyline points="12 5 19 12 12 19"></polyline>
             </svg>
+            <span class="tooltip">CLOSE</span>
         </button>
     </div>