comparison app/view/window/GenProbenFromMessprogramm.js @ 818:097d4edc2f00

Genprobenwindow can only be created once, also fixed messprogrammortewindow 'close with x and can not reopen' bug
author Dustin Demuth <dustin@intevation.de>
date Fri, 29 May 2015 09:05:06 +0200
parents 188a9faf96e0
children 00072c3c926e
comparison
equal deleted inserted replaced
817:1321efe444f0 818:097d4edc2f00
19 autoScroll: true, 19 autoScroll: true,
20 layout: 'fit', 20 layout: 'fit',
21 constrain: true, 21 constrain: true,
22 22
23 record: null, 23 record: null,
24 parentWindow: null,
24 25
25 initComponent: function() { 26 initComponent: function() {
26 var i18n = Lada.getApplication().bundle; 27 var i18n = Lada.getApplication().bundle;
28
29 // add listeners to change the window appearence when it becomes inactive
30 this.on({
31 activate: function(){
32 this.getEl().removeCls('window-inactive');
33 },
34 deactivate: function(){
35 this.getEl().addCls('window-inactive');
36 }
37 });
27 38
28 this.title = i18n.getMsg('gpfm.window.title'); 39 this.title = i18n.getMsg('gpfm.window.title');
29 var me = this; 40 var me = this;
30 this.buttons = [{ 41 this.buttons = [{
31 text: i18n.getMsg('cancel'), 42 text: i18n.getMsg('cancel'),
74 * handle it here with relaunch. */ 85 * handle it here with relaunch. */
75 Ext.MessageBox.confirm('Erneutes Login erforderlich', 86 Ext.MessageBox.confirm('Erneutes Login erforderlich',
76 'Der Server konnte die Anfrage nicht authentifizieren.<br/>'+ 87 'Der Server konnte die Anfrage nicht authentifizieren.<br/>'+
77 'Für ein erneutes Login muss die Anwendung neu geladen werden.<br/>' + 88 'Für ein erneutes Login muss die Anwendung neu geladen werden.<br/>' +
78 'Alle ungesicherten Daten gehen dabei verloren.<br/>' + 89 'Alle ungesicherten Daten gehen dabei verloren.<br/>' +
79 'Soll die Anwendung jetzt neu geladen werden?', this.reload); 90 'Soll die Anwendung jetzt neu geladen werden?', me.reload); //TODO Scope?
80 } 91 }
81 else if(json.message){ 92 else if(json.message){
82 Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.generic.title') 93 Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.generic.title')
83 +' #'+json.message, 94 +' #'+json.message,
84 Lada.getApplication().bundle.getMsg(json.message)); 95 Lada.getApplication().bundle.getMsg(json.message));
102 activate: function(){ 113 activate: function(){
103 this.getEl().removeCls('window-inactive'); 114 this.getEl().removeCls('window-inactive');
104 }, 115 },
105 deactivate: function(){ 116 deactivate: function(){
106 this.getEl().addCls('window-inactive'); 117 this.getEl().addCls('window-inactive');
118 },
119 close: function () {
120 this.parentWindow.probenWindow = null;
107 } 121 }
108 }); 122 });
109 123
110 // InitialConfig is the config object passed to the constructor on 124 // InitialConfig is the config object passed to the constructor on
111 // creation of this window. We need to pass it throuh to the form as 125 // creation of this window. We need to pass it throuh to the form as

http://lada.wald.intevation.org