# HG changeset patch # User Raimund Renkert # Date 1486128748 -3600 # Node ID 754db8d7369164baa8e7d9b1d10fd55b849bc853 # Parent 6edab3ee2198ce9643553ceb6669c7ddd7928082# Parent 518b4c28e71a2809a78c6ada29a16ff0705f3302 merged diff -r 518b4c28e71a -r 754db8d73691 app/controller/grid/Ortszuordnung.js --- a/app/controller/grid/Ortszuordnung.js Fri Feb 03 14:25:38 2017 +0100 +++ b/app/controller/grid/Ortszuordnung.js Fri Feb 03 14:32:28 2017 +0100 @@ -208,6 +208,8 @@ if (evt.getKey() === 27) { if (this.resultPanel.isVisible()) { this.resultPanel.close(); + verwaltungseinheiten.clearFilter(true); + staaten.clearFilter(true); return; } else { @@ -221,6 +223,8 @@ } if (field.getValue().length === 0) { this.resultPanel.hide(); + verwaltungseinheiten.clearFilter(true); + staaten.clearFilter(true); return; } if (field.getValue().length < 3) { @@ -236,12 +240,19 @@ execSearch: function(field, filter) { // Filter stores var messpunkte = Ext.data.StoreManager.get('orte'); + var cloneRecords = []; + messpunkte.each(function(r) { + cloneRecords.push(r.copy()); + }); + var filterMesspunkte = Ext.create('Lada.store.Orte',{ + autoLoad: false + }); + filterMesspunkte.add(cloneRecords); var verwaltungseinheiten = Ext.data.StoreManager.get('verwaltungseinheiten'); var staaten = Ext.data.StoreManager.get('staaten'); - messpunkte.clearFilter(true); verwaltungseinheiten.clearFilter(true); staaten.clearFilter(true); - messpunkte.filter({filterFn: function(item) { + filterMesspunkte.filter({filterFn: function(item) { if (item.get('ortId').indexOf(filter) > -1) { return true; } @@ -272,7 +283,7 @@ }); } this.resultPanel.show(); - this.resultPanel.updateGrids(messpunkte, verwaltungseinheiten, staaten); + this.resultPanel.updateGrids(filterMesspunkte, verwaltungseinheiten, staaten); this.resultPanel.reposition(field.getX() + field.getLabelWidth(), field.getY()); field.focus(); }, diff -r 518b4c28e71a -r 754db8d73691 app/view/form/Ortserstellung.js --- a/app/view/form/Ortserstellung.js Fri Feb 03 14:25:38 2017 +0100 +++ b/app/view/form/Ortserstellung.js Fri Feb 03 14:32:28 2017 +0100 @@ -20,6 +20,8 @@ margin: 5, + border: 0, + record: null, trackResetOnLoad: true, @@ -44,6 +46,7 @@ fieldLabel: i18n.getMsg('orte.ortId') }, { xtype: 'checkbox', + labelWidth: 125, name: 'aktiv', fieldLabel: 'aktiv:' },{ @@ -132,7 +135,7 @@ fieldLabel: i18n.getMsg('orte.berichtstext'), name: 'berichtstext' }, { - xtype: 'tfield', + xtype: 'kta', labelWidth: 125, maxLength: 100, name: 'anlageId', @@ -150,7 +153,7 @@ name: 'sektor', fieldLabel: i18n.getMsg('orte.sektor') },{ - xtype: 'tfield', + xtype: 'orttyp', labelWidth: 125, maxLength: 100, name: 'ortTyp', @@ -174,7 +177,7 @@ name: 'nutsCode', fieldLabel: i18n.getMsg('orte.nutsCode') },{ - xtype: 'tfield', + xtype: 'ortszusatz', labelWidth: 125, maxLength: 7, name: 'ozId', @@ -184,7 +187,6 @@ this.dockedItems = [{ xtype: 'toolbar', dock: 'bottom', - ui: 'footer', border: '0, 1, 1, 1', style: { borderBottom: '1px solid #b5b8c8 !important', @@ -194,14 +196,14 @@ items: ['->', { text: i18n.getMsg('save'), action: 'save', - handler: me.saveOrt, + qtip: 'Daten speichern', + icon: 'resources/img/dialog-ok-apply.png', disabled: true }, { - text: i18n.getMsg('close'), - action: 'close', - handler: function() { - me.close(); - } + text: i18n.getMsg('discard'), + qtip: 'Änderungen verwerfen', + icon: 'resources/img/dialog-cancel.png', + action: 'revert', }] }]; diff -r 518b4c28e71a -r 754db8d73691 app/view/form/Ortszuordnung.js --- a/app/view/form/Ortszuordnung.js Fri Feb 03 14:25:38 2017 +0100 +++ b/app/view/form/Ortszuordnung.js Fri Feb 03 14:32:28 2017 +0100 @@ -74,6 +74,11 @@ icon: 'resources/img/dialog-ok-apply.png', action: 'save', disabled: true + }, { + text: i18n.getMsg('discard'), + qtip: 'Änderungen verwerfen', + icon: 'resources/img/dialog-cancel.png', + action: 'revert', }] }], items: [{ diff -r 518b4c28e71a -r 754db8d73691 app/view/widget/Kta.js --- a/app/view/widget/Kta.js Fri Feb 03 14:25:38 2017 +0100 +++ b/app/view/widget/Kta.js Fri Feb 03 14:32:28 2017 +0100 @@ -15,10 +15,14 @@ store: 'Ktas', displayField: 'id', valueField: 'id', + editable: this.editable || false, + forceSelection: true, // Enable filtering of comboboxes + autoSelect: false, queryMode: 'local', triggerAction: 'all', typeAhead: false, + minChars: 0, tpl: Ext.create("Ext.XTemplate", '
' + '{code} - {bezeichnung}
'), @@ -33,9 +37,6 @@ if (!this.store) { this.store = Ext.create('Lada.store.Ktas'); } - else { - this.store.clearFilter(); - } this.callParent(arguments); } }); diff -r 518b4c28e71a -r 754db8d73691 app/view/widget/OrtTyp.js --- a/app/view/widget/OrtTyp.js Fri Feb 03 14:25:38 2017 +0100 +++ b/app/view/widget/OrtTyp.js Fri Feb 03 14:32:28 2017 +0100 @@ -15,10 +15,14 @@ store: 'OrtTyp', displayField: 'id', valueField: 'id', + editable: this.editable || false, + forceSelection: true, // Enable filtering of comboboxes + autoSelect: false, queryMode: 'local', triggerAction: 'all', typeAhead: false, + minChars: 0, tpl: Ext.create("Ext.XTemplate", '
' + '{code} - {ortTyp}
'), @@ -33,9 +37,6 @@ if (!this.store) { this.store = Ext.create('Lada.store.OrtTyp'); } - else { - this.store.clearFilter(); - } this.callParent(arguments); } }); diff -r 518b4c28e71a -r 754db8d73691 app/view/window/Ortserstellung.js --- a/app/view/window/Ortserstellung.js Fri Feb 03 14:25:38 2017 +0100 +++ b/app/view/window/Ortserstellung.js Fri Feb 03 14:32:28 2017 +0100 @@ -51,6 +51,11 @@ } }) ]; + this.buttons = [{ + text: 'Schließen', + scope: this, + handler: this.close + }]; this.callParent(arguments); } -}); \ No newline at end of file +}); diff -r 518b4c28e71a -r 754db8d73691 app/view/window/Ortszuordnung.js --- a/app/view/window/Ortszuordnung.js Fri Feb 03 14:25:38 2017 +0100 +++ b/app/view/window/Ortszuordnung.js Fri Feb 03 14:32:28 2017 +0100 @@ -137,13 +137,6 @@ dockedItems: [{ xtype: 'toolbar', dock: 'bottom', - ui: 'footer', - border: '0, 1, 1, 1', - style: { - borderBottom: '1px solid #b5b8c8 !important', - borderLeft: '1px solid #b5b8c8 !important', - borderRight: '1px solid #b5b8c8 !important' - }, items: [{ xtype: 'textfield', name: 'search',