Skip to content

Commit

Permalink
Merge pull request #115 from dsummersl/issue-82
Browse files Browse the repository at this point in the history
Sets height of schools list fit within window size (issue #82).
:+1: Thanks @dsummersl
  • Loading branch information
Alexander Lemann committed Jun 2, 2015
2 parents c4a0249 + 76ee56c commit 9b8b07a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions frontend/app/directives/SearchDirectives.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
angular.module('SchoolsApp.searchDirectives', [])
.directive('search', ['$q', 'Schools', '$location', 'Geodecoder', function($q, Schools, $location, Geodecoder) {
var linker = function(scope, element, attrs) {
scope.maxHeight = function () {
return $(window).height() - 150 + 'px';
};

// do all map rendering and interactions here
scope.selectSchool = function (school) {
angular.forEach(scope.all_schools, function(obj) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/templates/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<li data-ng-class="{active: eligibility == 'assigned'}"><a data-ng-click="filterSchools('assigned')">Assigned</a></li>
<li data-ng-class="{active: eligibility == 'option'}"><a data-ng-click="filterSchools('option')">Options</a></li>
</ul>
<div id="my-schools" data-ng-mouseleave="clear_highlight();">
<div id="my-schools" data-ng-mouseleave="clear_highlight();" style="max-height: {{maxHeight()}}">
<div data-ng-repeat="level in levels" class="school-group {{ level }}">
<h3 class="{{ level }}">{{ level }}</h3>
<div data-ng-repeat="school in schools | filter:{'level': level}" class="school-group-item" data-ng-mouseenter="highlight_school(school.id);" data-ng-mouseleave="clear_highlight();" ng-class="{'last':$last, detail: school.selected == true}" >
Expand Down
2 changes: 0 additions & 2 deletions frontend/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ body {

#my-schools {
background: white;
/*padding: 20px;*/
max-height: 700px;
overflow-y: auto;
}

Expand Down

0 comments on commit 9b8b07a

Please sign in to comment.