mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
Load javascript files before processing other response types, so all JS is available.
This commit is contained in:
parent
23fa7ed233
commit
26e9792256
@ -95,6 +95,22 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd) {
|
||||
json_request.prototype.handleResponse = function(data) {
|
||||
if (data && data.response)
|
||||
{
|
||||
// Load files first
|
||||
var js_files = [];
|
||||
for (var i = data.response.length - 1; i > 0; --i)
|
||||
{
|
||||
var res = data.response[i];
|
||||
if(res.type == 'js' && typeof res.data == 'string')
|
||||
{
|
||||
js_files.unshift(res.data);
|
||||
data.response.splice(i,1);
|
||||
}
|
||||
}
|
||||
if(js_files.length > 0)
|
||||
{
|
||||
this.egw.includeJS(js_files, function() {this.handleResponse(data);}, this);
|
||||
return;
|
||||
}
|
||||
for (var i = 0; i < data.response.length; i++)
|
||||
{
|
||||
// Get the response object
|
||||
|
Loading…
Reference in New Issue
Block a user