annotate app/view/grid/Nuklide.js @ 767:5ee59111b188

Add/Remove is now reliable
author Dustin Demuth <dustin@intevation.de>
date Tue, 12 May 2015 14:53:54 +0200
parents 31eaed998531
children 380edfecac67
rev   line source
764
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
3 *
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
7 */
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
8
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
9 /*
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
10 * Grid to list Nuklide
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
11 */
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
12 Ext.define('Lada.view.grid.Nuklide', {
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
13 extend: 'Ext.grid.Panel',
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
14 alias: 'widget.nuklidegrid',
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
15
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
16 requires: [
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
17 'Lada.view.widget.Messgroesse'
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
18 ],
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
19
767
5ee59111b188 Add/Remove is now reliable
Dustin Demuth <dustin@intevation.de>
parents: 766
diff changeset
20 maxHeight: 150,
5ee59111b188 Add/Remove is now reliable
Dustin Demuth <dustin@intevation.de>
parents: 766
diff changeset
21 minHeight: 150,
764
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
22 viewConfig: {
767
5ee59111b188 Add/Remove is now reliable
Dustin Demuth <dustin@intevation.de>
parents: 766
diff changeset
23 deferEmptyText: false,
5ee59111b188 Add/Remove is now reliable
Dustin Demuth <dustin@intevation.de>
parents: 766
diff changeset
24 markDirty: false //Remove Dirty-Flags
764
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
25 },
767
5ee59111b188 Add/Remove is now reliable
Dustin Demuth <dustin@intevation.de>
parents: 766
diff changeset
26 //margin: '0, 0, 5, 5',
764
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
27
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
28 recordId: null,
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
29
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
30 initComponent: function() {
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
31 var i18n = Lada.getApplication().bundle;
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
32 this.emptyText = i18n.getMsg('emptytext.nuklidgrid');
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
33
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
34 this.dockedItems = [{
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
35 xtype: 'toolbar',
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
36 dock: 'bottom',
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
37 items: ['->', {
766
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
38 text: i18n.getMsg('add'),
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
39 qtip: i18n.getMsg('add.qtip'),
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
40 icon: 'resources/img/list-add.png',
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
41 action: 'add',
764
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
42 disabled: true
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
43 }, {
766
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
44 text: i18n.getMsg('delete'),
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
45 qtip: i18n.getMsg('delete.qtip'),
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
46 icon: 'resources/img/list-remove.png',
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
47 action: 'remove',
764
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
48 disabled: true
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
49 }]
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
50 }];
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
51 this.columns = [{
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
52 header: i18n.getMsg('nuklid'),
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
53 dataIndex: 'id',
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
54 flex: 1,
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
55 renderer: function(value) {
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
56 if (!value || value === '') {
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
57 return '';
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
58 }
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
59 var store = Ext.data.StoreManager.get('messgroessen');
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
60 if (!store) {
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
61 store = Ext.create('Lada.store.Messgroessen');
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
62 }
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
63 return store.findRecord('id', value, 0, false, false, true).get('messgroesse');
766
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
64 },
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
65 editor: {
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
66 xtype: 'combobox',
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
67 store: Ext.data.StoreManager.get('messgroessen'),
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
68 valueField: 'id',
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
69 allowBlank: false,
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
70 editable: true,
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
71 forceSelection: true,
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
72 autoSelect: true,
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
73 //multiSelect: true, // TODO
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
74 queryMode: 'local',
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
75 minChars: 0,
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
76 typeAhead: false,
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
77 triggerAction: 'all',
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
78 tpl: Ext.create("Ext.XTemplate",
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
79 '<tpl for="."><div class="x-combo-list-item x-boundlist-item" >' +
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
80 '{messgroesse}</div></tpl>'),
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
81 displayTpl: Ext.create('Ext.XTemplate',
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
82 '<tpl for=".">{messgroesse}</tpl>'),
764
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
83 }
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
84 }];
766
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
85
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
86 this.rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
87 clicksToMoveEditor: 1,
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
88 autoCancel: false,
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
89 disabled: false,
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
90 pluginId: 'nuklidrowedit',
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
91 listeners:{
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
92 // Make row ineditable when readonly is set to true
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
93 // Normally this would belong into a controller an not the view.
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
94 // But the RowEditPlugin is not handled there.
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
95 beforeedit: function(e, o) {
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
96 var readonlywin = o.grid.up('window').record.get('readonly');
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
97 var readonlygrid = o.record.get('readonly');
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
98 if (readonlywin == true || readonlygrid == true || this.disabled) {
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
99 return false;
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
100 }
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
101 return true;
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
102 }
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
103 }
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
104 });
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
105
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
106 this.plugins = [this.rowEditing];
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
107
764
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
108 this.initData();
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
109 this.callParent(arguments);
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
110 },
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
111 initData: function() {
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
112 if (this.store) {
766
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
113 this.store.reload();
764
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
114 }
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
115 },
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
116 setData: function(store) {
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
117 this.setLoading(true);
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
118 this.reconfigure(store);
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
119 this.setLoading(false);
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
120 },
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
121 setReadOnly: function(b) {
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
122 if (b == true){
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
123 //Readonly
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
124 if (this.getPlugin('rowedit')){
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
125 this.getPlugin('rowedit').disable();
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
126 }
766
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
127 this.down('button[action=add]').disable();
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
128 this.down('button[action=remove]').disable();
764
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
129 }else{
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
130 //Writable
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
131 if (this.getPlugin('rowedit')){
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
132 this.getPlugin('rowedit').enable();
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
133 }
766
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
134 this.down('button[action=add]').enable();
31eaed998531 enabled removal and creation of messgroessen for a messmethode
Dustin Demuth <dustin@intevation.de>
parents: 764
diff changeset
135 this.down('button[action=remove]').enable();
764
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
136 }
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
137 }
ba8c0e754979 Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
138 });

http://lada.wald.intevation.org