forked from verdnatura/hedera-web
Bug Db.Param.oneWay fixed
This commit is contained in:
parent
7b10868dea
commit
65791be9d5
|
@ -1,4 +1,4 @@
|
|||
hedera-web (1.405.94) stable; urgency=low
|
||||
hedera-web (1.405.95) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -1,35 +1,28 @@
|
|||
|
||||
Hedera.Address = new Class
|
||||
({
|
||||
Extends: Hedera.Form
|
||||
Hedera.Address = new Class({
|
||||
Extends: Hedera.Form,
|
||||
|
||||
,activate: function ()
|
||||
{
|
||||
this.$('model').setInfo ('a', 'myAddress', 'hedera', ['id'], 'id');
|
||||
this.$('model').setDefault ('clientFk', 'a',
|
||||
new Sql.Function ({schema: 'account', name: 'myUserGetId'}));
|
||||
}
|
||||
activate: function() {
|
||||
this.$('model').setInfo('a', 'myAddress', 'hedera', ['id'], 'id');
|
||||
this.$('model').setDefault('clientFk', 'a',
|
||||
new Sql.Function({schema: 'account', name: 'myUserGetId'}));
|
||||
},
|
||||
|
||||
,onStatusChange: function (form)
|
||||
{
|
||||
onStatusChange: function(form) {
|
||||
if (form.ready && this.$('address').value == 0)
|
||||
form.insertRow ();
|
||||
}
|
||||
form.insertRow();
|
||||
},
|
||||
|
||||
,onOperationsDone: function ()
|
||||
{
|
||||
Htk.Toast.showMessage (_('AddressChangedSuccessfully'));
|
||||
this.onReturnClick ();
|
||||
}
|
||||
onOperationsDone: function() {
|
||||
Htk.Toast.showMessage(_('AddressChangedSuccessfully'));
|
||||
this.onReturnClick();
|
||||
},
|
||||
|
||||
,onAcceptClick: function ()
|
||||
{
|
||||
this.$('iter').performOperations ();
|
||||
}
|
||||
onAcceptClick: function() {
|
||||
this.$('iter').performOperations();
|
||||
},
|
||||
|
||||
,onReturnClick: function ()
|
||||
{
|
||||
onReturnClick: function() {
|
||||
window.history.back();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -9,14 +9,12 @@
|
|||
updatable="true"
|
||||
mode="ON_DEMAND"
|
||||
on-operations-done="onOperationsDone">
|
||||
<custom>
|
||||
SELECT a.id, a.street, a.nickname, a.city,
|
||||
a.postalCode, a.provinceFk, c.id countryFk
|
||||
FROM myAddress a
|
||||
LEFT JOIN vn.province p ON p.id = a.provinceFk
|
||||
JOIN vn.country c ON c.id = p.countryFk
|
||||
WHERE a.id = #address
|
||||
</custom>
|
||||
SELECT a.id, a.street, a.nickname, a.city,
|
||||
a.postalCode, a.provinceFk, c.id countryFk
|
||||
FROM myAddress a
|
||||
LEFT JOIN vn.province p ON p.id = a.provinceFk
|
||||
JOIN vn.country c ON c.id = p.countryFk
|
||||
WHERE a.id = #address
|
||||
<sql-batch property="batch">
|
||||
<custom>
|
||||
<item name="address" param="address"/>
|
||||
|
@ -67,10 +65,8 @@
|
|||
column="countryFk"
|
||||
one-way="true"/>
|
||||
<db-model property="model">
|
||||
<custom>
|
||||
SELECT id, country FROM vn.country
|
||||
ORDER BY country
|
||||
</custom>
|
||||
SELECT id, country FROM vn.country
|
||||
ORDER BY country
|
||||
</db-model>
|
||||
</htk-combo>
|
||||
</div>
|
||||
|
@ -78,11 +74,9 @@
|
|||
<label><t>Province</t></label>
|
||||
<htk-combo column="provinceFk" form="iter">
|
||||
<db-model property="model">
|
||||
<custom>
|
||||
SELECT id, name FROM vn.province
|
||||
WHERE countryFk = #country
|
||||
ORDER BY name
|
||||
</custom>
|
||||
SELECT id, name FROM vn.province
|
||||
WHERE countryFk = #country
|
||||
ORDER BY name
|
||||
<sql-batch property="batch">
|
||||
<custom>
|
||||
<item name="country" param="country"/>
|
||||
|
|
|
@ -93,6 +93,9 @@ module.exports = new Class
|
|||
|
||||
,onIterChange: function ()
|
||||
{
|
||||
if (this._oneWay && this.value != null)
|
||||
return;
|
||||
|
||||
this._formLock = true;
|
||||
|
||||
var formValue;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hedera-web",
|
||||
"version": "1.405.94",
|
||||
"version": "1.405.95",
|
||||
"description": "Verdnatura web page",
|
||||
"license": "GPL-3.0",
|
||||
"repository": {
|
||||
|
|
Loading…
Reference in New Issue