Merge pull request #198 from gallifabio/feature/favor-selected-text
Explain and Export: favor selected text
This commit is contained in:
commit
474c439076
File diff suppressed because one or more lines are too long
@ -563,7 +563,7 @@ function runExplain() {
|
|||||||
$("#run, #explain, #csv, #json, #xml").prop("disabled", true);
|
$("#run, #explain, #csv, #json, #xml").prop("disabled", true);
|
||||||
$("#query_progress").show();
|
$("#query_progress").show();
|
||||||
|
|
||||||
var query = $.trim(editor.getValue());
|
var query = $.trim(editor.getSelectedText() || editor.getValue());
|
||||||
|
|
||||||
if (query.length == 0) {
|
if (query.length == 0) {
|
||||||
$("#run, #explain, #csv, #json, #xml").prop("disabled", false);
|
$("#run, #explain, #csv, #json, #xml").prop("disabled", false);
|
||||||
@ -583,7 +583,7 @@ function runExplain() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function exportTo(format) {
|
function exportTo(format) {
|
||||||
var query = $.trim(editor.getValue());
|
var query = $.trim(editor.getSelectedText() || editor.getValue());
|
||||||
|
|
||||||
if (query.length == 0) {
|
if (query.length == 0) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user