Skip to content

Commit

Permalink
Merge #15848 - Ref #15792 - Fixed logic after PRs
Browse files Browse the repository at this point in the history
Ref: #15792
Pull-request: #15848
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Jan 25, 2020
2 parents 2117a3f + 1b39ddd commit 19ccc36
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/makegrid.js
Expand Up @@ -1378,7 +1378,7 @@ var makeGrid = function (t, enableResize, enableReorder, enableVisib, enableGrid
var tools = $resultQuery.find('.tools').wrap('<p>').parent().html();
// sqlOuter and tools will not be present if 'Show SQL queries' configuration is off
if (typeof sqlOuter !== 'undefined' && typeof tools !== 'undefined') {
$(g.o).find('.result_query').not().last().remove();
$(g.o).find('.result_query').not($(g.o).find('.result_query').last()).remove();
var $existingQuery = $(g.o).find('.result_query');
// If two query box exists update query in second else add a second box
if ($existingQuery.find('div.sqlOuter').length > 1) {
Expand Down
6 changes: 5 additions & 1 deletion js/server/privileges.js
Expand Up @@ -360,7 +360,11 @@ AJAX.registerOnload('server/privileges.js', function () {
$('#initials_table')
.prop('id', 'initials_table_old')
.after(data.message).show('medium')
.siblings('h2').not().first().remove();
.siblings('h2').not($('#initials_table')
.prop('id', 'initials_table_old')
.after(data.message).show('medium')
.siblings('h2').first())
.remove();
// prevent double initials table
$('#initials_table_old').remove();
} else {
Expand Down
8 changes: 6 additions & 2 deletions js/table/relation.js
Expand Up @@ -190,8 +190,12 @@ AJAX.registerOnload('table/relation.js', function () {
$newRow.find('a.add_foreign_key_field').attr('data-index', newIndex);

// Update form parameter names.
$newRow.find('select[name^="foreign_key_fields_name"]').not().first().find(
'select[name^="destination_foreign_column"]').not().first()
$newRow.find('select[name^="foreign_key_fields_name"]')
.not($newRow.find('select[name^="foreign_key_fields_name"]').first())
.find('select[name^="destination_foreign_column"]')
.not($newRow.find('select[name^="foreign_key_fields_name"]')
.not($newRow.find('select[name^="foreign_key_fields_name"]').first())
.find('select[name^="destination_foreign_column"]').first())
.each(function () {
$(this).parent().remove();
});
Expand Down

0 comments on commit 19ccc36

Please sign in to comment.