From fd6f39371a86e8a60c847d7a4c7a487cefaba421 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Sat, 18 Jun 2022 23:04:34 +0200 Subject: [PATCH] Builder refactor, various fixes --- debian/changelog | 2 +- forms/account/address-list/ui.xml | 2 +- forms/account/address/ui.xml | 2 +- forms/account/conf/ui.xml | 37 +- forms/admin/access-log/ui.xml | 12 +- forms/admin/connections/ui.xml | 2 +- forms/admin/items/ui.xml | 2 +- forms/admin/visits/ui.xml | 2 +- forms/cms/home/ui.xml | 2 +- forms/ecomerce/basket/ui.xml | 9 +- forms/ecomerce/catalog/catalog.js | 13 +- forms/ecomerce/catalog/ui.xml | 56 ++- forms/ecomerce/orders/ui.xml | 8 +- forms/ecomerce/ticket/ticket.js | 28 +- forms/ecomerce/ticket/ui.xml | 78 ++-- forms/news/news/ui.xml | 4 +- js/db/model.js | 1 + js/hedera/form.js | 4 +- js/hedera/report.js | 2 +- js/htk/columns/button/style.scss | 2 + js/htk/repeater/index.js | 32 +- js/vn/builder.js | 597 +++--------------------------- js/vn/compiler-element.js | 85 +++++ js/vn/compiler-object.js | 216 +++++++++++ js/vn/compiler-text.js | 33 ++ js/vn/compiler.js | 150 ++++++++ js/vn/lot.js | 6 +- js/vn/scope.js | 112 +++++- package.json | 2 +- web/html-service.php | 2 +- web/service.php | 5 +- 31 files changed, 745 insertions(+), 763 deletions(-) create mode 100644 js/vn/compiler-element.js create mode 100644 js/vn/compiler-object.js create mode 100644 js/vn/compiler-text.js create mode 100644 js/vn/compiler.js diff --git a/debian/changelog b/debian/changelog index 36fc6419..62ff773b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (1.407.79) stable; urgency=low +hedera-web (1.407.80) stable; urgency=low * Initial Release. diff --git a/forms/account/address-list/ui.xml b/forms/account/address-list/ui.xml index 9232a038..b97313bb 100644 --- a/forms/account/address-list/ui.xml +++ b/forms/account/address-list/ui.xml @@ -60,7 +60,7 @@ + on-click="this.onRemoveAddressClick($iter)"/> + on-click="iter.performOperations()"/>
diff --git a/forms/account/conf/ui.xml b/forms/account/conf/ui.xml index 28136d09..cc60d89a 100644 --- a/forms/account/conf/ui.xml +++ b/forms/account/conf/ui.xml @@ -1,22 +1,18 @@ - + - - SELECT length, nAlpha, nUpper, nDigits, nPunct - FROM account.userPassword - + SELECT length, nAlpha, nUpper, nDigits, nPunct + FROM account.userPassword - - SELECT u.id, u.name, u.email, u.nickname, - u.lang, c.isToBeMailed, c.id clientFk - FROM account.myUser u - LEFT JOIN myClient c - ON u.id = c.id - + SELECT u.id, u.name, u.email, u.nickname, + u.lang, c.isToBeMailed, c.id clientFk + FROM account.myUser u + LEFT JOIN myClient c + ON u.id = c.id @@ -27,7 +23,7 @@ + on-click="hash.setAll({form: 'account/address-list'})"/>
  • - - characters long + {{passwordForm.length}} characters long
  • - - alphabetic characters + {{passwordForm.nAlpha}} alphabetic characters
  • - - capital letters + {{passwordForm.nUpper}} capital letters
  • - - digits + {{passwordForm.nDigits}} digits
  • - - symbols + {{passwordForm.nPunct}} symbols
diff --git a/forms/admin/access-log/ui.xml b/forms/admin/access-log/ui.xml index f4b9b1b8..ebe24628 100644 --- a/forms/admin/access-log/ui.xml +++ b/forms/admin/access-log/ui.xml @@ -1,6 +1,6 @@ - + SELECT u.id, u.name user, u.nickname, u.email, c.phone, r.name role FROM account.user u @@ -16,11 +16,11 @@
-

-

# -

-

-

-

+

{{user.nickname}}

+

#{{user.id}} - {{user.user}}

+

{{user.role}}

+

{{user.email}}

+

{{user.phone}}

diff --git a/forms/admin/connections/ui.xml b/forms/admin/connections/ui.xml index 65b25336..487938fa 100644 --- a/forms/admin/connections/ui.xml +++ b/forms/admin/connections/ui.xml @@ -6,7 +6,7 @@ + on-click="sessions.refresh()"/>
+ on-click="visits.refresh()"/> + on-click="hash.setAll({form: 'ecomerce/catalog'})"/>
diff --git a/forms/ecomerce/basket/ui.xml b/forms/ecomerce/basket/ui.xml index 6d05ae55..8a6d1f0a 100644 --- a/forms/ecomerce/basket/ui.xml +++ b/forms/ecomerce/basket/ui.xml @@ -44,19 +44,16 @@ class="delete" tip="_Remove" icon="delete" - on-click="this.onDeleteClick($.iter)"/> + on-click="this.onDeleteClick($iter)"/>
-

- -

+

{{iter.item}}

{{iter.value5}} {{iter.value6}} {{iter.value7}}

diff --git a/forms/ecomerce/catalog/catalog.js b/forms/ecomerce/catalog/catalog.js index 74ae04f9..0f50ea19 100644 --- a/forms/ecomerce/catalog/catalog.js +++ b/forms/ecomerce/catalog/catalog.js @@ -169,13 +169,6 @@ Hedera.Catalog = new Class({ Hedera.Catalog.View.GRID : Hedera.Catalog.View.LIST); } - ,onBasketReady: function(form) { - if (form.$.method != 'PICKUP') - Vn.Node.setText(this.$.method, _('Agency')); - else - Vn.Node.setText(this.$.method, _('Warehouse')); - } - ,onItemsChange: function(model, status) { if (status !== Db.Model.Status.CLEAN) this.$.order.style.display = 'block'; @@ -255,7 +248,7 @@ Hedera.Catalog = new Class({ if (this.isGuest()) return; this.onEraseClick(); - this.$.card.row = form.row; + this.$.$card.row = form.row; this.$.cardLot.assign({item: form.$.id}); this.$.cardPopup.show(event.currentTarget); } @@ -303,7 +296,7 @@ Hedera.Catalog = new Class({ if (amountSum > 0) { this.conn.execQuery(sql); - var itemName = this.$.card.get('item'); + var itemName = this.$.$card.get('item'); Htk.Toast.showMessage( Vn.Value.sprintf(_('Added%dOf%s'), amountSum, itemName)); } @@ -318,7 +311,7 @@ Hedera.Catalog = new Class({ ,onPopupClose: function() { this.onEraseClick(); - this.$.card.row = -1; + this.$.$card.row = -1; this.$.cardLot.value = undefined; } diff --git a/forms/ecomerce/catalog/ui.xml b/forms/ecomerce/catalog/ui.xml index 7a209c51..46c94c4f 100644 --- a/forms/ecomerce/catalog/ui.xml +++ b/forms/ecomerce/catalog/ui.xml @@ -87,7 +87,7 @@ param="producer"/> - + SELECT b.id, b.sent, a.description agency, m.code method FROM myBasket b @@ -108,7 +108,7 @@ JOIN vn.itemType t ON t.id = i.typeFk WHERE #filter; CALL myBasket_calcCatalogFull; - SELECT i.id, i.description, i.longName item, i.subName, + SELECT i.id, i.longName item, i.subName, i.tag5, i.value5, i.tag6, i.value6, i.tag7, i.value7, i.relevancy, i.size, i.category, k.name ink, p.name producer, o.name origin, @@ -126,7 +126,7 @@ ORDER BY i.relevancy DESC, i.name, i.size LIMIT 5000; - +
@@ -135,17 +135,17 @@ id="grid-view" empty-message="_Choose filter from right menu" form-id="item" - model="items" > + model="items">
+ on-click="this.onAddItemClick($event, $iter)">
+

{{Vn.Value.format(basket.sent, '%D')}}

- -

-

- - + {{_(basket.method != 'PICKUP' ? 'Agency' : 'Warehouse')}} + {{basket.agency}}