diff --git a/package/DEBIAN/control b/package/DEBIAN/control index 940c7fac..278a3b82 100644 --- a/package/DEBIAN/control +++ b/package/DEBIAN/control @@ -1,5 +1,5 @@ Package: hedera-web -Version: 1.0-42 +Version: 1.0-43 Architecture: all Maintainer: Juan Ferrer Toribio Depends: apache2, php5-mysql, php-vn-web diff --git a/package/usr/share/hedera-web/forms/account/address/address.js b/package/usr/share/hedera-web/forms/account/address/address.js new file mode 100755 index 00000000..1b5b86b1 --- /dev/null +++ b/package/usr/share/hedera-web/forms/account/address/address.js @@ -0,0 +1,36 @@ + +Vn.Address = new Class +({ + Extends: Vn.Module + + ,activate: function () + { + this.$('return').addEventListener ('click', this.onReturnClick.bind (this)); + this.$('accept').addEventListener ('click', this.onAcceptClick.bind (this)); + this.$('iter').on ('status-changed', this.onStatusChange, this); + this.$('model').on ('operations-done', this.onOperationsDone, this); + } + + ,onStatusChange: function (form) + { + if (this.$('address').value == 0) + form.insertRow (); + } + + ,onOperationsDone: function () + { + (new Htk.Toast ()).showMessage (_('ConsigneeChangedSuccessfully')); + this.onReturnClick (); + } + + ,onAcceptClick: function () + { + this.$('iter').performOperations (); + } + + ,onReturnClick: function () + { + window.history.back(); + } +}); + diff --git a/package/usr/share/hedera-web/forms/account/address/style.css b/package/usr/share/hedera-web/forms/account/address/style.css new file mode 100755 index 00000000..f26a2151 --- /dev/null +++ b/package/usr/share/hedera-web/forms/account/address/style.css @@ -0,0 +1,31 @@ + +.address +{ + padding: 1em; +} +.address .box +{ + max-width: 40em; +} +.address .box .body +{ + margin: 0 auto; + max-width: 25em; + padding: 3em; +} +div.form-group +{ + padding: 0.4em; +} +.address label +{ + display: block; + margin-bottom: 0.5em; +} +.address input, +.address select +{ + margin: 0; + width: 100%; +} + diff --git a/package/usr/share/hedera-web/forms/account/address/ui.xml b/package/usr/share/hedera-web/forms/account/address/ui.xml new file mode 100755 index 00000000..b242253f --- /dev/null +++ b/package/usr/share/hedera-web/forms/account/address/ui.xml @@ -0,0 +1,61 @@ + + + + + + + + SELECT id, name, consignee, city, zip_code, province_id + FROM address_view + WHERE active != FALSE AND id = #address + + + + + + +
+
+
+

EditConsignee

+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + + + SELECT province_id, name FROM vn2008.province + ORDER BY name + + +
+
+
+
+
diff --git a/package/usr/share/hedera-web/forms/account/account.js b/package/usr/share/hedera-web/forms/account/conf/conf.js similarity index 91% rename from package/usr/share/hedera-web/forms/account/account.js rename to package/usr/share/hedera-web/forms/account/conf/conf.js index 41f9b067..388281a9 100755 --- a/package/usr/share/hedera-web/forms/account/account.js +++ b/package/usr/share/hedera-web/forms/account/conf/conf.js @@ -1,5 +1,5 @@ -Vn.Account = new Class +Vn.Conf = new Class ({ Extends: Vn.Module @@ -13,6 +13,15 @@ Vn.Account = new Class this.$('new-password').addEventListener ('change', this.onPasswordChange.bind (this)); this.$('repeat-password').addEventListener ('change', this.onPasswordChange.bind (this)); this.$('user-name').addEventListener ('change', this.onUserChange.bind (this)); + this.$('add').addEventListener ('click', this.onAddClick.bind (this)); + } + + ,onAddClick: function () + { + this.hash.set ({ + 'form': 'account/address', + 'address': 0 + }); } ,onUserDataReady: function (form) diff --git a/package/usr/share/hedera-web/forms/account/conf/style.css b/package/usr/share/hedera-web/forms/account/conf/style.css new file mode 100755 index 00000000..35b1707d --- /dev/null +++ b/package/usr/share/hedera-web/forms/account/conf/style.css @@ -0,0 +1,42 @@ + +.conf +{ + padding: 1em; +} +.conf .box +{ + max-width: 40em; +} +.conf .form +{ + margin: 0 auto; + max-width: 25em; + padding: 2em; +} +.conf .form-group +{ + padding: 0.4em; +} +.conf .form-group label +{ + display: block; + margin-bottom: 0.5em; +} +.conf .form-group input[type=text], +.conf .form-group input[type=password] +{ + margin: 0; + width: 100%; +} +.conf .form-group input[type=password] +{ + margin-bottom: 0.5em; +} +.consignee +{ + margin-bottom: 1em; +} +.consignee p +{ + margin: 0.2em 0; +} diff --git a/package/usr/share/hedera-web/forms/account/ui.xml b/package/usr/share/hedera-web/forms/account/conf/ui.xml similarity index 53% rename from package/usr/share/hedera-web/forms/account/ui.xml rename to package/usr/share/hedera-web/forms/account/conf/ui.xml index ede9c083..f604f7f6 100755 --- a/package/usr/share/hedera-web/forms/account/ui.xml +++ b/package/usr/share/hedera-web/forms/account/conf/ui.xml @@ -8,8 +8,14 @@ ON u.id = c.user_id + + SELECT id, consignee, p.name province, zip_code, city, a.name + FROM address_view a + JOIN vn2008.province p ON a.province_id = p.province_id + WHERE active != FALSE + -
+

Configuration

@@ -17,7 +23,7 @@
- +
@@ -38,5 +44,33 @@
+
+
+

Consignees

+
+ +
+
+
+ +
+

+

+ +

+

+ - + +

+

+ +

+
+
+
+
diff --git a/package/usr/share/hedera-web/forms/account/style.css b/package/usr/share/hedera-web/forms/account/style.css deleted file mode 100755 index 44bdd429..00000000 --- a/package/usr/share/hedera-web/forms/account/style.css +++ /dev/null @@ -1,34 +0,0 @@ - -.account -{ - padding: 1em; -} -.account .box -{ - max-width: 40em; -} -.account .form -{ - margin: 0 auto; - max-width: 25em; - padding: 2em; -} -.account .form-group -{ - padding: 0.4em; -} -.account .form-group label -{ - display: block; - margin-bottom: 0.5em; -} -.account .form-group input[type=text], -.account .form-group input[type=password] -{ - margin: 0; - width: 100%; -} -.account .form-group input[type=password] -{ - margin-bottom: 0.5em; -} diff --git a/package/usr/share/hedera-web/forms/ecomerce/catalog/catalog.js b/package/usr/share/hedera-web/forms/ecomerce/catalog/catalog.js index 3a069924..805f52fe 100755 --- a/package/usr/share/hedera-web/forms/ecomerce/catalog/catalog.js +++ b/package/usr/share/hedera-web/forms/ecomerce/catalog/catalog.js @@ -12,6 +12,7 @@ Vn.Catalog = new Class model.setFieldFlags ('id', Db.Conn.Flag.AI); model.setFieldFlags ('Id_Article', Db.Conn.Flag.PRI_KEY); + this.$('price').renderer = this.priceRenderer; this.$('type-column').renderer = this.typeRenderer.bind (this); this.$('cat').renderer = this.catRenderer; this.$('basket-button').addEventListener ('click', this.basketClicked.bind (this)); @@ -26,17 +27,12 @@ Vn.Catalog = new Class this.$('warehouse').value = 1; this.$('date').value = new Date (); - if (!Vn.Url.getQuery ('guest')) - { - var orderId = Vn.Cookie.getInt ('order'); - - if (!orderId) - this.configureView (); - else - this.$('order-batch').addValue ('order', orderId); - } + var orderId = Vn.Cookie.getInt ('order'); + + if (!orderId) + this.configureView (); else - this.$('order').value = 0; + this.$('order-batch').addValue ('order', orderId); } ,onRealmsReload: function (model, status) @@ -189,17 +185,6 @@ Vn.Catalog = new Class Vn.Cookie.unset ('order'); this.$('order').value = orderId; - - var priceCol = new Htk.ColumnSpin - ({ - title: 'Price' - ,digits: 2 - ,unit: '€' - ,column: 'price' - ,renderer: this.priceRenderer - }); - grid.insertColumn (11, priceCol); - this.$('basket-button').disabled = false; } diff --git a/package/usr/share/hedera-web/forms/ecomerce/catalog/ui.xml b/package/usr/share/hedera-web/forms/ecomerce/catalog/ui.xml index 378e1aaf..247af0f9 100755 --- a/package/usr/share/hedera-web/forms/ecomerce/catalog/ui.xml +++ b/package/usr/share/hedera-web/forms/ecomerce/catalog/ui.xml @@ -28,8 +28,7 @@ CALL item (#warehouse, #date); SELECT i.grouping, m.amount, Foto, i.available, Article, Categoria, - Medida, Tallos, Color, o.Abreviatura, price, fixed, m.id, - Id_Article + Medida, Tallos, Color, o.Abreviatura, price, fixed, m.id, Id_Article FROM vn2008.Articles a INNER JOIN vn2008.item_catalog i ON i.item_id = a.Id_Article LEFT JOIN vn2008.Origen o ON a.id_origen = o.id @@ -106,6 +105,7 @@ +

AddNew

+
+ + +
- +
- + SELECT name, description FROM news_tag ORDER BY description @@ -37,10 +47,6 @@