[Lada-commits] [PATCH] Added model/store/widget for new stammdaten ort attributes

Wald Commits scm-commit at wald.intevation.org
Fri Feb 3 13:16:57 CET 2017


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1486124213 -3600
# Node ID f772e70ff723b7f8e62e697a0b8d6c3e25f5af46
# Parent  d312e514875c6cefd568d6b557e3c8d64dc2cd10
Added model/store/widget for new stammdaten ort attributes.

diff -r d312e514875c -r f772e70ff723 app/model/KoordinatenArt.js
--- /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'
+        }
+    }
+});
diff -r d312e514875c -r f772e70ff723 app/model/Kta.js
--- /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'
+        }
+    }
+});
diff -r d312e514875c -r f772e70ff723 app/model/OrtTyp.js
--- /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'
+        }
+    }
+});
diff -r d312e514875c -r f772e70ff723 app/model/OrtsZusatz.js
--- /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'
+        }
+    }
+});
diff -r d312e514875c -r f772e70ff723 app/store/KoordinatenArt.js
--- /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
+});
diff -r d312e514875c -r f772e70ff723 app/store/Ktas.js
--- /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
+});
diff -r d312e514875c -r f772e70ff723 app/store/OrtTyp.js
--- /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
+});
diff -r d312e514875c -r f772e70ff723 app/store/OrtsZusatz.js
--- /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
+});
diff -r d312e514875c -r f772e70ff723 app/view/widget/KoordinatenArt.js
--- /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);
+    }
+});
diff -r d312e514875c -r f772e70ff723 app/view/widget/Kta.js
--- /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);
+    }
+});
diff -r d312e514875c -r f772e70ff723 app/view/widget/OrtTyp.js
--- /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);
+    }
+});
diff -r d312e514875c -r f772e70ff723 app/view/widget/OrtsZusatz.js
--- /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);
+    }
+});


More information about the Lada-commits mailing list