sync call ajax.request

master
inpos 2018-08-16 20:13:19 +03:00
parent f73a950caa
commit a4d80ad827
1 changed files with 3 additions and 3 deletions

View File

@ -34,17 +34,17 @@ def js_procedure(func_id, ajax_args=''):
def js_function(func_id, ajax_args=''):
return '''
var ajax_result;
Ext.Ajax.request(
var response = Ext.Ajax.request(
{
url: '%s',
method: 'GET',
async: false,
params: {
fn: %d%s
},
success: function () { ajax_result = JSON.parse(arguments[0].responseText); }
}
);
var ajax_result = JSON.parse(response.responseText);
return ajax_result.data;
''' % (
AJAX_FUNC_URL,