comparison app/view/window/About.js @ 801:646779690e20

moved code to request the server version to app.js
author Dustin Demuth <dustin@intevation.de>
date Fri, 22 May 2015 12:34:14 +0200
parents 4b9b1d3ad9f1
children c6e9bcda69b8
comparison
equal deleted inserted replaced
800:4b9b1d3ad9f1 801:646779690e20
91 xtype: 'text', 91 xtype: 'text',
92 style: { 92 style: {
93 width: '95%', 93 width: '95%',
94 marginBottom: '5px' 94 marginBottom: '5px'
95 }, 95 },
96 text: this.requestServerVersion() 96 text: Lada.serverversion
97 }, {
98 xtype: 'text',
99 style: {
100 width: '95%',
101 marginBottom: '5px'
102 },
103 text: i18n.getMsg('about.window.text.clientversion')
104 }, {
105 xtype: 'text',
106 style: {
107 width: '95%',
108 marginBottom: '5px'
109 },
110 text: Lada.clientversion
97 }] 111 }]
98 }]; 112 }];
99 113
100 this.callParent(arguments); 114 this.callParent(arguments);
101 },
102
103 requestServerVersion: function() {
104 var i18n = Lada.getApplication().bundle;
105 Ext.Ajax.request({
106 url: '/lada-server/version',
107 method: 'GET',
108 headers: {
109 'X-OPENID-PARAMS': Lada.openIDParams
110 },
111 success: function(response) {
112 var json = Ext.decode(response.responseText);
113 // TODO
114 console.log(json);
115 return json.data;
116 },
117 failure: function(response) {
118 console.log('Error in Retrieving the Server Version.'
119 + ' It might be lower than 2.0-beta2'
120 + ' Or something is broken...');
121 return i18n.getMsg('err.msg.generic.body');
122 }
123 });
124 } 115 }
125 }); 116 });

http://lada.wald.intevation.org