webui: horrible hack to force combobox to reload on store update

This shouldn't be necessary but I just can't figure out the right magic
runes to make it work properly.
This commit is contained in:
Adam Sutton 2013-11-10 21:50:46 +00:00
parent 01fc249fb5
commit 695e706f77

View file

@ -276,21 +276,31 @@ tvheadend.idnode_editor_field = function(f, create)
var cons = Ext.form.ComboBox;
if (f.list)
cons = Ext.ux.form.LovCombo;
return new cons({
var st = tvheadend.idnode_enum_store(f);
var r = new cons({
fieldLabel : f.caption,
name : f.id,
value : value,
disabled : d,
width : 300,
mode : 'local',
mode : 'remote',
valueField : 'key',
displayField : 'val',
store : tvheadend.idnode_enum_store(f),
store : st,
typeAhead : true, // TODO: this does strange things in multi
forceSelection : false,
triggerAction : 'all',
emptyText :'Select ' + f.caption +' ...'
emptyText :'Select ' + f.caption +' ...',
listeners : {
beforequery: function(qe){
delete qe.combo.lastQuery;
}
}
});
st.on('load', function() {
r.setValue(r.getValue());
});
return r;
/* TODO: listeners for regexp?
listeners : {
keyup: function() {