annotate app/view/grid/Status.js @ 727:e002234d7da5

Corrected URL for lada-server in export and import
author Dustin Demuth <dustin@intevation.de>
date Fri, 17 Apr 2015 10:51:40 +0200
parents 9ab7b1eed9f8
children ad24af3fcf89
rev   line source
594
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
3 *
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
7 */
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
8
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
9 /*
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
10 * Grid to list Status
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
11 */
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
12 Ext.define('Lada.view.grid.Status', {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
13 extend: 'Ext.grid.Panel',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
14 alias: 'widget.statusgrid',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
15
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
16 maxHeight: 350,
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
17 emptyText: 'Keine Statusangaben gefunden.',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
18 minHeight: 110,
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
19 viewConfig: {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
20 deferEmptyText: false
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
21 },
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
22
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
23 recordId: null,
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
24
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
25 initComponent: function() {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
26 this.rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
27 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: 663
diff changeset
28 autoCancel: false,
703
9ab7b1eed9f8 Rowediting is now disabled when the Grid was set to ReadOnly
Dustin Demuth <dustin@intevation.de>
parents: 684
diff changeset
29 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
30 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: 663
diff changeset
31 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: 663
diff changeset
32 // 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: 663
diff changeset
33 // 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: 684
diff changeset
34 // 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: 663
diff changeset
35 beforeedit: function(e, o) {
703
9ab7b1eed9f8 Rowediting is now disabled when the Grid was set to ReadOnly
Dustin Demuth <dustin@intevation.de>
parents: 684
diff changeset
36 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: 684
diff changeset
37 var readonlygrid = o.record.get('readonly');
9ab7b1eed9f8 Rowediting is now disabled when the Grid was set to ReadOnly
Dustin Demuth <dustin@intevation.de>
parents: 684
diff changeset
38 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: 663
diff changeset
39 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: 663
diff changeset
40 }
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: 663
diff changeset
41 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: 663
diff changeset
42 }
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: 663
diff changeset
43 }
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: 663
diff changeset
44 });
594
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
45 this.plugins = [this.rowEditing];
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
46
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
47 var statusStore = Ext.create('Ext.data.Store', {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
48 fields: ['display', 'id'],
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
49 data: [{
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
50 display: 'unbekannt', id: 0
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
51 }, {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
52 display: 'nicht vergeben', id: 1
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
53 }, {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
54 display: 'plausibel', id: 2
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
55 }, {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
56 display: 'nicht repräsentativ', id: 3
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
57 }, {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
58 display: 'nicht plausibel', id: 4
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
59 }]
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
60 });
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
61 this.dockedItems = [{
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
62 xtype: 'toolbar',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
63 dock: 'bottom',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
64 items: ['->', {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
65 text: 'HinzufĂĽgen',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
66 icon: 'resources/img/list-add.png',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
67 action: 'add',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
68 probeId: this.probeId,
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
69 parentId: this.parentId
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
70 }, {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
71 text: 'Löschen',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
72 icon: 'resources/img/list-remove.png',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
73 action: 'delete'
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
74 }]
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
75 }];
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
76 this.columns = [{
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
77 header: 'Erzeuger',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
78 dataIndex: 'erzeuger',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
79 renderer: function(value) {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
80 if (!value || value === '') {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
81 return '';
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
82 }
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
83 var mstore = Ext.data.StoreManager.get('messstellen');
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
84 return mstore.getById(value).get('messStelle');
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
85 },
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
86 editor: {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
87 xtype: 'combobox',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
88 store: Ext.data.StoreManager.get('messstellen'),
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
89 displayField: 'messStelle',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
90 valueField: 'id',
663
1c5a4b419149 Field Validity in Status Grid
Dustin Demuth <dustin@intevation.de>
parents: 630
diff changeset
91 allowBlank: false,
1c5a4b419149 Field Validity in Status Grid
Dustin Demuth <dustin@intevation.de>
parents: 630
diff changeset
92 editable: false
594
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
93 }
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
94 }, {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
95 header: 'Status',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
96 dataIndex: 'status',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
97 renderer: function(value) {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
98 if (!value || value === '') {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
99 return '';
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
100 }
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
101 return statusStore.getById(value).get('display');
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
102 },
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
103 editor: {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
104 xtype: 'combobox',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
105 store: statusStore,
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
106 displayField: 'display',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
107 valueField: 'id',
663
1c5a4b419149 Field Validity in Status Grid
Dustin Demuth <dustin@intevation.de>
parents: 630
diff changeset
108 allowBlank: false,
1c5a4b419149 Field Validity in Status Grid
Dustin Demuth <dustin@intevation.de>
parents: 630
diff changeset
109 editable: false
594
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
110 }
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
111 }, {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
112 header: 'Datum',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
113 dataIndex: 'sdatum',
630
73b5b22a5b76 Column zu datecolumn gemacht
Dustin Demuth <dustin@intevation.de>
parents: 594
diff changeset
114 xtype: 'datecolumn',
663
1c5a4b419149 Field Validity in Status Grid
Dustin Demuth <dustin@intevation.de>
parents: 630
diff changeset
115 format: 'd.m.Y',
594
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
116 editor: {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
117 xtype: 'datefield',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
118 allowBlank: false,
663
1c5a4b419149 Field Validity in Status Grid
Dustin Demuth <dustin@intevation.de>
parents: 630
diff changeset
119 format: 'd.m.Y',
594
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
120 maxValue: Ext.Date.format(new Date(), 'd.m.Y')
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
121 }
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
122 }, {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
123 header: 'Text',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
124 dataIndex: 'skommentar',
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
125 flex: 1,
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
126 editor: {
663
1c5a4b419149 Field Validity in Status Grid
Dustin Demuth <dustin@intevation.de>
parents: 630
diff changeset
127 allowBlank: true,
1c5a4b419149 Field Validity in Status Grid
Dustin Demuth <dustin@intevation.de>
parents: 630
diff changeset
128 maxLength: 1000,
1c5a4b419149 Field Validity in Status Grid
Dustin Demuth <dustin@intevation.de>
parents: 630
diff changeset
129 enforceMaxLength: true
594
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
130 }
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
131 }];
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
132 this.initData();
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
133 this.callParent(arguments);
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
134 },
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
135
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
136 initData: function() {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
137 if (this.store) {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
138 this.store.removeAll();
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
139 }
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
140 else {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
141 this.store = Ext.create('Lada.store.Status');
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
142 }
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
143 this.store.load({
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
144 params: {
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
145 messungsId: this.recordId
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
146 }
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
147 });
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
148 },
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
149
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
150 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
151 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
152 //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
153 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
154 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
155 }
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
156 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
157 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
158 }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
159 //Writable
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
160 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
161 this.getPlugin('rowedit').enable();
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
162 }
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
163 this.down('button[action=delete]').enable();
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
164 this.down('button[action=add]').enable();
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
165 }
594
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
166 }
89b337cbfb5d Added status grid and controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
167 });

http://lada.wald.intevation.org