annotate app/view/kommentare/List.js @ 543:ce188e2fab06

Added custom textfield to shwo errors and warnings.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 18 Dec 2014 15:03:51 +0100
parents 99e738c17b81
children 7c9475119861
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
342
1e4f0c42369c Added documentation
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 144
diff changeset
9 /*
1e4f0c42369c Added documentation
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 144
diff changeset
10 * Grid to list Kommentare
1e4f0c42369c Added documentation
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 144
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.kommentare.List', {
53
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
13 extend: 'Ext.grid.Panel',
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
14 alias: 'widget.kommentarelist',
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
15
498
c1b77fb96b01 Have consistent requires in classes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 497
diff changeset
16 requires: [
c1b77fb96b01 Have consistent requires in classes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 497
diff changeset
17 'Ext.toolbar.Toolbar'
c1b77fb96b01 Have consistent requires in classes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 497
diff changeset
18 ],
c1b77fb96b01 Have consistent requires in classes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 497
diff changeset
19
490
446e99cfd425 Updated views and controllers using the new model and stores.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 472
diff changeset
20 store: 'KommentareP',
53
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
21 viewConfig: {
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
22 maxHeight: 350,
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
23 emptyText: 'Keine Kommentaregefunden.',
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
24 // minHeight and deferEmptyText are needed to be able to show the
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
25 // emptyText message.
530
95bad130be98 Increased list grid height.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 513
diff changeset
26 minHeight: 65,
53
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
27 deferEmptyText: false
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
28 },
144
7b1140bd8b3d Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 58
diff changeset
29 probeId: null,
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
30
53
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
31 initComponent: function() {
536
fbe81214026a Make tables editable for 'Kommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
32 var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
fbe81214026a Make tables editable for 'Kommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
33 clicksToMoveEditor: 1,
fbe81214026a Make tables editable for 'Kommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
34 autoCancel: false
fbe81214026a Make tables editable for 'Kommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
35 });
fbe81214026a Make tables editable for 'Kommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
36 this.plugins = [rowEditing];
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: 498
diff changeset
39 dock: 'bottom',
6de00657cd87 Moved alll list toolbars to bottom and buttons to the right.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 498
diff changeset
40 items: ['->', {
540
99e738c17b81 Add detail button to tables
Roland Geider <roland.geider@intevation.de>
parents: 538
diff changeset
41 text: 'Details',
99e738c17b81 Add detail button to tables
Roland Geider <roland.geider@intevation.de>
parents: 538
diff changeset
42 icon: 'gfx/document-open.png',
99e738c17b81 Add detail button to tables
Roland Geider <roland.geider@intevation.de>
parents: 538
diff changeset
43 action: 'open'
99e738c17b81 Add detail button to tables
Roland Geider <roland.geider@intevation.de>
parents: 538
diff changeset
44 }, {
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
45 text: 'Hinzufügen',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
46 icon: 'gfx/list-add.png',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
47 action: 'add',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
48 probeId: this.probeId
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
49 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
50 text: 'Löschen',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
51 icon: 'gfx/list-remove.png',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
52 action: 'delete'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
53 }]
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
54 }];
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
55 this.columns = [{
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
56 header: 'Erzeuger',
536
fbe81214026a Make tables editable for 'Kommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
57 dataIndex: 'erzeuger',
fbe81214026a Make tables editable for 'Kommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
58 editor: {
fbe81214026a Make tables editable for 'Kommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
59 allowBlank: false,
fbe81214026a Make tables editable for 'Kommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
60 }
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
61 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
62 header: 'Datum',
536
fbe81214026a Make tables editable for 'Kommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
63 dataIndex: 'datum',
fbe81214026a Make tables editable for 'Kommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
64 editor: {
fbe81214026a Make tables editable for 'Kommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
65 xtype: 'datefield',
fbe81214026a Make tables editable for 'Kommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
66 allowBlank: false,
fbe81214026a Make tables editable for 'Kommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
67 format: 'd.m.Y',
fbe81214026a Make tables editable for 'Kommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
68 maxValue: Ext.Date.format(new Date(), 'd.m.Y')
fbe81214026a Make tables editable for 'Kommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
69 }
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
70 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
71 header: 'Text',
497
7c0653e8d9f7 Fixed some js related issues (unused vars, arrays, etc.) and code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 491
diff changeset
72 dataIndex: 'text',
536
fbe81214026a Make tables editable for 'Kommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
73 flex: 1,
fbe81214026a Make tables editable for 'Kommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
74 editor: {
fbe81214026a Make tables editable for 'Kommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
75 allowBlank: false,
fbe81214026a Make tables editable for 'Kommentare'
Roland Geider <roland.geider@intevation.de>
parents: 513
diff changeset
76 }
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 490
diff changeset
77 }];
53
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
78 this.callParent(arguments);
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
79 }
73bc17de6ff2 Added store, view and model for kommentare. Load kommentare when opening a probe.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
80 });

http://lada.wald.intevation.org