Mercurial > lada > lada-client
changeset 40:f9b6de636ad0
Added probenart combobox
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 24 May 2013 16:36:26 +0200 |
parents | 4040d384d6b3 |
children | a1be7ccd4d0c |
files | app/controller/Proben.js app/store/Probenart.js app/view/proben/Edit.js app/view/widgets/Probenart.js |
diffstat | 4 files changed, 37 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/app/controller/Proben.js Fri May 24 16:32:13 2013 +0200 +++ b/app/controller/Proben.js Fri May 24 16:36:26 2013 +0200 @@ -5,7 +5,8 @@ 'proben.Edit' ], stores: [ - 'Proben' + 'Proben', + 'Probenart' ], models: [ 'Probe'
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/store/Probenart.js Fri May 24 16:36:26 2013 +0200 @@ -0,0 +1,15 @@ +Ext.define('Lada.store.Probenart', { + extend: 'Ext.data.Store', + fields: ['probenartId', 'beschreibung', 'probenart', 'probenartEudfId'], + autoLoad: true, + proxy: { + type: 'ajax', + api: { + read: 'server/rest/probenart' + }, + reader: { + type: 'json' + } + } +}); +
--- a/app/view/proben/Edit.js Fri May 24 16:32:13 2013 +0200 +++ b/app/view/proben/Edit.js Fri May 24 16:36:26 2013 +0200 @@ -9,6 +9,10 @@ autoScroll: true, modal: true, + requires: [ + 'Lada.view.widgets.Probenart' + ], + initComponent: function() { this.items = [ { @@ -62,7 +66,9 @@ fieldLabel: 'Testdatensatz' }, { - xtype: 'textfield', + xtype: 'probenart', + id: 'probenart', + editable: false, name: 'probenartId', fieldLabel: 'Probenart' },
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/view/widgets/Probenart.js Fri May 24 16:36:26 2013 +0200 @@ -0,0 +1,13 @@ +// Combobox for Umweltbereich +Ext.define('Lada.view.widgets.Probenart' ,{ + extend: 'Ext.form.ComboBox', + alias: 'widget.probenart', + store: 'Probenart', + queryMode: 'local', + displayField:'probenart', + valueField: 'probenartId', + emptyText:'Wählen Sie eine Probenart', + initComponent: function() { + this.callParent(arguments); + } +});