From 3b942118e93a069dbbc88f712d6438fa9eca6412 Mon Sep 17 00:00:00 2001
From: Arik Fraimovich
Date: Thu, 7 May 2015 21:39:25 +0300
Subject: [PATCH] Make query editor auto resize again to prevent scroll issues
---
rd_ui/app/scripts/directives/query_directives.js | 2 ++
rd_ui/app/styles/redash.css | 8 ++++++--
rd_ui/app/views/query.html | 2 +-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/rd_ui/app/scripts/directives/query_directives.js b/rd_ui/app/scripts/directives/query_directives.js
index e4ce2a4acc..68beea9039 100644
--- a/rd_ui/app/scripts/directives/query_directives.js
+++ b/rd_ui/app/scripts/directives/query_directives.js
@@ -117,6 +117,8 @@
$scope.query.query = newValue;
});
}
+
+ $('.schema-container').css('height', $('.CodeMirror').css('height'));
});
$scope.$watch('query.query', function () {
diff --git a/rd_ui/app/styles/redash.css b/rd_ui/app/styles/redash.css
index 1e3e03fdb8..b80566a73a 100644
--- a/rd_ui/app/styles/redash.css
+++ b/rd_ui/app/styles/redash.css
@@ -156,7 +156,7 @@ li.widget:hover {
/* CodeMirror */
.CodeMirror {
border: 1px solid #eee;
- /*height: auto;*/
+ height: auto;
min-height: 300px;
margin-bottom: 10px;
}
@@ -308,8 +308,12 @@ counter-renderer counter-name {
height: 100%;
}
-.schema-browser {
+.schema-container {
height: 300px;
+}
+
+.schema-browser {
+ height: 100%;
overflow-y: auto;
overflow-x: hidden;
}
diff --git a/rd_ui/app/views/query.html b/rd_ui/app/views/query.html
index 781a93c80d..85caee9d16 100644
--- a/rd_ui/app/views/query.html
+++ b/rd_ui/app/views/query.html
@@ -83,7 +83,7 @@
-