Browse Source

Cleaned out unused css in dashboard.css.

Lee Morgan 5 years ago
parent
commit
e9d899cab8
3 changed files with 46 additions and 122 deletions
  1. 6 6
      views/dashboardPage/bundle.js
  2. 34 110
      views/dashboardPage/dashboard.css
  3. 6 6
      views/dashboardPage/js/analytics.js

+ 6 - 6
views/dashboardPage/bundle.js

@@ -1298,16 +1298,16 @@ let analytics = {
 
         for(let i = 0; i < merchant.ingredients.length; i++){
             let li = document.createElement("li");
-            li.classList.add("itemButton");
+            li.classList.add("choosable");
             li.item = merchant.ingredients[i];
             li.innerText = merchant.ingredients[i].ingredient.name;
             li.onclick = ()=>{
                 const itemsList = document.getElementById("itemsList");
                 for(let i = 0; i < itemsList.children.length; i++){
-                    itemsList.children[i].classList.remove("analItemActive");
+                    itemsList.children[i].classList.remove("active");
                 }
 
-                li.classList.add("analItemActive");
+                li.classList.add("active");
 
                 this.ingredient = merchant.ingredients[i];
                 this.ingredientDisplay();
@@ -1329,15 +1329,15 @@ let analytics = {
 
         for(let i = 0; i < merchant.recipes.length; i++){
             let li = document.createElement("li");
-            li.classList.add("itemButton");
+            li.classList.add("choosable");
             li.recipe = merchant.recipes[i];
             li.innerText = merchant.recipes[i].name;
             li.onclick = ()=>{
                 let recipeList = document.getElementById("analRecipeList");
                 for(let i = 0; i < recipeList.children.length; i++){
-                    recipeList.children[i].classList.remove("analItemActive");
+                    recipeList.children[i].classList.remove("active");
                 }
-                li.classList.add("analItemActive");
+                li.classList.add("active");
 
                 this.recipe = merchant.recipes[i];
                 this.recipeDisplay();

+ 34 - 110
views/dashboardPage/dashboard.css

@@ -49,42 +49,6 @@ Multi-strand use classes
             padding: 0;
         }
 
-.itemDisplay{
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    padding: 20px;
-    width: 100%;
-    background: rgb(240, 252, 255);
-    border-radius: 5px;
-    border: 1px solid gray;
-    cursor: pointer;
-    box-sizing: border-box;
-}
-
-    .itemDisplay:hover{
-        background: rgb(0, 27, 45);
-        color: white;
-    }
-
-    .itemDisplay > *:first-of-type{
-        font-size: 20px;
-        font-weight: bold;
-    }
-
-.smallItemDisplay{
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    padding: 10px;
-    margin: 5px 0;
-    width: 100%;
-    background: rgb(240, 252, 255);
-    border-radius: 5px;
-    border: 1px solid gray;
-    box-sizing: border-box;
-}
-
 .searchBar{
     display: flex;
     justify-content: space-between;
@@ -518,8 +482,6 @@ Analytics Strand
             transition: 0.2s;
         }
 
-    
-
 .analContent{
     display: flex;
     justify-content: space-around;
@@ -536,27 +498,6 @@ Analytics Strand
         overflow-y: auto;
     }
 
-        .itemButton{
-            background: rgb(0, 27, 45);
-            color: white;
-            border-radius: 5px;
-            padding: 5px;
-            margin: 2px;
-            width: 90%;
-            text-align: center;
-            cursor: pointer;
-        }
-
-            .itemButton:hover{
-                background: rgb(201, 201, 201);
-                color: black;
-            }
-
-        .analItemActive{
-            background: rgb(179, 191, 209);
-            cursor: default;
-        }
-
     .analData{
         display: flex;
         flex-direction: column;
@@ -647,64 +588,51 @@ Transactions Strand
         margin-top: 50px;
     }
 
-    #transactionFilter{
-        padding: 5px;
-        margin: 0;
+    .dropdown{
+        display: flex;
+        flex-direction: column;
         align-items: center;
-        max-height: 150px;
+        position: relative;
+        margin: 0;
     }
 
-        #transactionFilter > div{
+        .dropdown button{
             display: flex;
-            justify-content: space-around;
-            width: 100%;
+            align-items: center;
+            justify-content: center;
+            height: 25px;
+            width: 25px;
+            border-radius: 5px;
+            border: 1px solid black;
+            background: none;
+            cursor: pointer;
         }
 
-            .dropdown{
+            .dropdownHead{
                 display: flex;
-                flex-direction: column;
-                align-items: center;
-                position: relative;
-                margin: 0;
             }
 
-                .dropdown button{
-                    display: flex;
-                    align-items: center;
-                    justify-content: center;
-                    height: 25px;
-                    width: 25px;
-                    border-radius: 5px;
-                    border: 1px solid black;
-                    background: none;
-                    cursor: pointer;
-                }
+            .dropdown button:hover{
+                background: rgb(0, 27, 45);
+                color: white;
+            }
 
-                    .dropdownHead{
-                        display: flex;
-                    }
-
-                    .dropdown button:hover{
-                        background: rgb(0, 27, 45);
-                        color: white;
-                    }
-
-                .dropdownContents{
-                    text-align: left;
-                    position: absolute;
-                    top: 25px;
-                    background: rgb(240, 252, 255);
-                    z-index: 1;
-                    padding: 2px;
-                    border: 1px solid black;
-                    border-radius: 5px;
-                    padding: 5px;
-                    white-space: nowrap;
-                }
+        .dropdownContents{
+            text-align: left;
+            position: absolute;
+            top: 25px;
+            background: rgb(240, 252, 255);
+            z-index: 1;
+            padding: 2px;
+            border: 1px solid black;
+            border-radius: 5px;
+            padding: 5px;
+            white-space: nowrap;
+        }
 
-                    .dropDownContents label{
-                        margin: 0;
-                    }
+            .dropDownContents label{
+                margin: 0;
+            }
 
 @media screen and (max-width: 1000px){
     body{
@@ -733,10 +661,6 @@ Transactions Strand
             display: none;
         }
 
-        .smallItemDisplay{
-            color: black;
-        }
-
     .filterForm{
         display: none;
     }

+ 6 - 6
views/dashboardPage/js/analytics.js

@@ -40,16 +40,16 @@ let analytics = {
 
         for(let i = 0; i < merchant.ingredients.length; i++){
             let li = document.createElement("li");
-            li.classList.add("itemButton");
+            li.classList.add("choosable");
             li.item = merchant.ingredients[i];
             li.innerText = merchant.ingredients[i].ingredient.name;
             li.onclick = ()=>{
                 const itemsList = document.getElementById("itemsList");
                 for(let i = 0; i < itemsList.children.length; i++){
-                    itemsList.children[i].classList.remove("analItemActive");
+                    itemsList.children[i].classList.remove("active");
                 }
 
-                li.classList.add("analItemActive");
+                li.classList.add("active");
 
                 this.ingredient = merchant.ingredients[i];
                 this.ingredientDisplay();
@@ -71,15 +71,15 @@ let analytics = {
 
         for(let i = 0; i < merchant.recipes.length; i++){
             let li = document.createElement("li");
-            li.classList.add("itemButton");
+            li.classList.add("choosable");
             li.recipe = merchant.recipes[i];
             li.innerText = merchant.recipes[i].name;
             li.onclick = ()=>{
                 let recipeList = document.getElementById("analRecipeList");
                 for(let i = 0; i < recipeList.children.length; i++){
-                    recipeList.children[i].classList.remove("analItemActive");
+                    recipeList.children[i].classList.remove("active");
                 }
-                li.classList.add("analItemActive");
+                li.classList.add("active");
 
                 this.recipe = merchant.recipes[i];
                 this.recipeDisplay();