Commit 1740bcd459db852616dcbd194a927f956e008551
Merge remote-tracking branch 'origin/master'
Showing
4 changed files
with
49 additions
and
1 deletions
Show diff stats
frontend/views/layouts/main.php
| @@ -414,7 +414,34 @@ _________________________________________________________ --> | @@ -414,7 +414,34 @@ _________________________________________________________ --> | ||
| 414 | ?> | 414 | ?> |
| 415 | 415 | ||
| 416 | <!-- *** LOGIN MODAL END *** --> | 416 | <!-- *** LOGIN MODAL END *** --> |
| 417 | - | 417 | + |
| 418 | + | ||
| 419 | + <!-- *** SUCCESS MODAL BEGIN *** | ||
| 420 | + _________________________________________________________ --> | ||
| 421 | + <div class="modal fade" id="success-modal" tabindex="-1" role="dialog" aria-labelledby="Success" aria-hidden="true"> | ||
| 422 | + <div class="modal-dialog modal-sm"> | ||
| 423 | + | ||
| 424 | + <div class="modal-content"> | ||
| 425 | + <div class="modal-header"> | ||
| 426 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | ||
| 427 | + <h4 class="modal-title" id="Success"> | ||
| 428 | + Success Title | ||
| 429 | + </h4> | ||
| 430 | + </div> | ||
| 431 | + <div class="modal-body"> | ||
| 432 | + <p class="text-center text-muted"> | ||
| 433 | + Success text 1</p> | ||
| 434 | + <p class="text-center text-muted"> | ||
| 435 | + Success text 2 | ||
| 436 | + </p> | ||
| 437 | + | ||
| 438 | + </div> | ||
| 439 | + </div> | ||
| 440 | + </div> | ||
| 441 | + </div> | ||
| 442 | + | ||
| 443 | + <!-- *** SUCCESS MODAL END *** --> | ||
| 444 | + | ||
| 418 | <!-- *** Breadcrumbs *** --> | 445 | <!-- *** Breadcrumbs *** --> |
| 419 | <?php | 446 | <?php |
| 420 | if (!$isHome) { | 447 | if (!$isHome) { |
frontend/web/css/style.css
| @@ -4639,4 +4639,18 @@ a.list-group-item.active > .badge, | @@ -4639,4 +4639,18 @@ a.list-group-item.active > .badge, | ||
| 4639 | -ms-transform: rotate(360deg); | 4639 | -ms-transform: rotate(360deg); |
| 4640 | transform: rotate(360deg); | 4640 | transform: rotate(360deg); |
| 4641 | } | 4641 | } |
| 4642 | +} | ||
| 4643 | + | ||
| 4644 | +.alert-cart{ | ||
| 4645 | + position: fixed; | ||
| 4646 | + z-index: 1001; | ||
| 4647 | + width: 50%; | ||
| 4648 | + left: 25%; | ||
| 4649 | + top: -75px; | ||
| 4650 | + box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.0); | ||
| 4651 | + transition: 0.3s; | ||
| 4652 | +} | ||
| 4653 | +.alert-cart.active{ | ||
| 4654 | + top: 30px; | ||
| 4655 | + box-shadow: 0px 0px 25px rgba(0, 0, 0, 0.3); | ||
| 4642 | } | 4656 | } |
| 4643 | \ No newline at end of file | 4657 | \ No newline at end of file |
frontend/web/js/script.js
| @@ -112,6 +112,13 @@ $( | @@ -112,6 +112,13 @@ $( | ||
| 112 | var id = $(this) | 112 | var id = $(this) |
| 113 | .data('id'); | 113 | .data('id'); |
| 114 | basket.add(id, 1); | 114 | basket.add(id, 1); |
| 115 | + if ($('.alert-cart').length > 0) { | ||
| 116 | + } else { | ||
| 117 | + $('body').prepend($("<div class='alert-cart alert alert-success alert-dismissible'>Товар добавлен в корзину.</div>")); | ||
| 118 | + setTimeout(function(){$(".alert-cart").addClass("active");},100); | ||
| 119 | + setTimeout(function(){$(".alert-cart").removeClass("active");},3500); | ||
| 120 | + setTimeout(function(){$(".alert-cart").remove();},3600); | ||
| 121 | + } | ||
| 115 | }); | 122 | }); |
| 116 | 123 | ||
| 117 | $(document) | 124 | $(document) |