Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Make query editor auto resize again to prevent scroll issues #420

Merged
merged 1 commit into from
May 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions rd_ui/app/scripts/directives/query_directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@
$scope.query.query = newValue;
});
}

$('.schema-container').css('height', $('.CodeMirror').css('height'));
});

$scope.$watch('query.query', function () {
Expand Down
8 changes: 6 additions & 2 deletions rd_ui/app/styles/redash.css
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ li.widget:hover {
/* CodeMirror */
.CodeMirror {
border: 1px solid #eee;
/*height: auto;*/
height: auto;
min-height: 300px;
margin-bottom: 10px;
}
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion rd_ui/app/views/query.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h2>
</p>
</div>
</div>
<div class="col-md-3" ng-show="hasSchema">
<div class="col-md-3 schema-container" ng-show="hasSchema">
<div>
<input type="text" placeholder="Search schema..." class="form-control" ng-model="schemaFilter">
</div>
Expand Down