# HG changeset patch # User Torsten Irländer # Date 1369406274 -7200 # Node ID a1be7ccd4d0c5acce2eff861b40fc82aeac271b9 # Parent f9b6de636ad0aabf4bbc368a80a35fc98277a1d5 Added datenbasis combobox diff -r f9b6de636ad0 -r a1be7ccd4d0c app/controller/Proben.js --- a/app/controller/Proben.js Fri May 24 16:36:26 2013 +0200 +++ b/app/controller/Proben.js Fri May 24 16:37:54 2013 +0200 @@ -6,6 +6,7 @@ ], stores: [ 'Proben', + 'Datenbasis', 'Probenart' ], models: [ diff -r f9b6de636ad0 -r a1be7ccd4d0c app/store/Datenbasis.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/store/Datenbasis.js Fri May 24 16:37:54 2013 +0200 @@ -0,0 +1,14 @@ +Ext.define('Lada.store.Datenbasis', { + extend: 'Ext.data.Store', + fields: ['datenbasisId', 'beschreibung', 'datenbasis'], + proxy: { + type: 'ajax', + api: { + read: 'server/rest/datenbasis' + }, + reader: { + type: 'json' + } + } +}); + diff -r f9b6de636ad0 -r a1be7ccd4d0c app/view/proben/Edit.js --- a/app/view/proben/Edit.js Fri May 24 16:36:26 2013 +0200 +++ b/app/view/proben/Edit.js Fri May 24 16:37:54 2013 +0200 @@ -10,6 +10,7 @@ modal: true, requires: [ + 'Lada.view.widgets.Datenbasis', 'Lada.view.widgets.Probenart' ], @@ -51,9 +52,11 @@ collapsed: true, items: [ { - xtype: 'textfield', - name: 'x4', - fieldLabel: 'Datebasis' + xtype: 'datenbasis', + id: 'datenbasis', + editable: false, + name: 'datenbasisId', + fieldLabel: 'Datenbasis' }, { xtype: 'textfield', diff -r f9b6de636ad0 -r a1be7ccd4d0c app/view/widgets/Datenbasis.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/view/widgets/Datenbasis.js Fri May 24 16:37:54 2013 +0200 @@ -0,0 +1,13 @@ +// Combobox for Datenbasis +Ext.define('Lada.view.widgets.Datenbasis' ,{ + extend: 'Ext.form.ComboBox', + alias: 'widget.datenbasis', + store: 'Datenbasis', + displayField:'datenbasis', + valueField: 'datenbasisId', + emptyText:'Wählen Sie eine Datenbasis', + initComponent: function() { + this.callParent(arguments); + } +}); +