1) Fix sort/filter dialog editing issue. Fixes #3558.

2) Fix sort/filter dialog issue where it incorrectly requires ASC/DESC. Fixes #3325.
This commit is contained in:
Aditya Toshniwal 2018-08-21 13:05:40 +05:30 committed by Akshay Joshi
parent 46d4bf027d
commit 57660d131f
6 changed files with 14 additions and 12 deletions

View File

@ -15,7 +15,9 @@ Features
Bug fixes
*********
| `Bug #3325 <https://redmine.postgresql.org/issues/3325>`_ - Fix sort/filter dialog issue where it incorrectly requires ASC/DESC.
| `Bug #3407 <https://redmine.postgresql.org/issues/3407>`_ - Fix keyboard shortcuts layout in the preferences panel.
| `Bug #3461 <https://redmine.postgresql.org/issues/3461>`_ - Ensure that refreshing a node also updates the Property list.
| `Bug #3528 <https://redmine.postgresql.org/issues/3528>`_ - Handle connection errors properly in the query tool.
| `Bug #3558 <https://redmine.postgresql.org/issues/3558>`_ - Fix sort/filter dialog editing issue.
| `Bug #3578 <https://redmine.postgresql.org/issues/3578>`_ - Ensure sql for Role should be visible in SQL panel for GPDB.

View File

@ -42,10 +42,6 @@
color: #964;
}
.pgadmin-controls.sql_field_layout .CodeMirror {
line-height: 22px;
}
/* Codemirror buttons */
.CodeMirror-dialog button {
font-family: 'Open Sans';

View File

@ -2099,7 +2099,9 @@ define([
self.sqlCtrl.setOption('lineWrapping', sqlEditPreferences.wrap_code);
self.sqlCtrl.setOption('autoCloseBrackets', sqlEditPreferences.insert_pair_brackets);
self.sqlCtrl.setOption('matchBrackets', sqlEditPreferences.brace_matching);
self.sqlCtrl.refresh();
setTimeout(function() {
self.sqlCtrl.refresh();
}, 500);
}
},

View File

@ -51,13 +51,13 @@ let FilterDialog = {
}),
},
}, {
text: gettext('Ok'),
className: 'btn btn-primary fa fa-lg fa-save pg-alertify-button',
text: gettext('OK'),
className: 'btn btn-primary pg-alertify-button',
'data-btn-name': 'ok',
}, {
text: gettext('Cancel'),
key: 27,
className: 'btn btn-danger fa fa-lg fa-times pg-alertify-button',
className: 'btn btn-danger pg-alertify-button',
'data-btn-name': 'cancel',
}],
// Set options for dialog

View File

@ -304,8 +304,12 @@ define('pgadmin.datagrid', [
matchBrackets: self.preferences.brace_matching,
});
let sql_font_size = sqlEditorUtils.calcFontSize(self.preferences.sql_font_size);
$(this.filter_obj.getWrapperElement()).css('font-size', sql_font_size);
setTimeout(function() {
// Set focus on editor
that.filter_obj.refresh();
that.filter_obj.focus();
}, 500);
},

View File

@ -425,12 +425,10 @@ class GridCommand(BaseCommand, SQLFilter, FetchedRowTracker):
"""
This function gets the order required for primary keys
"""
if self.cmd_type in (VIEW_FIRST_100_ROWS, VIEW_ALL_ROWS):
return 'asc'
elif self.cmd_type == VIEW_LAST_100_ROWS:
if self.cmd_type == VIEW_LAST_100_ROWS:
return 'desc'
else:
return None
return 'asc'
class TableCommand(GridCommand):