Merge #15675 - Fix #15662 stay on the structure page when editing indexes

Pull-request: #15675
Fixes: #15662

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2020-02-25 22:21:35 +01:00
commit b5ecd65e13
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -667,10 +667,9 @@ AJAX.registerOnload('indexes.js', function () {
.prependTo('#structure_content');
Functions.highlightSql($('#page_content'));
}
CommonActions.refreshMain(false, function () {
$('a.ajax[href^=#indexes]').trigger('click');
});
Navigation.reload();
var tableStructureUrl = 'index.php?route=/table/structure' + CommonParams.getUrlQuery('&');
CommonActions.refreshMain(tableStructureUrl);
} else {
Functions.ajaxShowMessage(Messages.strErrorProcessingRequest + ' : ' + data.error, false);
}
@ -704,10 +703,8 @@ AJAX.registerOnload('indexes.js', function () {
}
url += CommonParams.get('arg_separator') + 'ajax_request=true';
Functions.indexEditorDialog(url, title, function () {
// refresh the page using ajax
CommonActions.refreshMain(false, function () {
$('a.ajax[href^=#indexes]').trigger('click');
});
var tableStructureUrl = 'index.php?route=/table/structure' + CommonParams.getUrlQuery('&');
CommonActions.refreshMain(tableStructureUrl);
});
});