refs #3971 Htk.Select: Display value when no row
gitea/hedera-web/pipeline/head This commit looks good
Details
gitea/hedera-web/pipeline/head This commit looks good
Details
This commit is contained in:
parent
ca61ee24ce
commit
8978172515
|
@ -1,4 +1,4 @@
|
|||
hedera-web (22.46.16) stable; urgency=low
|
||||
hedera-web (22.46.17) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -140,13 +140,6 @@ module.exports = new Class({
|
|||
this.iterChanged();
|
||||
}
|
||||
|
||||
,_onEraseMouseDown(event) {
|
||||
if (event.defaultPrevented) return;
|
||||
event.preventDefault();
|
||||
this._setRow(-1);
|
||||
this.valueChanged(undefined);
|
||||
}
|
||||
|
||||
,_onButtonMouseDown(event) {
|
||||
if (this._popup) {
|
||||
this._popup.hide();
|
||||
|
@ -197,29 +190,41 @@ module.exports = new Class({
|
|||
else
|
||||
value = null;
|
||||
|
||||
this._setRow(row);
|
||||
this.valueChanged(value);
|
||||
this._setMyValue(row, value);
|
||||
this._popup.hide();
|
||||
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
||||
,_onEraseMouseDown(event) {
|
||||
if (event.defaultPrevented) return;
|
||||
event.preventDefault();
|
||||
this._setMyValue(-1, undefined);
|
||||
}
|
||||
|
||||
,_setMyValue(row, value) {
|
||||
this._myValue = value;
|
||||
this._setRow(row);
|
||||
this.valueChanged(value);
|
||||
}
|
||||
|
||||
,_onPopupClose() {
|
||||
this._popup = null;
|
||||
this.emit('menu-hide');
|
||||
}
|
||||
|
||||
,_refreshShowText() {
|
||||
var model = this._model;
|
||||
const model = this._model;
|
||||
let showText = '';
|
||||
|
||||
if (this._row !== -1)
|
||||
var showText = model.getByIndex(this._row, this.showColumnIndex);
|
||||
showText = model.getByIndex(this._row, this.showColumnIndex);
|
||||
else if (model && model.status === Db.Model.Status.LOADING)
|
||||
var showText = _('Loading...');
|
||||
showText = _('Loading...');
|
||||
else if (this._myValue != null)
|
||||
showText = this._myValue;
|
||||
else if (this._placeholder)
|
||||
var showText = this._placeholder;
|
||||
else
|
||||
var showText = '';
|
||||
showText = this._placeholder;
|
||||
|
||||
Vn.Node.setText(this.label, showText);
|
||||
}
|
||||
|
@ -246,7 +251,7 @@ module.exports = new Class({
|
|||
var row;
|
||||
|
||||
if (this._model && this._model.ready)
|
||||
row = this._model.searchByIndex(this.valueColumnIndex, this._value);
|
||||
row = this._model.searchByIndex(this.valueColumnIndex, this._myValue);
|
||||
else
|
||||
row = -1;
|
||||
|
||||
|
@ -254,6 +259,7 @@ module.exports = new Class({
|
|||
}
|
||||
|
||||
,putValue() {
|
||||
this._myValue = this._value;
|
||||
this._selectOption();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hedera-web",
|
||||
"version": "22.46.16",
|
||||
"version": "22.46.17",
|
||||
"description": "Verdnatura web page",
|
||||
"license": "GPL-3.0",
|
||||
"repository": {
|
||||
|
|
Loading…
Reference in New Issue