[Lada-commits] [PATCH 11 of 16] Make custom comboboxed selectable
Wald Commits
scm-commit at wald.intevation.org
Wed Aug 7 12:05:38 CEST 2013
# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1375800827 -7200
# Node ID 852dc338894e3459c3ee2f885ee7b2ce85a023f8
# Parent 11f8a2c1b610c7f390246eb5c4dd1cc7ee0d432b
Make custom comboboxed selectable
diff -r 11f8a2c1b610 -r 852dc338894e app/view/widgets/Messmethode.js
--- a/app/view/widgets/Messmethode.js Tue Aug 06 16:03:38 2013 +0200
+++ b/app/view/widgets/Messmethode.js Tue Aug 06 16:53:47 2013 +0200
@@ -17,7 +17,7 @@
});
Ext.define('Lada.view.widgets.Messmethode' ,{
- tpl: '<tpl for="."><div class="x-combo-list-item" >{mmtId} - {messmethhode}</div></tpl>',
+ tpl: '<tpl for="."><div class="x-combo-list-item x-boundlist-item" >{mmtId} - {messmethhode}</div></tpl>',
extend: 'Ext.form.ComboBox',
alias: 'widget.messmethode',
store: mmtStore,
diff -r 11f8a2c1b610 -r 852dc338894e app/view/widgets/Uwb.js
--- a/app/view/widgets/Uwb.js Tue Aug 06 16:03:38 2013 +0200
+++ b/app/view/widgets/Uwb.js Tue Aug 06 16:53:47 2013 +0200
@@ -17,13 +17,26 @@
});
Ext.define('Lada.view.widgets.Uwb' ,{
- tpl: '<tpl for="."><div class="x-combo-list-item" >{umwId} - {umweltBereich}</div></tpl>',
+ tpl: '<tpl for="."><div class="x-combo-list-item x-boundlist-item" >{umwId} - {umweltBereich}</div></tpl>',
extend: 'Ext.form.ComboBox',
alias: 'widget.uwb',
store: uwbStore,
displayField:'umwId',
valueField: 'umwId',
emptyText:'Wählen Sie einen Umweltbereich',
+ // TODO: Set value in disply after selection. Can not figure out why
+ // accessing the recored.data attribute fails here (ti) <2013-08-06 16:52>
+ //listeners: {
+ // select: function(combo, record, index) {
+ // console.log("1");
+ // console.log(record);
+ // console.log("2");
+ // var text = record.data['umwId'] + " - " + record.data['umweltBereich'];
+ // console.log("3");
+ // Ext.form.ComboBox.superclass.setValue.call(this, text);
+ // combo.value = record.id;
+ // }
+ //},
initComponent: function() {
this.callParent(arguments);
}
More information about the Lada-commits
mailing list