Fix saving function changes
Wait for the request to complete before reloading.
This commit is contained in:
parent
d843ef89f6
commit
f046b565c6
|
@ -186,8 +186,9 @@ function initPage() {
|
||||||
var mid = form.elements['mid'].value;
|
var mid = form.elements['mid'].value;
|
||||||
var newFunc = $j('#newFunction').val();
|
var newFunc = $j('#newFunction').val();
|
||||||
var newEnabled = $j('#newEnabled').is(':checked') ? 1 : 0;
|
var newEnabled = $j('#newEnabled').is(':checked') ? 1 : 0;
|
||||||
$j.getJSON(thisUrl + '?view=function&action=function&mid='+mid+'&newFunction='+newFunc+'&newEnabled='+newEnabled);
|
$j.getJSON(thisUrl + '?view=function&action=function&mid='+mid+'&newFunction='+newFunc+'&newEnabled='+newEnabled, function() {
|
||||||
window.location.reload(true);
|
window.location.reload(true);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue