From ed036bf893f340821043922dc1b385ad81a57ffb Mon Sep 17 00:00:00 2001 From: SlowV <31509114+SlowV@users.noreply.github.com> Date: Sat, 15 Sep 2018 12:17:03 +0700 Subject: [PATCH] fix chuc nagn dang phat trien --- .../app/Http/Controllers/UserController.php | 3 +- HanaStore/public/css/main.css | 58 +++++++++++++++++++ HanaStore/public/js/main.js | 13 ++++- .../views/user/flower/footer.blade.php | 51 +++++++--------- .../views/user/flower/header.blade.php | 2 +- .../views/user/flower/productDetail.blade.php | 15 +---- 6 files changed, 94 insertions(+), 48 deletions(-) diff --git a/HanaStore/app/Http/Controllers/UserController.php b/HanaStore/app/Http/Controllers/UserController.php index 412febc..8e5e58c 100644 --- a/HanaStore/app/Http/Controllers/UserController.php +++ b/HanaStore/app/Http/Controllers/UserController.php @@ -117,7 +117,8 @@ public function productBuy($id) $itemCart = Cart::add(array( 'id' => $id, 'name' => $product->name, - 'qty' => 1, 'price' => $product->price - $product->price * $product->sale / 100, + 'qty' => 1, + 'price' => $product->price - $product->price * $product->sale / 100, 'options' => array( 'img' => $product->images ) diff --git a/HanaStore/public/css/main.css b/HanaStore/public/css/main.css index efc773a..36c6838 100644 --- a/HanaStore/public/css/main.css +++ b/HanaStore/public/css/main.css @@ -3088,7 +3088,65 @@ input.num-product::-webkit-inner-spin-button { visibility: visible; } +#Popup { + visibility: hidden; + text-align: center; + position: fixed; + z-index: 10; + left: 45%; + bottom: 30px; + font-size: 15px; +} + +#Popup.show-mess { + visibility: visible; + -webkit-animation: fadein 0.5s, fadeout 0.5s 1.5s; + animation: fadein 0.5s, fadeout 0.5s 1.5s; +} +@-webkit-keyframes fadein { + from { + bottom: 0; + opacity: 0; + } + to { + bottom: 30px; + opacity: 1; + } +} + +@keyframes fadein { + from { + bottom: 0; + opacity: 0; + } + to { + bottom: 30px; + opacity: 1; + } +} + +@-webkit-keyframes fadeout { + from { + bottom: 30px; + opacity: 1; + } + to { + bottom: 0; + opacity: 0; + } +} + +@keyframes fadeout { + from { + bottom: 30px; + opacity: 1; + } + to { + bottom: 0; + opacity: 0; + } +} diff --git a/HanaStore/public/js/main.js b/HanaStore/public/js/main.js index 09617cc..bc2623b 100644 --- a/HanaStore/public/js/main.js +++ b/HanaStore/public/js/main.js @@ -217,7 +217,7 @@ error:function () { } - }) + }); setTimeout(function () { window.location.reload(); },500) @@ -227,11 +227,20 @@ var src = $('.avatarUser').attr('src').replace('?type=normal',''); $('#modalInfoUser').modal(); $('.avatarUser').attr('src',src); - }) + }); $('#edit-user').click(function () { $('.box-edit-user').addClass('active-box'); $('.box-user').removeClass('active-box'); }); + $('.showPopup').click(function () { + // Mess delete product success. + $('#Popup').addClass('show-mess'); + setTimeout(function () { + $('#Popup').removeClass('show-mess'); + }, 2000); + }); + + })(jQuery); \ No newline at end of file diff --git a/HanaStore/resources/views/user/flower/footer.blade.php b/HanaStore/resources/views/user/flower/footer.blade.php index 566a21c..8e74732 100644 --- a/HanaStore/resources/views/user/flower/footer.blade.php +++ b/HanaStore/resources/views/user/flower/footer.blade.php @@ -45,26 +45,14 @@