[Lada-commits] [PATCH] Added about dialog
Wald Commits
scm-commit at wald.intevation.org
Fri Aug 30 11:13:18 CEST 2013
# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1377853860 -7200
# Node ID 00bf2d4f3bd1c5a778973c8702776c42340c4cec
# Parent 08bb418f31c9e867c8fc78f23e0e3a9dce2f5492
Added about dialog.
diff -r 08bb418f31c9 -r 00bf2d4f3bd1 app/controller/Sql.js
--- 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});
}
});
diff -r 08bb418f31c9 -r 00bf2d4f3bd1 app/view/About.js
--- /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();
+ },
+});
+
diff -r 08bb418f31c9 -r 00bf2d4f3bd1 app/view/Viewport.js
--- 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',
More information about the Lada-commits
mailing list