diff app/store/Probenintervall.js @ 757:b8502964f5c3

Added missing files. Added MmtMockup
author Dustin Demuth <dustin@intevation.de>
date Wed, 06 May 2015 14:15:37 +0200
parents
children d2ee6858f452
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Probenintervall.js	Wed May 06 14:15:37 2015 +0200
@@ -0,0 +1,79 @@
+/* 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.
+ */
+
+/**
+ * This is a Store which maps between the identifiers
+ * of a probenintervall and their meanings.
+ */
+
+Ext.define('Lada.store.Probenintervall', {
+    extend: 'Ext.data.Store',
+    fields: ['probenintervall',
+            {
+                name: 'piTexti18nId',
+                convert: translateStore
+            },
+            'periodstart',
+            'periodend'],
+    storeId: 'probenintervall',
+    data: [{
+        'probenintervall': 'J',
+        'piTexti18nId': 'pi.yearly',
+        'periodstart': 1,
+        'periodend': 365
+    }, {
+        'probenintervall': 'H',
+        'piTexti18nId': 'pi.halfyearly',
+        'periodstart': 1,
+        'periodend': 183
+    }, {
+        'probenintervall': 'Q',
+        'piTexti18nId': 'pi.quarteryearly',
+        'periodstart': 1,
+        'periodend': 91
+    }, {
+        'probenintervall': 'M',
+        'piTexti18nId': 'pi.monthly',
+        'periodstart': 1,
+        'periodend': 30
+    }, {
+        'probenintervall': 'W4',
+        'piTexti18nId': 'pi.fourweekly',
+        'periodstart': 1,
+        'periodend': 28
+    }, {
+        'probenintervall': 'W2',
+        'piTexti18nId': 'pi.twoweekly',
+        'periodstart': 1,
+        'periodend': 14
+    }, {
+        'probenintervall': 'W',
+        'piTexti18nId': 'pi.weekly',
+        'periodstart': 1,
+        'periodend': 7
+    }, {
+        'probenintervall': 'T',
+        'piTexti18nId': 'pi.daily',
+        'periodstart': 1,
+        'periodend': 1
+    }],
+    sorters: [{
+        property: 'periodend',
+        direction: 'DESC',
+    }],
+    sortOnLoad: true,
+    remoteSort: false,
+});
+
+function translateStore(v, record){
+// TODO currently Lada.get... can not be found when this code is run.
+//    var i18n = Lada.getApplication().bundle;
+//    return i18n.getMsg(v);
+      return v;
+}
+

http://lada.wald.intevation.org