0
1
Fork 0

Bug Db.Param.oneWay fixed

This commit is contained in:
Juan 2018-05-16 17:21:15 +02:00
parent 7b10868dea
commit 65791be9d5
5 changed files with 34 additions and 44 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.405.94) stable; urgency=low hedera-web (1.405.95) stable; urgency=low
* Initial Release. * Initial Release.

View File

@ -1,35 +1,28 @@
Hedera.Address = new Class Hedera.Address = new Class({
({ Extends: Hedera.Form,
Extends: Hedera.Form
,activate: function () activate: function() {
{ this.$('model').setInfo('a', 'myAddress', 'hedera', ['id'], 'id');
this.$('model').setInfo ('a', 'myAddress', 'hedera', ['id'], 'id'); this.$('model').setDefault('clientFk', 'a',
this.$('model').setDefault ('clientFk', 'a', new Sql.Function({schema: 'account', name: 'myUserGetId'}));
new Sql.Function ({schema: 'account', name: 'myUserGetId'})); },
}
,onStatusChange: function (form) onStatusChange: function(form) {
{
if (form.ready && this.$('address').value == 0) if (form.ready && this.$('address').value == 0)
form.insertRow (); form.insertRow();
} },
,onOperationsDone: function () onOperationsDone: function() {
{ Htk.Toast.showMessage(_('AddressChangedSuccessfully'));
Htk.Toast.showMessage (_('AddressChangedSuccessfully')); this.onReturnClick();
this.onReturnClick (); },
}
,onAcceptClick: function () onAcceptClick: function() {
{ this.$('iter').performOperations();
this.$('iter').performOperations (); },
}
,onReturnClick: function () onReturnClick: function() {
{
window.history.back(); window.history.back();
} }
}); });

View File

@ -9,14 +9,12 @@
updatable="true" updatable="true"
mode="ON_DEMAND" mode="ON_DEMAND"
on-operations-done="onOperationsDone"> on-operations-done="onOperationsDone">
<custom> SELECT a.id, a.street, a.nickname, a.city,
SELECT a.id, a.street, a.nickname, a.city, a.postalCode, a.provinceFk, c.id countryFk
a.postalCode, a.provinceFk, c.id countryFk FROM myAddress a
FROM myAddress a LEFT JOIN vn.province p ON p.id = a.provinceFk
LEFT JOIN vn.province p ON p.id = a.provinceFk JOIN vn.country c ON c.id = p.countryFk
JOIN vn.country c ON c.id = p.countryFk WHERE a.id = #address
WHERE a.id = #address
</custom>
<sql-batch property="batch"> <sql-batch property="batch">
<custom> <custom>
<item name="address" param="address"/> <item name="address" param="address"/>
@ -67,10 +65,8 @@
column="countryFk" column="countryFk"
one-way="true"/> one-way="true"/>
<db-model property="model"> <db-model property="model">
<custom> SELECT id, country FROM vn.country
SELECT id, country FROM vn.country ORDER BY country
ORDER BY country
</custom>
</db-model> </db-model>
</htk-combo> </htk-combo>
</div> </div>
@ -78,11 +74,9 @@
<label><t>Province</t></label> <label><t>Province</t></label>
<htk-combo column="provinceFk" form="iter"> <htk-combo column="provinceFk" form="iter">
<db-model property="model"> <db-model property="model">
<custom> SELECT id, name FROM vn.province
SELECT id, name FROM vn.province WHERE countryFk = #country
WHERE countryFk = #country ORDER BY name
ORDER BY name
</custom>
<sql-batch property="batch"> <sql-batch property="batch">
<custom> <custom>
<item name="country" param="country"/> <item name="country" param="country"/>

View File

@ -93,6 +93,9 @@ module.exports = new Class
,onIterChange: function () ,onIterChange: function ()
{ {
if (this._oneWay && this.value != null)
return;
this._formLock = true; this._formLock = true;
var formValue; var formValue;

View File

@ -1,6 +1,6 @@
{ {
"name": "hedera-web", "name": "hedera-web",
"version": "1.405.94", "version": "1.405.95",
"description": "Verdnatura web page", "description": "Verdnatura web page",
"license": "GPL-3.0", "license": "GPL-3.0",
"repository": { "repository": {