Mercurial > lada > lada-client
changeset 1316:f772e70ff723
Added model/store/widget for new stammdaten ort attributes.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 03 Feb 2017 13:16:53 +0100 |
parents | d312e514875c |
children | 46093e6f45d2 |
files | app/model/KoordinatenArt.js app/model/Kta.js app/model/OrtTyp.js app/model/OrtsZusatz.js app/store/KoordinatenArt.js app/store/Ktas.js app/store/OrtTyp.js app/store/OrtsZusatz.js app/view/widget/KoordinatenArt.js app/view/widget/Kta.js app/view/widget/OrtTyp.js app/view/widget/OrtsZusatz.js |
diffstat | 12 files changed, 407 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/model/KoordinatenArt.js Fri Feb 03 13:16:53 2017 +0100 @@ -0,0 +1,39 @@ +/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU GPL (v>=3) + * and comes with ABSOLUTELY NO WARRANTY! Check out + * the documentation coming with IMIS-Labordaten-Application for details. + */ + +/** + * Model for KoordinatenArt Stammdaten. + */ +Ext.define('Lada.model.KoordinatenArt', { + extend: 'Ext.data.Model', + + /** + * Fields are: + * - id: The unique identifier (Primary key). + * - idfGeoKey: The long description. + * - koordinatenart: + */ + fields: [{ + name: 'id' + }, { + name: 'idfGeoKey' + }, { + name: 'koordinatenart' + }], + + idProperty: 'id', + + proxy: { + type: 'rest', + url: 'lada-server/rest/koordinatenart', + reader: { + type: 'json', + root: 'data' + } + } +});
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/model/Kta.js Fri Feb 03 13:16:53 2017 +0100 @@ -0,0 +1,39 @@ +/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU GPL (v>=3) + * and comes with ABSOLUTELY NO WARRANTY! Check out + * the documentation coming with IMIS-Labordaten-Application for details. + */ + +/** + * Model for Kta Stammdaten. + */ +Ext.define('Lada.model.Kta', { + extend: 'Ext.data.Model', + + /** + * Fields are: + * - id: The unique identifier (Primary key). + * - bezeichnung: The long description. + * - code: human readable identifer + */ + fields: [{ + name: 'id' + }, { + name: 'bezeichnung' + }, { + name: 'code' + }], + + idProperty: 'id', + + proxy: { + type: 'rest', + url: 'lada-server/rest/kta', + reader: { + type: 'json', + root: 'data' + } + } +});
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/model/OrtTyp.js Fri Feb 03 13:16:53 2017 +0100 @@ -0,0 +1,39 @@ +/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU GPL (v>=3) + * and comes with ABSOLUTELY NO WARRANTY! Check out + * the documentation coming with IMIS-Labordaten-Application for details. + */ + +/** + * Model for OrtTyp Stammdaten. + */ +Ext.define('Lada.model.OrtTyp', { + extend: 'Ext.data.Model', + + /** + * Fields are: + * - id: The unique identifier (Primary key). + * - ortTyp: The long description. + * - code: short hand as identifier. + */ + fields: [{ + name: 'id' + }, { + name: 'ortTyp' + }, { + name: 'code' + }], + + idProperty: 'id', + + proxy: { + type: 'rest', + url: 'lada-server/rest/orttyp', + reader: { + type: 'json', + root: 'data' + } + } +});
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/model/OrtsZusatz.js Fri Feb 03 13:16:53 2017 +0100 @@ -0,0 +1,36 @@ +/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU GPL (v>=3) + * and comes with ABSOLUTELY NO WARRANTY! Check out + * the documentation coming with IMIS-Labordaten-Application for details. + */ + +/** + * Model for OrtsZusatz Stammdaten. + */ +Ext.define('Lada.model.OrtsZusatz', { + extend: 'Ext.data.Model', + + /** + * Fields are: + * - ozsId: The unique identifier (Primary key). + * - ortszusatz: The long description. + */ + fields: [{ + name: 'ozsId' + }, { + name: 'ortszusatz' + }], + + idProperty: 'id', + + proxy: { + type: 'rest', + url: 'lada-server/rest/ortszusatz', + reader: { + type: 'json', + root: 'data' + } + } +});
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/store/KoordinatenArt.js Fri Feb 03 13:16:53 2017 +0100 @@ -0,0 +1,22 @@ +/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU GPL (v>=3) + * and comes with ABSOLUTELY NO WARRANTY! Check out + * the documentation coming with IMIS-Labordaten-Application for details. + */ + +/** + * Store for Kta + */ +Ext.define('Lada.store.KoordinatenArt', { + extend: 'Ext.data.Store', + model: 'Lada.model.KoordinatenArt', + sorters: [ + { + property: 'id', + direction: 'ASC' + }], + autoLoad: true, + sortOnLoad: true +});
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/store/Ktas.js Fri Feb 03 13:16:53 2017 +0100 @@ -0,0 +1,22 @@ +/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU GPL (v>=3) + * and comes with ABSOLUTELY NO WARRANTY! Check out + * the documentation coming with IMIS-Labordaten-Application for details. + */ + +/** + * Store for Kta + */ +Ext.define('Lada.store.Ktas', { + extend: 'Ext.data.Store', + model: 'Lada.model.Kta', + sorters: [ + { + property: 'id', + direction: 'ASC' + }], + autoLoad: true, + sortOnLoad: true +});
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/store/OrtTyp.js Fri Feb 03 13:16:53 2017 +0100 @@ -0,0 +1,22 @@ +/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU GPL (v>=3) + * and comes with ABSOLUTELY NO WARRANTY! Check out + * the documentation coming with IMIS-Labordaten-Application for details. + */ + +/** + * Store for OrtTyp + */ +Ext.define('Lada.store.OrtTyp', { + extend: 'Ext.data.Store', + model: 'Lada.model.OrtTyp', + sorters: [ + { + property: 'id', + direction: 'ASC' + }], + autoLoad: true, + sortOnLoad: true +});
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/store/OrtsZusatz.js Fri Feb 03 13:16:53 2017 +0100 @@ -0,0 +1,22 @@ +/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU GPL (v>=3) + * and comes with ABSOLUTELY NO WARRANTY! Check out + * the documentation coming with IMIS-Labordaten-Application for details. + */ + +/** + * Store for OrtsZusatz + */ +Ext.define('Lada.store.OrtsZusatz', { + extend: 'Ext.data.Store', + model: 'Lada.model.OrtsZusatz', + sorters: [ + { + property: 'ozsId', + direction: 'ASC' + }], + autoLoad: true, + sortOnLoad: true +});
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/view/widget/KoordinatenArt.js Fri Feb 03 13:16:53 2017 +0100 @@ -0,0 +1,41 @@ +/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU GPL (v>=3) + * and comes with ABSOLUTELY NO WARRANTY! Check out + * the documentation coming with IMIS-Labordaten-Application for details. + */ + +/** + * Combobox for Datenbasis + */ +Ext.define('Lada.view.widget.KoordinatenArt', { + extend: 'Lada.view.widget.base.ComboBox', + alias: 'widget.koordinatenart', + store: 'KoordinatenArt', + displayField: 'id', + valueField: 'id', + // Enable filtering of comboboxes + queryMode: 'local', + triggerAction: 'all', + typeAhead: false, + tpl: Ext.create("Ext.XTemplate", + '<tpl for="."><div class="x-combo-list-item x-boundlist-item" >' + + '{idfGeoKey} - {koordinatenart}</div></tpl>'), + displayTpl: Ext.create('Ext.XTemplate', + '<tpl for=".">{idfGeoKey} - {koordinatenart}</tpl>'), + + initComponent: function() { + var i18n = Lada.getApplication().bundle; + this.emptyText = i18n.getMsg('emptytext.koordinatenart'); + + this.store = Ext.data.StoreManager.get('koordinatenart'); + if (!this.store) { + this.store = Ext.create('Lada.store.KoordinatenArt'); + } + else { + this.store.clearFilter(); + } + this.callParent(arguments); + } +});
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/view/widget/Kta.js Fri Feb 03 13:16:53 2017 +0100 @@ -0,0 +1,41 @@ +/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU GPL (v>=3) + * and comes with ABSOLUTELY NO WARRANTY! Check out + * the documentation coming with IMIS-Labordaten-Application for details. + */ + +/** + * Combobox for Datenbasis + */ +Ext.define('Lada.view.widget.Kta', { + extend: 'Lada.view.widget.base.ComboBox', + alias: 'widget.kta', + store: 'Ktas', + displayField: 'id', + valueField: 'id', + // Enable filtering of comboboxes + queryMode: 'local', + triggerAction: 'all', + typeAhead: false, + tpl: Ext.create("Ext.XTemplate", + '<tpl for="."><div class="x-combo-list-item x-boundlist-item" >' + + '{code} - {bezeichnung}</div></tpl>'), + displayTpl: Ext.create('Ext.XTemplate', + '<tpl for=".">{code} - {bezeichnung}</tpl>'), + + initComponent: function() { + var i18n = Lada.getApplication().bundle; + this.emptyText = i18n.getMsg('emptytext.kta'); + + this.store = Ext.data.StoreManager.get('ktas'); + if (!this.store) { + this.store = Ext.create('Lada.store.Ktas'); + } + else { + this.store.clearFilter(); + } + this.callParent(arguments); + } +});
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/view/widget/OrtTyp.js Fri Feb 03 13:16:53 2017 +0100 @@ -0,0 +1,41 @@ +/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU GPL (v>=3) + * and comes with ABSOLUTELY NO WARRANTY! Check out + * the documentation coming with IMIS-Labordaten-Application for details. + */ + +/** + * Combobox for OrtTyp + */ +Ext.define('Lada.view.widget.OrtTyp', { + extend: 'Lada.view.widget.base.ComboBox', + alias: 'widget.orttyp', + store: 'OrtTyp', + displayField: 'id', + valueField: 'id', + // Enable filtering of comboboxes + queryMode: 'local', + triggerAction: 'all', + typeAhead: false, + tpl: Ext.create("Ext.XTemplate", + '<tpl for="."><div class="x-combo-list-item x-boundlist-item" >' + + '{code} - {ortTyp}</div></tpl>'), + displayTpl: Ext.create('Ext.XTemplate', + '<tpl for=".">{code} - {ortTyp}</tpl>'), + + initComponent: function() { + var i18n = Lada.getApplication().bundle; + this.emptyText = i18n.getMsg('emptytext.orttyp'); + + this.store = Ext.data.StoreManager.get('orttyp'); + if (!this.store) { + this.store = Ext.create('Lada.store.OrtTyp'); + } + else { + this.store.clearFilter(); + } + this.callParent(arguments); + } +});
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/view/widget/OrtsZusatz.js Fri Feb 03 13:16:53 2017 +0100 @@ -0,0 +1,43 @@ +/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU GPL (v>=3) + * and comes with ABSOLUTELY NO WARRANTY! Check out + * the documentation coming with IMIS-Labordaten-Application for details. + */ + +/** + * Combobox for OrtsZusatz + */ +Ext.define('Lada.view.widget.OrtsZusatz' ,{ + extend: 'Lada.view.widget.base.ComboBox', + alias: 'widget.ortszusatz', + store: 'OrtsZusatz', + 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", + '<tpl for="."><div class="x-combo-list-item x-boundlist-item" >' + + '{ozsId} - {ortszusatz}</div></tpl>'), + displayTpl: Ext.create('Ext.XTemplate', + '<tpl for=".">{ozsId} - {ortszusatz}</tpl>'), + + initComponent: function() { + var i18n = Lada.getApplication().bundle; + this.emptyText = i18n.getMsg('emptytext.ortszusatz'); + + this.store = Ext.data.StoreManager.get('ortszusatz'); + if (!this.store) { + this.store = Ext.create('Lada.store.OrtsZusatz'); + } + this.store.sort(); + this.callParent(arguments); + } +});