changeset 235:78134e20e62d

Added new model and store for Queries.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 23 Jul 2013 09:52:05 +0200 (2013-07-23)
parents d4894ed5045a
children 5a9c6b71bad2
files app/controller/Sql.js app/model/Query.js app/store/Queries.js
diffstat 3 files changed, 38 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/Sql.js	Wed Jul 17 12:15:33 2013 +0200
+++ b/app/controller/Sql.js	Tue Jul 23 09:52:05 2013 +0200
@@ -2,7 +2,8 @@
 Ext.define('Lada.controller.Sql', {
     extend: 'Ext.app.Controller',
     stores: [
-        'Proben'    // List of found Proben
+        'Proben',    // List of found Proben
+        'Queries'
     ],
     init: function() {
         console.log('Initialising the Sql controller');
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Query.js	Tue Jul 23 09:52:05 2013 +0200
@@ -0,0 +1,16 @@
+Ext.define('Lada.model.Query', {
+    extend: 'Ext.data.Model',
+    fields: [
+        {name: "id"},
+        {name: "name"},
+        {name: "description"},
+        {name: "sql"},
+        {name: "fields"},
+    ],
+    proxy: {
+        type: 'memory',
+        reader: {
+            type: 'json'
+        }
+    }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Queries.js	Tue Jul 23 09:52:05 2013 +0200
@@ -0,0 +1,20 @@
+Ext.define('Lada.store.Queries', {
+    extend: 'Ext.data.Store',
+    model: 'Lada.model.Query',
+    data  : [
+        {
+            'id': '1',
+            'name': 'MST, UWB',
+            'description': 'Beschreibung der MST, UWB Abfrage',
+            'sql': 'select * from xxx',
+            'fields': []
+        },
+        {
+            'id': '2',
+            'name': 'Rbegin',
+            'description': 'Beschreibung der Rbegin Abfrage',
+            'sql': 'select * from xxx',
+            'fields': []
+        }
+    ],
+});

http://lada.wald.intevation.org