Use a separate class to remove the footer space in the query editor,

when no of records in a page is set to 0 (or, less than 0). So that -
we do not loose CSS applied on the children DOM Elements dependent of
the original class.

This was regression of commit-id:
f9393aee44

We were loosing the formatting under the grid table due to this change.
This commit is contained in:
Ashesh Vashi 2016-06-17 15:11:43 +05:30
parent 262ae7d28c
commit 359b1d0176
2 changed files with 9 additions and 5 deletions

View File

@ -58,6 +58,10 @@
overflow: auto;
}
.sql-editor-grid-container.has-no-footer {
height: 100%;
}
#datagrid-paginator {
bottom: 0px;
width: 100%;
@ -289,4 +293,4 @@ li.CodeMirror-hint-active {
.CodeMirror-hint .fa::before {
padding-right: 7px;
}
}

View File

@ -448,8 +448,8 @@ define(
// Render the paginator if items_per_page is greater than zero.
if (self.items_per_page > 0) {
if ($data_grid.hasClass('sql-editor-grid-container') === false)
$data_grid.addClass('sql-editor-grid-container');
if ($data_grid.hasClass('has-no-footer'))
$data_grid.removeClass('has-no-footer');
// Render the grid
$data_grid.append(self.grid.render().$el);
@ -463,8 +463,8 @@ define(
self.$el.find('#datagrid-paginator').append(paginator.render().el);
}
else {
if ($data_grid.hasClass('sql-editor-grid-container'))
$data_grid.removeClass('sql-editor-grid-container');
if (!$data_grid.hasClass('has-no-footer'))
$data_grid.addClass('has-no-footer');
// Render the grid
$data_grid.append(self.grid.render().$el);