Skip to content

Commit

Permalink
Merge pull request #584 from SharakPL/fix-blockwishlist
Browse files Browse the repository at this point in the history
Fix missing add to wishlist button and modals backdrop
  • Loading branch information
SharakPL authored Feb 6, 2024
2 parents 2262c67 + d602e92 commit 5d33762
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
>
<div
class="wishlist-modal modal fade"
{literal}
:class="{show: !isHidden}"
{/literal}
:class="{ldelim}show: !isHidden{rdelim}"
tabindex="-1"
role="dialog"
aria-modal="true"
Expand All @@ -26,8 +24,7 @@
@click="toggleModal"
data-dismiss="modal"
aria-label="{l s='Close' d='Modules.Blockwishlist.Shop'}"
>
</button>
></button>
</div>

<div class="modal-body">
Expand All @@ -39,8 +36,7 @@
url="{$url}"
add-url="{$addUrl}"
empty-text="{l s='No list found.' d='Modules.Blockwishlist.Shop'}"
>
</choose-list>
></choose-list>
</div>

<div class="modal-footer">
Expand All @@ -52,11 +48,8 @@
</div>
</div>

<div
<div
class="modal-backdrop fade"
{literal}
:class="{in: !isHidden}"
{/literal}
>
</div>
:class="{ldelim}show: !isHidden{rdelim}"
></div>
</div>
24 changes: 7 additions & 17 deletions modules/blockwishlist/views/templates/components/modals/create.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
>
<div
class="wishlist-modal modal fade"
{literal}
:class="{show: !isHidden}"
{/literal}
:class="{ldelim}show: !isHidden{rdelim}"
tabindex="-1"
role="dialog"
aria-modal="true"
Expand All @@ -32,8 +30,7 @@
@click="toggleModal"
data-dismiss="modal"
aria-label="Close"
>
</button>
></button>
</div>
<div class="modal-body">
<div class="form-group form-group-lg">
Expand All @@ -53,27 +50,20 @@
class="modal-cancel btn btn-secondary"
data-dismiss="modal"
@click="toggleModal"
>
((cancelText))
</button>
>((cancelText))</button>

<button
type="button"
class="btn btn-primary"
@click="createWishlist"
>
((createText))
</button>
>((createText))</button>
</div>
</div>
</div>
</div>

<div
<div
class="modal-backdrop fade"
{literal}
:class="{in: !isHidden}"
{/literal}
>
</div>
:class="{ldelim}show: !isHidden{rdelim}"
></div>
</div>
26 changes: 8 additions & 18 deletions modules/blockwishlist/views/templates/components/modals/delete.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
>
<div
class="wishlist-modal modal fade"
{literal}
:class="{show: !isHidden}"
{/literal}
:class="{ldelim}show: !isHidden{rdelim}"
tabindex="-1"
role="dialog"
aria-modal="true"
Expand All @@ -37,39 +35,31 @@
@click="toggleModal"
data-dismiss="modal"
aria-label="Close"
>
</button>
></button>
</div>
<div class="modal-body" v-if="productId">
<p class="modal-text">((confirmMessage))</p>
<p class="modal-text">((confirmMessage))</p>
</div>
<div class="modal-footer">
<button
type="button"
class="modal-cancel btn btn-secondary"
data-dismiss="modal"
@click="toggleModal"
>
((cancelText))
</button>
>((cancelText))</button>

<button
type="button"
class="btn btn-primary"
@click="deleteWishlist"
>
((modalDeleteText))
</button>
>((modalDeleteText))</button>
</div>
</div>
</div>
</div>

<div
<div
class="modal-backdrop fade"
{literal}
:class="{in: !isHidden}"
{/literal}
>
</div>
:class="{ldelim}show: !isHidden{rdelim}"
></div>
</div>
22 changes: 6 additions & 16 deletions modules/blockwishlist/views/templates/components/modals/login.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
>
<div
class="wishlist-modal modal fade"
{literal}
:class="{show: !isHidden}"
{/literal}
:class="{ldelim}show: !isHidden{rdelim}"
tabindex="-1"
role="dialog"
aria-modal="true"
Expand All @@ -27,8 +25,7 @@
@click="toggleModal"
data-dismiss="modal"
aria-label="Close"
>
</button>
></button>
</div>
<div class="modal-body">
<p class="modal-text">{l s='You need to be logged in to save products in your wishlist.' d='Modules.Blockwishlist.Shop'}</p>
Expand All @@ -39,26 +36,19 @@
class="modal-cancel btn btn-secondary"
data-dismiss="modal"
@click="toggleModal"
>
((cancelText))
</button>
>((cancelText))</button>

<a
class="btn btn-primary"
:href="prestashop.urls.pages.authentication"
>
((loginText))
</a>
>((loginText))</a>
</div>
</div>
</div>
</div>

<div
class="modal-backdrop fade"
{literal}
:class="{in: !isHidden}"
{/literal}
>
</div>
:class="{ldelim}show: !isHidden{rdelim}"
></div>
</div>
24 changes: 7 additions & 17 deletions modules/blockwishlist/views/templates/components/modals/rename.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
>
<div
class="wishlist-modal modal fade"
{literal}
:class="{show: !isHidden}"
{/literal}
:class="{ldelim}show: !isHidden{rdelim}"
tabindex="-1"
role="dialog"
aria-modal="true"
Expand All @@ -31,8 +29,7 @@
@click="toggleModal"
data-dismiss="modal"
aria-label="Close"
>
</button>
></button>
</div>
<div class="modal-body">
<div class="form-group form-group-lg">
Expand All @@ -51,26 +48,19 @@
class="modal-cancel btn btn-secondary"
data-dismiss="modal"
@click="toggleModal"
>
((cancelText))
</button>
>((cancelText))</button>
<button
type="button"
class="btn btn-primary"
@click="renameWishlist"
>
((renameText))
</button>
>((renameText))</button>
</div>
</div>
</div>
</div>

<div
<div
class="modal-backdrop fade"
{literal}
:class="{in: !isHidden}"
{/literal}
>
</div>
:class="{ldelim}show: !isHidden{rdelim}"
></div>
</div>
24 changes: 7 additions & 17 deletions modules/blockwishlist/views/templates/components/modals/share.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
>
<div
class="wishlist-modal modal fade"
{literal}
:class="{show: !isHidden}"
{/literal}
:class="{ldelim}show: !isHidden{rdelim}"
tabindex="-1"
role="dialog"
aria-modal="true"
Expand All @@ -31,8 +29,7 @@
@click="toggleModal"
data-dismiss="modal"
aria-label="Close"
>
</button>
></button>
</div>
<div class="modal-body">
<div class="form-group form-group-lg">
Expand All @@ -52,27 +49,20 @@
class="modal-cancel btn btn-secondary"
data-dismiss="modal"
@click="toggleModal"
>
((cancelText))
</button>
>((cancelText))</button>

<button
type="button"
class="btn btn-primary"
@click="copyLink"
>
(( actionText ))
</button>
>(( actionText ))</button>
</div>
</div>
</div>
</div>

<div
<div
class="modal-backdrop fade"
{literal}
:class="{in: !isHidden}"
{/literal}
>
</div>
:class="{ldelim}show: !isHidden{rdelim}"
></div>
</div>
10 changes: 7 additions & 3 deletions templates/catalog/_partials/miniatures/product.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@
{$componentName = 'product-miniature'}

{block name='product_miniature_item'}
<article class="{$componentName} js-{$componentName} thumbnail-container {if !empty($productClasses)} {$productClasses}{/if}" data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}">
<article
class="{$componentName} js-{$componentName}{if !empty($productClasses)} {$productClasses}{/if}"
data-id-product="{$product.id_product}"
data-id-product-attribute="{$product.id_product_attribute}"
>
<div class="card">
<a href="{$product.url}" class="{$componentName}__link">
{include file='catalog/_partials/product-flags.tpl'}

{block name='product_miniature_image'}
<div class="{$componentName}__image-container">
<div class="{$componentName}__image-container thumbnail-container">
{if $product.cover}
<picture>
{if isset($product.cover.bySize.default_md.sources.avif)}
Expand Down Expand Up @@ -102,7 +106,7 @@

{block name='quick_view_touch'}
<button class="{$componentName}__quickview_touch btn js-quickview" data-link-action="quickview">
<i class="material-icons">&#xE417;</i>
<i class="material-icons">&#xE417;</i>
</button>
{/block}
</div>
Expand Down

0 comments on commit 5d33762

Please sign in to comment.