Cleanup the layout of the filter data dialogue. Fixes #2924
parent
709f646f5e
commit
389cf01af7
|
@ -1,7 +1,6 @@
|
||||||
define('pgadmin.datagrid', [
|
define('pgadmin.datagrid', [
|
||||||
'sources/gettext', 'sources/url_for', 'jquery', 'underscore', 'alertify', 'sources/pgadmin',
|
'sources/gettext', 'sources/url_for', 'jquery', 'underscore', 'pgadmin.alertifyjs',
|
||||||
'bundled_codemirror',
|
'sources/pgadmin', 'bundled_codemirror', 'sources/sqleditor_utils', 'wcdocker'
|
||||||
'sources/sqleditor_utils', 'wcdocker'
|
|
||||||
], function(gettext, url_for, $, _, alertify, pgAdmin, codemirror, sqlEditorUtils) {
|
], function(gettext, url_for, $, _, alertify, pgAdmin, codemirror, sqlEditorUtils) {
|
||||||
// Some scripts do export their object in the window only.
|
// Some scripts do export their object in the window only.
|
||||||
// Generally the one, which do no have AMD support.
|
// Generally the one, which do no have AMD support.
|
||||||
|
@ -244,14 +243,20 @@ define('pgadmin.datagrid', [
|
||||||
{ text: "OK", className: "btn btn-primary" },
|
{ text: "OK", className: "btn btn-primary" },
|
||||||
{ text: "Cancel", className: "btn btn-danger" }
|
{ text: "Cancel", className: "btn btn-danger" }
|
||||||
],
|
],
|
||||||
options: { modal: 0, resizable: false, maximizable: false, pinnable: false}
|
options: { modal: 0, resizable: true, maximizable: false, pinnable: false}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
build: function() {
|
||||||
build:function() {},
|
alertify.pgDialogBuild.apply(this)
|
||||||
|
},
|
||||||
prepare:function() {
|
prepare:function() {
|
||||||
var $content = $(this.message),
|
var self = this,
|
||||||
$sql_filter = $content.find('#sql_filter');
|
$content = $(this.message),
|
||||||
|
$sql_filter = $content.find('#sql_filter');
|
||||||
|
|
||||||
|
$(this.elements.body.childNodes[0]).addClass(
|
||||||
|
'dataview_filter_dialog'
|
||||||
|
);
|
||||||
|
|
||||||
this.setContent($content.get(0));
|
this.setContent($content.get(0));
|
||||||
|
|
||||||
|
@ -267,6 +272,11 @@ define('pgadmin.datagrid', [
|
||||||
autoCloseBrackets: pgAdmin.Browser.editor_options.insert_pair_brackets,
|
autoCloseBrackets: pgAdmin.Browser.editor_options.insert_pair_brackets,
|
||||||
matchBrackets: pgAdmin.Browser.editor_options.brace_matching
|
matchBrackets: pgAdmin.Browser.editor_options.brace_matching
|
||||||
});
|
});
|
||||||
|
|
||||||
|
setTimeout(function() {
|
||||||
|
// Set focus on editor
|
||||||
|
self.filter_obj.focus();
|
||||||
|
}, 500);
|
||||||
},
|
},
|
||||||
|
|
||||||
callback: function(closeEvent) {
|
callback: function(closeEvent) {
|
||||||
|
@ -310,7 +320,8 @@ define('pgadmin.datagrid', [
|
||||||
var content = '';
|
var content = '';
|
||||||
$.get(url_for('datagrid.filter'),
|
$.get(url_for('datagrid.filter'),
|
||||||
function(data) {
|
function(data) {
|
||||||
alertify.filterDialog('Data Filter', data, baseUrl, validateUrl).resizeTo(600, 400);
|
alertify.filterDialog('Data Filter', data, baseUrl, validateUrl)
|
||||||
|
.resizeTo(300, 200);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,7 +3,14 @@
|
||||||
<style>
|
<style>
|
||||||
.filter-textarea .CodeMirror-scroll {
|
.filter-textarea .CodeMirror-scroll {
|
||||||
min-height: 120px;
|
min-height: 120px;
|
||||||
max-height: 120px;
|
}
|
||||||
|
.dataview_filter_dialog {
|
||||||
|
bottom: 0 !important;
|
||||||
|
left: 0 !important;
|
||||||
|
right: 0 !important;
|
||||||
|
top: 35px !important;
|
||||||
|
padding: 0px !important;
|
||||||
|
position: absolute;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue