comparison app/controller/form/Probe.js @ 1386:7e9a6f0e55b3

Added UI for audit trail. TODO: add more i18n strings.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 24 Feb 2017 14:32:55 +0100
parents 49efc1cc0eac
children
comparison
equal deleted inserted replaced
1385:3f499c52eee6 1386:7e9a6f0e55b3
10 * A Controller for a Probe form 10 * A Controller for a Probe form
11 */ 11 */
12 Ext.define('Lada.controller.form.Probe', { 12 Ext.define('Lada.controller.form.Probe', {
13 extend: 'Ext.app.Controller', 13 extend: 'Ext.app.Controller',
14 14
15 requires: [
16 'Lada.view.window.AuditTrail'
17 ],
18
15 /** 19 /**
16 * Initialize the Controller 20 * Initialize the Controller
17 * It has 4 listeners 21 * It has 4 listeners
18 */ 22 */
19 init: function() { 23 init: function() {
21 'probeform button[action=save]': { 25 'probeform button[action=save]': {
22 click: this.save 26 click: this.save
23 }, 27 },
24 'probeform button[action=discard]': { 28 'probeform button[action=discard]': {
25 click: this.discard 29 click: this.discard
30 },
31 'probeform button[action=audit]': {
32 click: this.showAuditTrail
26 }, 33 },
27 'probeform': { 34 'probeform': {
28 dirtychange: this.dirtyForm 35 dirtychange: this.dirtyForm
29 }, 36 },
30 'probeform messstellelabor combobox': { 37 'probeform messstellelabor combobox': {
302 clearChildDesk: function(field) { 309 clearChildDesk: function(field) {
303 var allS = field.up('fieldset').items.items; 310 var allS = field.up('fieldset').items.items;
304 for (var i = field.layer + 1; i < 12; i++) { 311 for (var i = field.layer + 1; i < 12; i++) {
305 allS[i].clearValue(); 312 allS[i].clearValue();
306 } 313 }
314 },
315
316 showAuditTrail: function(button) {
317 Ext.create('Lada.view.window.AuditTrail', {
318 autoShow: true,
319 closeAction: 'destroy',
320 type: 'probe',
321 objectId: button.up('form').recordId
322 });
307 } 323 }
308
309 }); 324 });

http://lada.wald.intevation.org