annotate app/view/mkommentare/List.js @ 528:8b4ec83ddca3

merged.
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 16 Dec 2014 18:28:58 +0100
parents 8972f008dfb1
children 95bad130be98
rev   line source
472
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 391
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 391
diff changeset
2 * Software engineering by Intevation GmbH
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 391
diff changeset
3 *
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 391
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 391
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
497
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 491
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
472
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 391
diff changeset
7 */
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 391
diff changeset
8
346
b2dc95820b70 Added documentation
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 207
diff changeset
9 /*
b2dc95820b70 Added documentation
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 207
diff changeset
10 * Grid to list Kommentare for Messunge
b2dc95820b70 Added documentation
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 207
diff changeset
11 */
497
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 491
diff changeset
12 Ext.define('Lada.view.mkommentare.List', {
207
62e116cd3e3b Inheritance of Mkommentare from Kommentare does not work as expected. So write
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
13 extend: 'Ext.grid.Panel',
180
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
14 alias: 'widget.mkommentarelist',
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
15
490
446e99cfd425 Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
16 store: 'KommentareM',
207
62e116cd3e3b Inheritance of Mkommentare from Kommentare does not work as expected. So write
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
17 viewConfig: {
62e116cd3e3b Inheritance of Mkommentare from Kommentare does not work as expected. So write
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
18 maxHeight: 350,
62e116cd3e3b Inheritance of Mkommentare from Kommentare does not work as expected. So write
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
19 emptyText: 'Keine Kommentare gefunden.',
62e116cd3e3b Inheritance of Mkommentare from Kommentare does not work as expected. So write
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
20 // minHeight and deferEmptyText are needed to be able to show the
62e116cd3e3b Inheritance of Mkommentare from Kommentare does not work as expected. So write
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
21 // emptyText message.
62e116cd3e3b Inheritance of Mkommentare from Kommentare does not work as expected. So write
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
22 minHeight: 35,
62e116cd3e3b Inheritance of Mkommentare from Kommentare does not work as expected. So write
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
23 deferEmptyText: false
62e116cd3e3b Inheritance of Mkommentare from Kommentare does not work as expected. So write
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
24 },
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
25
207
62e116cd3e3b Inheritance of Mkommentare from Kommentare does not work as expected. So write
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
26 probeId: null,
62e116cd3e3b Inheritance of Mkommentare from Kommentare does not work as expected. So write
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
27 parentId: null,
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
28
207
62e116cd3e3b Inheritance of Mkommentare from Kommentare does not work as expected. So write
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
29 initComponent: function() {
524
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
30 var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
31 clicksToMoveEditor: 1,
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
32 autoCancel: false
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
33 });
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
34
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
35 this.plugins = [rowEditing];
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
36
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
37 this.dockedItems = [{
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
38 xtype: 'toolbar',
513
6de00657cd87 Moved alll list toolbars to bottom and buttons to the right.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 497
diff changeset
39 dock: 'bottom',
6de00657cd87 Moved alll list toolbars to bottom and buttons to the right.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 497
diff changeset
40 items: ['->', {
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
41 text: 'Hinzufügen',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
42 icon: 'gfx/list-add.png',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
43 action: 'add',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
44 probeId: this.probeId,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
45 parentId: this.parentId
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
46 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
47 text: 'Löschen',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
48 icon: 'gfx/list-remove.png',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
49 action: 'delete'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
50 }]
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
51 }];
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
52 this.columns = [{
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
53 header: 'Erzeuger',
524
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
54 dataIndex: 'erzeuger',
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
55 editor: {
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
56 allowBlank: false
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
57 }
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
58 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
59 header: 'Datum',
524
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
60 dataIndex: 'datum',
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
61 editor: {
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
62 xtype: 'datefield',
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
63 allowBlank: false,
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
64 format: 'd.m.Y',
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
65 maxValue: Ext.Date.format(new Date(), 'd.m.Y')
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
66 }
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
67 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
68 header: 'Text',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
69 dataIndex: 'text',
524
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
70 flex: 1,
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
71 editor: {
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
72 allowBlank: false
8972f008dfb1 Make tables editable for 'MKommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
73 }
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
74 }];
207
62e116cd3e3b Inheritance of Mkommentare from Kommentare does not work as expected. So write
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
75 this.callParent(arguments);
62e116cd3e3b Inheritance of Mkommentare from Kommentare does not work as expected. So write
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
76 }
180
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
77 });

http://lada.wald.intevation.org