changeset 520:16fbbad55589

Updated viewport layout.
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 16 Dec 2014 18:16:25 +0100
parents 48593a6181c9
children 381066c87ba8 9545adcfceeb
files app/controller/Sql.js app/view/Viewport.js app/view/search/List.js
diffstat 3 files changed, 82 insertions(+), 71 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/Sql.js	Tue Dec 16 16:56:46 2014 +0100
+++ b/app/controller/Sql.js	Tue Dec 16 18:16:25 2014 +0100
@@ -59,7 +59,7 @@
     selectSql: function(element, record) {
         var result = Ext.getCmp('result');
         var filters = Ext.getCmp('queryfilters');
-        var sqlquery = Ext.getCmp('sqlquery');
+        //var sqlquery = Ext.getCmp('sqlquery');
         var sqldesc = Ext.getCmp('sqldesc');
         var buttons = Ext.getCmp('SearchBtnPanel');
         var displayFields = record[0].data.results;
@@ -67,7 +67,7 @@
 
         this.reset();
 
-        sqlquery.setValue(record[0].data.sql);
+        //sqlquery.setValue(record[0].data.sql);
         sqldesc.setValue(record[0].data.description);
 
         // Setup Columns of the probenlist
--- a/app/view/Viewport.js	Tue Dec 16 16:56:46 2014 +0100
+++ b/app/view/Viewport.js	Tue Dec 16 18:16:25 2014 +0100
@@ -156,82 +156,72 @@
      */
     initSearch: function() {
         this.items = [{
-            xtype: 'panel',
             title: '<center>Probenauswahlmaske</center>',
-            bodyPadding: '10 10',
-            layout: {
-                type: 'vbox',
-                align: 'stretch'
-            },
-            dockedItems: [{
-                xtype: 'toolbar',
-                dock: 'top',
+            layout: 'border',
+            items: [{
+                layout: {
+                    type: 'vbox',
+                    align: 'stretch'
+                },
+                region: 'west',
+                split: true,
+                border: 1,
+                flex: 1,
+                dockedItems: [{
+                    xtype: 'toolbar',
+                    dock: 'top',
+                    items: [{
+                        xtype: 'splitbutton',
+                        text: 'Info',
+                        menu: {
+                            items: [{
+                                id: 'AboutBtn',
+                                text: 'About'
+                            }]
+                        }
+                    }, '->', {
+                        xtype: 'box',
+                        autoEl: {
+                            tag: 'img',
+                            src: 'gfx/user-identity.png'
+                        }
+                    }, {
+                        xtype: 'tbtext',
+                        id: 'userinfo',
+                        text: ''
+                    }, {
+                        xtype: 'box',
+                        autoEl: {
+                            tag: 'img',
+                            src: 'gfx/network-workgroup.png'
+                        }
+                    }, {
+                        xtype: 'tbtext',
+                        id: 'groupinfo',
+                        text: ''
+                    }]
+                }],
                 items: [{
-                    xtype: 'splitbutton',
-                    text: 'Info',
-                    menu: {
-                        items: [{
-                            id: 'AboutBtn',
-                            text: 'About'
-                        }]
-                    }
-                }, '->', {
-                    xtype: 'box',
-                    autoEl: {
-                        tag: 'img',
-                        src: 'gfx/user-identity.png'
-                    }
-                }, {
-                    xtype: 'tbtext',
-                    id: 'userinfo',
-                    text: ''
+                    // Auswahl einer Abfrage.
+                    xtype: 'queryselector',
+                    margin: '0, 10, 0, 10',
+                    id: 'queryselector'
                 }, {
-                    xtype: 'box',
-                    autoEl: {
-                        tag: 'img',
-                        src: 'gfx/network-workgroup.png'
-                    }
-                }, {
-                    xtype: 'tbtext',
-                    id: 'groupinfo',
-                    text: ''
+                // Variables settings for the current selected sql statement.
+                    xtype: 'fieldset',
+                    id: 'queryfilters',
+                    title: 'Variablenbelegung',
+                    hidden: true,
+                    margin: '0, 10, 0, 10',
+                    items: []
                 }]
-            }],
-            items: [{
-                // Auswahl einer Abfrage.
-                xtype: 'queryselector',
-                id: 'queryselector',
-                margin: '0 0 10 0'
-            }, {
-            // Variables settings for the current selected sql statement.
-                xtype: 'fieldset',
-                id: 'queryfilters',
-                title: 'Variablenbelegung',
-                hidden: true,
-                items: []
-            }, {
-            // Buttons to trigger the search.
-                id: 'SearchBtnPanel',
-                xtype: 'panel',
-                border: false,
-                margin: '0 0 10 0',
-                items: [{
-                    id: 'SearchBtn',
-                    text: 'Suchen',
-                    xtype: 'button',
-                    margin: '0 10 0 0'
-                }, {
-                    id: 'ResetBtn',
-                    text: 'Zurücksetzen',
-                    xtype: 'button'
-                }],
-                hidden: false
             }, {
             // Resultlist for the query.
                 id: 'result',
-                flex: 1,
+                flex: 3,
                 xtype: 'probenlist',
-                hidden: false
+                hidden: false,
+                region: 'center'
             }]
         }];
     }
--- a/app/view/search/List.js	Tue Dec 16 16:56:46 2014 +0100
+++ b/app/view/search/List.js	Tue Dec 16 18:16:25 2014 +0100
@@ -19,7 +19,10 @@
 
     title: 'SQL-Auswahl',
     initComponent: function() {
-        this.layout = 'column';
+        this.layout = {
+            type: 'vbox',
+            align: 'stretch'
+        };
         this.items = [{
             id: 'search',
             xtype: 'combobox',
@@ -29,6 +32,23 @@
             valueField: 'id',
             emptyText: 'Wählen Sie eine Abfrage'
         }, {
+        // Buttons to trigger the search.
+            id: 'SearchBtnPanel',
+            xtype: 'panel',
+            border: false,
+            margin: '0 0 10 0',
+            items: [{
+                id: 'SearchBtn',
+                text: 'Suchen',
+                xtype: 'button',
+                margin: '0 10 0 0'
+            }, {
+                id: 'ResetBtn',
+                text: 'Zurücksetzen',
+                xtype: 'button'
+            }],
+            hidden: false
+        }, {
             xtype: 'panel',
             maxWidth: '500',
             border: false,
@@ -37,6 +57,7 @@
                 id: 'sqldesc',
                 xtype: 'displayfield',
                 fieldLabel: 'Beschreibung',
+                shrinkWrap: 3,
                 value: '-/-'
             }, {
                 id: 'sqlquery',

http://lada.wald.intevation.org