From e81362c549db8b260e2ad0fe6f3f5c3e3e57b416 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 3 Jul 2015 07:49:45 +0200 Subject: [PATCH] Copia seguridad --- .../forms/account/address/address.js | 11 - .../hedera-web/forms/account/address/ui.xml | 6 +- .../hedera-web/forms/account/conf/ui.xml | 4 +- .../share/hedera-web/forms/admin/links/ui.xml | 6 +- .../forms/ecomerce/catalog/style.css | 39 +- .../forms/ecomerce/checkout/checkout.js | 346 ++++-------------- .../forms/ecomerce/checkout/style.css | 129 +------ .../hedera-web/forms/ecomerce/checkout/ui.xml | 117 +++--- .../forms/ecomerce/orders/orders.js | 1 - .../forms/ecomerce/orders/style.css | 13 +- .../hedera-web/forms/ecomerce/orders/ui.xml | 32 +- package/usr/share/hedera-web/global/style.css | 204 ++++++++--- package/usr/share/hedera-web/js/db/form.js | 111 +----- .../usr/share/hedera-web/js/db/iterator.js | 147 ++++++++ package/usr/share/hedera-web/js/db/main.php | 1 + package/usr/share/hedera-web/js/db/model.js | 2 +- package/usr/share/hedera-web/js/db/param.js | 50 ++- .../share/hedera-web/js/htk/assistant-bar.js | 116 ++++++ .../usr/share/hedera-web/js/htk/assistant.js | 109 ++++++ package/usr/share/hedera-web/js/htk/column.js | 2 +- package/usr/share/hedera-web/js/htk/field.js | 4 +- .../share/hedera-web/js/htk/field/select.js | 75 +++- package/usr/share/hedera-web/js/htk/grid.js | 20 +- package/usr/share/hedera-web/js/htk/main.php | 2 + .../usr/share/hedera-web/js/htk/repeater.js | 20 +- package/usr/share/hedera-web/js/sql/value.js | 2 +- package/usr/share/hedera-web/js/vn/builder.js | 16 +- package/usr/share/hedera-web/js/vn/param.js | 2 +- .../usr/share/hedera-web/locale/ca/js/htk.js | 2 + .../locale/es/forms/ecomerce/checkout.json | 12 +- .../locale/es/forms/ecomerce/orders.json | 10 +- .../usr/share/hedera-web/locale/es/js/htk.js | 2 + .../usr/share/hedera-web/locale/fr/js/htk.js | 2 + .../usr/share/hedera-web/locale/mn/js/htk.js | 2 + 34 files changed, 921 insertions(+), 696 deletions(-) create mode 100755 package/usr/share/hedera-web/js/db/iterator.js create mode 100644 package/usr/share/hedera-web/js/htk/assistant-bar.js create mode 100644 package/usr/share/hedera-web/js/htk/assistant.js 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 af753096..f85218fb 100755 --- a/package/usr/share/hedera-web/forms/account/address/address.js +++ b/package/usr/share/hedera-web/forms/account/address/address.js @@ -16,17 +16,6 @@ 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 81694027..00290182 100755 --- a/package/usr/share/hedera-web/forms/account/address/ui.xml +++ b/package/usr/share/hedera-web/forms/account/address/ui.xml @@ -3,7 +3,8 @@ - + + SELECT a.id, a.name, a.consignee, a.city, a.zip_code, a.province_id, c.Id country_id FROM address_view a @@ -50,8 +51,7 @@
- - + SELECT Id, Pais FROM vn2008.Paises ORDER BY Pais 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 e4e78a80..e7343dc6 100755 --- a/package/usr/share/hedera-web/forms/account/conf/ui.xml +++ b/package/usr/share/hedera-web/forms/account/conf/ui.xml @@ -85,11 +85,11 @@

- - + ,

- - + ,

diff --git a/package/usr/share/hedera-web/forms/admin/links/ui.xml b/package/usr/share/hedera-web/forms/admin/links/ui.xml index de36cf5b..41c8adaf 100755 --- a/package/usr/share/hedera-web/forms/admin/links/ui.xml +++ b/package/usr/share/hedera-web/forms/admin/links/ui.xml @@ -4,14 +4,14 @@

ControlPanel

- + SELECT image, name, description, link FROM link ORDER BY name - - + +
diff --git a/package/usr/share/hedera-web/forms/ecomerce/catalog/style.css b/package/usr/share/hedera-web/forms/ecomerce/catalog/style.css index 5d40c005..b0ee3086 100755 --- a/package/usr/share/hedera-web/forms/ecomerce/catalog/style.css +++ b/package/usr/share/hedera-web/forms/ecomerce/catalog/style.css @@ -92,9 +92,9 @@ { position: absolute; z-index: 20; - top: 0em; - bottom: 0em; - right: 0em; + top: 0; + bottom: 0; + right: 0; width: 17em; background-color: white; box-shadow: 0 0.2em 0.2em #AAA; @@ -127,10 +127,9 @@ button.basket:hover max-height: 4em; cursor: pointer; } -.htk-realm img.selected, .htk-realm img:hover { -/* height: 4em; */ + opacity: 0.85; } /* Types */ @@ -139,36 +138,36 @@ button.basket:hover { position: absolute; top: 6.8em; - bottom: 0em; - right: 0em; - left: 0em; + bottom: 0; + right: 0; + left: 0; overflow: auto; } -table.types +.types { width: 100%; } -table.types > thead +.types > thead { display: none; } -table.types > tbody > tr +.types > tbody > tr { border-top: none; height: 2.2em; } -table.types > tbody a +.types > tbody a { display: block; padding: 0.3em 7%; width: 88%; height: 100%; } -table.types tbody a:hover +.types tbody a:hover { background-color: #EEE; } -table.types td.grid-message +.types td.grid-message { padding-top: 1em; } @@ -215,25 +214,25 @@ table.types td.grid-message /* List view */ -table.items +.items { width: 100%; } -.catalog div.header, -table.items > thead > tr, +.catalog div.box div.header, +.items > thead > tr, .realms-bar { background-color: #777; } -table.items > thead th:hover +.items > thead th:hover { background-color: #333; } -table.items > tbody > tr +.items > tbody > tr { height: 6em; } -table.items > tbody img +.items > tbody img { max-height: 5em; max-width: 5em; 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 56fc377e..8f0b231e 100755 --- a/package/usr/share/hedera-web/forms/ecomerce/checkout/checkout.js +++ b/package/usr/share/hedera-web/forms/ecomerce/checkout/checkout.js @@ -4,65 +4,33 @@ Vn.Checkout = new Class Extends: Vn.Module ,activate: function () {} - - ,onStatusChange: function (form) - { -// if (this.$('address').value == 0) -// form.insertRow (); - } - - ,onCancelClick: function () - { - this.hash.set ({'form': 'ecomerce/orders'}); - } - ,onConfirmClick: function () - { - var batch = new Sql.Batch (); - batch.addParam ('date', this.$('date')); - batch.addParam ('agency', this.$('agency')); - batch.addValue ('address', this.$('address')); - batch.addValue ('delivery', 1); - - var sql = 'CALL order_new_beta (#date, #delivery, #agency, #address);'; - this.conn.execQuery (sql, this.onOrderCreate.bind (this), batch); - } - - ,onOrderCreate: function (resultSet) - { - var orderId = resultSet.fetchValue (); - - if (orderId) - { - Vn.Cookie.set ('order', orderId); - this.hash.set ({'form': 'ecomerce/catalog'}); - } - else - (new Htk.Toast ()).showMessage (_('ErrorCreatingOrder')); - } - - ,onFieldChange: function () - { - setTimeout (this.goNextStep.bind (this), 75); - } - - ,onAddressClick: function (e) - { - this.onFieldChange (); - } - - ,goNextStep: function () - { - this.$('assistant').moveNext (); - } - - ,deliverySteps: ['delivery', 'date', 'address', 'agency', 'confirm-delivery'] + ,agencySteps: ['delivery', 'date', 'address', 'agency', 'confirm-agency'] + ,deliverySteps: ['delivery', 'date', 'address', null, '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 steps; + var isDelivery; + + switch (this.$('rg-delivery').value) + { + case 'AGENCY': + steps = this.agencySteps; + isDelivery = true; + break; + case 'DELIVERY': + steps = this.deliverySteps; + isDelivery = true; + break; + case 'PICKUP': + default: + steps = this.pickupSteps; + isDelivery = false; + break; + } + var stepId = steps[stepIndex]; if (stepId) @@ -80,226 +48,72 @@ Vn.Checkout = new Class else return null; } -}); - -Htk.Assitant = new Class -({ - Extends: Vn.Object - ,Tag: 'htk-assistant' - ,Properties: + + ,onDefaults: function (i) { - 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)) + if (!i.ready) return; + + this.lockAssistant = true; + this.$('rg-delivery').value = i.get ('delivery_method'); + this.$('date').value = new Date (); + this.$('agency').value = i.get ('agency_id'); + this.$('address').value = i.get ('address_id'); + this.lockAssistant = false; + } + + ,onFieldChange: function () + { + if (!this.lockAssistant) + setTimeout (this.goNextStep.bind (this), 75); + } + + ,addressRenderer: function (builder, index) + { + builder.$('address').addEventListener ('click', + this.onAddressClick.bind (this, index)); + } + + ,onAddressClick: function (index) + { + this.$('address-form').row = index; + this.goNextStep (); + } + + ,goNextStep: function () + { + this.$('assistant').moveNext (); + } + + ,onConfirmClick: function () + { + var batch = new Sql.Batch (); + batch.addParam ('date', this.$('date')); + batch.addParam ('delivery', this.$('rg-delivery')); + batch.addParam ('agency', this.$('agency')); + batch.addParam ('address', this.$('address')); + + var sql = 'CALL order_new_beta (#date, #delivery, #agency, #address);'; + this.conn.execQuery (sql, this.onOrderCreate.bind (this), batch); + } + + ,onOrderCreate: function (resultSet) + { + var orderId = resultSet.fetchValue (); - if (this._stepFunc && stepIndex != -1) + if (orderId) { - 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); + Vn.Cookie.set ('order', orderId); + this.hash.set ({'form': 'ecomerce/catalog'}); + (new Htk.Toast ()).showMessage (_('OrderStarted')); } else - this._setStepIndex (stepIndex); + (new Htk.Toast ()).showMessage (_('ErrorCreatingOrder')); } - - ,_setStepIndex: function (stepIndex) + + ,onCancelClick: function () { - 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; + this.hash.set ({'form': 'ecomerce/orders'}); } }); 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 1c75b4c7..52c24117 100755 --- a/package/usr/share/hedera-web/forms/ecomerce/checkout/style.css +++ b/package/usr/share/hedera-web/forms/ecomerce/checkout/style.css @@ -1,75 +1,58 @@ .checkout { padding: 1em; -} -.checkout -{ max-width: 50em; margin: 0 auto; } -table.form td.label -{ - width: 30%; -} - -/* Checkout */ - .checkout .form { max-width: 40em; padding: 3em; } -/* Delivery method */ - -ul.delivery -{ - list-style-type: none; - margin: 0; - padding-top: 0.8em; - padding-left: 1em; -} -ul.delivery > li -{ - margin: 0.2em 0; -} -ul.delivery input -{ - margin-right: 0.4em; -} - /* Step */ .answers button, .answers span, -.answers select, .answers p, .radio > div { - font-size: 1.3em; + font-size: 1.4em; +} +.answers select +{ + min-width: 8em; + display: block; + margin: 0 auto; + font-size: 1.6em; + height: 1.8em; +} +.answers p +{ + margin: 0.3em 0; } .target { - max-width: 24em; + max-width: 28em; margin: 0 auto; } .address { border-radius: 0.1em; - padding: 1em; + padding: 0.6em 1.4em; } .address:hover { cursor: pointer; background-color: rgba(1, 1, 1, 0.05); } -.address > p +.address p.consignee { - margin: 0.2em; + font-weight: bold; } .radio { - max-width: 15em; + max-width: 20em; margin: 0 auto; } .radio > div @@ -86,86 +69,14 @@ ul.delivery input width: inherit; max-width: 24em; margin: 0 auto; + box-shadow: 0 0.1em 0.3em #ccc; } -.thin-calendar thead > tr, -.thin-calendar tfoot > tr -{ - background-color: transparent; - color: inherit; -} -.thin-calendar .button:hover +.thin-calendar tr > th { 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 72b67ae8..fc91cfc0 100755 --- a/package/usr/share/hedera-web/forms/ecomerce/checkout/ui.xml +++ b/package/usr/share/hedera-web/forms/ecomerce/checkout/ui.xml @@ -1,7 +1,6 @@ - @@ -15,19 +14,22 @@
- + - SELECT address_id, agency_id, delivery_method_id + SELECT address_id, agency_id, delivery_method 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 - 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 - + + + + SELECT a.id, a.consignee, p.name province, a.zip_code, a.city, a.name, a.active, c.Pais country + FROM address_view a + 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 + +
@@ -47,22 +49,6 @@ step-func="stepFunc" node="assistant-node"/>
-
-

DeliveryOrPickupQuestion

-
- -
- - -
-
- - -
-
-

OrderDateDeliveryQuestion

@@ -73,31 +59,43 @@ on-changed="onFieldChange"/>
+
+

DeliveryOrPickupQuestion

+
+ +
+ + +
+
+ + +
+
+ + +
+
+

AddressQuestion

- -
-

+ +
+

-

+

-

- - - -

-

- - - -

AgencyQuestion

- + SELECT a.Id_Agencia, a.description FROM vn2008.Agencias a @@ -107,18 +105,14 @@ ORDER BY a.description - -

PickupWarehouseQuestion

- + - SELECT a.Id_Agencia, SUBSTR(a.description, 5) + SELECT a.Id_Agencia, SUBSTR(a.description, 5) description FROM vn2008.Agencias a JOIN vn2008.Vistas v ON a.Vista = v.vista_id WHERE a.web != FALSE @@ -126,8 +120,24 @@ ORDER BY a.description -
+
+
+

ConfirmToAccessCatalog

+
+

+ Arrival + +

+

+ +

+

+ Agency + +

+
@@ -136,13 +146,14 @@

ConfirmToAccessCatalog

- ArrivalOf + Arrival +

- Agency +

- + ReceiveThroughtRoute

+
- + SELECT o.id, date_send, Agencia FROM order_view o - JOIN vn2008.Agencias a ON o.type_id = a.Id_Agencia + LEFT JOIN vn2008.Agencias a ON o.type_id = a.Id_Agencia + + - - -
-

ConfirmedOrdersDesc

+

ConfirmedOrders

PendingBalance: @@ -43,27 +43,21 @@ _MakePayment
+
- + CALL ticket_list (); + + + - - - - - -
@@ -81,7 +75,7 @@
- + CALL customer_debt (); diff --git a/package/usr/share/hedera-web/global/style.css b/package/usr/share/hedera-web/global/style.css index ed8aa6d4..2889723b 100755 --- a/package/usr/share/hedera-web/global/style.css +++ b/package/usr/share/hedera-web/global/style.css @@ -11,7 +11,7 @@ } @media screen and (min-device-width: 1850px) { - * { font-size: 11pt; } + * { font-size: 12pt; } } /* Global */ @@ -23,7 +23,7 @@ } body { - margin: 0px; + margin: 0; } body, label, @@ -88,30 +88,49 @@ h2 } p { - margin: 0; - margin-top: 16px; - margin-bottom: 16px; + margin: 0.8em 0; } /* Inputs */ -input, +input[type=text], +input[type=password], +input[type=file], +input[type=number], textarea, select { border: 1px solid #CCD; margin: 0.2em; - padding: 0.3em; border-radius: 0.1em; box-shadow: 0 0.1em 0.1em #CCC; } + +input[type=text], +input[type=password], +input[type=file], +input[type=number], +textarea +{ + padding: 0.3em; +} select { background-color: white; - cursor: pointer; - padding: 0.4em; - padding-top: 0.2em; font-size: 1.1em; + height: 1.8em; +} +option +{ + padding: 0.3em; + border-width: 0; + font-weight: normal; + font-size: 1em; +} +select, +option +{ + cursor: pointer; } input[type=text], input[type=password] @@ -134,6 +153,8 @@ input[type=checkbox], input[type=radio] { cursor: pointer; + margin: 0.2em; + padding: 0.3em; width: 0.8em; height: 0.8em; } @@ -220,60 +241,61 @@ img.editable /* Float */ -div.clear +.clear { clear: both; } /* Box */ -div.box +.box { background-color: white; margin: 0 auto; border-radius: 0.1em; box-shadow: 0 0.2em 0.2em #CCC; } -div.box .header +.box .header { padding: 0.6em 0.8em; margin: 0; - color: white; background-color: #009688; + color: white; } -div.box .header h1 +.box .header > h1 { + color: white; text-align: left; font-size: 1.6em; line-height: 2em; font-weight: normal; display: inline; } -div.box .body +.box .body { padding: 2em; } /* Form */ -div.form +.form { margin: 0 auto; } -div.form-group +.form-group { padding: 0.4em; } -div.form-group > label +.form-group > label { display: block; margin-bottom: 0.5em; } -div.form-group > input[type=text], -div.form-group > input[type=password], -div.form-group > select, -div.form-group > textarea +.form-group > input[type=text], +.form-group > input[type=password], +.form-group > select, +.form-group > textarea { margin: 0; width: 100%; @@ -281,32 +303,30 @@ div.form-group > textarea /* Action bar */ -div.action-bar +.action-bar { float: right; padding: 0; margin-top: 0.3em; - background-color: #009688; } -div.action-bar > * +.action-bar > * { float: left; padding: 0.4em; } -div.action-bar > button +.action-bar > button { border-left: 1px solid white; - background-color: #009688; } -div.action-bar > button:first-child +.action-bar > button:first-child { border-left: none; } -div.action-bar > button:hover +.action-bar > button:hover { - background-color: #076; + background-color: rgba(1, 1, 1, 0.2); } -div.action-bar > button > img +.action-bar > button > img { vertical-align: middle; margin-right: 0.4em; @@ -340,90 +360,95 @@ img.icon /* Grid */ -table.htk-grid +.htk-grid { margin: auto; border-collapse: collapse; text-align: center; } -table.htk-grid thead tr, -table.htk-grid tfoot tr +.htk-grid > thead > tr, +.htk-grid > tfoot > tr { background-color: #009688; - color: white; vertical-align: middle; text-align: center; height: 3em; } -table.htk-grid thead th +.htk-grid > thead th { + color: white; cursor: pointer; font-weight: normal; padding: 0 0.4em; } -table.htk-grid thead th:hover +.htk-grid > thead th:hover { - background-color: #076; + background-color: rgba(1, 1, 1, 0.2); } -table.htk-grid tr +.htk-grid tr { height: 3.5em; } -table.htk-grid tfoot a, -table.htk-grid thead a +.htk-grid > tfoot a, +.htk-grid > thead a { color: black; } -table.htk-grid tr.pair-row +.htk-grid tr.pair-row { background-color: transparent; } -td.grid-message +.htk-grid .message { height: 5em; } -td.grid-message img +.htk-grid .message img { vertical-align: middle; padding: 0.8em; height: 1.8em; } -table.htk-grid tbody tr +.htk-grid > tbody tr { border-top: 1px solid #DDD; } -table.htk-grid tbody tr:first-child +.htk-grid > tbody tr:first-child { border-top: none; } -table.htk-grid tbody td +.htk-grid > tbody td { padding-right: 0.7em; padding-left: 0.3em; } -table.htk-grid tbody td:first-child, -table.htk-grid thead th:first-child +.htk-grid > tbody td:first-child, +.htk-grid > thead th:first-child { padding-left: 1em; } -table.htk-grid tbody td:last-child, -table.htk-grid thead th:last-child +.htk-grid > tbody td:last-child, +.htk-grid > thead th:last-child { padding-right: 1em; } -input.cell-spin +.htk-grid .cell-spin { width: 2.5em; text-align: right; } -button.cell-button +.htk-grid .cell-button { margin: 0; - padding: 0; + padding: 0.5em; border: none; background-color: transparent; + border-radius: 0.1em; } -button.cell-button img +.htk-grid .cell-button:hover +{ + background-color: rgba(1, 1, 1, 0.1); +} +.htk-grid .cell-button img { height: 1.5em; } @@ -544,12 +569,10 @@ button.cell-button img { background-color: #BFB; } - .htk-toast.warning { background-color: #FFB; } - .htk-toast.error { background-color: #FBB; @@ -625,3 +648,68 @@ button.cell-button img margin-right: 0.5em; } +/* Assistant */ + +.htk-assistant > div +{ + display: none; + margin-top: 1em; + margin-bottom: 4em; +} +.htk-assistant > div > h2 +{ + text-align: center; + font-style: italic; + font-weight: normal; + font-size: 1.5em; + 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; + padding: 0.3em; + border-radius: 0.1em; +} +.htk-assistant-bar > img:hover +{ + background-color: rgba(1,1,1,0.1); +} +.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 +{ + padding: 0.3em 0.2em; + width: 1.3em; +} + diff --git a/package/usr/share/hedera-web/js/db/form.js b/package/usr/share/hedera-web/js/db/form.js index 0113499d..a8d9c008 100755 --- a/package/usr/share/hedera-web/js/db/form.js +++ b/package/usr/share/hedera-web/js/db/form.js @@ -1,7 +1,8 @@ Db.Form = new Class ({ - Extends: Vn.Object + Extends: Vn.Object + ,Implements: Db.Iterator ,Tag: 'db-form' ,Child: 'model' ,Properties: @@ -100,113 +101,5 @@ Db.Form = new Class if (row == this._row) this.iterChanged (); } - - ,refresh: function () - { - if (this._model) - this._model.refresh (); - } - - /** - * Emits the 'iter-changed' signal on the form. - **/ - ,iterChanged: function () - { - this.signalEmit ('iter-changed'); - } - - /** - * Get the index of the column from its name. - * - * @param {String} columnName The column name - * @return {integer} The column index or -1 if column not exists - **/ - ,getColumnIndex: function (columnName) - { - if (this._model) - return this._model.getColumnIndex (columnName); - - return -1; - } - - ,insertRow: function () - { - if (this._model) - this.row = this._model.insertRow (); - } - - ,performOperations: function () - { - if (this._model) - this._model.performOperations (); - } - - /** - * Removes the current row. - **/ - ,deleteRow: function () - { - if (this._row >= 0) - this._model.deleteRow (this._row); - } - - /** - * Gets a value from the form. - * - * @param {String} columnName The column name - * @return {Object} The value - **/ - ,get: function (columnName) - { - return this._model.get (this._row, columnName); - } - - /** - * Sets a value on the form. - * - * @param {String} columnName The column name - * @param {Object} value The new value - **/ - ,set: function (columnName, value) - { - return this._model.set (this._row, columnName, value); - } - - /** - * Gets a value from the form using the column index. - * - * @param {String} columnName The column index - * @return {Object} The value - **/ - ,getByIndex: function (column) - { - return this._model.getByIndex (this._row, column); - } - - /** - * Sets a value on the form using the column index. - * - * @param {String} columnName The column index - * @param {Object} value The new value - **/ - ,setByIndex: function (column, value) - { - return this._model.setByIndex (this._row, column, value); - } - - /** - * Gets a param from the form. - * - * @param {String} columnName The column name - * @return {Db.Param} The new parameter - **/ - ,getParam: function (columnName) - { - return new Db.Param - ({ - form: this - ,column: columnName - }); - } }); diff --git a/package/usr/share/hedera-web/js/db/iterator.js b/package/usr/share/hedera-web/js/db/iterator.js new file mode 100755 index 00000000..b0f66a83 --- /dev/null +++ b/package/usr/share/hedera-web/js/db/iterator.js @@ -0,0 +1,147 @@ + +Db.Iterator = new Class +({ + Properties: + { + /** + * The model associated to this form. + **/ + model: + { + type: Db.Model + }, + /** + * The row where the form positioned, has -1 if the row is unselected. + **/ + row: + { + type: Number + }, + /** + * The number of rows in the form. + **/ + numRows: + { + type: Number + }, + /** + * Checks if the form data is ready. + **/ + ready: + { + type: Boolean + } + } + + ,_model: null + ,_row: -1 + + ,refresh: function () + { + if (this._model) + this._model.refresh (); + } + + /** + * Emits the 'iter-changed' signal on the form. + **/ + ,iterChanged: function () + { + this.signalEmit ('iter-changed'); + } + + /** + * Get the index of the column from its name. + * + * @param {String} columnName The column name + * @return {integer} The column index or -1 if column not exists + **/ + ,getColumnIndex: function (columnName) + { + if (this._model) + return this._model.getColumnIndex (columnName); + + return -1; + } + + ,insertRow: function () + { + if (this._model) + this.row = this._model.insertRow (); + } + + ,performOperations: function () + { + if (this._model) + this._model.performOperations (); + } + + /** + * Removes the current row. + **/ + ,deleteRow: function () + { + if (this._row >= 0) + this._model.deleteRow (this._row); + } + + /** + * Gets a value from the form. + * + * @param {String} columnName The column name + * @return {Object} The value + **/ + ,get: function (columnName) + { + return this._model.get (this._row, columnName); + } + + /** + * Sets a value on the form. + * + * @param {String} columnName The column name + * @param {Object} value The new value + **/ + ,set: function (columnName, value) + { + return this._model.set (this._row, columnName, value); + } + + /** + * Gets a value from the form using the column index. + * + * @param {String} columnName The column index + * @return {Object} The value + **/ + ,getByIndex: function (column) + { + return this._model.getByIndex (this._row, column); + } + + /** + * Sets a value on the form using the column index. + * + * @param {String} columnName The column index + * @param {Object} value The new value + **/ + ,setByIndex: function (column, value) + { + return this._model.setByIndex (this._row, column, value); + } + + /** + * Gets a param from the form. + * + * @param {String} columnName The column name + * @return {Db.Param} The new parameter + **/ + ,getParam: function (columnName) + { + return new Db.Param + ({ + form: this + ,column: columnName + }); + } +}); + diff --git a/package/usr/share/hedera-web/js/db/main.php b/package/usr/share/hedera-web/js/db/main.php index 3c8bb6ab..3744cab7 100755 --- a/package/usr/share/hedera-web/js/db/main.php +++ b/package/usr/share/hedera-web/js/db/main.php @@ -8,6 +8,7 @@ Vn\Hedera\Js::includeLib ('db' ,'result' ,'result-set' ,'model' + ,'iterator' ,'form' ,'param' ,'calc' diff --git a/package/usr/share/hedera-web/js/db/model.js b/package/usr/share/hedera-web/js/db/model.js index 17c93c9e..bd92d86f 100755 --- a/package/usr/share/hedera-web/js/db/model.js +++ b/package/usr/share/hedera-web/js/db/model.js @@ -418,7 +418,7 @@ Db.Model.implement && this.tables[tableIndex].pks.length > 0; if (!tableUpdatable) - console.warn ("DbModel: Table %s is not updatable", + console.warn ("Db.Model: Table %s is not updatable", this.tables[tableIndex].name); return tableUpdatable; diff --git a/package/usr/share/hedera-web/js/db/param.js b/package/usr/share/hedera-web/js/db/param.js index 15eb73bc..7eac6343 100755 --- a/package/usr/share/hedera-web/js/db/param.js +++ b/package/usr/share/hedera-web/js/db/param.js @@ -41,13 +41,31 @@ Db.Param = new Class { return this._form; } + }, + /** + * Determines whether the link to the form is unidirectional, ie, a + * change in the form updates the parameter but not vice versa. + **/ + oneWay: + { + type: Boolean + ,set: function (x) + { + this._oneWay = x; + } + ,get: function () + { + return this._oneWay; + } } } ,_columnName: null ,_form: null - ,formLock: false - ,columnIndex: -1 + ,_formLock: false + ,_columnIndex: -1 + ,_oneWay: false + ,_formValue: null ,initialize: function (props) { @@ -67,25 +85,33 @@ Db.Param = new Class ,onFormChange: function () { if (this._columnName != null) - this.columnIndex = this._form.getColumnIndex (this._columnName); + this._columnIndex = this._form.getColumnIndex (this._columnName); } ,onIterChange: function () { - this.formLock = true; - - if (this.columnIndex != -1) - this.value = this._form.getByIndex (this.columnIndex); - else - this.value = undefined; + this._formLock = true; - this.formLock = false; + var formValue; + + if (this._columnIndex != -1) + formValue = this._form.getByIndex (this._columnIndex); + else + formValue = null; + + if (formValue != this._formValue) + { + this.value = formValue; + this._formValue = formValue; + } + + this._formLock = false; } ,onChange: function () { - if (!this.formLock && this.columnIndex != -1) - this._form.setByIndex (this.columnIndex, this._value); + if (!this._formLock && this._columnIndex != -1 && !this.oneWay) + this._form.setByIndex (this._columnIndex, this._value); } }); diff --git a/package/usr/share/hedera-web/js/htk/assistant-bar.js b/package/usr/share/hedera-web/js/htk/assistant-bar.js new file mode 100644 index 00000000..9cfc8486 --- /dev/null +++ b/package/usr/share/hedera-web/js/htk/assistant-bar.js @@ -0,0 +1,116 @@ + +Htk.AssitantBar = new Class +({ + Extends: Htk.Widget + ,Tag: 'htk-assistant-bar' + ,Properties: + { + assistant: + { + type: Htk.Assistant + ,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.7) + '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.title = _('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.title = _('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/js/htk/assistant.js b/package/usr/share/hedera-web/js/htk/assistant.js new file mode 100644 index 00000000..cdf1b9fe --- /dev/null +++ b/package/usr/share/hedera-web/js/htk/assistant.js @@ -0,0 +1,109 @@ + +Htk.Assistant = 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); + } +}); + diff --git a/package/usr/share/hedera-web/js/htk/column.js b/package/usr/share/hedera-web/js/htk/column.js index ca5ae23c..52dc1c91 100755 --- a/package/usr/share/hedera-web/js/htk/column.js +++ b/package/usr/share/hedera-web/js/htk/column.js @@ -11,7 +11,7 @@ Htk.Column = new Class { value: { - type: Object + type: String ,value: null }, column: diff --git a/package/usr/share/hedera-web/js/htk/field.js b/package/usr/share/hedera-web/js/htk/field.js index fefd6f4e..498da991 100755 --- a/package/usr/share/hedera-web/js/htk/field.js +++ b/package/usr/share/hedera-web/js/htk/field.js @@ -8,7 +8,7 @@ Htk.Field = new Class { value: { - type: Object + type: String ,set: function (x) { if (Vn.Value.compare (x, this._value)) @@ -56,7 +56,7 @@ Htk.Field = new Class }, form: { - type: Db.Form + type: Vn.Object // Db.Iterator ,set: function (x) { this._form = x; diff --git a/package/usr/share/hedera-web/js/htk/field/select.js b/package/usr/share/hedera-web/js/htk/field/select.js index 78d6e530..05ee702c 100755 --- a/package/usr/share/hedera-web/js/htk/field/select.js +++ b/package/usr/share/hedera-web/js/htk/field/select.js @@ -1,6 +1,7 @@ Htk.Select = new Class ({ Extends: Htk.Field + ,Implements: Db.Iterator ,Tag: 'htk-combo' ,Properties: { @@ -19,9 +20,56 @@ Htk.Select = new Class { return this._model; } + }, + /** + * The row where the form positioned, has -1 if the row is unselected. + **/ + row: + { + type: Number + ,set: function (x) + { + if (!this._model || this._model.numRows <= x || x < -1) + x = -1; + if (x == this._row) + return; + + this._row = x; + this.iterChanged (); + } + ,get: function () + { + return this._row; + } + }, + /** + * The number of rows in the form. + **/ + numRows: + { + type: Number + ,get: function () + { + if (this._model) + return this._model.numRows; + + return 0; + } + }, + /** + * Checks if the form data is ready. + **/ + ready: + { + type: Boolean + ,get: function () + { + return this._ready; + } } } + ,_row: -1 ,_model: null ,valueColumnIndex: 0 ,valueColumnName: null @@ -35,6 +83,12 @@ Htk.Select = new Class this.node.addEventListener ('change', this.changed.bind (this)); } + ,setRow: function (row) + { + this._row = row; + this.iterChanged (); + } + ,changed: function (event) { var value; @@ -46,6 +100,7 @@ Htk.Select = new Class value = null; this.valueChanged (value); + this.setRow (row); } ,addOption: function (value, text) @@ -59,6 +114,7 @@ Htk.Select = new Class ,onModelChange: function () { var model = this._model; + this.signalEmit ('status-changed'); if (model.status == Db.Model.Status.LOADING) return; @@ -80,7 +136,8 @@ Htk.Select = new Class } case Db.Model.Status.ERROR: this.addOption (null, _('Error')); - break; + default: + this.setRow (-1); } } @@ -91,13 +148,19 @@ Htk.Select = new Class ,selectOption: function () { - if (!this._model || this._model.status != Db.Model.Status.READY) - return; + var row; + + if (this._model && this._model.status == Db.Model.Status.READY) + { + row = this._model.searchByIndex (this.valueColumnIndex, this._value); - var row = this._model.searchByIndex (this.valueColumnIndex, this._value); + if (row != -1) + this.node.selectedIndex = row + 1; + } + else + row = -1; - if (row != -1) - this.node.selectedIndex = row + 1; + this.setRow (row); } ,putValue: function (value) diff --git a/package/usr/share/hedera-web/js/htk/grid.js b/package/usr/share/hedera-web/js/htk/grid.js index d746ecb8..c45b68ef 100755 --- a/package/usr/share/hedera-web/js/htk/grid.js +++ b/package/usr/share/hedera-web/js/htk/grid.js @@ -32,6 +32,19 @@ Htk.Grid = new Class { type: String ,value: _('NoData') + }, + showHeader: + { + type: Boolean + ,set: function (x) + { + this._showHeader = x; + this.thead.style.display = x ? 'table-header-group' : 'none'; + } + ,get: function () + { + return this._showHeader; + } } } @@ -42,10 +55,11 @@ Htk.Grid = new Class ,internalColumns: 0 ,sortColumn: -1 ,sortWay: null + ,_showHeader: true - ,initialize: function () + ,initialize: function (props) { - this.parent (); + this.parent (props); this.table = this.createElement ('table'); this.table.className = 'htk-grid'; @@ -206,7 +220,7 @@ Htk.Grid = new Class this.tbody.appendChild (tr); var td = document.createElement ('td'); - td.className = 'grid-message'; + td.className = 'message'; td.colSpan = this.columns.length; tr.appendChild (td); diff --git a/package/usr/share/hedera-web/js/htk/main.php b/package/usr/share/hedera-web/js/htk/main.php index 4aed4c7f..f01f4c1b 100755 --- a/package/usr/share/hedera-web/js/htk/main.php +++ b/package/usr/share/hedera-web/js/htk/main.php @@ -11,6 +11,8 @@ Vn\Hedera\Js::includeLib ('htk' ,'grid' ,'full-image' ,'image-editor' + ,'assistant' + ,'assistant-bar' ,'field' ,'field/text' ,'field/html' diff --git a/package/usr/share/hedera-web/js/htk/repeater.js b/package/usr/share/hedera-web/js/htk/repeater.js index 9051915c..38bf6e18 100755 --- a/package/usr/share/hedera-web/js/htk/repeater.js +++ b/package/usr/share/hedera-web/js/htk/repeater.js @@ -35,8 +35,20 @@ Htk.Repeater = new Class { this._alias; } - }, - emptyMessage: + } + ,renderer: + { + type: Function + ,set: function (x) + { + this._renderer = x; + } + ,get: function () + { + this._renderer; + } + } + ,emptyMessage: { type: String ,value: _('NoData') @@ -71,6 +83,10 @@ Htk.Repeater = new Class builder.add (this._alias, form); var mainNode = builder.loadXmlFromNode (this.xml); + + if (this._renderer) + this._renderer (builder, index); + this.node.appendChild (mainNode); } diff --git a/package/usr/share/hedera-web/js/sql/value.js b/package/usr/share/hedera-web/js/sql/value.js index 5be89871..b90a55b3 100755 --- a/package/usr/share/hedera-web/js/sql/value.js +++ b/package/usr/share/hedera-web/js/sql/value.js @@ -29,7 +29,7 @@ Sql.Value = new Class **/ value: { - type: Object + type: String ,set: function (x) { if (Vn.Value.compare (x, this._value)) diff --git a/package/usr/share/hedera-web/js/vn/builder.js b/package/usr/share/hedera-web/js/vn/builder.js index 82724d45..f2d5d8fc 100755 --- a/package/usr/share/hedera-web/js/vn/builder.js +++ b/package/usr/share/hedera-web/js/vn/builder.js @@ -200,7 +200,7 @@ Vn.Builder = new Class var method = this.getMethod (nodeValue); c.object.on (nodeName.substr (3), method, this.signalData); } - else + else if (!/^(id|property)$/.test (nodeName)) { var prop = nodeName.replace (/-./g, this.replaceFunc); this.setProperty (c, prop, nodeValue); @@ -229,7 +229,13 @@ Vn.Builder = new Class { var prop = c.klass.Properties[propName]; - if (!prop || !value) + if (!prop) + { + console.warn ('Htk.Builder: Attribute \'%s\' not valid for tag \'%s\'', + propName, c.node.tagName); + return; + } + if (!value) return; switch (prop.type) @@ -241,7 +247,6 @@ Vn.Builder = new Class value = 0 + new Number (value); break; case String: - case Object: value = this.translateValue (value); break; case Function: @@ -273,6 +278,11 @@ Vn.Builder = new Class if (parentBuilder) this.signalData = parentBuilder.signalData; } + + ,$: function (objectId) + { + return this.get (objectId); + } ,get: function (objectId) { diff --git a/package/usr/share/hedera-web/js/vn/param.js b/package/usr/share/hedera-web/js/vn/param.js index 72cbf248..3e4f0ed1 100755 --- a/package/usr/share/hedera-web/js/vn/param.js +++ b/package/usr/share/hedera-web/js/vn/param.js @@ -9,7 +9,7 @@ Vn.Param = new Class { value: { - type: Object + type: String ,set: function (x) { if (Vn.Value.compare (x, this._value)) diff --git a/package/usr/share/hedera-web/locale/ca/js/htk.js b/package/usr/share/hedera-web/locale/ca/js/htk.js index e8e79069..bc423d21 100755 --- a/package/usr/share/hedera-web/locale/ca/js/htk.js +++ b/package/usr/share/hedera-web/locale/ca/js/htk.js @@ -22,4 +22,6 @@ Vn.Locale.add ,"UploadFile": "Putjar arxiu" ,"ImageAdded": "Imatge afegida correctament" ,"Close": "Tancar" + ,"Previous": "Anterior" + ,"Next": "Següent" }); diff --git a/package/usr/share/hedera-web/locale/es/forms/ecomerce/checkout.json b/package/usr/share/hedera-web/locale/es/forms/ecomerce/checkout.json index c61d1bae..95a9a23a 100755 --- a/package/usr/share/hedera-web/locale/es/forms/ecomerce/checkout.json +++ b/package/usr/share/hedera-web/locale/es/forms/ecomerce/checkout.json @@ -5,22 +5,24 @@ ,"NEXT": "SIGUIENTE" ,"DeliveryOrPickupQuestion": "¿Desea recibir o recoger el pedido?" - ,"Receive": "Recibir" - ,"Pickup": "Recoger" + ,"ReceiveThroughtAgency": "Recibir por agencia" + ,"ReceiveThroughtRoute": "Reparto Verdnatura" + ,"PickupInStore": "Recoger en almacén" ,"OrderDateDeliveryQuestion": "¿Qué día desea recibir el pedido?" ,"OrderDatePickupQuestion": "¿Qué día desea recoger el pedido?" ,"AddressQuestion": "¿Dónde desea recibir el pedido?" ,"AgencyQuestion": "¿Por qué agencia desea recibir el pedido?" - ,"PickupWarehouseQuestion": "¿En qué almacén desea recoger su pedido?" + ,"PickupWarehouseQuestion": "¿En qué almacén desea recoger el pedido?" ,"ConfirmToAccessCatalog": "Confirme los datos para acceder al catálogo" - ,"ArrivalOf": "Llegada el" - ,"PickupOf": "Recogida el" + ,"Arrival": "Llegada" + ,"Pickup": "Recogida" ,"%A, %e of %B": "%A, %e de %B" ,"Agency": "Agencia" ,"Warehouse": "Almacén" ,"CONFIRM": "CONFIRMAR" ,"ErrorCreatingOrder": "Error al crear el pedido" + ,"OrderStarted": "Pedido empezado" } diff --git a/package/usr/share/hedera-web/locale/es/forms/ecomerce/orders.json b/package/usr/share/hedera-web/locale/es/forms/ecomerce/orders.json index e933a81a..17ecab34 100755 --- a/package/usr/share/hedera-web/locale/es/forms/ecomerce/orders.json +++ b/package/usr/share/hedera-web/locale/es/forms/ecomerce/orders.json @@ -1,6 +1,6 @@ { - "StartedOrdersDesc": - "Pedidos pendientes de confirmar" + "OpenOrders": + "Pedidos abiertos" ,"StartOrder": "Empezar pedido" ,"ContinueOrder": "Continuar pedido" @@ -9,8 +9,8 @@ ,"DateExit": "Fecha de salida" ,"SendMethod": "Forma de envío" - ,"ConfirmedOrdersDesc": - "Pedidos confirmados más recientes" + ,"ConfirmedOrders": + "Pedidos confirmados" ,"PendingBalance:": "Saldo pendiente:" ,"PaymentInfo": "Para realizar una entrega a cuenta pulse en el botón de la derecha y haga el pago en la empresa correspondiente. La cantidad que aparece es el saldo pendiente a día de hoy, no tiene en cuenta pedidos del futuro. Puede realizar una entrega a cuenta de la cantidad que desee. Si desea pagar un pedido en concreto puede pulsar directamente en el botón de pago del pedido." @@ -31,4 +31,6 @@ ,"AmountToPay:": "Cantidad a pagar (€):" ,"AmountError": "La cantidad debe ser un número positivo e inferior o igual al importe pendiente" ,"PayError": "Error al realizar el pago" + + ,"%A, %e of %B": "%A, %e de %B" } diff --git a/package/usr/share/hedera-web/locale/es/js/htk.js b/package/usr/share/hedera-web/locale/es/js/htk.js index 22ef9dc7..53ef633e 100755 --- a/package/usr/share/hedera-web/locale/es/js/htk.js +++ b/package/usr/share/hedera-web/locale/es/js/htk.js @@ -22,4 +22,6 @@ Vn.Locale.add ,"UploadFile": "Subir archivo" ,"ImageAdded": "Imagen añadida correctamente" ,"Close": "Cerrar" + ,"Previous": "Anterior" + ,"Next": "Siguiente" }); diff --git a/package/usr/share/hedera-web/locale/fr/js/htk.js b/package/usr/share/hedera-web/locale/fr/js/htk.js index 31b08680..a3b6d339 100755 --- a/package/usr/share/hedera-web/locale/fr/js/htk.js +++ b/package/usr/share/hedera-web/locale/fr/js/htk.js @@ -22,4 +22,6 @@ Vn.Locale.add ,"UploadFile": "Télécharger le fichier" ,"ImageAdded": "Image ajoutée correctement" ,"Close": "Croche" + ,"Previous": "Précédent" + ,"Next": "Suivant" }); diff --git a/package/usr/share/hedera-web/locale/mn/js/htk.js b/package/usr/share/hedera-web/locale/mn/js/htk.js index 22ef9dc7..6e5f16bf 100755 --- a/package/usr/share/hedera-web/locale/mn/js/htk.js +++ b/package/usr/share/hedera-web/locale/mn/js/htk.js @@ -22,4 +22,6 @@ Vn.Locale.add ,"UploadFile": "Subir archivo" ,"ImageAdded": "Imagen añadida correctamente" ,"Close": "Cerrar" + ,"Previous": "Anterior" + ,"Next": "Següent" });