Initial commit

This commit is contained in:
2019-11-20 07:44:43 +01:00
commit 5bf49c4a81
41188 changed files with 5459177 additions and 0 deletions

65
web/modules/deliverydate/.gitignore vendored Normal file
View File

@@ -0,0 +1,65 @@
config*
# Created by https://www.gitignore.io/api/macos,windows,linux
### macOS ###
*.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Windows ###
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
### Linux ###
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,124 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{deliverydate}prestashop>deliverydate_6be6f49a13f3faf043597c1f4c821d99'] = 'Dates de livraison';
$_MODULE['<{deliverydate}prestashop>deliverydate_d3a8f0c252889f0cd3183ce80c7e73db'] = 'Affichez des dates de livraison dans le panier et sur les fiches produit.';
$_MODULE['<{deliverydate}prestashop>deliverydate_5eb66c247fb792b5e67dc4120166836f'] = 'Livraison prévue à partir du [date_min]';
$_MODULE['<{deliverydate}prestashop>deliverydate_065ab3a28ca4f16f55f103adc7d0226f'] = 'Livraison';
$_MODULE['<{deliverydate}prestashop>deliverydate_2bcdca6c5f30b27d4632fe5857f689d7'] = 'Livraison prévue le [date_min]';
$_MODULE['<{deliverydate}prestashop>deliverydate_30b4ca04aee7b851f4c98b9fc75bdf71'] = 'Livraison prévue entre le [date_min] et le [date_max]';
$_MODULE['<{deliverydate}prestashop>deliverydate_ecb498fa6128719a45d3716b52c50b82'] = 'Le délai de livraison doit être de 1 jour minimum';
$_MODULE['<{deliverydate}prestashop>deliverydate_4c388b38f3f8c6e19c0d77f7a24f5e13'] = 'Vous devez sélectionner un transporteur.';
$_MODULE['<{deliverydate}prestashop>deliverydate_74b7ae9b2829f1c33736eceef023cd78'] = 'Vous devez sélectionner une zone';
$_MODULE['<{deliverydate}prestashop>deliverydate_26bbc33812bee2a206dc533c14f0a442'] = 'Vous devez sélectionner une valuer min';
$_MODULE['<{deliverydate}prestashop>deliverydate_290f60080f608967989553c5589da9a4'] = 'Vous devez sélectionner une valeur max';
$_MODULE['<{deliverydate}prestashop>deliverydate_d012b855784343be45ccdfc79925ba9d'] = 'Mauvaise limite d\'expedition';
$_MODULE['<{deliverydate}prestashop>deliverydate_f0acbc073a3f487eb61346d3508a816c'] = 'Enregistré avec succès';
$_MODULE['<{deliverydate}prestashop>deliverydate_a25c753ee3e4be15ec0daa5a40deb7b8'] = 'Une erreur s\'est produite';
$_MODULE['<{deliverydate}prestashop>deliverydate_4b302b767d0209b2358b2b9bd3f6bc32'] = 'Vous devez sélectionner une date';
$_MODULE['<{deliverydate}prestashop>deliverydate_185461029fa7780164d21c6e33654672'] = 'Règle suprimée avec succès !';
$_MODULE['<{deliverydate}prestashop>deliverydate_a36a38a860c95b225dbd7f3a833d6fcd'] = 'Exception supprimée avec succès';
$_MODULE['<{deliverydate}prestashop>deliverydate_9ccdea66c0382d964d730d3a143d00d0'] = 'Le temps de préparation doit être d\'un jour minimum';
$_MODULE['<{deliverydate}prestashop>deliverydate_8ba0dc4fda54ad43da1fe1ed24c5407a'] = 'Votre message ne peut pas contenir d\'HTML';
$_MODULE['<{deliverydate}prestashop>deliverydate_bb5c333c7d177431499f5de0b9ee31db'] = 'Réglages enregistrés avec succès !';
$_MODULE['<{deliverydate}prestashop>deliverydate_ed5543e211dfc2517be09491ae8c4c5e'] = 'Vous devez créer un transporteur valide avant d\'utiliser cette extension.';
$_MODULE['<{deliverydate}prestashop>deliverydate_8e05ce309074e2e10b06fb049d38cd99'] = 'Vous devez créer une zone valide avant d\'utiliser cette extension.';
$_MODULE['<{deliverydate}prestashop>deliverydate_914419aa32f04011357d3b604a86d7eb'] = 'Transporteur';
$_MODULE['<{deliverydate}prestashop>deliverydate_b3ff996fe5c77610359114835baf9b38'] = 'Zone';
$_MODULE['<{deliverydate}prestashop>deliverydate_021a1b67e143c6602e1b44a36a270976'] = 'Jours min.';
$_MODULE['<{deliverydate}prestashop>deliverydate_c0deafc177b875ec0b40b36b2e242677'] = 'Jours max.';
$_MODULE['<{deliverydate}prestashop>deliverydate_6f8522e0610541f1ef215a22ffa66ff6'] = 'Lundi';
$_MODULE['<{deliverydate}prestashop>deliverydate_5792315f09a5d54fb7e3d066672b507f'] = 'Mardi';
$_MODULE['<{deliverydate}prestashop>deliverydate_796c163589f295373e171842f37265d5'] = 'Mercredi';
$_MODULE['<{deliverydate}prestashop>deliverydate_78ae6f0cd191d25147e252dc54768238'] = 'Jeudi';
$_MODULE['<{deliverydate}prestashop>deliverydate_c33b138a163847cdb6caeeb7c9a126b4'] = 'Vendredi';
$_MODULE['<{deliverydate}prestashop>deliverydate_8b7051187b9191cdcdae6ed5a10e5adc'] = 'Samedi';
$_MODULE['<{deliverydate}prestashop>deliverydate_9d1a0949c39e66a0cd65240bc0ac9177'] = 'Dimanche';
$_MODULE['<{deliverydate}prestashop>deliverydate_2db43b2c3d2c7adcfe52f224f603ace6'] = 'Limite d\'expédition';
$_MODULE['<{deliverydate}prestashop>deliverydate_9b5e7fc14b157afb268b71b01d397eef'] = 'Ajouter une règle';
$_MODULE['<{deliverydate}prestashop>deliverydate_44749712dbec183e983dcd78a7736c41'] = 'Date';
$_MODULE['<{deliverydate}prestashop>deliverydate_9a5f09cf66e692efdae493ce4c9aa64f'] = 'Préparation';
$_MODULE['<{deliverydate}prestashop>deliverydate_ed0a16de69298a78317c7978a3f84f31'] = 'Ajouter une exception';
$_MODULE['<{deliverydate}prestashop>deliverydate_b4c6e7fdb7bc09a3ce894b4fc0fe187c'] = 'Si vous avez des problèmes pour afficher les dates sur la fiche produit, essayez d\'activer l\'option \"Afficher les quantités disponibles sur la page produit\" dans la page \"Préférences > Produits\"';
$_MODULE['<{deliverydate}prestashop>add_exception_ed0a16de69298a78317c7978a3f84f31'] = 'Ajouter une exception';
$_MODULE['<{deliverydate}prestashop>add_exception_914419aa32f04011357d3b604a86d7eb'] = 'Transporteur';
$_MODULE['<{deliverydate}prestashop>add_exception_b3ff996fe5c77610359114835baf9b38'] = 'Zone';
$_MODULE['<{deliverydate}prestashop>add_exception_44749712dbec183e983dcd78a7736c41'] = 'Date';
$_MODULE['<{deliverydate}prestashop>add_exception_9a5f09cf66e692efdae493ce4c9aa64f'] = 'Préparation';
$_MODULE['<{deliverydate}prestashop>add_exception_93cba07454f06a4a960172bbd6e2a435'] = 'Oui';
$_MODULE['<{deliverydate}prestashop>add_exception_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non';
$_MODULE['<{deliverydate}prestashop>add_exception_065ab3a28ca4f16f55f103adc7d0226f'] = 'Livraison';
$_MODULE['<{deliverydate}prestashop>add_exception_ea4788705e6873b424c65e91c2846b19'] = 'Annuler';
$_MODULE['<{deliverydate}prestashop>add_exception_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer';
$_MODULE['<{deliverydate}prestashop>add_rule_9b5e7fc14b157afb268b71b01d397eef'] = 'Ajouter une règle';
$_MODULE['<{deliverydate}prestashop>add_rule_914419aa32f04011357d3b604a86d7eb'] = 'Transporteur';
$_MODULE['<{deliverydate}prestashop>add_rule_b3ff996fe5c77610359114835baf9b38'] = 'Zone';
$_MODULE['<{deliverydate}prestashop>add_rule_723c8ce6450c233a3e54cb0ac624238d'] = 'Jours de livraison';
$_MODULE['<{deliverydate}prestashop>add_rule_de6cacf1a1da0a857073e81738e69dd6'] = 'Quels jours ce transporteur livre cette zone ?';
$_MODULE['<{deliverydate}prestashop>add_rule_6f8522e0610541f1ef215a22ffa66ff6'] = 'Lundi';
$_MODULE['<{deliverydate}prestashop>add_rule_5792315f09a5d54fb7e3d066672b507f'] = 'Mardi';
$_MODULE['<{deliverydate}prestashop>add_rule_796c163589f295373e171842f37265d5'] = 'Mercredi';
$_MODULE['<{deliverydate}prestashop>add_rule_78ae6f0cd191d25147e252dc54768238'] = 'Jeudi';
$_MODULE['<{deliverydate}prestashop>add_rule_c33b138a163847cdb6caeeb7c9a126b4'] = 'Vendredi';
$_MODULE['<{deliverydate}prestashop>add_rule_8b7051187b9191cdcdae6ed5a10e5adc'] = 'Samedi';
$_MODULE['<{deliverydate}prestashop>add_rule_9d1a0949c39e66a0cd65240bc0ac9177'] = 'Dimanche';
$_MODULE['<{deliverydate}prestashop>add_rule_021a1b67e143c6602e1b44a36a270976'] = 'Jours min.';
$_MODULE['<{deliverydate}prestashop>add_rule_225e75c29d32392d311f5dc94c792384'] = 'jour(s)';
$_MODULE['<{deliverydate}prestashop>add_rule_c0deafc177b875ec0b40b36b2e242677'] = 'Jours max.';
$_MODULE['<{deliverydate}prestashop>add_rule_9e8f06ebcddccda68d0d98f22822f630'] = 'Pas d\'expedition après';
$_MODULE['<{deliverydate}prestashop>add_rule_ea4788705e6873b424c65e91c2846b19'] = 'Annuler';
$_MODULE['<{deliverydate}prestashop>add_rule_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer';
$_MODULE['<{deliverydate}prestashop>satisfaction_58a8858edd68743ee3a1fd248a3cb1da'] = 'Êtes-vous satisfait de ce module ?';
$_MODULE['<{deliverydate}prestashop>satisfaction_c2f3f489a00553e7a01d369c103c7251'] = 'NON';
$_MODULE['<{deliverydate}prestashop>satisfaction_7469a286259799e5b37e5db9296f00b3'] = 'OUI';
$_MODULE['<{deliverydate}prestashop>satisfaction_8f643c93e483d7c5121db062d2daeb36'] = 'Heureux d\'entre cela ! Cliquez-ici pour laisser une bonne note sur PrestaShop Addons. Merci.';
$_MODULE['<{deliverydate}prestashop>satisfaction_63f89ad94a24d9b53c0e3b8389c6c61c'] = 'Désolé d\'entendre cela. Cliquez ici pour m\'envoyer un message afin que je puisse jeter un oeil au problème.';
$_MODULE['<{deliverydate}prestashop>settings_f4f70727dc34561dfde1a3c529b6205c'] = 'Réglages';
$_MODULE['<{deliverydate}prestashop>settings_64979b52d796defbdf05356df9e37d57'] = 'Temps de préparation';
$_MODULE['<{deliverydate}prestashop>settings_ce3c8366c9321faf78961c6e8a3c2f95'] = 'Combien de temps vous faut-il pour préparer une commande ?';
$_MODULE['<{deliverydate}prestashop>settings_225e75c29d32392d311f5dc94c792384'] = 'jour(s)';
$_MODULE['<{deliverydate}prestashop>settings_b55197a49e8c4cd8c314bc2aa39d6feb'] = 'Hors stock';
$_MODULE['<{deliverydate}prestashop>settings_d544df7f73ff2fddf944a09f773c7e26'] = 'Combien de temps faut-il ajouter pour un produit hors stock ?';
$_MODULE['<{deliverydate}prestashop>settings_aec13eaeef500171ca10380e8105eaaa'] = 'Date max seulement';
$_MODULE['<{deliverydate}prestashop>settings_93cba07454f06a4a960172bbd6e2a435'] = 'Oui';
$_MODULE['<{deliverydate}prestashop>settings_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non';
$_MODULE['<{deliverydate}prestashop>settings_9a47791c7feb68219b72697394ea9cfe'] = 'Si vous souhaitez seulement appliquer le délai hors stock sur la date de livraison maximale et non la minimale.';
$_MODULE['<{deliverydate}prestashop>settings_1f6ddbb7c6c5395c4b9e7d33b8eef2c7'] = 'Jours de préparation';
$_MODULE['<{deliverydate}prestashop>settings_516ad92d94d3e72c185162da2048ddb3'] = 'Quels jours préparez vous vos commandes?';
$_MODULE['<{deliverydate}prestashop>settings_6f8522e0610541f1ef215a22ffa66ff6'] = 'Lundi';
$_MODULE['<{deliverydate}prestashop>settings_5792315f09a5d54fb7e3d066672b507f'] = 'Mardi';
$_MODULE['<{deliverydate}prestashop>settings_796c163589f295373e171842f37265d5'] = 'Mercredi';
$_MODULE['<{deliverydate}prestashop>settings_78ae6f0cd191d25147e252dc54768238'] = 'Jeudi';
$_MODULE['<{deliverydate}prestashop>settings_c33b138a163847cdb6caeeb7c9a126b4'] = 'Vendredi';
$_MODULE['<{deliverydate}prestashop>settings_8b7051187b9191cdcdae6ed5a10e5adc'] = 'Samedi';
$_MODULE['<{deliverydate}prestashop>settings_9d1a0949c39e66a0cd65240bc0ac9177'] = 'Dimanche';
$_MODULE['<{deliverydate}prestashop>settings_4c2a8fe7eaf24721cc7a9f0175115bd4'] = 'Message';
$_MODULE['<{deliverydate}prestashop>settings_0e0fec901471a6c518c435d3bcc5ba4c'] = 'Si vous avez besoin d\'ajouter un message spécial avec la date de livraison dans le panier.';
$_MODULE['<{deliverydate}prestashop>settings_eb763a2e313718f33f55e1f0d84df6ee'] = 'Page produit';
$_MODULE['<{deliverydate}prestashop>settings_d67eb18cddb04bc3778f5741df295b8c'] = 'Si vous souhaitez afficher les dates de livraison sur vos pages produit.';
$_MODULE['<{deliverydate}prestashop>settings_7015777bcc86cd0c5e4819310d62b040'] = 'Onglets';
$_MODULE['<{deliverydate}prestashop>settings_70c1353f1b002fa988b0d5ea27ad0904'] = 'Si votre thème utilise des onglets, activez cette option.';
$_MODULE['<{deliverydate}prestashop>settings_65a8d96805d91aa82146f1c1e371d44c'] = 'Position dans le panier';
$_MODULE['<{deliverydate}prestashop>settings_746be7bb0cf93ac0522869198d703cc9'] = 'Après la liste des transporteurs';
$_MODULE['<{deliverydate}prestashop>settings_741d46c8b758a7936dd30ba67018136d'] = 'Avant la liste des transporteurs';
$_MODULE['<{deliverydate}prestashop>settings_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer';
$_MODULE['<{deliverydate}prestashop>settings_1f4da964f8eab62e96e8cfe406e44364'] = 'Règles';
$_MODULE['<{deliverydate}prestashop>settings_675ab478a45de78eb2c02050ce5340b3'] = 'Pas de règles';
$_MODULE['<{deliverydate}prestashop>settings_d5f1381c5f97f928df4ef8d18c2a27c0'] = 'Exceptions';
$_MODULE['<{deliverydate}prestashop>settings_43c87d1e4b047b32e6be7bb21b44dc66'] = 'Pas d\'exceptions';
$_MODULE['<{deliverydate}prestashop>settings_bf17ac149e2e7a530c677e9bd51d3fd2'] = 'Modules';
$_MODULE['<{deliverydate}prestashop>settings_abfc3a65538a6ec86502b2b498b6b4a6'] = 'Découvrir';
$_MODULE['<{deliverydate}prestashop>settings_e29252902fd4eaee6279ea5b60bc9092'] = 'Templates d\'email';
$_MODULE['<{deliverydate}prestashop>settings_6381eb657115a477cd3e4dc71c109ccd'] = 'Personnalisez l\'ensemble de vos e-mails automatiques aux couleurs de votre boutique ! Ces templates d\'emails sont responsive, pour vous assurer un taux d\'ouverture optimal sur tous les supports, et leurs couleurs et liens sont entièrement personnalisables.';
$_MODULE['<{deliverydate}prestashop>settings_5b6cf869265c13af8566f192b4ab3d2a'] = 'Documentation';
$_MODULE['<{deliverydate}prestashop>admin_order_6be6f49a13f3faf043597c1f4c821d99'] = 'Dates de livraison';
$_MODULE['<{deliverydate}prestashop>admin_order_374b6dd217da8866fa421ee88bb94499'] = 'Date de livraison minimale';
$_MODULE['<{deliverydate}prestashop>admin_order_882417db69334ddd92692523d20be8d0'] = 'Date de livraison maximale';
$_MODULE['<{deliverydate}prestashop>admin_order_content_ship_374b6dd217da8866fa421ee88bb94499'] = 'Date de livraison minimale';
$_MODULE['<{deliverydate}prestashop>admin_order_content_ship_882417db69334ddd92692523d20be8d0'] = 'Date de livraison maximale';
$_MODULE['<{deliverydate}prestashop>admin_order_tab_ship_d9d9b85529567a65f2766f5c7ce2c956'] = 'Date(s)';
$_MODULE['<{deliverydate}prestashop>before_carrier_js_701488db1beaa778f53fa98f8daefb17'] = 'En choisissant [name], votre commande sera livrée entre le [start] et le [end]';
$_MODULE['<{deliverydate}prestashop>before_carrier_js_1b6d98b69c4fcbae60883f31e0785f9a'] = 'En choisissant [name], votre commande sera livrée le [start]';
$_MODULE['<{deliverydate}prestashop>product_tab_065ab3a28ca4f16f55f103adc7d0226f'] = 'Livraison';
$_MODULE['<{deliverydate}prestashop>product_tab_content_065ab3a28ca4f16f55f103adc7d0226f'] = 'Livraison';

View File

@@ -0,0 +1,11 @@
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -0,0 +1,9 @@
select[name=minutes] {
width: 75px;
display: inline-block;
}
select[name=hours] {
width: 60px;
display: inline-block;
}

View File

@@ -0,0 +1,14 @@
.delivery_reason {
padding: 10px;
margin-top: 20px;
margin-bottom: 20px;
border: 1px solid #d6d4d4;
}
.delivery_date {
padding: 10px;
margin-top: 20px;
margin-bottom: 20px;
display: none;
border: 1px solid #d6d4d4;
}

View File

@@ -0,0 +1,14 @@
.delivery_reason {
padding: 10px;
margin-top: 20px;
margin-bottom: 20px;
background: #f6f6f6;
}
.delivery_date {
padding: 10px;
margin-top: 20px;
margin-bottom: 20px;
display: none;
background: #f6f6f6;
}

View File

@@ -0,0 +1,11 @@
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,7 @@
.hidden {
display: none !important;
}
.dd_available, .dd_oot {
margin: 20px 0 10px 0;
}

View File

@@ -0,0 +1,5 @@
iframe {
width: 100%;
min-height: 800px;
border: none;
}

View File

@@ -0,0 +1,11 @@
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1003 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 981 B

View File

@@ -0,0 +1,11 @@
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,43 @@
function changeDeliveryDate()
{
id = parseInt($('input[name="id_carrier"]:checked, input[name^="delivery_option"]:checked').val());
if (deliveries[id])
{
if (deliveries[id]['start'] == deliveries[id]['end'])
text = delivery_text;
else
text = delivery_text_between;
text = text.replace('[start]', '<b>'+deliveries[id]['start']+'</b>');
text = text.replace('[end]', '<b>'+deliveries[id]['end']+'</b>');
text = text.replace('[name]', deliveries[id]['name']);
$('.delivery_date').html(text).slideDown();
}
else
$('.delivery_date').slideUp();
}
function moveDates()
{
delivery_date_block = $('.delivery_date').first().clone();
$('.delivery_date').remove();
$('.delivery_options_address, table#carrierTable').after(delivery_date_block); // 1.5/1.6
$('.delivery-options').append(delivery_date_block); // 1.7
}
function moveReason()
{
delivery_reason_block = $('.delivery_reason').first().clone();
$('.delivery_reason').remove();
$('.delivery_options_address, table#carrierTable').after(delivery_reason_block); // 1.5/1.6
$('.delivery-options').append(delivery_reason_block); // 1.7
}
$(document).ready(function() {
if (typeof opc == 'undefined' || !opc)
{
$('input[name="id_carrier"]:visible, input[name^="delivery_option"]').change(function() {
changeDeliveryDate();
});
}
});

View File

@@ -0,0 +1,11 @@
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,49 @@
function toggleDeliveryDates(qty)
{
if (!allowBuyWhenOutOfStock && qty == 0 && stock_management)
{
$('#dd_carriers_list').parent().addClass('hidden');
$('p.dd_available, p.dd_oot').addClass('hidden');
}
else
{
$('#dd_carriers_list').parent().removeClass('hidden');
$('p.dd_available, p.dd_oot').removeClass('hidden');
}
if (qty > 0 || !stock_management)
{
$('.dd_available').removeClass('hidden');
$('.dd_oot').addClass('hidden');
}
else
{
$('.dd_available').addClass('hidden');
$('.dd_oot').removeClass('hidden');
}
}
$(document).ready(function()
{
if (typeof(quantityAvailable) == 'undefined')
quantityAvailable = 1;
if (typeof(combinations) != 'undefined' && combinations.length)
{
$('#buy_block input, #buy_block select').change(function() {
setTimeout(function(){
toggleDeliveryDates(quantityAvailable)
}, 100);
});
$('#color_to_pick_list a').click(function() {
setTimeout(function(){
toggleDeliveryDates(quantityAvailable);
}, 100);
});
}
toggleDeliveryDates(quantityAvailable);
});

View File

@@ -0,0 +1,15 @@
function toggleDeliveryDates(add_to_cart_disabled)
{
if (add_to_cart_disabled)
{
$('.dd_available').removeClass('hidden');
$('.dd_oot').addClass('hidden');
} else {
$('.dd_available').addClass('hidden');
$('.dd_oot').removeClass('hidden');
}
}
prestashop.on('updatedProduct', function (event) {
toggleDeliveryDates($(event.product_add_to_cart).find('.add-to-cart').is(':disabled'));
});

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,34 @@
<ps-panel header="{l s='Add exception' mod='deliverydate'}">
<form class="form-horizontal" action="{$current_url|escape:'quotes':'UTF-8'}" method="post">
<ps-form-group label="{l s='Carrier' mod='deliverydate'}">
<select name="carrier" class="fixed-width-xxl">
{foreach from=$carriers item='carrier'}
<option value="{$carrier.id_carrier|intval}" {if isset($exception) && $exception.id_carrier == $carrier.id_carrier}selected="selected"{/if}>{$carrier.name|escape:'htmlall':'UTF-8'}</option>
{/foreach}
</select>
</ps-form-group>
<ps-form-group label="{l s='Zone' mod='deliverydate'}">
<select name="zone" class="fixed-width-xxl">
{foreach from=$zones item='zone'}
<option value="{$zone.id_zone|intval}" {if isset($exception) && $exception.id_zone == $zone.id_zone}selected="selected"{/if}>{$zone.name|escape:'htmlall':'UTF-8'}</option>
{/foreach}
</select>
</ps-form-group>
<ps-date-picker name="date" label="{l s='Date' mod='deliverydate'}" value="{if isset($exception)}{$exception.date|escape:'quotes':'UTF-8'}{/if}" size="10" fixed-width="lg"></ps-date-picker>
<ps-switch name="preparation" label="{l s='Preparation' mod='deliverydate'}" yes="{l s='Yes' mod='deliverydate'}" no="{l s='No' mod='deliverydate'}" active="{if isset($exception) && $exception.preparation}true{else}false{/if}"></ps-switch>
<ps-switch name="delivery" label="{l s='Delivery' mod='deliverydate'}" yes="{l s='Yes' mod='deliverydate'}" no="{l s='No' mod='deliverydate'}" active="{if isset($exception) && $exception.delivery}true{else}false{/if}"></ps-switch>
<ps-panel-footer>
<ps-panel-footer-link title="{l s='Cancel' mod='deliverydate'}" icon="process-icon-back" href="{$cancel_url|escape:'quotes':'UTF-8'}" direction="left" img="{$module_dir|escape:'quotes':'UTF-8'}views/img/process-icon-back.png"></ps-panel-footer-link>
<ps-panel-footer-submit title="{l s='Save' mod='deliverydate'}" icon="process-icon-save" direction="right" img="{$module_dir|escape:'quotes':'UTF-8'}views/img/process-icon-save.png" name="addException"></ps-panel-footer-submit>
</ps-panel-footer>
</form>
</ps-panel>

View File

@@ -0,0 +1,55 @@
<ps-panel header="{l s='Add rule' mod='deliverydate'}">
<form class="form-horizontal" action="{$current_url|escape:'quotes':'UTF-8'}" method="post">
<ps-form-group label="{l s='Carrier' mod='deliverydate'}">
<select name="carrier" class="fixed-width-xxl">
{foreach from=$carriers item='carrier'}
<option value="{$carrier.id_carrier|intval}" {if isset($rule) && $rule.id_carrier == $carrier.id_carrier}selected="selected"{/if}>{$carrier.name|escape:'htmlall':'UTF-8'}</option>
{/foreach}
</select>
</ps-form-group>
<ps-form-group label="{l s='Zone' mod='deliverydate'}">
<select name="zone" class="fixed-width-xxl">
{foreach from=$zones item='zone'}
<option value="{$zone.id_zone|intval}" {if isset($rule) && $rule.id_zone == $zone.id_zone}selected="selected"{/if}>{$zone.name|escape:'htmlall':'UTF-8'}</option>
{/foreach}
</select>
</ps-form-group>
<ps-checkboxes label="{l s='Delivery days' mod='deliverydate'}" help="{l s='Which days this carrier delivers in this zone?' mod='deliverydate'}">
<ps-checkbox name="monday" value="1" {if isset($days.0) && $days.0 == 1}checked="true"{/if}>{l s='Monday' mod='deliverydate'}</ps-checkbox>
<ps-checkbox name="tuesday" value="1" {if isset($days.1) && $days.1 == 1}checked="true"{/if}>{l s='Tuesday' mod='deliverydate'}</ps-checkbox>
<ps-checkbox name="wednesday" value="1" {if isset($days.2) && $days.2 == 1}checked="true"{/if}>{l s='Wednesday' mod='deliverydate'}</ps-checkbox>
<ps-checkbox name="thursday" value="1" {if isset($days.3) && $days.3 == 1}checked="true"{/if}>{l s='Thursday' mod='deliverydate'}</ps-checkbox>
<ps-checkbox name="friday" value="1" {if isset($days.4) && $days.4 == 1}checked="true"{/if}>{l s='Friday' mod='deliverydate'}</ps-checkbox>
<ps-checkbox name="saturday" value="1" {if isset($days.5) && $days.5 == 1}checked="true"{/if}>{l s='Saturday' mod='deliverydate'}</ps-checkbox>
<ps-checkbox name="sunday" value="1" {if isset($days.6) && $days.6 == 1}checked="true"{/if}>{l s='Sunday' mod='deliverydate'}</ps-checkbox>
</ps-checkboxes>
<ps-input-text name="min" label="{l s='Min days' mod='deliverydate'}" size="10" value="{if isset($rule)}{$rule.min|intval}{/if}" required-input="true" suffix="{l s='day(s)' mod='deliverydate'}" fixed-width="xs"></ps-input-text>
<ps-input-text name="max" label="{l s='Max days' mod='deliverydate'}" size="10" value="{if isset($rule)}{$rule.max|intval}{/if}" required-input="true" suffix="{l s='day(s)' mod='deliverydate'}" fixed-width="xs"></ps-input-text>
<ps-form-group label="{l s='No expedition after' mod='deliverydate'}">
<select name="hours">
{for $i=0 to 23}
<option value="{$i|intval}" {if isset($rule) && $rule.hours == $i}selected="selected"{/if}>{$i|intval}h</option>
{/for}
</select>
<select name="minutes">
{for $i=0 to 59}
<option value="{$i|intval}" {if isset($rule) && $rule.minutes == $i}selected="selected"{/if}>{$i|intval}min</option>
{/for}
</select>
</ps-form-group>
<ps-panel-footer>
<ps-panel-footer-link title="{l s='Cancel' mod='deliverydate'}" icon="process-icon-back" href="{$cancel_url|escape:'quotes':'UTF-8'}" direction="left" img="{$module_dir|escape:'quotes':'UTF-8'}views/img/process-icon-back.png"></ps-panel-footer-link>
<ps-panel-footer-submit title="{l s='Save' mod='deliverydate'}" icon="process-icon-save" direction="right" img="{$module_dir|escape:'quotes':'UTF-8'}views/img/process-icon-save.png" name="addRule"></ps-panel-footer-submit>
</ps-panel-footer>
</form>
</ps-panel>

View File

@@ -0,0 +1,11 @@
{foreach from=$errors item='error'}
<ps-alert-error>{$error}{* HTML *}</ps-alert-error>
{/foreach}
{foreach from=$warnings item='warning'}
<ps-alert-warn>{$warning}{* HTML *}</ps-alert-warn>
{/foreach}
{foreach from=$confirmations item='confirmation'}
<ps-alert-success>{$confirmation}{* HTML *}</ps-alert-success>
{/foreach}

View File

@@ -0,0 +1,11 @@
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,11 @@
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,118 @@
{*
* The MIT License (MIT)
*
* Copyright (c) 2015 Emmanuel MARICHAL
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*}
<script type="riot/tag">
<ps-alert>
{if $ps_version >= 1.6}
<div class="alert { opts['alertClass'] }">
<button type="button" class="close" data-dismiss="alert">×</button>
<yield/>
</div>
{else}
<div class="{ opts['alertClass'] }">
<yield/>
<img class="close" alt="X" src="../img/admin/close.png" onclick={ hide }>
</div>
<style scoped>
div {
position: relative;
padding-right: 25px !important;
}
img.close {
margin: 0 !important;
position: absolute;
right: 10px;
top: 15px;
cursor: pointer;
}
</style>
hide(e) {
$(e.target).parent().hide()
}
{/if}
</ps-alert>
</script>
<script type="riot/tag">
<ps-alert-success>
<ps-alert alert-class="{if $ps_version == 1.5}conf{else}alert alert-success{/if}">
<yield/>
</ps-alert>
</ps-alert-success>
</script>
<script type="riot/tag">
<ps-alert-error>
<ps-alert alert-class="{if $ps_version == 1.5}error{else}alert alert-danger{/if}">
<yield/>
</ps-alert>
</ps-alert-error>
</script>
<script type="riot/tag">
<ps-alert-warn>
<ps-alert alert-class="{if $ps_version == 1.5}warn{else}alert alert-warning{/if}">
<yield/>
</ps-alert>
</ps-alert-warn>
</script>
<script type="riot/tag">
<ps-alert-hint>
<ps-alert alert-class="{if $ps_version == 1.5}hint{else}alert alert-info{/if}">
<yield/>
</ps-alert>
{if $ps_version == 1.5}
<style scoped>
.hint {
display: block;
margin: 0 0 10px 0;
}
</style>
{/if}
</ps-alert-hint>
</script>

View File

@@ -0,0 +1,611 @@
{*
* The MIT License (MIT)
*
* Copyright (c) 2015 Emmanuel MARICHAL
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*}
<script type="riot/tag">
<ps-form-group>
{if $ps_version >= 1.6}
<div class="form-group">
<label class="control-label col-lg-3 { opts.required == 'true' ? 'required' : '' }">
<span class="label-tooltip" data-toggle="tooltip" data-html="true" data-original-title="{ opts.hint }" if={ opts.hint }>{ opts.label }</span>
<span if={ !opts.hint }>{ opts.label }</span>
</label>
<div class="col-lg-9"><yield/></div>
<div class="col-lg-9 col-lg-offset-3"><div class="help-block" if={ opts.help }><raw content="{ opts.help }"/></div></div>
</div>
{else}
<div style="clear: both; padding-top:15px;">
<label class="conf_title"><sup if={ opts.required }>*&nbsp;</sup>{ opts.label }</label>
<div class="margin-form">
<yield/>
<p class="preference_description" if={ opts.help }><raw content="{ opts.help }"/></p>
</div>
</div>
{/if}
</ps-form-group>
</script>
<script type="riot/tag">
<ps-input-text-core>
{if $ps_version >= 1.6}
<div class="{literal}{ opts.prefix || opts.suffix ? 'input-group input ' : '' }{ opts.fixedWidth ? 'fixed-width-'+opts.fixedWidth : '' }{/literal}">
<span class="input-group-addon" if={ opts.prefix }>{ opts.prefix}</span>
<input type="text" name="{ opts.name }" value="{ opts.value }" class="input { opts.fixedWidth ? 'fixed-width-'+opts.fixedWidth : '' }" placeholder="{ opts.placeholder }" required="{ opts.requiredInput == 'true' }">
<span class="input-group-addon" if={ opts.suffix }>{ opts.suffix}</span>
</div>
{else}
<span if={ opts.prefix }>{ opts.prefix }&nbsp;</span><input type="text" size="{ opts.size }" name="{ opts.name }" value="{ opts.value }" placeholder="{ opts.placeholder }" required="{ opts.requiredInput == 'true' }"><span if={ opts.suffix }>&nbsp;{ opts.suffix }</span>
{/if}
</ps-input-text-core>
</script>
<script type="riot/tag">
<ps-input-text>
<ps-form-group>
<ps-input-text-core name="{ opts.name }" fixed-width="{ opts.fixedWidth }" suffix="{ opts.suffix }" prefix="{ opts.prefix }" placeholder="{ opts.placeholder }" required-input="{ opts.requiredInput }" size="{ opts.size }" value="{ opts.value }"></ps-input-text-core>
</ps-form-group>
this.tags['ps-form-group'].opts = opts
</ps-input-text>
</script>
<script type="riot/tag">
<ps-input-text-lang>
<ps-form-group>
{if $ps_version >= 1.6}
<yield/>
{else}
<div class="translatable">
<yield/>
<div class="displayed_flag"><img class="language_current pointer" src="../img/l/{ this.parent.opts.activeLang }.jpg" onclick="toggleLanguageFlags(this);"></div>
<div class="language_flags" style="display: none;">
<img class="pointer" src="../img/l/{ lang.idLang }.jpg" alt="{ lang.langName }" each={ lang in this.parent.langs } onclick="changeFormLanguage({ lang.idLang }, '{ lang.isoLang }', 0)">
</div>
</div>
{/if}
</ps-form-group>
{if $ps_version == 1.5}
<style scoped>
.language_flags .pointer {
margin: 2px;
}
.translatable div[class^=lang_] {
float: left;
}
</style>
this.langs = []
this.on('mount', function() {
that = this
that.tags['ps-form-group'].tags['ps-input-text-lang-value'].forEach(function(elem) {
that.langs.push(elem.opts)
$(elem.root).addClass('lang_'+elem.opts.idLang)
if (that.opts.activeLang != elem.opts.idLang)
$(elem.root).hide()
})
that.update()
})
{/if}
this.tags['ps-form-group'].opts = opts
</ps-input-text-lang>
</script>
<script type="riot/tag">
<ps-input-text-lang-value>
{if $ps_version >= 1.6}
<div class="translatable-field row lang-{ this.opts.idLang }" style="display: { this.parent.opts.activeLang == this.opts.idLang ? 'block' : 'none' };">
<div class="col-lg-{ this.parent.opts.colLg }">
<ps-input-text-core name="{ this.parent.opts.name }_{ this.opts.idLang }" placeholder="{ opts.placeholder }" required-input="{ this.parent.opts.requiredInput }" fixed-width="{ this.parent.opts.fixedWidth }" value="{ opts.value }"></ps-input-text-core>
</div>
<div class="col-lg-2">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" tabindex="-1">
{ this.opts.isoLang }
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li each={ dropdown_lang in this.langs }>
<a href="javascript:hideOtherLanguage({ dropdown_lang.idLang });">{ dropdown_lang.langName }</a>
</li>
</ul>
</div>
</div>
this.langs = []
this.on('mount', function() {
that = this
if (that.parent)
{
that.parent.tags['ps-input-text-lang-value'].forEach(function(elem) {
that.langs.push(elem.opts)
})
that.update()
}
})
{else}
<ps-input-text-core name="{ this.parent.opts.name }_{ this.opts.idLang }" placeholder="{ opts.placeholder }" required-input="{ this.parent.opts.requiredInput }" size="{ this.parent.opts.size }" value="{ opts.value }"></ps-input-text-core>
{/if}
</ps-input-text-lang-value>
</script>
<script type="riot/tag">
<ps-textarea-core>
<textarea name="{ opts.name }" class="{ rte: opts.richEditor == 'true', autoload_rte: opts.richEditor == 'true'}" rows="{ opts.rows }" {if $ps_version < 1.6}cols="{ opts.cols }"{/if}><yield/></textarea>
</ps-textarea-core>
</script>
<script type="riot/tag">
<ps-textarea>
<ps-form-group>
<ps-textarea-core rich-editor="{ opts.richEditor }" name="{ opts.name }" rows="{ opts.rows }" cols="{ opts.cols }"><yield/></ps-textarea-core>
</ps-form-group>
this.tags['ps-form-group'].opts = opts
</ps-textarea>
</script>
<script type="riot/tag">
<ps-textarea-lang>
<ps-form-group>
{if $ps_version >= 1.6}
<yield/>
{else}
<div class="translatable">
<yield/>
<div class="displayed_flag"><img class="language_current pointer" src="../img/l/{ this.parent.opts.activeLang }.jpg" onclick="toggleLanguageFlags(this);"></div>
<div class="language_flags" style="display: none;">
<img class="pointer" src="../img/l/{ lang.idLang }.jpg" alt="{ lang.langName }" each={ lang in this.parent.langs } onclick="changeFormLanguage({ lang.idLang }, '{ lang.isoLang }', 0)">
</div>
</div>
{/if}
</ps-form-group>
{if $ps_version == 1.5}
<style scoped>
.language_flags .pointer {
margin: 2px;
}
.translatable div[class^=lang_] {
float: left;
}
</style>
this.langs = []
this.on('mount', function() {
that = this
that.tags['ps-form-group'].tags['ps-textarea-lang-value'].forEach(function(elem) {
that.langs.push(elem.opts)
$(elem.root).addClass('lang_'+elem.opts.idLang)
if (that.opts.activeLang != elem.opts.idLang)
$(elem.root).hide()
})
that.update()
})
{/if}
this.tags['ps-form-group'].opts = opts
</ps-textarea-lang>
</script>
<script type="riot/tag">
<ps-textarea-lang-value>
{if $ps_version >= 1.6}
<div class="translatable-field row lang-{ this.opts.idLang }" style="display: { this.parent.opts.activeLang == this.opts.idLang ? 'block' : 'none' };">
<div class="col-lg-{ this.parent.opts.colLg }">
<ps-textarea-core name="{ this.parent.opts.name }_{ this.opts.idLang }" rows="{ this.parent.parent.opts.rows }" cols="{ this.parent.parent.opts.cols }" rich-editor="{ this.parent.opts.richEditor }"><yield/></ps-textarea-core>
</div>
<div class="col-lg-2">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" tabindex="-1">
{ this.opts.isoLang }
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li each={ dropdown_lang in this.langs }>
<a href="javascript:hideOtherLanguage({ dropdown_lang.idLang });">{ dropdown_lang.langName }</a>
</li>
</ul>
</div>
</div>
this.langs = []
this.on('mount', function() {
that = this
if (that.parent)
{
that.parent.tags['ps-textarea-lang-value'].forEach(function(elem) {
that.langs.push(elem.opts)
})
that.update()
}
})
{else}
<ps-textarea-core name="{ this.parent.opts.name }_{ this.opts.idLang }" rows="{ this.parent.parent.opts.rows }" cols="{ this.parent.parent.opts.cols }" rich-editor="{ this.parent.opts.richEditor }"><yield/></ps-textarea-core>
{/if}
</ps-textarea-lang-value>
</script>
{if $ps_version < 1.6}
<script type="text/javascript" src="{$smarty.const.__PS_BASE_URI__|escape:'quotes':'UTF-8'}/js/tinymce.inc.js"></script>
{/if}
<script type="text/javascript">
var iso = iso_user;
var pathCSS = "{$smarty.const._THEME_CSS_DIR_|escape:'quotes':'UTF-8'}";
var ad = "{$smarty.const.__PS_BASE_URI__|escape:'htmlall':'UTF-8'}{basename($smarty.const._PS_ADMIN_DIR_)|escape:'quotes':'UTF-8'}";
$( document ).ready(function() {
if ($("ps-textarea .autoload_rte").length > 0) {
tinySetup({ editor_selector: "autoload_rte" })
}
});
</script>
<script type="riot/tag">
<ps-select>
<ps-form-group>
<select name={ opts.name } class="{ opts.chosen == 'true' ? 'chosen' : '' } {if $ps_version >= 1.6}{ opts.fixedWidth ? 'fixed-width-'+opts.fixedWidth : '' }{/if}" onChange={ toggleChangeEvent }>
<yield/>
</select>
</ps-form-group>
this.tags['ps-form-group'].opts = opts
toggleChangeEvent(e) {
if (e.target)
window[this.opts.onChange](e.target.value);
else
window[this.opts.onChange](e.currentTarget.value); // Chosen
e.stopPropagation(); // Chosen
}
</ps-select>
</script>
<script type="riot/tag">
<ps-group>
<yield/>
</ps-group>
</script>
<script type="riot/tag">
<ps-groups>
<ps-form-group>
<div class="hide"><yield/></div>
<table class="table table-bordered" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="fixed-width-xs">
<span class="title_box">
<input type="checkbox" name="checkme" id="checkme" onclick="checkDelBoxes(this.form, '{ this.opts.name }[]', this.checked)">
</span>
</th>
<th class="fixed-width-xs"><span class="title_box">ID</span></th>
<th><span class="title_box">{ this.opts.columnTitle }</span></th>
</tr>
</thead>
<tbody>
<tr each={ group in this.groups }>
<td><input type="checkbox" name="{ group.parent.opts.name }[]" class="groupBox" id="{ group.parent.opts.name }_{ group.opts.value }" value="{ group.opts.value }"></td>
<td>{ group.opts.value }</td>
<td><label for="{ group.parent.opts.name }_{ group.opts.value }" class="t">{ group.root.innerHTML }</label></td>
</tr>
</tbody>
</table>
</ps-form-group>
<style scoped>
.hide {
display: none;
}
table {
width: auto !important;
min-width: 28em;
}
</style>
console.log(this.opts.name);
this.tags['ps-form-group'].opts = opts
this.groups = this.tags['ps-form-group'].tags['ps-group']
if (!this.groups.length)
this.groups = [this.groups];
</ps-groups>
</script>
<script type="riot/tag">
<ps-switch>
<ps-form-group>
{if $ps_version >= 1.6}
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="{ opts.name }" id="{ opts.name }_on" value="1" checked={ opts.active == 'true' } disabled="{ opts.disabled == 'true' }" onChange={ toggleSwitchEvent }>
<label for="{ opts.name }_on">{ opts.yes }</label>
<input type="radio" name="{ opts.name }" id="{ opts.name }_off" value="0" checked={ opts.active != 'true' } disabled="{ opts.disabled == 'true' }" onChange={ toggleSwitchEvent }>
<label for="{ opts.name }_off">{ opts.no }</label>
<a class="slide-button btn"></a>
</span>
{else}
<label class="t" for="{ opts.name }_on"><img src="../img/admin/enabled.gif" alt="{ opts.yes }" title="{ opts.yes }"></label>
<input type="radio" name="{ opts.name }" id="{ opts.name }_on" value="1" checked={ opts.active == 'true' } onChange={ toggleSwitchEvent }>
<label class="t" for="{ opts.name }_on"> { opts.yes }</label>
<label class="t" for="{ opts.name }_off"><img src="../img/admin/disabled.gif" alt="{ opts.no }" title="{ opts.no }" style="margin-left: 10px;"></label>
<input type="radio" name="{ opts.name }" id="{ opts.name }_off" value="0" checked={ opts.active != 'true' } onChange={ toggleSwitchEvent }>
<label class="t" for="{ opts.name }_off"> { opts.no }</label>
{/if}
</ps-form-group>
this.tags['ps-form-group'].opts = opts
toggleSwitchEvent(e) {
window[this.opts.onSwitch](+e.target.value);
}
</ps-switch>
</script>
<script type="riot/tag">
<ps-radios>
<ps-form-group>
<yield/>
</ps-form-group>
this.tags['ps-form-group'].opts = opts
</ps-radios>
</script>
<script type="riot/tag">
<ps-radio>
{if $ps_version >= 1.6}
<div class="radio">
<label><input type="radio" name="{ opts.name }" id="{ opts.name }_{ opts.value }" value="{ opts.value }" checked={ opts.checked == 'true' }><yield/></label>
</div>
{else}
<input type="radio" name="{ opts.name }" id="{ opts.name }_{ opts.value }" value="{ opts.value }" checked={ opts.checked == 'true' }>
<label class="t" for="{ opts.name }_{ opts.value }"><yield/></label>
<br>
{/if}
</ps-radio>
</script>
<script type="riot/tag">
<ps-checkboxes>
<ps-form-group>
<yield/>
</ps-form-group>
this.tags['ps-form-group'].opts = opts
</ps-checkboxes>
</script>
<script type="riot/tag">
<ps-checkbox>
{if $ps_version >= 1.6}
<div class="checkbox">
<label for="{ opts.name }_{ opts.value }">
<input type="checkbox" name="{ opts.name }" checked={ opts.checked == 'true' } value="{ opts.value }">
<yield/>
</label>
</div>
{else}
<input type="checkbox" name="{ opts.name }" value="{ opts.value }" checked={ opts.checked == 'true' }>
<label class="t" for="{ opts.name }_{ opts.value }"><yield/></label>
<br>
{/if}
</ps-checkbox>
</script>
<script type="riot/tag">
<ps-color-picker>
<ps-form-group>
<div class="{if $ps_version == '1.6'}input-group{/if} { opts.fixedWidth ? 'fixed-width-'+opts.fixedWidth : '' }">
<input type="color" size="{ opts.size || 20 }" data-hex="true" class="color mColorPickerInput mColorPicker" name="{ opts.name }" id="{ opts.name }">
</div>
<style scoped>
img {
border: 0;
margin:0 0 0 3px;
}
span {
cursor: pointer;
}
</style>
</ps-form-group>
this.tags['ps-form-group'].opts = opts
this.on('mount', function() {
// Fix for mColorPicker
$(this.root).find('input[type=color]').attr('value', opts.color)
})
</ps-color-picker>
</script>
<script type="riot/tag">
<ps-password>
<ps-form-group>
{if $ps_version >= 1.6}
<div class="input-group { opts.fixedWidth ? 'fixed-width-'+opts.fixedWidth : '' }">
<span class="input-group-addon">
<i class="icon-key"></i>
</span>
<input type="password" name="{ opts.name }" required="{ opts.requiredInput == 'true' }" value="{ opts.value }">
</div>
{else}
<input type="password" size="{ opts.size }" name="{ opts.name }" required="{ opts.requiredInput == 'true' }" value="{ opts.value }">
{/if}
</ps-form-group>
this.tags['ps-form-group'].opts = opts
</ps-password>
</script>
<script type="riot/tag">
<ps-date-picker>
<ps-form-group>
{if $ps_version >= 1.6}
<div class="input-group { opts.fixedWidth ? 'fixed-width-'+opts.fixedWidth : '' }">
<input id="{ opts.name }" type="text" data-hex="true" class="datepicker" name="{ opts.name }" value="{ opts.value }" required="{ opts.requiredInput == 'true' }" />
<span class="input-group-addon">
<i class="icon-calendar-empty"></i>
</span>
</div>
{else}
<input id="{ opts.name }" type="text" data-hex="true" size="{ opts.size }" class="datepicker" name="{ opts.name }" value="{ opts.value }" required="{ opts.requiredInput == 'true' }" />
{/if}
</ps-form-group>
this.tags['ps-form-group'].opts = opts
</ps-date-picker>
</script>
<script type="text/javascript">
$( document ).ready(function() {
if ($("ps-date-picker .datepicker").length > 0) {
$("ps-date-picker .datepicker").datepicker({
prevText: '',
nextText: '',
dateFormat: 'yy-mm-dd'
});
}
});
</script>

View File

@@ -0,0 +1,223 @@
{*
* The MIT License (MIT)
*
* Copyright (c) 2015 Emmanuel MARICHAL
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*}
<script type="riot/tag">
<ps-panel-footer>
<div class="panel-footer">
<yield/>
</div>
<style scoped>
{if $ps_version >= 1.6}
.btn.pull-right {
margin-left: 5px;
}
.btn.pull-left {
margin-right: 5px;
}
a.btn i {
display: block;
width: 30px;
height: 30px;
margin: 0 auto;
font-size: 28px;
background: transparent;
background-size: 26px;
background-position: center
}
{else}
.panel-footer {
margin: 20px -13px 0px;
background: rgba(182, 182, 182, 0.1);
display: block;
border-top: 1px solid rgba(160, 160, 160, 0.19);
height: 80px;
position: relative;
bottom: -13px;
}
.btn {
margin: 0;
background: none;
border: none;
padding: 0 20px;
outline: none;
cursor: pointer;
font-size: 11px;
text-align: center;
height: 100%;
line-height: normal;
}
.btn.pull-right {
border-left: 1px solid rgba(160, 160, 160, 0.19);
float: right;
}
.btn.pull-left {
border-right: 1px solid rgba(160, 160, 160, 0.19);
float: left;
}
.btn:hover {
background: rgba(182, 182, 182, 0.1);
}
.btn img {
display: block;
padding: 0;
margin-bottom: 5px;
margin-left: auto;
margin-right: auto;
}
{/if}
</style>
</ps-panel-footer>
</script>
<script type="riot/tag">
<ps-panel-footer-submit>
{if $ps_version >= 1.6}
<button type="submit" class="btn btn-default pull-{ opts.direction }" name="{ opts.name }">
<i class="{ opts.icon }"></i> { opts.title }
</button>
{else}
<button type="submit" class="btn pull-{ opts.direction }" name="{ opts.name }">
<img src="{ opts.img }" if={ !opts.fa } /><i class="fa fa-{ opts.fa }" if={ opts.fa }></i> { opts.title }
</button>
<style scoped>
button i.fa {
display: block;
font-size: 2.5em;
margin-bottom: 5px;
color: #585a69;
}
</style>
{/if}
</ps-panel-footer-submit>
</script>
<script type="riot/tag">
<ps-panel-footer-link>
{if $ps_version >= 1.6}
<a class="btn btn-default pull-{ opts.direction }" href="{ opts.href }">
<i class="{ opts.icon }"></i> { opts.title }
</a>
{else}
<a class="btn pull-{ opts.direction }" href="{ opts.href }">
<img src="{ opts.img }" if={ !opts.fa } /><i class="fa fa-{ opts.fa }" if={ opts.fa }></i> { opts.title }
</a>
<style scoped>
a img {
margin-top: 15px;
}
a i.fa {
display: block;
font-size: 2.5em;
margin-bottom: 5px;
color: #585a69;
margin-top: 18px;
}
</style>
{/if}
</ps-panel-footer-link>
</script>
<script type="riot/tag">
<ps-panel>
{if $ps_version >= 1.6}
<div class="panel">
<div class="panel-heading" if={ opts.icon || opts.header }>
<i class="{ opts.icon }" if={ opts.icon }></i> { opts.header }
</div>
<yield/>
</div>
{else}
<fieldset>
<legend if={ opts.header }>
<img src="{ opts.img }" if={ !opts.fa } /><i class="fa fa-{ opts.fa }" if={ opts.fa }></i> { opts.header }
</legend>
<yield/>
</fieldset>
<style scoped>
fieldset {
margin-bottom: 20px;
margin-left: auto;
margin-right: auto;
}
</style>
{/if}
</ps-panel>
</script>
<script type="riot/tag">
<ps-panel-divider>
{if $ps_version >= 1.6}
<hr/>
{else}
<div class="separation"></div>
{/if}
</ps-panel-divider>
</script>

View File

@@ -0,0 +1,283 @@
{*
* The MIT License (MIT)
*
* Copyright (c) 2015 Emmanuel MARICHAL
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*}
<script type="riot/tag">
<ps-table>
{if $ps_version >= 1.6}
<form method="post" method="post" class="form-horizontal clearfix">
<input type="hidden" name="token" value="">
<div class="panel col-lg-12">
<div class="panel-heading">
<i class="{ opts.icon }" if={ opts.icon }></i> { opts.header }
<span class="badge">{ this.rows.length }</span>
<span class="panel-heading-action" if={ this.top_actions }>
<a class="list-toolbar-btn" href="{ this.base_action_url }&action={ elem.action }" title="{ elem.title }" each={ elem, index in this.top_actions }>
<span data-toggle="tooltip" class="label-tooltip" data-original-title="{ elem.title }" data-html="true" data-placement="top">
<i class="process-icon-new"></i>
</span>
</a>
</span>
</div>
<div class="table-responsive-row clearfix">
<table class="table">
<thead>
<tr class="nodrag nodrop">
<th each={ elem, index in this.columns } class="{ this.columns_classes[this.columns.indexOf(elem)] }">
<span class="title_box">
{ elem.content }
</span>
</th>
<th class="fixed-width-md" if={ this.primary_action }></th>
</tr>
</thead>
<tbody>
<tr class="odd" each={ row, i in this.rows }>
<td each={ value, key in this.columns_keys } class="{ this.columns_classes[key] }">
<i class="icon-{ row[value] == 1 ? 'check' : 'remove' } status" if={ this.columns[key].bool }></i>
<span if={ !this.columns[key].bool }>{ row[value] }</span>
</td>
<td if={ this.primary_action }>
<div class="btn-group-action">
<div class="btn-group pull-right">
<a href="{ this.base_action_url }&action={ this.primary_action.action }&{ this.identifier }={ row[this.identifier] }" title="{ this.primary_action.title }" class="edit btn btn-default">
<i class="icon-{ this.primary_action.icon }"></i> { this.primary_action.title }
</a>
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown" if={ this.secondary_actions.length }>
<i class="icon-caret-down"></i>&nbsp;
</button>
<ul class="dropdown-menu" if={ this.secondary_actions.length }>
<li each={ elem, index in this.secondary_actions }>
<a href="{ this.base_action_url }&action={ elem.action }&{ this.identifier }={ row[this.identifier] }" title="{ elem.title }">
<i class="icon-{ elem.icon }"></i> { elem.title }
</a>
</li>
</ul>
</div>
</div>
</td>
</tr>
<tr if={ this.empty_table }>
<td class="list-empty" colspan="{ this.columns.length + 1 }">
<div class="list-empty-msg">
<i class="icon-warning-sign list-empty-icon"></i>
{ this.opts.noItemsText }
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</form>
{else}
<div class="toolbar-placeholder">
<div class="toolbarBox toolbarHead">
<ul class="cc_button" if={ this.top_actions }>
<li each={ elem, index in this.top_actions }>
<a class="toolbar_btn" href="{ this.base_action_url }&action={ elem.action }" title="{ elem.title }">
<img src="{ elem.img }" if={ !elem.fa } />
<i class="fa fa-{ elem.fa }"></i>
<div>{ elem.title }</div>
</a>
</li>
</ul>
<div class="pageTitle">
<h3>{ opts.header } <span class="badge">{ this.rows.length }</span></h3>
</div>
</div>
</div>
<form method="post" class="form">
<table class="table_grid" name="list_table">
<tbody>
<tr>
<td>
<table class="table" cellpadding="0" cellspacing="0" style="width: 100%; margin-bottom:10px;">
<thead>
<tr class="nodrag nodrop" style="height: 40px">
<th each={ elem, index in this.columns } class="{ this.columns_classes[this.columns.indexOf(elem)] }">
<span class="title_box">
{ elem.content }
</span>
</th>
<th if={ this.primary_action }></th>
</tr>
</thead>
<tbody>
<tr class="row_hover" each={ row, i in this.rows }>
<td each={ value, key in this.columns_keys } class="{ this.columns_classes[key] }">
<img src="../img/admin/{ row[value] == 1 ? 'enabled' : 'disabled' }.gif" if={ this.columns[key].bool && !this.columns[key].fa }>
<i class="fa fa-{ row[value] == 1 ? 'check fa-bool-true' : 'times fa-bool-false' }" if={ this.columns[key].bool && this.columns[key].fa }></i>
<span if={ !this.columns[key].bool }>{ row[value] }</span>
</td>
<td class="right" style="white-space: nowrap;" if={ this.primary_action }>
<a href="{ this.base_action_url }&action={ this.primary_action.action }&{ this.identifier }={ row[this.identifier] }" title="{ this.primary_action.title }">
<img src="{ this.primary_action.img }" alt="{ this.primary_action.title }" if={ !this.primary_action.fa }>
<i class="fa fa-{ this.primary_action.fa }" if={ this.primary_action.fa }></i>
</a>
<a each={ elem, index in this.secondary_actions } href="{ this.base_action_url }&action={ elem.action }&{ this.identifier }={ row[this.identifier] }" title="{ elem.title }">
<img src="{ elem.img }" alt="{ elem.title }" if={ !elem.fa }>
<i class="fa fa-{ elem.fa }" if={ elem.fa }></i>
</a>
</td>
</tr>
<tr if={ this.empty_table }>
<td class="center" colspan="{ this.columns.length + 1 }">{ this.opts.noItemsText }</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</form>
{/if}
<style scoped>
{if $ps_version >= 1.6}
i.status.icon-check {
color: #72C279;
}
i.status.icon-remove {
color: #E08F95;
}
{else}
.help-context-AdminModules {
display: none !important;
}
> .toolbar-placeholder {
margin-top: 20px;
}
> .toolbar-placeholder .pageTitle h3 {
font-weight: normal;
}
> .toolbar-placeholder .pageTitle h3 .badge {
font-size: 14px;
border: 1px solid #CCCCCC;
border-radius: 4%;
padding: 3px 8px;
vertical-align: top;
}
> form {
margin-bottom: 15px;
}
.toolbarBox .toolbar_btn {
color: #585a69;
padding: 5px;
margin-top: -2px;
margin-right: 2px
}
.toolbarBox .toolbar_btn i {
font-size: 2.5em;
}
.fa {
font-size: 1.3em;
margin: 0 2px;
color: #585a69;
}
.fa-bool-true {
color: #83CA79;
}
.fa-bool-false {
color: #FF575A;
}
{/if}
</style>
content = JSON.parse(this.root.getAttribute('content'))
this.columns = content.columns
this.rows = content.rows
this.empty_table = this.rows.length == 0
this.columns_classes = []
this.columns_keys = []
for (var i in this.columns) {
this.columns_classes.push(this.columns[i].center == true ? 'center' : '')
this.columns_keys.push(this.columns[i].key)
}
this.base_action_url = currentIndex + "&token={Tools::getAdminTokenLite(Context::getContext()->controller->controller_name)|escape:'htmlall':'UTF-8'}&" + jQuery.param(content.url_params)
if (typeof content.rows_actions == 'object' && content.rows_actions.length > 0) {
this.primary_action = content.rows_actions.slice(0, 1)[0]
this.secondary_actions = content.rows_actions.slice(1)
}
else
this.primary_action = null
this.top_actions = content.top_actions
this.identifier = content.identifier
</ps-table>
</script>

View File

@@ -0,0 +1,293 @@
{*
* The MIT License (MIT)
*
* Copyright (c) 2015 Emmanuel MARICHAL
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*}
<script type="riot/tag">
<ps-tab>
<ps-panel if={ opts.panel != 'false' }>
<yield/>
</ps-panel>
<div if={ opts.panel == 'false' }>
<yield />
</div>
{if $ps_version >= 1.6}
<style scoped>
.panel {
border-top-left-radius: 0 !important;
border-top-right-radius: 0 !important;
}
</style>
{else}
<style scoped>
:scope {
display: none;
}
:scope.active {
display: block;
}
</style>
{/if}
$(this.root).addClass('tab-pane')
if (this.parent && this.parent.opts.position == 'left' && this.opts.panel != 'false')
{
this.tags['ps-panel'].opts.header = opts.label
this.tags['ps-panel'].opts.icon = opts.icon
this.tags['ps-panel'].opts.img = opts.img
this.tags['ps-panel'].opts.fa = opts.fa
}
</ps-tab>
</script>
<script type="riot/tag">
<ps-tabs>
{if $ps_version >= 1.6}
<div class="row">
<div class="{ col-md-2: this.opts.position == 'left', col-md-12: this.opts.position != 'left' }">
<ul class="{ nav: true, list-group: this.opts.position == 'left', nav-tabs: this.opts.position != 'left' }">
<li class="{ list-group-item: this.parent.opts.position == 'left', active: tab.opts.active == 'true' }" each={ tab in this.tags['ps-tab'] }>
<a href="#{ tab.opts.id }" data-toggle="tab"><i class="{ tab.opts.icon }" if={ tab.opts.icon }></i> { tab.opts.label } <span if={ tab.opts.badge } class="badge pull-right">{ tab.opts.badge }</span></a>
</li>
</ul>
</div>
<div class="{ tab-content: true, col-md-10: this.opts.position == 'left', col-md-12: this.opts.position != 'left' }">
<yield/>
</div>
<div class="clearfix"></div>
</div>
{else}
<div class="tabs-container">
<ul class="{ tabs-navigation: true, tabs-navigation-left: this.opts.position == 'left', tabs-navigation-top: this.opts.position != 'left' }">
<li each={ tab in this.tags['ps-tab'] } class={ active: tab.opts.active == 'true' }>
<a href="#{ tab.opts.id }" onclick={ changeTab }>
<img src="{ tab.opts.img }" if={ !tab.opts.fa } /><i class="fa fa-{ tab.opts.fa }" if={ tab.opts.fa }></i> { tab.opts.label } <span if={ tab.opts.badge } class="badge pull-right">{ tab.opts.badge }</span>
</a>
</li>
</ul>
<div class="{ tabs-content: true, tabs-content-left: this.opts.position == 'left', tabs-content-top: this.opts.position != 'left' }">
<yield/>
</div>
<div class="clearfix"></div>
</div>
{/if}
this.on('mount', function() {
that = this
that.tags['ps-tab'].forEach(function(elem) {
if (elem.opts.active == 'true')
$(elem.root).addClass('active')
})
})
changeTab(event) {
// Change active tab
$(this.root).find('> .tabs-container > ul > li.active').removeClass('active')
$(event.target).closest('li').addClass('active')
// Change active tab content
$(this.root).find('> .tabs-container > .tabs-content > .active').removeClass('active')
id_target = $(event.target).closest('a').attr('href')
$(this.root).find('> .tabs-container > .tabs-content > ' + id_target).addClass('active')
return false
}
{if $ps_version >= 1.6}
<style scoped>
li.list-group-item {
padding: 0 !important;
}
li.list-group-item a {
color: #555;
}
li.list-group-item:hover {
background-color: #f5f5f5;
}
li.list-group-item.active a {
color: white;
}
.nav.list-group li a {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.nav li a .badge {
margin-top: -3px;
margin-left: 5px;
}
.nav.list-group li a .badge {
position: absolute;
right: 8px;
top: 12px;
}
</style>
{else}
<style scoped>
.tabs-container {
margin: 20px 0;
}
.tabs-content-left {
margin-left: 200px;
}
.tabs-navigation li {
background: #fafafa;
}
.tabs-navigation li:hover {
background: #F1F3F9;
}
.tabs-navigation li a {
color: #666;
cursor: pointer;
padding: 10px 15px;
display: block;
line-height: 18px;
}
.tabs-navigation li a img {
margin-top: -4px;
max-width: 16px;
max-height: 16px;
}
.tabs-navigation li a .badge {
background: #EBEDF4;
border: 1px solid #EBEDF4;
padding: 2px 5px;
margin-top: -3px;
margin-right: -5px;
float: right;
margin-left: 10px;
}
.tabs-navigation li.active {
background: #EBEDF4;
}
.tabs-navigation li.active a {
color: black;
font-weight: bold;
}
.tabs-navigation li.active a .badge {
border-color: #CCCED7;
background: #fafafa;
}
.tabs-navigation.tabs-navigation-top {
margin-bottom: -1px;
}
.tabs-navigation.tabs-navigation-top li {
border: 1px solid #CCCED7;
border-right: none;
display: inline-block;
}
.tabs-navigation.tabs-navigation-top li.active {
border-bottom: 1px solid #EBEDF4;
}
.tabs-navigation.tabs-navigation-top li:last-child {
border-right: 1px solid #CCCED7;
}
.tabs-navigation.tabs-navigation-left {
float: left;
border: 1px solid #CCCED7;
width: 180px;
margin-top: 11px;
}
.tabs-navigation.tabs-navigation-left li {
border-bottom: 1px solid #CCCED7;
}
.tabs-navigation.tabs-navigation-left li:last-child {
border-bottom: none;
}
.tabs-navigation.tabs-navigation-left li a {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
position: relative;
}
.tabs-navigation.tabs-navigation-left li a .badge {
float: none;
position: absolute;
right: 12px;
top: 10px;
}
</style>
{/if}
</ps-tabs>
</script>

View File

@@ -0,0 +1,49 @@
{*
* The MIT License (MIT)
*
* Copyright (c) 2015 Emmanuel MARICHAL
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*}
{if !isset($tags) || !is_array($tags)}
{assign var='tags' value=array('tabs', 'panel', 'form', 'alert', 'table')}
{/if}
<script type="text/javascript">
var color_picker = false;
</script>
{assign var="ps_version" value=$smarty.const._PS_VERSION_|string_format:"%.1f"}
{foreach from=$tags item=tag}
{include file="./ps-$tag.tpl"}
{/foreach}
<script type="riot/tag">
<raw>
<span></span>
this.root.innerHTML = opts.content
</raw>
</script>
<script type="text/javascript">
riot.mount('*');
</script>

View File

@@ -0,0 +1,21 @@
<div class="panel panel-default">
<h3>{l s='Are you satisfied about this module?' mod='deliverydate'}</h3>
<div class="satisfied_text">
<a class="btn btn-default not_satisfied"><i class="fa fa-frown-o"></i> {l s='NO' mod='deliverydate'}</a>
<a class="btn btn-default satisfied"><i class="fa fa-smile-o"></i> {l s='YES' mod='deliverydate'}</a>
<div class="clearfix"></div>
</div>
</div>
<div class="clearfix"></div>
<script type="text/javascript">
$(".satisfied").click(function() {
$(this).remove();
$(".not_satisfied").remove();
$(".satisfied_text").html("<a target=\'_blank\' href=\'http://addons.prestashop.com/fr/ratings.php\'>{l s='Happy to hear that! Please click here to leave a review on PrestaShop Addons. I would greatly appreciate!' mod='deliverydate'}</a>");
});
$(".not_satisfied").click(function() {
$(this).remove();
$(".satisfied").remove();
$(".satisfied_text").html("<a target=\'_blank\' href=\'http://addons.prestashop.com/contact-community.php?id_product=16652\'>{l s='Sorry to hear that. Please click here to send me a message in order to look into your problem.' mod='deliverydate'}</a>");
});
</script>

View File

@@ -0,0 +1,118 @@
<ps-tabs position="left">
<ps-tab label="{l s='Settings' mod='deliverydate'}" active="{if !$dd_tab || !in_array($dd_tab, array('rules', 'exceptions'))}true{else}false{/if}" id="dd-settings" icon="icon-AdminTools" img="../img/t/AdminTools.gif">
<form class="form-horizontal" action="{$current_url|escape:'quotes':'UTF-8'}" method="post">
<input type="hidden" value="save_settings" name="action">
<ps-input-text name="prep_time" label="{l s='Preparation time' mod='deliverydate'}" help="{l s='How many days do you need to prepare an order?' mod='deliverydate'}" size="10" value="{if isset($config.DELIVERYDATE_PREP_TIME)}{$config.DELIVERYDATE_PREP_TIME|intval}{/if}" required-input="true" suffix="{l s='day(s)' mod='deliverydate'}" fixed-width="xs"></ps-input-text>
<ps-input-text name="outofstock" label="{l s='Out of stock' mod='deliverydate'}" help="{l s='How many days to add if a product is out of stock?' mod='deliverydate'}" size="10" value="{if isset($config.DELIVERYDATE_OUT_OF_STOCK)}{$config.DELIVERYDATE_OUT_OF_STOCK|intval}{/if}" required-input="true" suffix="{l s='day(s)' mod='deliverydate'}" fixed-width="xs"></ps-input-text>
<ps-switch name="max_date" label="{l s='Date max only' mod='deliverydate'}" yes="{l s='Yes' mod='deliverydate'}" no="{l s='No' mod='deliverydate'}" active="{if isset($config.DELIVERYDATE_DATE_MAX) && $config.DELIVERYDATE_DATE_MAX}true{else}false{/if}" help="{l s='If you only want to add the out of stock delay on the max date and not the min date.' mod='deliverydate'}"></ps-switch>
<ps-checkboxes label="{l s='Preparation days' mod='deliverydate'}" help="{l s='Which days do you prepare your orders?' mod='deliverydate'}">
<ps-checkbox name="monday" value="1" {if isset($days.0) && $days.0 == 1}checked="true"{/if}>{l s='Monday' mod='deliverydate'}</ps-checkbox>
<ps-checkbox name="tuesday" value="1" {if isset($days.1) && $days.1 == 1}checked="true"{/if}>{l s='Tuesday' mod='deliverydate'}</ps-checkbox>
<ps-checkbox name="wednesday" value="1" {if isset($days.2) && $days.2 == 1}checked="true"{/if}>{l s='Wednesday' mod='deliverydate'}</ps-checkbox>
<ps-checkbox name="thursday" value="1" {if isset($days.3) && $days.3 == 1}checked="true"{/if}>{l s='Thursday' mod='deliverydate'}</ps-checkbox>
<ps-checkbox name="friday" value="1" {if isset($days.4) && $days.4 == 1}checked="true"{/if}>{l s='Friday' mod='deliverydate'}</ps-checkbox>
<ps-checkbox name="saturday" value="1" {if isset($days.5) && $days.5 == 1}checked="true"{/if}>{l s='Saturday' mod='deliverydate'}</ps-checkbox>
<ps-checkbox name="sunday" value="1" {if isset($days.6) && $days.6 == 1}checked="true"{/if}>{l s='Sunday' mod='deliverydate'}</ps-checkbox>
</ps-checkboxes>
<ps-input-text name="reason" label="{l s='Message' mod='deliverydate'}" help="{l s='If you need to add a special message with the delivery date in the checkout process' mod='deliverydate'}" size="50" value="{if isset($config.DELIVERYDATE_REASON)}{$config.DELIVERYDATE_REASON|escape:'htmlall':'UTF-8'}{/if}"></ps-input-text>
<ps-switch name="product" label="{l s='Product page' mod='deliverydate'}" yes="{l s='Yes' mod='deliverydate'}" no="{l s='No' mod='deliverydate'}" active="{if isset($config.DELIVERYDATE_PRODUCT) && $config.DELIVERYDATE_PRODUCT}true{else}false{/if}" help="{l s='If you want to display delivery dates on product pages' mod='deliverydate'}"></ps-switch>
{if !$ps17}
<ps-switch name="tabs" label="{l s='Tabs' mod='deliverydate'}" yes="{l s='Yes' mod='deliverydate'}" no="{l s='No' mod='deliverydate'}" active="{if isset($config.DELIVERYDATE_TABS) && $config.DELIVERYDATE_TABS}true{else}false{/if}" help="{l s='If your theme uses tabs on product sheets, activate this option.' mod='deliverydate'}"></ps-switch>
{/if}
<ps-form-group label="{l s='Cart position' mod='deliverydate'}">
<select name="position" class="fixed-width-xxl">
<option value="bottom" {if isset($config.DELIVERYDATE_POSITION) && $config.DELIVERYDATE_POSITION != 'top'}selected="selected"{/if}>{l s='After carriers list' mod='deliverydate'}</option>
<option value="top" {if isset($config.DELIVERYDATE_POSITION) && $config.DELIVERYDATE_POSITION == 'top'}selected="selected"{/if}>{l s='Before carriers list' mod='deliverydate'}</option>
</select>
</ps-form-group>
<ps-panel-footer>
<ps-panel-footer-submit title="{l s='Save' mod='deliverydate'}" icon="process-icon-save" direction="right" name="saveSettings" img="{$module_dir|escape:'quotes':'UTF-8'}views/img/process-icon-save.png"></ps-panel-footer-submit>
</ps-panel-footer>
</form>
</ps-tab>
<ps-tab label="{l s='Rules' mod='deliverydate'}" id="dd-dates" icon="icon-list" img="../img/admin/date.png" panel="false" {if $dd_tab && $dd_tab == 'rules'}active="true"{/if}>
<ps-table header="{l s='Rules' mod='deliverydate'}" icon="icon-list" content="{$data_rules|escape:'htmlall':'UTF-8'}" no-items-text="{l s='No rules found' mod='deliverydate'}"></ps-table>
</ps-tab>
<ps-tab label="{l s='Exceptions' mod='deliverydate'}" id="dd-exceptions" icon="icon-calendar-o" panel="false" {if $dd_tab && $dd_tab == 'exceptions'}active="true"{/if} img="../img/t/AdminAttributesGroups.gif">
<ps-table header="{l s='Exceptions' mod='deliverydate'}" icon="icon-calendar-o" content="{$data_exceptions|escape:'htmlall':'UTF-8'}" no-items-text="{l s='No exceptions found' mod='deliverydate'}"></ps-table>
</ps-tab>
{if $modules}
<ps-tab id="dd-modules" panel="false" label="{l s='Modules' mod='deliverydate'}" icon="icon-AdminParentModules">
<ps-panel header="{l s='Modules' mod='deliverydate'}" icon="icon-AdminParentModules">
<table id="module-list" class="table row">
<tbody>
{foreach from=$modules item="module"}
{if $module->product_type != 'email'}
<tr>
<td class="module_inactive text-center"></td>
<td class="fixed-width-xs">
<img width="57" src="{$module->img|escape:'quotes':'UTF-8'}" />
</td>
<td>
<div class="text-muted">{$module->categoryName|escape:'htmlall':'UTF-8'}</div>
<div class="module_name">
{$module->displayName|escape:'htmlall':'UTF-8'}
<small class="text-muted">v{$module->version|escape:'htmlall':'UTF-8'}</small>
</div>
<p class="module_description">{$module->fullDescription|truncate:140|escape:'quotes':'UTF-8'}</p>
</td>
<td class="actions">
<div class="btn-group-action">
<div class="btn-group pull-right">
<a class="btn btn-default _blank" href="{$module->url|escape:'quotes':'UTF-8'}">
<i class="icon-chevron-right"></i> {l s='Discover' mod='deliverydate'}
</a>
</div>
</div>
</td>
</tr>
{/if}
{/foreach}
</tbody>
</table>
</ps-panel>
<ps-panel header="{l s='Email templates' mod='deliverydate'}" icon="icon-envelope">
<ps-alert-hint>{l s='Customize all your automatic e-mails with your stores design! These emails templates are responsive to ensure an optimal open rate on all devices, and their colors and links are fully customizable.' mod='deliverydate'}</ps-alert-hint>
{foreach from=$modules item="module"}
{if $module->product_type == 'email'}
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="panel">
<a href="{$module->url|escape:'quotes':'UTF-8'}" target="_blank">
<img width="100%" src="{$module->cover->big|escape:'quotes':'UTF-8'}" />
</a>
<br/>
<br/>
<a href="{$module->url|escape:'quotes':'UTF-8'}" class="btn btn-primary btn-lg btn-block" target="_blank" >{l s='Discover' mod='deliverydate'}</a>
</div>
</div>
{/if}
{/foreach}
<div class="clearfix"></div>
</ps-panel>
<div class="clearfix"></div>
</ps-tab>
{/if}
<ps-tab label="{l s='Documentation' mod='deliverydate'}" id="dd-documentation" icon="icon-AdminCatalog" {if $dd_tab && $dd_tab == 'documentation'}active="true"{/if} img="../img/admin/AdminCatalog.gif">
<iframe src="../modules/deliverydate/docs/readme_{$doc_iso|escape:'htmlall':'UTF-8'}.pdf#page=1&zoom=120"></iframe>
</ps-tab>
</ps-tabs>

View File

@@ -0,0 +1,8 @@
<p class="buttons_bottom_block no-print dd_available" style="text-align:center;">
<b>{$available_text|escape:'quotes':'UTF-8'}</b>
</p>
{if isset($oot_text)}
<p class="buttons_bottom_block no-print dd_oot hidden" style="text-align:center;">
<b>{$oot_text|escape:'quotes':'UTF-8'}</b>
</p>
{/if}

View File

@@ -0,0 +1,8 @@
<div class="dd_available">
<b><i class="material-icons">local_shipping</i> {$available_text|escape:'quotes':'UTF-8'}</b>
</div>
{if isset($oot_text)}
<div class="dd_oot hidden">
<b>{$oot_text|escape:'quotes':'UTF-8'}</b>
</div>
{/if}

View File

@@ -0,0 +1,6 @@
<br>
<fieldset>
<legend><img src="../img/admin/delivery.gif">{l s='Delivery dates' mod='deliverydate'}</legend>
{l s='Minimal delivery date' mod='deliverydate'} <b>{$date_min|escape:'htmlall':'UTF-8'}</b><br>
{l s='Maximal delivery date' mod='deliverydate'} <b>{$date_max|escape:'htmlall':'UTF-8'}</b>
</fieldset>

View File

@@ -0,0 +1,4 @@
<div class="tab-pane" id="deliverydate">
{l s='Minimal delivery date' mod='deliverydate'}: <b>{$date_min|escape:'htmlall':'UTF-8'}</b><br>
{l s='Maximal delivery date' mod='deliverydate'}: <b>{$date_max|escape:'htmlall':'UTF-8'}</b>
</div>

View File

@@ -0,0 +1,3 @@
<li>
<a href="#deliverydate" style="line-height: 24px;"><i class="icon-calendar-o"></i> {l s='Date(s)' mod='deliverydate'}</a>
</li>

View File

@@ -0,0 +1,5 @@
<div class="delivery_date"></div>
{if isset($reason) && $reason && $reason != ''}
<div class="delivery_reason">{$reason|escape:'htmlall':'UTF-8'}</div>
{/if}

View File

@@ -0,0 +1,19 @@
<script type="text/javascript">
var deliveries = JSON.parse('{$deliveries nofilter}');
var delivery_text_between = "{l s='By choosing [name], your order will be delivered between the [start] and [end]' mod='deliverydate' d='Modules.DeliveryDate.Shop'}";
var delivery_text = "{l s='By choosing [name], your order will be delivered the [start]' mod='deliverydate' d='Modules.DeliveryDate.Shop'}";
document.addEventListener('DOMContentLoaded', function() {
{if isset($position) && $position == 'bottom'}
moveDates();
{if isset($reason) && $reason && $reason != ''}
moveReason();
{/if}
{/if}
changeDeliveryDate();
});
</script>

View File

@@ -0,0 +1,11 @@
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1 @@
<div class="delivery_date" style="padding: 10px;margin-top: 10px;margin-bottom: 10px;border: 1px solid #D3D3D3;background: #FDFDFD;">{$text|escape:'htmlall':'UTF-8'}</div>

View File

@@ -0,0 +1 @@
<li><a href="#DeliveryDate">{l s='Delivery' mod='deliverydate'}</a></li>

View File

@@ -0,0 +1,28 @@
{* $only_content is only for 1.7 *}
{if isset($tab) && $tab == true && !$only_content}
<div id="DeliveryDate" class="product_accordion rte block_hidden_only_for_screen hidden">
{else if !$only_content}
<section class="page-product-box hidden">
<h3 class="page-product-heading">{l s='Delivery' mod='deliverydate'}</h3>
{/if}
<table class="table-data-sheet" id="dd_carriers_list">
<tbody>
{foreach from=$carriers item=c key=id_carrier}
<tr class="odd dd_available">
<td align="center"><img src="{$c.logo|escape:'quotes':'UTF-8'}" style="max-height:50px;{if isset($tab) && $tab}margin-right:10px;{/if}" /></td>
<td><b>{$c.name|escape:'htmlall':'UTF-8'}</b> : {$c.date nofilter}</td>
</tr>
{if isset($carrier.oot_date)}
<tr class="odd hidden dd_oot">
<td align="center"><img src="{$carrier.logo|escape:'quotes':'UTF-8'}" style="max-height:50px;{if isset($tab) && $tab}margin-right:10px;{/if}" /></td>
<td><b>{$carrier.name|escape:'htmlall':'UTF-8'}</b> : {$carrier.oot_date nofilter}</td>
</tr>
{/if}
{/foreach}
</tbody>
</table>
{if isset($tab) && $tab == true && !$only_content}
</div>
{else if !$only_content}
</section>
{/if}

View File

@@ -0,0 +1,11 @@
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;