Only set output mode to json once we've put some json into it.

Later we could put other modes in there based on response type.

Closes #84
This commit is contained in:
Boaz Leskes 2014-01-26 23:25:25 +01:00
parent 4b96360adb
commit 8bcd7a06b1
2 changed files with 3 additions and 1 deletions

View file

@ -216,6 +216,7 @@ define([
exec: function () {
output.update('');
submitCurrentRequestToES(function (resp) {
output.getSession().setMode("ace/mode/json");
output.update(resp);
});
}
@ -223,6 +224,7 @@ define([
$send.click(function () {
submitCurrentRequestToES(function (resp) {
output.getSession().setMode("ace/mode/json");
output.update(resp);
});
return false;

View file

@ -16,7 +16,7 @@ define([
};
output.$el = $el;
output.getSession().setMode("ace/mode/json");
output.getSession().setMode("ace/mode/text");
output.getSession().setFoldStyle('markbeginend');
output.getSession().setUseWrapMode(true);
output.setShowPrintMargin(false);