annotate app/view/About.js @ 386:00bf2d4f3bd1

Added about dialog.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 30 Aug 2013 11:11:00 +0200
parents
children 6952e5dc9861
rev   line source
386
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
1 /*
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
2 * Window to edit a Probe
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
3 */
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
4 Ext.define('Lada.view.About', {
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
5 extend: 'Ext.window.Window',
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
6 alias: 'widget.about',
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
7
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
8 title: 'Lada Information',
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
9 // Make size of the dialog dependend of the available space.
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
10 // TODO: Handle resizing the browser window.
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
11 width: Ext.getBody().getViewSize().width - 30,
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
12 height: Ext.getBody().getViewSize().height - 30,
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
13 autoShow: true,
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
14 autoScroll: true,
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
15 modal: true,
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
16
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
17 initComponent: function() {
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
18 var sver = "tests"
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
19 var cver = "testc"
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
20 this.buttons = [
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
21 {
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
22 text: 'Abbrechen',
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
23 scope: this,
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
24 handler: this.close,
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
25 }
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
26 ];
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
27 this.items = [
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
28 { html: "<h1>Lada</h1>Server version: " + sver + "<br>Client version: " + cver }
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
29 ];
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
30 this.callParent();
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
31 },
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
32 });
00bf2d4f3bd1 Added about dialog.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
33

http://lada.wald.intevation.org