Mercurial > lada > lada-client
annotate app/view/grid/Messwert.js @ 1391:11748859733c
more strings for audit-trail
author | Maximilian Krambach <mkrambach@intevation.de> |
---|---|
date | Thu, 02 Mar 2017 15:11:16 +0100 |
parents | 3b4dcc83a21b |
children |
rev | line source |
---|---|
590
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
2 * Software engineering by Intevation GmbH |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
3 * |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
4 * This file is Free Software under the GNU GPL (v>=3) |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
6 * the documentation coming with IMIS-Labordaten-Application for details. |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
7 */ |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
8 |
893
07dfcdf5b41f
jsduck for grids and panels
Dustin Demuth <dustin@intevation.de>
parents:
845
diff
changeset
|
9 /** |
590
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
10 * Grid to list Messwerte |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
11 */ |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
12 Ext.define('Lada.view.grid.Messwert', { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
13 extend: 'Ext.grid.Panel', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
14 alias: 'widget.messwertgrid', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
15 |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
16 requires: [ |
1119
b73f9a976c82
Exponential notation without tampering numbers.
Tom Gottfried <tom@intevation.de>
parents:
1112
diff
changeset
|
17 'Lada.view.form.ExpNumberField', |
590
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
18 'Lada.view.widget.Messgroesse', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
19 'Lada.view.widget.Messeinheit' |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
20 ], |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
21 |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
22 emptyText: 'Keine Messwerte gefunden.', |
1163
d3cf992099a0
Change height of MessungsGrid and MesswertGrid
Evi Huber <ehuber@bfs.de>
parents:
1127
diff
changeset
|
23 minHeight: 44, |
590
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
24 viewConfig: { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
25 deferEmptyText: false |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
26 }, |
1163
d3cf992099a0
Change height of MessungsGrid and MesswertGrid
Evi Huber <ehuber@bfs.de>
parents:
1127
diff
changeset
|
27 margin: '0, 5, 15, 5', |
590
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
28 |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
29 recordId: null, |
824
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
30 readOnly: true, |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
31 allowDeselect: true, |
845
613ad3263e59
Load messgroessen with messmethode filter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
824
diff
changeset
|
32 messgroesseStore: null, |
1112
e76551a6da27
Use custom row expander in messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1054
diff
changeset
|
33 bottomBar: true, |
590
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
34 |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
35 initComponent: function() { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
36 this.rowEditing = Ext.create('Ext.grid.plugin.RowEditing', { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
37 clicksToMoveEditor: 1, |
683
612f4f933083
Made Grid-Rows uneditable if the dataset contains readonly=true. This only affects the Grids using the RowEdit Plugin
Dustin Demuth <dustin@intevation.de>
parents:
662
diff
changeset
|
38 autoCancel: false, |
703
9ab7b1eed9f8
Rowediting is now disabled when the Grid was set to ReadOnly
Dustin Demuth <dustin@intevation.de>
parents:
687
diff
changeset
|
39 disabled: false, |
684
69cb367c0a63
When a Probeform is dirty, all child-grids are made readonly (Row Editing is not disbled correctly). When a Probe is read-only all Child-grid buttons are disabled. When a Probe is ReadOnly probeform is also readonly.
Dustin Demuth <dustin@intevation.de>
parents:
683
diff
changeset
|
40 pluginId: 'rowedit', |
683
612f4f933083
Made Grid-Rows uneditable if the dataset contains readonly=true. This only affects the Grids using the RowEdit Plugin
Dustin Demuth <dustin@intevation.de>
parents:
662
diff
changeset
|
41 listeners:{ |
612f4f933083
Made Grid-Rows uneditable if the dataset contains readonly=true. This only affects the Grids using the RowEdit Plugin
Dustin Demuth <dustin@intevation.de>
parents:
662
diff
changeset
|
42 // Make row ineditable when readonly is set to true |
612f4f933083
Made Grid-Rows uneditable if the dataset contains readonly=true. This only affects the Grids using the RowEdit Plugin
Dustin Demuth <dustin@intevation.de>
parents:
662
diff
changeset
|
43 // Normally this would belong into a controller an not the view. |
703
9ab7b1eed9f8
Rowediting is now disabled when the Grid was set to ReadOnly
Dustin Demuth <dustin@intevation.de>
parents:
687
diff
changeset
|
44 // But the RowEditPlugin is not handled there. |
683
612f4f933083
Made Grid-Rows uneditable if the dataset contains readonly=true. This only affects the Grids using the RowEdit Plugin
Dustin Demuth <dustin@intevation.de>
parents:
662
diff
changeset
|
45 beforeedit: function(e, o) { |
1112
e76551a6da27
Use custom row expander in messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1054
diff
changeset
|
46 // We are not in a messung window! |
e76551a6da27
Use custom row expander in messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1054
diff
changeset
|
47 if (!o.grid.up('window')) { |
e76551a6da27
Use custom row expander in messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1054
diff
changeset
|
48 return false; |
e76551a6da27
Use custom row expander in messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1054
diff
changeset
|
49 } |
e76551a6da27
Use custom row expander in messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1054
diff
changeset
|
50 // We are in a messung window and should check if we can |
e76551a6da27
Use custom row expander in messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1054
diff
changeset
|
51 // edit. |
703
9ab7b1eed9f8
Rowediting is now disabled when the Grid was set to ReadOnly
Dustin Demuth <dustin@intevation.de>
parents:
687
diff
changeset
|
52 var readonlywin = o.grid.up('window').record.get('readonly'); |
9ab7b1eed9f8
Rowediting is now disabled when the Grid was set to ReadOnly
Dustin Demuth <dustin@intevation.de>
parents:
687
diff
changeset
|
53 var readonlygrid = o.record.get('readonly'); |
9ab7b1eed9f8
Rowediting is now disabled when the Grid was set to ReadOnly
Dustin Demuth <dustin@intevation.de>
parents:
687
diff
changeset
|
54 if (readonlywin == true || readonlygrid == true || this.disabled) { |
683
612f4f933083
Made Grid-Rows uneditable if the dataset contains readonly=true. This only affects the Grids using the RowEdit Plugin
Dustin Demuth <dustin@intevation.de>
parents:
662
diff
changeset
|
55 return false; |
612f4f933083
Made Grid-Rows uneditable if the dataset contains readonly=true. This only affects the Grids using the RowEdit Plugin
Dustin Demuth <dustin@intevation.de>
parents:
662
diff
changeset
|
56 } |
612f4f933083
Made Grid-Rows uneditable if the dataset contains readonly=true. This only affects the Grids using the RowEdit Plugin
Dustin Demuth <dustin@intevation.de>
parents:
662
diff
changeset
|
57 return true; |
612f4f933083
Made Grid-Rows uneditable if the dataset contains readonly=true. This only affects the Grids using the RowEdit Plugin
Dustin Demuth <dustin@intevation.de>
parents:
662
diff
changeset
|
58 } |
612f4f933083
Made Grid-Rows uneditable if the dataset contains readonly=true. This only affects the Grids using the RowEdit Plugin
Dustin Demuth <dustin@intevation.de>
parents:
662
diff
changeset
|
59 } |
845
613ad3263e59
Load messgroessen with messmethode filter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
824
diff
changeset
|
60 }); |
613ad3263e59
Load messgroessen with messmethode filter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
824
diff
changeset
|
61 var me = this; |
590
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
62 this.plugins = [this.rowEditing]; |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
63 |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
64 this.dockedItems = [{ |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
65 xtype: 'toolbar', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
66 dock: 'bottom', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
67 items: ['->', { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
68 text: 'Hinzufügen', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
69 icon: 'resources/img/list-add.png', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
70 action: 'add', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
71 probeId: this.probeId, |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
72 parentId: this.parentId |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
73 }, { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
74 text: 'Löschen', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
75 icon: 'resources/img/list-remove.png', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
76 action: 'delete' |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
77 }] |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
78 }]; |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
79 this.columns = [{ |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
80 header: 'Messgröße', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
81 dataIndex: 'messgroesseId', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
82 width: 80, |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
83 renderer: function(value) { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
84 if (!value || value === '') { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
85 return ''; |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
86 } |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
87 var store = Ext.data.StoreManager.get('messgroessen'); |
736
7ae9599bee39
Returned Units od Measurement where not distinct
Dustin Demuth <dustin@intevation.de>
parents:
718
diff
changeset
|
88 return store.findRecord('id', value, 0, false, false, true).get('messgroesse'); |
590
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
89 }, |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
90 editor: { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
91 xtype: 'combobox', |
845
613ad3263e59
Load messgroessen with messmethode filter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
824
diff
changeset
|
92 store: me.messgroesseStore, |
590
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
93 displayField: 'messgroesse', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
94 valueField: 'id', |
662 | 95 allowBlank: false, |
739
efb1369a8cac
Enabled autocompletion for Messwerte in a Messung.
Dustin Demuth <dustin@intevation.de>
parents:
736
diff
changeset
|
96 editable: true, |
efb1369a8cac
Enabled autocompletion for Messwerte in a Messung.
Dustin Demuth <dustin@intevation.de>
parents:
736
diff
changeset
|
97 forceSelection: true, |
efb1369a8cac
Enabled autocompletion for Messwerte in a Messung.
Dustin Demuth <dustin@intevation.de>
parents:
736
diff
changeset
|
98 autoSelect: true, |
efb1369a8cac
Enabled autocompletion for Messwerte in a Messung.
Dustin Demuth <dustin@intevation.de>
parents:
736
diff
changeset
|
99 queryMode: 'local', |
efb1369a8cac
Enabled autocompletion for Messwerte in a Messung.
Dustin Demuth <dustin@intevation.de>
parents:
736
diff
changeset
|
100 minChars: 0, |
efb1369a8cac
Enabled autocompletion for Messwerte in a Messung.
Dustin Demuth <dustin@intevation.de>
parents:
736
diff
changeset
|
101 typeAhead: false, |
efb1369a8cac
Enabled autocompletion for Messwerte in a Messung.
Dustin Demuth <dustin@intevation.de>
parents:
736
diff
changeset
|
102 triggerAction: 'all' |
590
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
103 } |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
104 }, { |
991 | 105 header: '<NWG', |
106 width: 60, | |
107 dataIndex: 'messwertNwg', | |
108 editor: { | |
993
f9449df5f9fb
init messwertNwg for editing
Michael Stanko <mstanko@bfs.de>
parents:
991
diff
changeset
|
109 xtype: 'checkbox', |
1054
7e801af49eeb
Use exponential notation for messwerte and zusatzwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
993
diff
changeset
|
110 inputValue: '<' |
991 | 111 } |
112 }, { | |
590
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
113 header: 'Messwert', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
114 dataIndex: 'messwert', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
115 width: 80, |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
116 editor: { |
1119
b73f9a976c82
Exponential notation without tampering numbers.
Tom Gottfried <tom@intevation.de>
parents:
1112
diff
changeset
|
117 xtype: 'expnumberfield', |
1280
3b4dcc83a21b
fix sencha compile warnings
Michael Stanko <mstanko@bfs.de>
parents:
1165
diff
changeset
|
118 allowBlank: false |
1119
b73f9a976c82
Exponential notation without tampering numbers.
Tom Gottfried <tom@intevation.de>
parents:
1112
diff
changeset
|
119 }, |
b73f9a976c82
Exponential notation without tampering numbers.
Tom Gottfried <tom@intevation.de>
parents:
1112
diff
changeset
|
120 renderer: function(value) { |
1123
4f68511ce7a4
Restrict range of values to two-digit exponent and format it nicely.
Tom Gottfried <tom@intevation.de>
parents:
1119
diff
changeset
|
121 if (!value || value === '') { |
4f68511ce7a4
Restrict range of values to two-digit exponent and format it nicely.
Tom Gottfried <tom@intevation.de>
parents:
1119
diff
changeset
|
122 return value; |
4f68511ce7a4
Restrict range of values to two-digit exponent and format it nicely.
Tom Gottfried <tom@intevation.de>
parents:
1119
diff
changeset
|
123 } |
4f68511ce7a4
Restrict range of values to two-digit exponent and format it nicely.
Tom Gottfried <tom@intevation.de>
parents:
1119
diff
changeset
|
124 var strValue = value.toExponential(2).toString() |
4f68511ce7a4
Restrict range of values to two-digit exponent and format it nicely.
Tom Gottfried <tom@intevation.de>
parents:
1119
diff
changeset
|
125 .replace('.', Ext.util.Format.decimalSeparator); |
4f68511ce7a4
Restrict range of values to two-digit exponent and format it nicely.
Tom Gottfried <tom@intevation.de>
parents:
1119
diff
changeset
|
126 var splitted = strValue.split('e'); |
4f68511ce7a4
Restrict range of values to two-digit exponent and format it nicely.
Tom Gottfried <tom@intevation.de>
parents:
1119
diff
changeset
|
127 var exponent = parseInt(splitted[1]); |
4f68511ce7a4
Restrict range of values to two-digit exponent and format it nicely.
Tom Gottfried <tom@intevation.de>
parents:
1119
diff
changeset
|
128 return splitted[0] + 'e' |
4f68511ce7a4
Restrict range of values to two-digit exponent and format it nicely.
Tom Gottfried <tom@intevation.de>
parents:
1119
diff
changeset
|
129 + ((exponent < 0) ? '-' : '+') |
4f68511ce7a4
Restrict range of values to two-digit exponent and format it nicely.
Tom Gottfried <tom@intevation.de>
parents:
1119
diff
changeset
|
130 + ((Math.abs(exponent) < 10) ? '0' : '') |
4f68511ce7a4
Restrict range of values to two-digit exponent and format it nicely.
Tom Gottfried <tom@intevation.de>
parents:
1119
diff
changeset
|
131 + Math.abs(exponent).toString(); |
590
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
132 } |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
133 }, { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
134 header: 'Messeinheit', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
135 dataIndex: 'mehId', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
136 width: 90, |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
137 renderer: function(value) { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
138 if (!value || value === '') { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
139 return ''; |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
140 } |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
141 var store = Ext.data.StoreManager.get('messeinheiten'); |
736
7ae9599bee39
Returned Units od Measurement where not distinct
Dustin Demuth <dustin@intevation.de>
parents:
718
diff
changeset
|
142 return store.findRecord('id', value, 0, false, false, true).get('einheit'); |
590
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
143 }, |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
144 editor: { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
145 xtype: 'combobox', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
146 store: Ext.data.StoreManager.get('messeinheiten'), |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
147 displayField: 'einheit', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
148 valueField: 'id', |
662 | 149 allowBlank: false, |
740
2e8da590ea0c
made Comboboces editable and filterable for; Messungenform: Messstelle,Datenbasis,Betriebsarts,Testdatensatz,Preobenart,Netzbetreiber Messungform: Messmethode Messwertegrid: Messgroesse,Messeinheit
Dustin Demuth <dustin@intevation.de>
parents:
739
diff
changeset
|
150 editable: true, |
2e8da590ea0c
made Comboboces editable and filterable for; Messungenform: Messstelle,Datenbasis,Betriebsarts,Testdatensatz,Preobenart,Netzbetreiber Messungform: Messmethode Messwertegrid: Messgroesse,Messeinheit
Dustin Demuth <dustin@intevation.de>
parents:
739
diff
changeset
|
151 forceSelection: true, |
2e8da590ea0c
made Comboboces editable and filterable for; Messungenform: Messstelle,Datenbasis,Betriebsarts,Testdatensatz,Preobenart,Netzbetreiber Messungform: Messmethode Messwertegrid: Messgroesse,Messeinheit
Dustin Demuth <dustin@intevation.de>
parents:
739
diff
changeset
|
152 autoSelect: true, |
2e8da590ea0c
made Comboboces editable and filterable for; Messungenform: Messstelle,Datenbasis,Betriebsarts,Testdatensatz,Preobenart,Netzbetreiber Messungform: Messmethode Messwertegrid: Messgroesse,Messeinheit
Dustin Demuth <dustin@intevation.de>
parents:
739
diff
changeset
|
153 queryMode: 'local', |
2e8da590ea0c
made Comboboces editable and filterable for; Messungenform: Messstelle,Datenbasis,Betriebsarts,Testdatensatz,Preobenart,Netzbetreiber Messungform: Messmethode Messwertegrid: Messgroesse,Messeinheit
Dustin Demuth <dustin@intevation.de>
parents:
739
diff
changeset
|
154 minChars: 0, |
2e8da590ea0c
made Comboboces editable and filterable for; Messungenform: Messstelle,Datenbasis,Betriebsarts,Testdatensatz,Preobenart,Netzbetreiber Messungform: Messmethode Messwertegrid: Messgroesse,Messeinheit
Dustin Demuth <dustin@intevation.de>
parents:
739
diff
changeset
|
155 typeAhead: false, |
2e8da590ea0c
made Comboboces editable and filterable for; Messungenform: Messstelle,Datenbasis,Betriebsarts,Testdatensatz,Preobenart,Netzbetreiber Messungform: Messmethode Messwertegrid: Messgroesse,Messeinheit
Dustin Demuth <dustin@intevation.de>
parents:
739
diff
changeset
|
156 triggerAction: 'all' |
590
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
157 } |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
158 }, { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
159 header: 'Messfehler', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
160 dataIndex: 'messfehler', |
624
927484545e9b
added xtype for numeric-fields to grid to enable decimalseparator-replacement by locale-config
Dustin Demuth <dustin@intevation.de>
parents:
591
diff
changeset
|
161 xtype: 'numbercolumn', |
590
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
162 width: 80, |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
163 editor: { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
164 xtype: 'numberfield', |
662 | 165 allowBlank: false, |
166 maxLength: 10, | |
167 allowExponential: false, | |
718
7f11b75e0188
Trailing Commas, editable: false for Umwelt und Messstelle widget
Dustin Demuth <dustin@intevation.de>
parents:
703
diff
changeset
|
168 enforceMaxLength: true |
590
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
169 } |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
170 }, { |
991 | 171 header: 'Nachweisgrenze', |
172 dataIndex: 'nwgZuMesswert', | |
173 width: 80, | |
174 editor: { | |
1280
3b4dcc83a21b
fix sencha compile warnings
Michael Stanko <mstanko@bfs.de>
parents:
1165
diff
changeset
|
175 xtype: 'expnumberfield' |
1119
b73f9a976c82
Exponential notation without tampering numbers.
Tom Gottfried <tom@intevation.de>
parents:
1112
diff
changeset
|
176 }, |
b73f9a976c82
Exponential notation without tampering numbers.
Tom Gottfried <tom@intevation.de>
parents:
1112
diff
changeset
|
177 renderer: function(value) { |
b73f9a976c82
Exponential notation without tampering numbers.
Tom Gottfried <tom@intevation.de>
parents:
1112
diff
changeset
|
178 if (!value || value === '') { |
b73f9a976c82
Exponential notation without tampering numbers.
Tom Gottfried <tom@intevation.de>
parents:
1112
diff
changeset
|
179 return value; |
b73f9a976c82
Exponential notation without tampering numbers.
Tom Gottfried <tom@intevation.de>
parents:
1112
diff
changeset
|
180 } |
1123
4f68511ce7a4
Restrict range of values to two-digit exponent and format it nicely.
Tom Gottfried <tom@intevation.de>
parents:
1119
diff
changeset
|
181 var strValue = value.toExponential(2).toString() |
4f68511ce7a4
Restrict range of values to two-digit exponent and format it nicely.
Tom Gottfried <tom@intevation.de>
parents:
1119
diff
changeset
|
182 .replace('.', Ext.util.Format.decimalSeparator); |
4f68511ce7a4
Restrict range of values to two-digit exponent and format it nicely.
Tom Gottfried <tom@intevation.de>
parents:
1119
diff
changeset
|
183 var splitted = strValue.split('e'); |
4f68511ce7a4
Restrict range of values to two-digit exponent and format it nicely.
Tom Gottfried <tom@intevation.de>
parents:
1119
diff
changeset
|
184 var exponent = parseInt(splitted[1]); |
4f68511ce7a4
Restrict range of values to two-digit exponent and format it nicely.
Tom Gottfried <tom@intevation.de>
parents:
1119
diff
changeset
|
185 return splitted[0] + 'e' |
4f68511ce7a4
Restrict range of values to two-digit exponent and format it nicely.
Tom Gottfried <tom@intevation.de>
parents:
1119
diff
changeset
|
186 + ((exponent < 0) ? '-' : '+') |
4f68511ce7a4
Restrict range of values to two-digit exponent and format it nicely.
Tom Gottfried <tom@intevation.de>
parents:
1119
diff
changeset
|
187 + ((Math.abs(exponent) < 10) ? '0' : '') |
4f68511ce7a4
Restrict range of values to two-digit exponent and format it nicely.
Tom Gottfried <tom@intevation.de>
parents:
1119
diff
changeset
|
188 + Math.abs(exponent).toString(); |
991 | 189 } |
190 }, { | |
590
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
191 header: 'Grenzwertüberschreitung', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
192 dataIndex: 'grenzwertueberschreitung', |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
193 flex: 1, |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
194 renderer: function(value) { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
195 if (value === true) { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
196 return 'Ja'; |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
197 } |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
198 return 'Nein'; |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
199 }, |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
200 editor: { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
201 xtype: 'checkbox' |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
202 } |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
203 }]; |
824
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
204 this.listeners = { |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
205 select: { |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
206 fn: this.activateRemoveButton, |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
207 scope: this |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
208 }, |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
209 deselect: { |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
210 fn: this.deactivateRemoveButton, |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
211 scope: this |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
212 } |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
213 }; |
590
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
214 this.initData(); |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
215 this.callParent(arguments); |
824
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
216 this.setReadOnly(true); //Grid is always initialised as RO |
1112
e76551a6da27
Use custom row expander in messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1054
diff
changeset
|
217 if (!me.bottomBar) { |
e76551a6da27
Use custom row expander in messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1054
diff
changeset
|
218 this.down('toolbar[dock=bottom]').hide(); |
e76551a6da27
Use custom row expander in messung list grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1054
diff
changeset
|
219 } |
590
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
220 }, |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
221 |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
222 initData: function() { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
223 if (this.store) { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
224 this.store.removeAll(); |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
225 } |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
226 else { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
227 this.store = Ext.create('Lada.store.Messwerte'); |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
228 } |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
229 this.store.load({ |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
230 params: { |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
231 messungsId: this.recordId |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
232 } |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
233 }); |
684
69cb367c0a63
When a Probeform is dirty, all child-grids are made readonly (Row Editing is not disbled correctly). When a Probe is read-only all Child-grid buttons are disabled. When a Probe is ReadOnly probeform is also readonly.
Dustin Demuth <dustin@intevation.de>
parents:
683
diff
changeset
|
234 }, |
69cb367c0a63
When a Probeform is dirty, all child-grids are made readonly (Row Editing is not disbled correctly). When a Probe is read-only all Child-grid buttons are disabled. When a Probe is ReadOnly probeform is also readonly.
Dustin Demuth <dustin@intevation.de>
parents:
683
diff
changeset
|
235 |
69cb367c0a63
When a Probeform is dirty, all child-grids are made readonly (Row Editing is not disbled correctly). When a Probe is read-only all Child-grid buttons are disabled. When a Probe is ReadOnly probeform is also readonly.
Dustin Demuth <dustin@intevation.de>
parents:
683
diff
changeset
|
236 setReadOnly: function(b) { |
69cb367c0a63
When a Probeform is dirty, all child-grids are made readonly (Row Editing is not disbled correctly). When a Probe is read-only all Child-grid buttons are disabled. When a Probe is ReadOnly probeform is also readonly.
Dustin Demuth <dustin@intevation.de>
parents:
683
diff
changeset
|
237 if (b == true){ |
69cb367c0a63
When a Probeform is dirty, all child-grids are made readonly (Row Editing is not disbled correctly). When a Probe is read-only all Child-grid buttons are disabled. When a Probe is ReadOnly probeform is also readonly.
Dustin Demuth <dustin@intevation.de>
parents:
683
diff
changeset
|
238 //Readonly |
69cb367c0a63
When a Probeform is dirty, all child-grids are made readonly (Row Editing is not disbled correctly). When a Probe is read-only all Child-grid buttons are disabled. When a Probe is ReadOnly probeform is also readonly.
Dustin Demuth <dustin@intevation.de>
parents:
683
diff
changeset
|
239 if (this.getPlugin('rowedit')){ |
69cb367c0a63
When a Probeform is dirty, all child-grids are made readonly (Row Editing is not disbled correctly). When a Probe is read-only all Child-grid buttons are disabled. When a Probe is ReadOnly probeform is also readonly.
Dustin Demuth <dustin@intevation.de>
parents:
683
diff
changeset
|
240 this.getPlugin('rowedit').disable(); |
69cb367c0a63
When a Probeform is dirty, all child-grids are made readonly (Row Editing is not disbled correctly). When a Probe is read-only all Child-grid buttons are disabled. When a Probe is ReadOnly probeform is also readonly.
Dustin Demuth <dustin@intevation.de>
parents:
683
diff
changeset
|
241 } |
69cb367c0a63
When a Probeform is dirty, all child-grids are made readonly (Row Editing is not disbled correctly). When a Probe is read-only all Child-grid buttons are disabled. When a Probe is ReadOnly probeform is also readonly.
Dustin Demuth <dustin@intevation.de>
parents:
683
diff
changeset
|
242 this.down('button[action=delete]').disable(); |
69cb367c0a63
When a Probeform is dirty, all child-grids are made readonly (Row Editing is not disbled correctly). When a Probe is read-only all Child-grid buttons are disabled. When a Probe is ReadOnly probeform is also readonly.
Dustin Demuth <dustin@intevation.de>
parents:
683
diff
changeset
|
243 this.down('button[action=add]').disable(); |
69cb367c0a63
When a Probeform is dirty, all child-grids are made readonly (Row Editing is not disbled correctly). When a Probe is read-only all Child-grid buttons are disabled. When a Probe is ReadOnly probeform is also readonly.
Dustin Demuth <dustin@intevation.de>
parents:
683
diff
changeset
|
244 }else{ |
69cb367c0a63
When a Probeform is dirty, all child-grids are made readonly (Row Editing is not disbled correctly). When a Probe is read-only all Child-grid buttons are disabled. When a Probe is ReadOnly probeform is also readonly.
Dustin Demuth <dustin@intevation.de>
parents:
683
diff
changeset
|
245 //Writable |
687
aedf0709af92
Applied ReadOnlyParadigm to a Messung Window
Dustin Demuth <dustin@intevation.de>
parents:
684
diff
changeset
|
246 if (this.getPlugin('rowedit')){ |
aedf0709af92
Applied ReadOnlyParadigm to a Messung Window
Dustin Demuth <dustin@intevation.de>
parents:
684
diff
changeset
|
247 this.getPlugin('rowedit').enable(); |
aedf0709af92
Applied ReadOnlyParadigm to a Messung Window
Dustin Demuth <dustin@intevation.de>
parents:
684
diff
changeset
|
248 } |
824
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
249 //this.down('button[action=delete]').enable(); |
687
aedf0709af92
Applied ReadOnlyParadigm to a Messung Window
Dustin Demuth <dustin@intevation.de>
parents:
684
diff
changeset
|
250 this.down('button[action=add]').enable(); |
aedf0709af92
Applied ReadOnlyParadigm to a Messung Window
Dustin Demuth <dustin@intevation.de>
parents:
684
diff
changeset
|
251 } |
824
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
252 }, |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
253 /** |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
254 * Activate the Remove Button |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
255 */ |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
256 activateRemoveButton: function(selection, record) { |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
257 var grid = this; |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
258 //only enable the remove buttone, when the grid is editable. |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
259 if (! grid.readOnly) { |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
260 grid.down('button[action=delete]').enable(); |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
261 } |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
262 }, |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
263 /** |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
264 * Activate the Remove Button |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
265 */ |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
266 deactivateRemoveButton: function(selection, record) { |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
267 var grid = this; |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
268 //only enable the remove buttone, when the grid is editable. |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
269 if (! grid.readOnly) { |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
270 grid.down('button[action=delete]').disable(); |
fab0b7be5aca
add disbled remove button to all grids which relate to proben or messungen. Messprogramme-grids are untouched. BUG: When the last entry is deleted, the button remains active
Dustin Demuth <dustin@intevation.de>
parents:
740
diff
changeset
|
271 } |
590
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
272 } |
e440b66a859f
Added grid (+controller) for messwerte.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
273 }); |