diff --git a/falcon/_dev/img/bag.svg b/falcon/_dev/img/bag.svg new file mode 100644 index 0000000..efbc783 --- /dev/null +++ b/falcon/_dev/img/bag.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/falcon/_dev/img/checkmark.svg b/falcon/_dev/img/checkmark.svg new file mode 100644 index 0000000..87168de --- /dev/null +++ b/falcon/_dev/img/checkmark.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/falcon/_dev/img/chevron_down.svg b/falcon/_dev/img/chevron_down.svg new file mode 100644 index 0000000..64b5016 --- /dev/null +++ b/falcon/_dev/img/chevron_down.svg @@ -0,0 +1,3 @@ + + + diff --git a/falcon/_dev/img/chevron_left.svg b/falcon/_dev/img/chevron_left.svg new file mode 100644 index 0000000..4e540e3 --- /dev/null +++ b/falcon/_dev/img/chevron_left.svg @@ -0,0 +1,3 @@ + + + diff --git a/falcon/_dev/img/chevron_right.svg b/falcon/_dev/img/chevron_right.svg new file mode 100644 index 0000000..409f028 --- /dev/null +++ b/falcon/_dev/img/chevron_right.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/falcon/_dev/img/chevron_up.svg b/falcon/_dev/img/chevron_up.svg new file mode 100644 index 0000000..31a0429 --- /dev/null +++ b/falcon/_dev/img/chevron_up.svg @@ -0,0 +1,3 @@ + + + diff --git a/falcon/_dev/img/hamburger-menu.svg b/falcon/_dev/img/hamburger-menu.svg new file mode 100644 index 0000000..603e8b9 --- /dev/null +++ b/falcon/_dev/img/hamburger-menu.svg @@ -0,0 +1,3 @@ + + + diff --git a/falcon/_dev/img/heart.svg b/falcon/_dev/img/heart.svg new file mode 100644 index 0000000..8a051f4 --- /dev/null +++ b/falcon/_dev/img/heart.svg @@ -0,0 +1,3 @@ + + + diff --git a/falcon/_dev/img/person.svg b/falcon/_dev/img/person.svg new file mode 100644 index 0000000..c2d71cc --- /dev/null +++ b/falcon/_dev/img/person.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/falcon/_dev/img/search.svg b/falcon/_dev/img/search.svg new file mode 100644 index 0000000..ae29bf0 --- /dev/null +++ b/falcon/_dev/img/search.svg @@ -0,0 +1,3 @@ + + + diff --git a/falcon/_dev/img/x.svg b/falcon/_dev/img/x.svg new file mode 100644 index 0000000..61979ba --- /dev/null +++ b/falcon/_dev/img/x.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/falcon/_dev/js/theme/components/product.js b/falcon/_dev/js/theme/components/product.js index 05875a4..4f59eee 100644 --- a/falcon/_dev/js/theme/components/product.js +++ b/falcon/_dev/js/theme/components/product.js @@ -1,90 +1,108 @@ -import $ from 'jquery'; -import prestashop from 'prestashop'; +import $ from "jquery"; +import prestashop from "prestashop"; $(() => { - const createInputFile = () => { - $('.js-file-input').on('change', (event) => { - const target = $(event.currentTarget)[0]; - const file = (target) ? target.files[0] : null; + const createInputFile = () => { + $(".js-file-input").on("change", (event) => { + const target = $(event.currentTarget)[0]; + const file = target ? target.files[0] : null; - if (target && file) { - $(target).prev().text(file.name); - } - }); - }; + if (target && file) { + $(target).prev().text(file.name); + } + }); + }; - const createProductSpin = () => { - const $quantityInput = $('#quantity_wanted'); + const createProductSpin = () => { + const $quantityInput = $("#quantity_wanted"); - $quantityInput.TouchSpin({ - verticalupclass: 'material-icons touchspin-up', - verticaldownclass: 'material-icons touchspin-down', - buttondown_class: 'btn btn-touchspin js-touchspin', - buttonup_class: 'btn btn-touchspin js-touchspin', - min: parseInt($quantityInput.attr('min'), 10), - max: 1000000, - }); + $quantityInput.TouchSpin({ + min: parseInt($quantityInput.attr("min"), 10), + max: 1000000, + verticalbuttons: true, + verticalupclass: "btn btn-touchspin js-touchspin", + verticaldownclass: "btn btn-touchspin js-touchspin", + verticalup: + 'Up', + verticaldown: + 'Down', + }); - $quantityInput.on('focusout', () => { - if ($quantityInput.val() === '' || $quantityInput.val() < $quantityInput.attr('min')) { - $quantityInput.val($quantityInput.attr('min')); - $quantityInput.trigger('change'); - } - }); + $quantityInput.on("focusout", () => { + if ( + $quantityInput.val() === "" || + $quantityInput.val() < $quantityInput.attr("min") + ) { + $quantityInput.val($quantityInput.attr("min")); + $quantityInput.trigger("change"); + } + }); - $('body').on('change keyup', '#quantity_wanted', (event) => { - $(event.currentTarget).trigger('touchspin.stopspin'); - prestashop.emit('updateProduct', { - eventType: 'updatedProductQuantity', - event, - }); - }); - }; + $("body").on("change keyup", "#quantity_wanted", (event) => { + $(event.currentTarget).trigger("touchspin.stopspin"); + prestashop.emit("updateProduct", { + eventType: "updatedProductQuantity", + event, + }); + }); + }; - createProductSpin(); - createInputFile(); - let updateEvenType = false; - - prestashop.on('updateProduct', ({ eventType }) => { - updateEvenType = eventType; - }); - - prestashop.on('updateCart', (event) => { - if ( - prestashop.page.page_name === 'product' - && parseInt(event.reason.idProduct, 10) === parseInt($('#add-to-cart-or-refresh').find('[name="id_product"]').val(), 10)) { - prestashop.emit('updateProduct', { - event, - resp: {}, - reason: { - productUrl: prestashop.urls.pages.product || '', - }, - }); - } - }); - - prestashop.on('updatedProduct', (event) => { + createProductSpin(); createInputFile(); + let updateEvenType = false; - if (event && event.product_minimal_quantity) { - const minimalProductQuantity = parseInt(event.product_minimal_quantity, 10); - const quantityInputSelector = '#quantity_wanted'; - const quantityInput = $(quantityInputSelector); + prestashop.on("updateProduct", ({ eventType }) => { + updateEvenType = eventType; + }); - // @see http://www.virtuosoft.eu/code/bootstrap-touchspin/ about Bootstrap TouchSpin - quantityInput.trigger('touchspin.updatesettings', { - min: minimalProductQuantity, - }); - } + prestashop.on("updateCart", (event) => { + if ( + prestashop.page.page_name === "product" && + parseInt(event.reason.idProduct, 10) === + parseInt( + $("#add-to-cart-or-refresh") + .find('[name="id_product"]') + .val(), + 10 + ) + ) { + prestashop.emit("updateProduct", { + event, + resp: {}, + reason: { + productUrl: prestashop.urls.pages.product || "", + }, + }); + } + }); - if (updateEvenType === 'updatedProductCombination') { - $('.js-product-images').replaceWith(event.product_cover_thumbnails); - $('.js-product-images-modal').replaceWith(event.product_images_modal); - prestashop.emit('updatedProductCombination', event); - } + prestashop.on("updatedProduct", (event) => { + createInputFile(); - updateEvenType = false; + if (event && event.product_minimal_quantity) { + const minimalProductQuantity = parseInt( + event.product_minimal_quantity, + 10 + ); + const quantityInputSelector = "#quantity_wanted"; + const quantityInput = $(quantityInputSelector); - prestashop.pageLazyLoad.update(); - }); + // @see http://www.virtuosoft.eu/code/bootstrap-touchspin/ about Bootstrap TouchSpin + quantityInput.trigger("touchspin.updatesettings", { + min: minimalProductQuantity, + }); + } + + if (updateEvenType === "updatedProductCombination") { + $(".js-product-images").replaceWith(event.product_cover_thumbnails); + $(".js-product-images-modal").replaceWith( + event.product_images_modal + ); + prestashop.emit("updatedProductCombination", event); + } + + updateEvenType = false; + + prestashop.pageLazyLoad.update(); + }); }); diff --git a/falcon/modules/is_favoriteproducts/views/templates/hook/button-product.tpl b/falcon/modules/is_favoriteproducts/views/templates/hook/button-product.tpl new file mode 100644 index 0000000..5d00fb0 --- /dev/null +++ b/falcon/modules/is_favoriteproducts/views/templates/hook/button-product.tpl @@ -0,0 +1,29 @@ + +
+ +
+ {capture name="svg_output"}{svg_icon file='heart.svg' }{/capture} + {if $smarty.capture.svg_output} + {$smarty.capture.svg_output nofilter} + {else} + favorite + {/if} +
+
+ {capture name="svg_output"}{svg_icon file='heart.svg' width="22"}{/capture} + {if $smarty.capture.svg_output} + {$smarty.capture.svg_output nofilter} + {else} + favorite_border + {/if} +
+
+
diff --git a/falcon/modules/is_favoriteproducts/views/templates/hook/button.tpl b/falcon/modules/is_favoriteproducts/views/templates/hook/button.tpl new file mode 100644 index 0000000..0188a2d --- /dev/null +++ b/falcon/modules/is_favoriteproducts/views/templates/hook/button.tpl @@ -0,0 +1,28 @@ + + +
+ {capture name="svg_output"}{svg_icon file='heart.svg'}{/capture} + {if $smarty.capture.svg_output} + {$smarty.capture.svg_output nofilter} + {else} + favorite + {/if} +
+
+ {capture name="svg_output"}{svg_icon file='heart.svg' width="22"}{/capture} + {if $smarty.capture.svg_output} + {$smarty.capture.svg_output nofilter} + {else} + favorite_border + {/if} + +
+
diff --git a/falcon/modules/is_favoriteproducts/views/templates/hook/top.tpl b/falcon/modules/is_favoriteproducts/views/templates/hook/top.tpl new file mode 100644 index 0000000..259802d --- /dev/null +++ b/falcon/modules/is_favoriteproducts/views/templates/hook/top.tpl @@ -0,0 +1,19 @@ +
+ +
+ {capture name="svg_output"}{svg_icon file='heart.svg'}{/capture} + {if $smarty.capture.svg_output} + {$smarty.capture.svg_output nofilter} + {else} + favorite + {/if} + + {$favoriteProductsCount} + +
+
+
diff --git a/falcon/modules/is_searchbar/views/templates/hook/is_searchbar.tpl b/falcon/modules/is_searchbar/views/templates/hook/is_searchbar.tpl new file mode 100644 index 0000000..d51da7d --- /dev/null +++ b/falcon/modules/is_searchbar/views/templates/hook/is_searchbar.tpl @@ -0,0 +1,22 @@ + \ No newline at end of file diff --git a/falcon/modules/is_shoppingcart/views/templates/hook/is_shoppingcart.tpl b/falcon/modules/is_shoppingcart/views/templates/hook/is_shoppingcart.tpl new file mode 100644 index 0000000..c15d237 --- /dev/null +++ b/falcon/modules/is_shoppingcart/views/templates/hook/is_shoppingcart.tpl @@ -0,0 +1,89 @@ +{** + * 2007-2020 PrestaShop and Contributors + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License 3.0 (AFL-3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * https://opensource.org/licenses/AFL-3.0 + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@prestashop.com so we can send you a copy immediately. + * + * @author PrestaShop SA + * @copyright 2007-2020 PrestaShop SA and Contributors + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) + * International Registered Trademark & Property of PrestaShop SA + *} + +
+ +
diff --git a/falcon/modules/ps_contactinfo/ps_contactinfo.tpl b/falcon/modules/ps_contactinfo/ps_contactinfo.tpl index bcbe054..278c738 100644 --- a/falcon/modules/ps_contactinfo/ps_contactinfo.tpl +++ b/falcon/modules/ps_contactinfo/ps_contactinfo.tpl @@ -28,7 +28,13 @@
{l s='Store information' d='Shop.Theme.Global'} - + {capture name="svg_output"}{svg_icon file='chevron_down.svg'}{/capture} + {if $smarty.capture.svg_output} + + {$smarty.capture.svg_output nofilter} + {else} + + {/if}
diff --git a/falcon/modules/ps_customeraccountlinks/ps_customeraccountlinks.tpl b/falcon/modules/ps_customeraccountlinks/ps_customeraccountlinks.tpl index 0756b45..09ae64f 100644 --- a/falcon/modules/ps_customeraccountlinks/ps_customeraccountlinks.tpl +++ b/falcon/modules/ps_customeraccountlinks/ps_customeraccountlinks.tpl @@ -28,7 +28,13 @@
{l s='Your account' d='Shop.Theme.Customeraccount'} - + {capture name="svg_output"}{svg_icon file='chevron_down.svg'}{/capture} + {if $smarty.capture.svg_output} + + {$smarty.capture.svg_output nofilter} + {else} + + {/if}
diff --git a/falcon/modules/ps_customersignin/ps_customersignin.tpl b/falcon/modules/ps_customersignin/ps_customersignin.tpl index bc98a32..681ff4a 100644 --- a/falcon/modules/ps_customersignin/ps_customersignin.tpl +++ b/falcon/modules/ps_customersignin/ps_customersignin.tpl @@ -34,7 +34,12 @@ {/if} >
- person + {capture name="svg_output"}{svg_icon file='person.svg'}{/capture} + {if $smarty.capture.svg_output} + {$smarty.capture.svg_output nofilter} + {else} + person + {/if}
diff --git a/falcon/modules/ps_linklist/views/templates/hook/linkblock-column.tpl b/falcon/modules/ps_linklist/views/templates/hook/linkblock-column.tpl index d6f261f..d4174ea 100644 --- a/falcon/modules/ps_linklist/views/templates/hook/linkblock-column.tpl +++ b/falcon/modules/ps_linklist/views/templates/hook/linkblock-column.tpl @@ -4,7 +4,13 @@
{$linkBlock.title} - + {capture name="svg_output"}{svg_icon file='chevron_down.svg'}{/capture} + {if $smarty.capture.svg_output} + + {$smarty.capture.svg_output nofilter} + {else} + + {/if}
\ No newline at end of file