diff --git a/functions/views/add-item.ejs b/functions/views/add-item.ejs
index 329840c..e83de1b 100644
--- a/functions/views/add-item.ejs
+++ b/functions/views/add-item.ejs
@@ -69,7 +69,7 @@
-
+
diff --git a/functions/views/css/style.css b/functions/views/css/style.css
index f87e3d4..c1c64f9 100644
--- a/functions/views/css/style.css
+++ b/functions/views/css/style.css
@@ -384,7 +384,7 @@ footer a {
.new-product-field button {
height: 40px;
- width: 100px;
+ width: 120px;
display: block;
font-size: 19px;
font-family: osl;
@@ -406,6 +406,10 @@ footer a {
background-color: #ffaf69;
}
+.new-product-field button:disabled {
+ background-color: #b9b9b9;
+}
+
.npf-long input {
width: 600px;
}
@@ -473,7 +477,9 @@ footer a {
transition: 0.1s;
background-color: #ffaf69;
}
-
+.product-page-info button:disabled {
+ background-color: #b9b9b9;
+}
.product-page-info h2 {
font-size: 30px;
}
diff --git a/functions/views/home.ejs b/functions/views/home.ejs
index a0d4f15..3b5aab3 100644
--- a/functions/views/home.ejs
+++ b/functions/views/home.ejs
@@ -73,7 +73,7 @@
<% keys.forEach(function(key){ %>
-
+
<%= products[key].name%>
£ <%= products[key].price%>
@@ -101,6 +101,16 @@
<%= "Item name"%>
£ <%= "20.99"%>
+
+

+
<%= "Item name"%>
+
£ <%= "20.99"%>
+
+
+

+
<%= "Item name"%>
+
£ <%= "20.99"%>
+
diff --git a/functions/views/js/fdb.js b/functions/views/js/fdb.js
index f97b1b5..3f42dea 100644
--- a/functions/views/js/fdb.js
+++ b/functions/views/js/fdb.js
@@ -7,7 +7,7 @@ function leavePage(){
}
}
-function productSubmutEventHandler(){
+function productSubmitEventHandler(){
data = {
id: 1,
name: "",
@@ -49,6 +49,11 @@ function productSubmutEventHandler(){
var image = imgBtn.files[0]
var imgPath = productKey + '/' + image.name
var storageRef = firebase.storage().ref('/product-img/' + imgPath)
+
+ const submitBtn = document.getElementById('pSend')
+ submitBtn.innerHTML = "Uploading..."
+ submitBtn.disabled = true
+
updateDBImg(productKey, imgPath)
storageRef.put(image).then(function(){
@@ -87,4 +92,17 @@ function updateImgs() {
pathReference.getDownloadURL().then(function(url) {image.src = url})
})
}
-updateImgs();
\ No newline at end of file
+
+updateImgs();
+
+function purchaseItem() {
+ const purchaseBtn = document.getElementById('remember-to-add-auth-verificartion-to-js-handler')
+ if (purchaseBtn.innerHTML == "Buy!") {
+ purchaseBtn.innerHTML = "Functionality not yet implemented 😢"
+ purchaseBtn.setAttribute("style", "width: 500px;");
+ }
+ else {
+ purchaseBtn.disabled = true
+ }
+
+}
\ No newline at end of file
diff --git a/functions/views/product.ejs b/functions/views/product.ejs
index adfe03e..bfe9c7e 100644
--- a/functions/views/product.ejs
+++ b/functions/views/product.ejs
@@ -69,7 +69,7 @@
Location: <%= item.location %>
In stock: <%= item.stock %>
Price: £<%= item.price %>
-
+