From b5ab9d7112a14bf916e716936833a3fbd8e8a7e7 Mon Sep 17 00:00:00 2001
From: Juan Ferrer Toribio
Date: Tue, 30 Jun 2015 14:06:19 +0200
Subject: [PATCH] =?UTF-8?q?Versi=C3=B3n=20inestable=20de=20la=20nueva=20ve?=
=?UTF-8?q?rsion=20web?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package/DEBIAN/control | 1 +
package/DEBIAN/postinst | 1 +
.../hedera-web.conf} | 3 +-
package/etc/hedera-web/config.php | 2 +-
.../forms/account/address/address.js | 11 +
.../hedera-web/forms/account/address/ui.xml | 22 +-
.../hedera-web/forms/account/conf/ui.xml | 10 +-
.../hedera-web/forms/admin/photos/ui.xml | 8 +-
.../share/hedera-web/forms/cms/contact/ui.xml | 14 +-
.../forms/ecomerce/basket/basket.js | 47 +--
.../forms/ecomerce/basket/style.css | 5 +
.../hedera-web/forms/ecomerce/basket/ui.xml | 76 ++---
.../forms/ecomerce/catalog/catalog.js | 8 +-
.../forms/ecomerce/catalog/style.css | 17 +-
.../hedera-web/forms/ecomerce/catalog/ui.xml | 22 +-
.../forms/ecomerce/checkout/checkout.js | 307 ++++++++++++++++--
.../forms/ecomerce/checkout/style.css | 162 ++++++++-
.../hedera-web/forms/ecomerce/checkout/ui.xml | 237 ++++++++------
.../forms/ecomerce/confirm/shipping.js | 126 +++++++
.../forms/ecomerce/confirm/style.css | 87 +++++
.../hedera-web/forms/ecomerce/confirm/ui.xml | 150 +++++++++
.../forms/ecomerce/orders/orders.js | 23 +-
.../forms/ecomerce/orders/style.css | 4 +
.../hedera-web/forms/ecomerce/orders/ui.xml | 2 +-
.../forms/ecomerce/shipping/shipping.js | 67 ++++
.../forms/ecomerce/shipping/style.css | 51 +++
.../hedera-web/forms/ecomerce/shipping/ui.xml | 116 +++++++
.../share/hedera-web/forms/news/new/ui.xml | 6 +-
package/usr/share/hedera-web/global/style.css | 51 ++-
package/usr/share/hedera-web/image/basket.svg | 60 ++++
.../share/hedera-web/image/dark/basket.svg | 60 ++++
.../usr/share/hedera-web/image/dark/close.svg | 93 ++++++
.../share/hedera-web/image/dark/go-next.svg | 151 +++++++++
.../hedera-web/image/dark/preferences.svg | 138 ++++++++
.../share/hedera-web/image/dark/shipping.svg | 53 +++
package/usr/share/hedera-web/image/delete.svg | 14 +-
.../image/deprecated/access-log.png | Bin 485 -> 0 bytes
.../hedera-web/image/deprecated/blogger.png | Bin 597 -> 0 bytes
.../hedera-web/image/deprecated/calendar.png | Bin 590 -> 0 bytes
.../hedera-web/image/deprecated/clean.png | Bin 636 -> 0 bytes
.../hedera-web/image/deprecated/delete.png | Bin 409 -> 0 bytes
.../hedera-web/image/deprecated/edit.png | Bin 578 -> 0 bytes
.../hedera-web/image/deprecated/error.png | Bin 633 -> 0 bytes
.../hedera-web/image/deprecated/exit.png | Bin 935 -> 0 bytes
.../hedera-web/image/deprecated/facebook.png | Bin 397 -> 0 bytes
.../share/hedera-web/image/deprecated/git.png | Bin 784 -> 0 bytes
.../image/deprecated/go-previous.png | Bin 447 -> 0 bytes
.../image/deprecated/google-plus.png | Bin 1204 -> 0 bytes
.../hedera-web/image/deprecated/info.png | Bin 434 -> 0 bytes
.../hedera-web/image/deprecated/logo-big.png | Bin 10818 -> 0 bytes
.../hedera-web/image/deprecated/logo.png | Bin 4807 -> 0 bytes
.../share/hedera-web/image/deprecated/ok.png | Bin 503 -> 0 bytes
.../hedera-web/image/deprecated/order.png | Bin 622 -> 0 bytes
.../share/hedera-web/image/deprecated/pay.png | Bin 1024 -> 0 bytes
.../hedera-web/image/deprecated/print.png | Bin 359 -> 0 bytes
.../hedera-web/image/deprecated/refresh.png | Bin 805 -> 0 bytes
.../hedera-web/image/deprecated/remove.png | Bin 576 -> 0 bytes
.../hedera-web/image/deprecated/show.png | Bin 684 -> 0 bytes
.../image/deprecated/unavailable.png | Bin 407 -> 0 bytes
.../hedera-web/image/deprecated/youtube.png | Bin 510 -> 0 bytes
.../usr/share/hedera-web/image/go-next.svg | 151 +++++++++
.../share/hedera-web/image/go-previous.svg | 36 +-
.../share/hedera-web/image/preferences.svg | 138 ++++++++
.../usr/share/hedera-web/image/shipping.svg | 53 +++
.../usr/share/hedera-web/image/step-cur.svg | 64 ++++
package/usr/share/hedera-web/image/step.svg | 64 ++++
package/usr/share/hedera-web/js/htk/field.js | 18 +-
.../share/hedera-web/js/htk/field/calendar.js | 2 +-
.../share/hedera-web/js/htk/field/radio.js | 2 +-
package/usr/share/hedera-web/js/htk/htk.js | 36 ++
package/usr/share/hedera-web/js/vn/builder.js | 5 +
.../locale/ca/forms/account/address.json | 1 +
.../locale/ca/forms/admin/photos.json | 8 +-
.../locale/ca/forms/cms/contact.json | 16 +-
.../locale/ca/forms/ecomerce/checkout.json | 6 +-
.../hedera-web/locale/ca/forms/news/new.json | 5 +-
.../usr/share/hedera-web/locale/ca/js/vn.js | 2 +-
.../locale/es/forms/account/address.json | 1 +
.../locale/es/forms/admin/photos.json | 8 +-
.../locale/es/forms/cms/contact.json | 16 +-
.../locale/es/forms/ecomerce/basket.json | 9 +-
.../locale/es/forms/ecomerce/checkout.json | 61 ++--
.../locale/es/forms/ecomerce/confirm.json | 26 ++
.../locale/es/forms/ecomerce/shipping.json | 16 +
.../hedera-web/locale/es/forms/news/new.json | 5 +-
.../usr/share/hedera-web/locale/es/js/vn.js | 2 +-
.../locale/fr/forms/account/address.json | 1 +
.../locale/fr/forms/admin/photos.json | 8 +-
.../locale/fr/forms/cms/contact.json | 16 +-
.../locale/fr/forms/ecomerce/checkout.json | 6 +-
.../hedera-web/locale/fr/forms/news/new.json | 5 +-
.../usr/share/hedera-web/locale/fr/js/vn.js | 2 +-
.../locale/mn/forms/account/address.json | 1 +
.../locale/mn/forms/admin/photos.json | 8 +-
.../locale/mn/forms/cms/contact.json | 16 +-
.../locale/mn/forms/ecomerce/checkout.json | 6 +-
.../hedera-web/locale/mn/forms/news/new.json | 5 +-
.../usr/share/hedera-web/locale/mn/js/vn.js | 2 +-
package/usr/share/php/vn/hedera/web.php | 3 +-
package/usr/share/php/vn/tpv/tpv.php | 8 +-
100 files changed, 2588 insertions(+), 455 deletions(-)
rename package/etc/apache2/{conf.d/hedera-web => conf-available/hedera-web.conf} (89%)
create mode 100755 package/usr/share/hedera-web/forms/ecomerce/confirm/shipping.js
create mode 100755 package/usr/share/hedera-web/forms/ecomerce/confirm/style.css
create mode 100755 package/usr/share/hedera-web/forms/ecomerce/confirm/ui.xml
create mode 100755 package/usr/share/hedera-web/forms/ecomerce/shipping/shipping.js
create mode 100755 package/usr/share/hedera-web/forms/ecomerce/shipping/style.css
create mode 100755 package/usr/share/hedera-web/forms/ecomerce/shipping/ui.xml
create mode 100644 package/usr/share/hedera-web/image/basket.svg
create mode 100644 package/usr/share/hedera-web/image/dark/basket.svg
create mode 100644 package/usr/share/hedera-web/image/dark/close.svg
create mode 100644 package/usr/share/hedera-web/image/dark/go-next.svg
create mode 100644 package/usr/share/hedera-web/image/dark/preferences.svg
create mode 100644 package/usr/share/hedera-web/image/dark/shipping.svg
delete mode 100644 package/usr/share/hedera-web/image/deprecated/access-log.png
delete mode 100755 package/usr/share/hedera-web/image/deprecated/blogger.png
delete mode 100755 package/usr/share/hedera-web/image/deprecated/calendar.png
delete mode 100644 package/usr/share/hedera-web/image/deprecated/clean.png
delete mode 100644 package/usr/share/hedera-web/image/deprecated/delete.png
delete mode 100644 package/usr/share/hedera-web/image/deprecated/edit.png
delete mode 100644 package/usr/share/hedera-web/image/deprecated/error.png
delete mode 100755 package/usr/share/hedera-web/image/deprecated/exit.png
delete mode 100755 package/usr/share/hedera-web/image/deprecated/facebook.png
delete mode 100755 package/usr/share/hedera-web/image/deprecated/git.png
delete mode 100644 package/usr/share/hedera-web/image/deprecated/go-previous.png
delete mode 100755 package/usr/share/hedera-web/image/deprecated/google-plus.png
delete mode 100644 package/usr/share/hedera-web/image/deprecated/info.png
delete mode 100755 package/usr/share/hedera-web/image/deprecated/logo-big.png
delete mode 100755 package/usr/share/hedera-web/image/deprecated/logo.png
delete mode 100644 package/usr/share/hedera-web/image/deprecated/ok.png
delete mode 100644 package/usr/share/hedera-web/image/deprecated/order.png
delete mode 100755 package/usr/share/hedera-web/image/deprecated/pay.png
delete mode 100644 package/usr/share/hedera-web/image/deprecated/print.png
delete mode 100644 package/usr/share/hedera-web/image/deprecated/refresh.png
delete mode 100644 package/usr/share/hedera-web/image/deprecated/remove.png
delete mode 100644 package/usr/share/hedera-web/image/deprecated/show.png
delete mode 100644 package/usr/share/hedera-web/image/deprecated/unavailable.png
delete mode 100644 package/usr/share/hedera-web/image/deprecated/youtube.png
create mode 100644 package/usr/share/hedera-web/image/go-next.svg
create mode 100644 package/usr/share/hedera-web/image/preferences.svg
create mode 100644 package/usr/share/hedera-web/image/shipping.svg
create mode 100644 package/usr/share/hedera-web/image/step-cur.svg
create mode 100644 package/usr/share/hedera-web/image/step.svg
create mode 100755 package/usr/share/hedera-web/js/htk/htk.js
create mode 100755 package/usr/share/hedera-web/locale/es/forms/ecomerce/confirm.json
create mode 100755 package/usr/share/hedera-web/locale/es/forms/ecomerce/shipping.json
diff --git a/package/DEBIAN/control b/package/DEBIAN/control
index 17527ca4..6559cde0 100644
--- a/package/DEBIAN/control
+++ b/package/DEBIAN/control
@@ -3,6 +3,7 @@ Version: 1.0-47
Architecture: all
Maintainer: Juan Ferrer Toribio
Depends: apache2, php5-mysql, php-vn-web
+Suggests: php-text-captcha, php5-imap, vn-image, tinymce
Section: misc
Priority: optional
Description: Verdnatura's web page
diff --git a/package/DEBIAN/postinst b/package/DEBIAN/postinst
index 1cf85653..90237ab0 100755
--- a/package/DEBIAN/postinst
+++ b/package/DEBIAN/postinst
@@ -1,5 +1,6 @@
#!/bin/bash
+a2enconf hedera-web
service apache2 reload
service cron restart
diff --git a/package/etc/apache2/conf.d/hedera-web b/package/etc/apache2/conf-available/hedera-web.conf
similarity index 89%
rename from package/etc/apache2/conf.d/hedera-web
rename to package/etc/apache2/conf-available/hedera-web.conf
index b20018c3..9a60aca0 100644
--- a/package/etc/apache2/conf.d/hedera-web
+++ b/package/etc/apache2/conf-available/hedera-web.conf
@@ -1,4 +1,4 @@
-Alias /hedera-web /usr/share/hedera-web/
+# Alias /hedera-web /usr/share/hedera-web/
@@ -19,3 +19,4 @@ Alias /hedera-web /usr/share/hedera-web/
+
diff --git a/package/etc/hedera-web/config.php b/package/etc/hedera-web/config.php
index 5d1c9b71..b59b22a8 100755
--- a/package/etc/hedera-web/config.php
+++ b/package/etc/hedera-web/config.php
@@ -10,7 +10,7 @@ $conf = [
'db' => [
'host' => 'db.verdnatura.es'
,'schema' => 'hedera-web'
- ,'user' => 'root'
+ ,'user' => 'hedera-web'
,'pass' => 'base64pass'
]
diff --git a/package/usr/share/hedera-web/forms/account/address/address.js b/package/usr/share/hedera-web/forms/account/address/address.js
index f85218fb..af753096 100755
--- a/package/usr/share/hedera-web/forms/account/address/address.js
+++ b/package/usr/share/hedera-web/forms/account/address/address.js
@@ -16,6 +16,17 @@ Vn.Address = new Class
if (this.$('address').value == 0)
form.insertRow ();
}
+
+ ,onIterChange: function (form)
+ {
+ // TODO: Implement one way binding in Vn.Param
+
+ if (form.get ('country_id') != this.country)
+ {
+ this.country = form.get ('country_id');
+ this.$('country').value = this.country;
+ }
+ }
,onOperationsDone: function ()
{
diff --git a/package/usr/share/hedera-web/forms/account/address/ui.xml b/package/usr/share/hedera-web/forms/account/address/ui.xml
index 0b3df783..81694027 100755
--- a/package/usr/share/hedera-web/forms/account/address/ui.xml
+++ b/package/usr/share/hedera-web/forms/account/address/ui.xml
@@ -3,11 +3,13 @@
-
+
- SELECT id, name, consignee, city, zip_code, province_id
+ SELECT a.id, a.name, a.consignee, a.city, a.zip_code, a.province_id, c.Id country_id
FROM address_view a
- WHERE active != FALSE AND id = #address
+ LEFT JOIN vn2008.province p ON p.province_id = a.province_id
+ JOIN vn2008.Paises c ON c.Id = p.Paises_Id
+ WHERE active != FALSE AND a.id = #address
@@ -46,12 +48,26 @@
ZipCode
+
+ Country
+
+
+
+ SELECT Id, Pais FROM vn2008.Paises
+ ORDER BY Pais
+
+
+
Province
SELECT province_id, name FROM vn2008.province
+ WHERE Paises_Id = #country
ORDER BY name
+
+
+
diff --git a/package/usr/share/hedera-web/forms/account/conf/ui.xml b/package/usr/share/hedera-web/forms/account/conf/ui.xml
index bd824be2..e4e78a80 100755
--- a/package/usr/share/hedera-web/forms/account/conf/ui.xml
+++ b/package/usr/share/hedera-web/forms/account/conf/ui.xml
@@ -9,9 +9,10 @@
- SELECT id, consignee, p.name province, zip_code, city, a.name, active
+ SELECT a.id, a.consignee, p.name province, a.zip_code, a.city, a.name, a.active, c.Pais country
FROM address_view a
- JOIN vn2008.province p ON a.province_id = p.province_id
+ LEFT JOIN vn2008.province p ON a.province_id = p.province_id
+ JOIN vn2008.Paises c ON c.Id = p.Paises_Id
WHERE active != FALSE
@@ -84,11 +85,12 @@
- -
+ -
-
+ -
+
+
diff --git a/package/usr/share/hedera-web/forms/ecomerce/checkout/checkout.js b/package/usr/share/hedera-web/forms/ecomerce/checkout/checkout.js
index b059c569..56fc377e 100755
--- a/package/usr/share/hedera-web/forms/ecomerce/checkout/checkout.js
+++ b/package/usr/share/hedera-web/forms/ecomerce/checkout/checkout.js
@@ -3,54 +3,303 @@ Vn.Checkout = new Class
({
Extends: Vn.Module
- ,goBasket: function ()
+ ,activate: function () {}
+
+ ,onStatusChange: function (form)
{
- this.hash.set ({
- 'form': 'ecomerce/basket',
- 'order': this.$('order-id').value
- });
+// if (this.$('address').value == 0)
+// form.insertRow ();
+ }
+
+ ,onCancelClick: function ()
+ {
+ this.hash.set ({'form': 'ecomerce/orders'});
}
,onConfirmClick: function ()
{
- if (!confirm (_('SureConfirmOrder')))
- return;
-
- var query = 'CALL order_confirm (#order)';
-
var batch = new Sql.Batch ();
- batch.addParam ('order', this.$('order-id'));
+ batch.addParam ('date', this.$('date'));
+ batch.addParam ('agency', this.$('agency'));
+ batch.addValue ('address', this.$('address'));
+ batch.addValue ('delivery', 1);
- this.conn.execQuery (query, this.confirmDone.bind (this), batch);
+ var sql = 'CALL order_new_beta (#date, #delivery, #agency, #address);';
+ this.conn.execQuery (sql, this.onOrderCreate.bind (this), batch);
}
- ,confirmDone: function (resultSet)
+ ,onOrderCreate: function (resultSet)
{
- if (resultSet.fetchResult ())
+ var orderId = resultSet.fetchValue ();
+
+ if (orderId)
{
- Vn.Cookie.unset ('order');
- this.hash.set ({'form': 'ecomerce/orders'});
-
- (new Htk.Toast ()).showMessage (_('OrderConfirmed'));
+ Vn.Cookie.set ('order', orderId);
+ this.hash.set ({'form': 'ecomerce/catalog'});
}
else
- this.goBasket ();
+ (new Htk.Toast ()).showMessage (_('ErrorCreatingOrder'));
}
- ,onAddAddressClick: function ()
+ ,onFieldChange: function ()
{
- this.hash.set ({
- 'form': 'account/address',
- 'address': 0
- });
+ setTimeout (this.goNextStep.bind (this), 75);
}
- ,onEditAddressClick: function (button, form)
+ ,onAddressClick: function (e)
{
- this.hash.set ({
- 'form': 'account/address',
- 'address': form.get ('id')
- });
+ this.onFieldChange ();
+ }
+
+ ,goNextStep: function ()
+ {
+ this.$('assistant').moveNext ();
+ }
+
+ ,deliverySteps: ['delivery', 'date', 'address', 'agency', 'confirm-delivery']
+ ,pickupSteps: ['delivery', 'date', 'pickup', null, 'confirm-pickup']
+
+ ,stepFunc: function (stepIndex)
+ {
+ var isDelivery = this.$('rg-delivery').value != 'PICKUP';
+ var steps = isDelivery ? this.deliverySteps : this.pickupSteps;
+ var stepId = steps[stepIndex];
+
+ if (stepId)
+ {
+ if (stepId == 'date')
+ {
+ Vn.Node.setText (this.$('date-question'), isDelivery ?
+ _('OrderDateDeliveryQuestion'):
+ _('OrderDatePickupQuestion'));
+ this.$('calendar').goToSelectedMonth ();
+ }
+
+ return this.$(stepId +'-step');
+ }
+ else
+ return null;
+ }
+});
+
+Htk.Assitant = new Class
+({
+ Extends: Vn.Object
+ ,Tag: 'htk-assistant'
+ ,Properties:
+ {
+ stepCount:
+ {
+ type: Number
+ ,set: function (x)
+ {
+ this._stepCount = x;
+
+ if (x > 0)
+ this.setStep (0);
+ else
+ this.setStep (-1);
+ }
+ ,get: function ()
+ {
+ return this._stepCount;
+ }
+ },
+ step:
+ {
+ type: Number
+ ,set: function (x)
+ {
+ this.setStep (x);
+ }
+ ,get: function ()
+ {
+ return this._stepIndex;
+ }
+ },
+ stepFunc:
+ {
+ type: Function
+ ,set: function (x)
+ {
+ this._stepFunc = x;
+ this.setStep (this._stepIndex);
+ }
+ ,get: function ()
+ {
+ return this._stepFunc;
+ }
+ },
+ node:
+ {
+ type: Object
+ ,set: function (x)
+ {
+ x.className = 'htk-assistant';
+ }
+ },
+ }
+
+ ,_stepNode: null
+ ,_stepIndex: -1
+ ,_stepCount: 0
+ ,_stepFunc: null
+
+ ,setStep: function (stepIndex)
+ {
+ if (!(stepIndex >= -1 && stepIndex < this.stepCount))
+ return;
+
+ if (this._stepFunc && stepIndex != -1)
+ {
+ var stepNode = this._stepFunc (stepIndex);
+
+ if (stepNode)
+ {
+ if (this._stepNode)
+ this._stepNode.style.display = 'none';
+
+ this._stepNode = stepNode;
+ stepNode.style.display = 'block';
+
+ this._setStepIndex (stepIndex);
+ }
+ else if (this._stepIndex < stepIndex)
+ this.setStep (stepIndex + 1);
+ else
+ this.setStep (stepIndex - 1);
+ }
+ else
+ this._setStepIndex (stepIndex);
+ }
+
+ ,_setStepIndex: function (stepIndex)
+ {
+ this._stepIndex = stepIndex;
+ this.signalEmit ('step-change', stepIndex);
+ }
+
+ ,movePrevious: function ()
+ {
+ this.setStep (this._stepIndex - 1);
+ }
+
+ ,moveNext: function ()
+ {
+ this.setStep (this._stepIndex + 1);
+ }
+});
+
+Htk.AssitantBar = new Class
+({
+ Extends: Htk.Widget
+ ,Tag: 'htk-assistant-bar'
+ ,Properties:
+ {
+ assistant:
+ {
+ type: Htk.Assitant
+ ,set: function (x)
+ {
+ this.link ({_assistant: x}, {'step-change': this.onStepChange});
+
+ var stepCount = x.stepCount;
+ var steps = this._steps;
+
+ Vn.Node.removeChilds (steps);
+ steps.style.width = (stepCount * 1.3) + 'em';
+
+ for (var i = 0; i < stepCount; i++)
+ {
+ var img = document.createElement ('img');
+ img.src = 'image/step.svg';
+ img.addEventListener ('click', this.setStep.bind (this, i));
+ steps.appendChild (img);
+ }
+
+ this.onStepChange ();
+ }
+ ,get: function ()
+ {
+ return this._assistant;
+ }
+ }
+ }
+
+ ,_assistant: null
+ ,_stepIndex: -1
+
+ ,initialize: function (props)
+ {
+ this.parent (props);
+
+ var bar = this.createElement ('div');
+ bar.className = 'htk-assistant-bar';
+
+ var previousButton = document.createElement ('img');
+ previousButton.src = 'image/go-previous.svg';
+ previousButton.className = 'previous';
+ previousButton.addEventListener ('click', this.movePrevious.bind (this));
+ bar.appendChild (previousButton);
+
+ var steps = document.createElement ('div');
+ bar.appendChild (steps);
+
+ var nextButton = document.createElement ('img');
+ nextButton.src = 'image/go-next.svg';
+ nextButton.className = 'next';
+ nextButton.addEventListener ('click', this.moveNext.bind (this));
+ bar.appendChild (nextButton);
+
+ this._steps = steps;
+ this._previousButton = previousButton;
+ this._nextButton = nextButton;
+ }
+
+ ,movePrevious: function ()
+ {
+ if (this._assistant)
+ this._assistant.movePrevious ();
+ }
+
+ ,moveNext: function ()
+ {
+ if (this._assistant)
+ this._assistant.moveNext ();
+ }
+
+ ,setStep: function (stepIndex)
+ {
+ if (this._assistant)
+ this._assistant.setStep (stepIndex);
+ }
+
+ ,onStepChange: function ()
+ {
+ if (this._assistant)
+ {
+ var stepIndex = this._assistant.step;
+ var stepCount = this._assistant.stepCount;
+ }
+ else
+ {
+ var stepIndex = -1;
+ var stepCount = 0;
+ }
+
+ if (this._stepIndex != -1)
+ this._steps.childNodes[this._stepIndex].src = 'image/step.svg';
+
+ this._stepIndex = stepIndex;
+
+ if (stepIndex != -1)
+ this._steps.childNodes[stepIndex].src = 'image/step-cur.svg';
+
+ var visibility = stepIndex <= 0 ? 'hidden' : 'visible';
+ this._previousButton.style.visibility = visibility;
+
+ var visibility = stepIndex >= stepCount - 1 ? 'hidden' : 'visible';
+ this._nextButton.style.visibility = visibility;
}
});
diff --git a/package/usr/share/hedera-web/forms/ecomerce/checkout/style.css b/package/usr/share/hedera-web/forms/ecomerce/checkout/style.css
index 54d5198a..1c75b4c7 100755
--- a/package/usr/share/hedera-web/forms/ecomerce/checkout/style.css
+++ b/package/usr/share/hedera-web/forms/ecomerce/checkout/style.css
@@ -2,34 +2,170 @@
{
padding: 1em;
}
-.checkout .box
+.checkout
{
- max-width: 70em;
+ max-width: 50em;
margin: 0 auto;
}
-
table.form td.label
{
width: 30%;
}
-/* Addresses */
+/* Checkout */
-.addresses > .form
+.checkout .form
{
- margin: 0 auto;
- padding: 2em;
- max-width: 25em;
+ max-width: 40em;
+ padding: 3em;
}
-.address
+
+/* Delivery method */
+
+ul.delivery
{
- margin-bottom: 1em;
+ list-style-type: none;
+ margin: 0;
+ padding-top: 0.8em;
+ padding-left: 1em;
}
-.address p
+ul.delivery > li
{
margin: 0.2em 0;
}
-.address .actions
+ul.delivery input
{
- text-align: right;
+ margin-right: 0.4em;
}
+
+/* Step */
+
+.answers button,
+.answers span,
+.answers select,
+.answers p,
+.radio > div
+{
+ font-size: 1.3em;
+}
+.target
+{
+ max-width: 24em;
+ margin: 0 auto;
+}
+.address
+{
+ border-radius: 0.1em;
+ padding: 1em;
+}
+.address:hover
+{
+ cursor: pointer;
+ background-color: rgba(1, 1, 1, 0.05);
+}
+.address > p
+{
+ margin: 0.2em;
+}
+.radio
+{
+ max-width: 15em;
+ margin: 0 auto;
+}
+.radio > div
+{
+ padding: 0.5em;
+ border-top: 1px solid #AAA;
+}
+.radio > div:first-child
+{
+ border-top: none;
+}
+.thin-calendar
+{
+ width: inherit;
+ max-width: 24em;
+ margin: 0 auto;
+}
+.thin-calendar thead > tr,
+.thin-calendar tfoot > tr
+{
+ background-color: transparent;
+ color: inherit;
+}
+.thin-calendar .button:hover
+{
+ color: white;
+}
+.thin-calendar td.highlight
+{
+ background-color: #009688;
+ color: white;
+}
+.htk-assistant select
+{
+ width: 10em;
+ float: left;
+}
+.htk-assistant button
+{
+ float: right;
+}
+
+/* Assistant */
+
+.htk-assistant > div
+{
+ display: none;
+ margin-top: 0;
+ margin-bottom: 3em;
+}
+.htk-assistant > div > h2
+{
+ text-align: center;
+ font-weight: normal;
+ font-size: 1.6em;
+ margin: 0.5em;
+ margin-bottom: 1em;
+}
+.htk-assistant *
+{
+ color: #555;
+}
+
+/* Assistant bar */
+
+.htk-assistant-bar
+{
+ margin: 0.5em auto;
+ max-width: 30em;
+ position: relative;
+}
+.htk-assistant-bar img
+{
+ cursor: pointer;
+}
+.htk-assistant-bar > img
+{
+ position: absolute;
+ width: 1.8em;
+ top: 0;
+}
+.htk-assistant-bar > img.previous
+{
+ left: 0;
+}
+.htk-assistant-bar > img.next
+{
+ right: 0;
+}
+.htk-assistant-bar > div
+{
+ margin: 0 auto;
+ padding-top: 0.2em;
+}
+.htk-assistant-bar > div > img
+{
+ width: 1.3em;
+}
+
diff --git a/package/usr/share/hedera-web/forms/ecomerce/checkout/ui.xml b/package/usr/share/hedera-web/forms/ecomerce/checkout/ui.xml
index 5918ce63..72b67ae8 100755
--- a/package/usr/share/hedera-web/forms/ecomerce/checkout/ui.xml
+++ b/package/usr/share/hedera-web/forms/ecomerce/checkout/ui.xml
@@ -1,123 +1,172 @@
+
+
+
-
+
- SELECT type_id, note, insurance, address_id, id
+ SELECT id, date_send, wh_id, delivery_method_id, agency_id, address_id, note
FROM order_view WHERE id = #id
-
-
-
-
- SELECT id, consignee, p.name province, zip_code, city, a.name, active
+
+
+ SELECT address_id, agency_id, delivery_method_id
+ FROM order_defaults_view
+
+
+
+ SELECT a.id, a.consignee, p.name province, a.zip_code, a.city, a.name, a.active, c.Pais country
FROM address_view a
- JOIN vn2008.province p ON a.province_id = p.province_id
+ LEFT JOIN vn2008.province p ON a.province_id = p.province_id
+ JOIN vn2008.Paises c ON c.Id = p.Paises_Id
WHERE active != FALSE
-