aboutsummaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorKumar Priyansh <[email protected]>2019-06-03 05:42:28 +0530
committerKumar Priyansh <[email protected]>2019-06-03 05:42:28 +0530
commit6b0736a3e456d1eb1ba3c565a67ad0e09dabe953 (patch)
tree579b9dbd9b05989950924d28977204adfb116ac9 /shared
parenta56d810e0574e6ef10ee63637d7bdf9081cecafa (diff)
downloadfirebase-ecommerce-6b0736a3e456d1eb1ba3c565a67ad0e09dabe953.tar.xz
firebase-ecommerce-6b0736a3e456d1eb1ba3c565a67ad0e09dabe953.zip
Adjusted Grid Size for Single Product and Updated Dashboard JS for Displaying Single Product Correctly
Diffstat (limited to 'shared')
-rw-r--r--shared/Dashboard.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/shared/Dashboard.js b/shared/Dashboard.js
index c995df8..5fb42a0 100644
--- a/shared/Dashboard.js
+++ b/shared/Dashboard.js
@@ -41,7 +41,12 @@ $(document).ready(function(){
}
function loadProduct (productid) {
$.getJSON("../products.json", function(result){
- $('#loader').append('<div class="productDetail"><div class="picture" style="background-image: url('+')"></div><div class="content"><h1>Title</h1><ul><li>Point 1</li><li>Point 2</li><li>Point 3</li><li>Point 4</li></ul><h3>$17.99</h3><button>Add to Cart</button></div></div>')
+ console.log(result[productid])
+ str = "";
+ for(i=0; i< Object.keys(result[productid].productDescription).length; i++) {
+ str += ('<li>' + result[productid].productDescription[i] + '</li>');
+ }
+ $('#loader').append('<div class="productDetail"><div class="picture" style="background-image:url(\''+result[productid].ProductImageURL+'\');"></div><div class="content"><h1>'+result[productid].productName+'</h1><ul>'+str+'</ul><h3>$17.99</h3><button>Add to Cart</button></div></div>');
})
}
function showErrorDiv() {