changeset 526:381066c87ba8

Merge
author Roland Geider <roland.geider@intevation.de>
date Tue, 16 Dec 2014 18:22:04 +0100
parents 16fbbad55589 (diff) 5960189e4461 (current diff)
children 8b4ec83ddca3 f6e26b782eb2
files
diffstat 8 files changed, 154 insertions(+), 83 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/Sql.js	Tue Dec 16 18:21:19 2014 +0100
+++ b/app/controller/Sql.js	Tue Dec 16 18:22:04 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 18:21:19 2014 +0100
+++ b/app/view/Viewport.js	Tue Dec 16 18:22:04 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/messungen/Edit.js	Tue Dec 16 18:21:19 2014 +0100
+++ b/app/view/messungen/Edit.js	Tue Dec 16 18:22:04 2014 +0100
@@ -26,11 +26,7 @@
         var form = Ext.create('Lada.view.messungen.EditForm',
             this.initialConfig);
         this.buttons = [{
-            text: 'Speichern',
-            scope: form,
-            action: 'save'
-        }, {
-            text: 'Abbrechen',
+            text: 'Schließen',
             scope: this,
             handler: this.close
         }];
--- a/app/view/messungen/EditForm.js	Tue Dec 16 18:21:19 2014 +0100
+++ b/app/view/messungen/EditForm.js	Tue Dec 16 18:22:04 2014 +0100
@@ -24,6 +24,7 @@
     minWidth: 650,
 
     initComponent: function() {
+        var me = this;
         this.items = [{
             xtype: 'fieldset',
             title: 'Allgemein',
@@ -33,39 +34,102 @@
                     columns: 2
                 },
                 border: 0,
+                margin: '0, 0, 10, 0',
+                dockedItems: [{
+                    xtype: 'toolbar',
+                    dock: 'bottom',
+                    border: '0, 1, 1, 1',
+                    style: {
+                        borderBottom: '1px solid #b5b8c8 !important',
+                        borderLeft: '1px solid #b5b8c8 !important',
+                        borderRight: '1px solid #b5b8c8 !important'
+                    },
+                    items: ['->', {
+                        text: 'Speichern',
+                        qtip: 'Daten speichern',
+                        icon: 'gfx/dialog-ok-apply.png',
+                        action: 'save',
+                        scope: me,
+                        handler: this.commit
+                    }, {
+                        text: 'Verwerfen',
+                        qtip: 'Änderungen verwerfen',
+                        icon: 'gfx/dialog-cancel.png',
+                        action: 'discard',
+                        disabled: true,
+                        scope: me,
+                        handler: this.reset
+                    }]
+                }],
                 items: [{
                     xtype: 'textfield',
                     name: 'nebenprobenNr',
                     maxLength: 10,
                     margin: '0, 10, 5, 0',
-                    fieldLabel: 'Nebenprobennr.'
+                    fieldLabel: 'Nebenprobennr.',
+                    listeners: {
+                        dirtychange: {
+                            fn: this.updateOnChange,
+                            scope: me
+                        }
+                    }
                 }, {
                     xtype: 'messmethode',
                     name: 'mmtId',
                     margin: '0, 10, 5, 0',
-                    fieldLabel: 'Messmethode'
+                    fieldLabel: 'Messmethode',
+                    listeners: {
+                        dirtychange: {
+                            fn: this.updateOnChange,
+                            scope: me
+                        }
+                    }
                 }, {
                     xtype: 'datetime',
                     name: 'messzeitpunkt',
                     margin: '0, 10, 5, 0',
-                    fieldLabel: 'Messzeitpunkt'
+                    fieldLabel: 'Messzeitpunkt',
+                    listeners: {
+                        dirtychange: {
+                            fn: this.updateOnChange,
+                            scope: me
+                        }
+                    }
                 }, {
                     xtype: 'numberfield',
                     allowDecimals: false,
                     minValue: 0,
                     name: 'messdauer',
                     margin: '0, 10, 5, 0',
-                    fieldLabel: 'Messdauer'
+                    fieldLabel: 'Messdauer',
+                    listeners: {
+                        dirtychange: {
+                            fn: this.updateOnChange,
+                            scope: me
+                        }
+                    }
                 }, {
                     xtype: 'testdatensatz',
                     name: 'fertig',
                     margin: '0, 10, 5, 0',
-                    fieldLabel: 'Fertig'
+                    fieldLabel: 'Fertig',
+                    listeners: {
+                        dirtychange: {
+                            fn: this.updateOnChange,
+                            scope: me
+                        }
+                    }
                 }, {
                     xtype: 'testdatensatz',
                     name: 'geplant',
                     margin: '0, 10, 5, 0',
-                    fieldLabel: 'Geplant'
+                    fieldLabel: 'Geplant',
+                    listeners: {
+                        dirtychange: {
+                            fn: this.updateOnChange,
+                            scope: me
+                        }
+                    }
                 }]
             }]
         }, {
--- a/app/view/proben/EditForm.js	Tue Dec 16 18:21:19 2014 +0100
+++ b/app/view/proben/EditForm.js	Tue Dec 16 18:22:04 2014 +0100
@@ -58,7 +58,7 @@
                         icon: 'gfx/dialog-cancel.png',
                         action: 'discard',
                         disabled: true,
-                        scope: this,
+                        scope: me,
                         handler: this.reset
                     }]
                 }],
--- a/app/view/search/List.js	Tue Dec 16 18:21:19 2014 +0100
+++ b/app/view/search/List.js	Tue Dec 16 18:22:04 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',
Binary file gfx/dialog-cancel.png has changed
Binary file gfx/dialog-ok-apply.png has changed

http://lada.wald.intevation.org