Fix saving function changes

Wait for the request to complete before reloading.
This commit is contained in:
Matthew Noorenberghe 2020-09-10 11:01:28 -04:00
parent d843ef89f6
commit f046b565c6
1 changed files with 3 additions and 2 deletions

View File

@ -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);
});
}); });
} }