Mercurial > lada > lada-client
changeset 386:00bf2d4f3bd1
Added about dialog.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 30 Aug 2013 11:11:00 +0200 |
parents | 08bb418f31c9 |
children | 6952e5dc9861 |
files | app/controller/Sql.js app/view/About.js app/view/Viewport.js |
diffstat | 3 files changed, 46 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/app/controller/Sql.js Fri Aug 30 10:29:39 2013 +0200 +++ b/app/controller/Sql.js Fri Aug 30 11:11:00 2013 +0200 @@ -9,12 +9,14 @@ stores: [ 'Proben', // List of found Proben 'ProbenList', // List of found Proben - 'Queries' + 'Queries', + 'Info', ], requires: [ 'Lada.view.widgets.Mst', 'Lada.view.widgets.Uwb', - 'Lada.view.widgets.Datetime' + 'Lada.view.widgets.Datetime', + 'Lada.view.About' ], init: function() { console.log('Initialising the Sql controller'); @@ -34,6 +36,10 @@ '#ResetBtn': { // Map click event on Button. click: this.reset + }, + '#AboutBtn': { + // Map click event on Button. + click: this.about } }); }, @@ -162,5 +168,9 @@ //} //result.hide(); //buttons.hide(); + }, + about: function(element, record, index) { + var info = this.getInfoStore(); + var view = Ext.widget('about', {info: info}); } });
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/view/About.js Fri Aug 30 11:11:00 2013 +0200 @@ -0,0 +1,33 @@ +/* + * Window to edit a Probe + */ +Ext.define('Lada.view.About', { + extend: 'Ext.window.Window', + alias: 'widget.about', + + title: 'Lada Information', + // Make size of the dialog dependend of the available space. + // TODO: Handle resizing the browser window. + width: Ext.getBody().getViewSize().width - 30, + height: Ext.getBody().getViewSize().height - 30, + autoShow: true, + autoScroll: true, + modal: true, + + initComponent: function() { + var sver = "tests" + var cver = "testc" + this.buttons = [ + { + text: 'Abbrechen', + scope: this, + handler: this.close, + } + ]; + this.items = [ + { html: "<h1>Lada</h1>Server version: " + sver + "<br>Client version: " + cver } + ]; + this.callParent(); + }, +}); +
--- a/app/view/Viewport.js Fri Aug 30 10:29:39 2013 +0200 +++ b/app/view/Viewport.js Fri Aug 30 11:11:00 2013 +0200 @@ -40,14 +40,10 @@ var clientVersion = "r261 (2013-07-26)"; var user = info.get('user'); var groups = info.get('groups'); - var serverVersion = info.get('version'); - var info = Ext.getCmp('systeminfo'); 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); } }); @@ -160,6 +156,7 @@ text: "Info", menu: { items: [{ + id: 'AboutBtn', text: "About" }] } @@ -173,13 +170,6 @@ } ], items: [ - // Informationen über Nutzer/Gruppe/Version - { - xtype: 'panel', - id: 'systeminfo', - bodyPadding: '5', - hidden: true, - }, // Auswahl einer Abfrage. { xtype: 'queryselector',