Skip to content

Business intelligence made simple

make editor bigger

Nick Elser94224d8d99f7
diff --git a/app/assets/stylesheets/blazer/application.css b/app/assets/stylesheets/blazer/application.css
index b51644a3..3e99c26f 100644
--- a/app/assets/stylesheets/blazer/application.css
+++ b/app/assets/stylesheets/blazer/application.css
@@ -58,7 +58,7 @@ input.search:focus {
#editor {
display: none;
- height: 100px;
+ height: 175px;
}
.ace_print-margin-layer {
diff --git a/app/views/blazer/queries/_form.html.erb b/app/views/blazer/queries/_form.html.erb
index 28dc311d..a94efb35 100644
--- a/app/views/blazer/queries/_form.html.erb
+++ b/app/views/blazer/queries/_form.html.erb
@@ -48,13 +48,24 @@
enableSnippets: false,
enableLiveAutocompletion: false,
highlightActiveLine: false,
- fontSize: 12
+ fontSize: 12,
+ minLines: 10
});
editor.renderer.setShowGutter(false);
editor.renderer.setPrintMarginColumn(false);
editor.renderer.setPadding(10);
editor.getSession().setUseWrapMode(true);
+ editor.commands.addCommand({
+ name: 'run',
+ bindKey: {win: 'Ctrl-Enter', mac: 'Command-Enter'},
+ exec: function(editor) {
+ $("#run").click();
+ },
+ readOnly: false // false if this command should not apply in readOnly mode
+ });
+
$("#editor").show();
+ editor.focus();
$("#run").click( function (e) {
e.preventDefault();