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=''): def js_function(func_id, ajax_args=''):
return ''' return '''
var ajax_result; var response = Ext.Ajax.request(
Ext.Ajax.request(
{ {
url: '%s', url: '%s',
method: 'GET', method: 'GET',
async: false,
params: { params: {
fn: %d%s fn: %d%s
}, },
success: function () { ajax_result = JSON.parse(arguments[0].responseText); }
} }
); );
var ajax_result = JSON.parse(response.responseText);
return ajax_result.data; return ajax_result.data;
''' % ( ''' % (
AJAX_FUNC_URL, AJAX_FUNC_URL,