[Lada-commits] [PATCH] Added toolbar to the mainwindow

Wald Commits scm-commit at wald.intevation.org
Thu Aug 29 14:15:57 CEST 2013


# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1377778467 -7200
# Node ID fe8d6e1b08ffdcfa315d7a8ee9dc8c2ba228907b
# Parent  91193c49c2bb39689b4352efe8207df8a54022e6
Added toolbar to the mainwindow.

diff -r 91193c49c2bb -r fe8d6e1b08ff app/view/Viewport.js
--- a/app/view/Viewport.js	Thu Aug 29 10:28:58 2013 +0200
+++ b/app/view/Viewport.js	Thu Aug 29 14:14:27 2013 +0200
@@ -42,7 +42,11 @@
                 var groups = info.get('groups');
                 var serverVersion = info.get('version');
                 var info = Ext.getCmp('systeminfo');
-                info.update('Nutzer: '+user+' | Gruppe(n): '+groups+' | Server: '+serverVersion+' | Client: '+clientVersion);
+                var groupinfo = Ext.getCmp('groupinfo');
+                var userinfo = Ext.getCmp('userinfo');
+                userinfo.update(user);
+                groupinfo.update(groups);
+                info.update('Server: '+serverVersion+' | Client: '+clientVersion);
                 info.show();
                 console.log(info);
             }
@@ -143,10 +147,32 @@
      * @private
      */
     initSearch: function() {
-        this.items = {
+        this.items = [{
             xtype: 'panel',
             title: '<center>Probenauswahlmaske</center>',
             bodyPadding: '10 10',
+            dockedItems: [
+                {
+                    xtype: "toolbar",
+                    dock: "top",
+                    items: [{
+                        xtype: "splitbutton",
+                        text: "Info",
+                        menu: {
+                            items: [{
+                                text: "About"
+                            }]
+                        }
+                    },
+                    "->",
+                    "User:",
+                    {xtype: "tbtext", id:"userinfo", text:"test"},
+                    "Blubb",
+                    "Group:",
+                    {xtype: "tbtext", id:"groupinfo", text:"test"}
+                    ]
+                }
+            ],
             items: [
                 // Informationen über Nutzer/Gruppe/Version
                 {
@@ -198,6 +224,6 @@
                     hidden: false
                 }
             ]
-        };
+        }];
     }
 });


More information about the Lada-commits mailing list