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.
|
* Initial Release.
|
||||||
|
|
||||||
|
|
|
@ -139,13 +139,6 @@ module.exports = new Class({
|
||||||
this._refreshShowText();
|
this._refreshShowText();
|
||||||
this.iterChanged();
|
this.iterChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
,_onEraseMouseDown(event) {
|
|
||||||
if (event.defaultPrevented) return;
|
|
||||||
event.preventDefault();
|
|
||||||
this._setRow(-1);
|
|
||||||
this.valueChanged(undefined);
|
|
||||||
}
|
|
||||||
|
|
||||||
,_onButtonMouseDown(event) {
|
,_onButtonMouseDown(event) {
|
||||||
if (this._popup) {
|
if (this._popup) {
|
||||||
|
@ -197,12 +190,23 @@ module.exports = new Class({
|
||||||
else
|
else
|
||||||
value = null;
|
value = null;
|
||||||
|
|
||||||
this._setRow(row);
|
this._setMyValue(row, value);
|
||||||
this.valueChanged(value);
|
|
||||||
this._popup.hide();
|
this._popup.hide();
|
||||||
|
|
||||||
e.stopPropagation();
|
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() {
|
,_onPopupClose() {
|
||||||
this._popup = null;
|
this._popup = null;
|
||||||
|
@ -210,16 +214,17 @@ module.exports = new Class({
|
||||||
}
|
}
|
||||||
|
|
||||||
,_refreshShowText() {
|
,_refreshShowText() {
|
||||||
var model = this._model;
|
const model = this._model;
|
||||||
|
let showText = '';
|
||||||
|
|
||||||
if (this._row !== -1)
|
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)
|
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)
|
else if (this._placeholder)
|
||||||
var showText = this._placeholder;
|
showText = this._placeholder;
|
||||||
else
|
|
||||||
var showText = '';
|
|
||||||
|
|
||||||
Vn.Node.setText(this.label, showText);
|
Vn.Node.setText(this.label, showText);
|
||||||
}
|
}
|
||||||
|
@ -246,7 +251,7 @@ module.exports = new Class({
|
||||||
var row;
|
var row;
|
||||||
|
|
||||||
if (this._model && this._model.ready)
|
if (this._model && this._model.ready)
|
||||||
row = this._model.searchByIndex(this.valueColumnIndex, this._value);
|
row = this._model.searchByIndex(this.valueColumnIndex, this._myValue);
|
||||||
else
|
else
|
||||||
row = -1;
|
row = -1;
|
||||||
|
|
||||||
|
@ -254,6 +259,7 @@ module.exports = new Class({
|
||||||
}
|
}
|
||||||
|
|
||||||
,putValue() {
|
,putValue() {
|
||||||
|
this._myValue = this._value;
|
||||||
this._selectOption();
|
this._selectOption();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "hedera-web",
|
"name": "hedera-web",
|
||||||
"version": "22.46.16",
|
"version": "22.46.17",
|
||||||
"description": "Verdnatura web page",
|
"description": "Verdnatura web page",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
Loading…
Reference in New Issue