diff --git a/app/assets/javascripts/app/services/directives/functional/infiniteScroll.js b/app/assets/javascripts/app/services/directives/functional/infiniteScroll.js index a9f565db3..372f0bf7b 100644 --- a/app/assets/javascripts/app/services/directives/functional/infiniteScroll.js +++ b/app/assets/javascripts/app/services/directives/functional/infiniteScroll.js @@ -2,8 +2,8 @@ angular.module('app.frontend').directive('infiniteScroll', [ '$rootScope', '$window', '$timeout', function($rootScope, $window, $timeout) { return { link: function(scope, elem, attrs) { - elem.css('overflow-x', 'hidden'); - elem.css('height', 'inherit'); + // elem.css('overflow-x', 'hidden'); + // elem.css('height', 'inherit'); var offset = parseInt(attrs.threshold) || 0; var e = elem[0] diff --git a/app/assets/stylesheets/app/_main.scss b/app/assets/stylesheets/app/_main.scss index 2cb8506ce..1a3e29895 100644 --- a/app/assets/stylesheets/app/_main.scss +++ b/app/assets/stylesheets/app/_main.scss @@ -145,12 +145,17 @@ $section-header-height: 70px; height: 100%; max-height: calc(100vh - #{$header-height}); float: left; - overflow-y: auto; + overflow-y: auto;; overflow-x: hidden; min-width: 0; font-size: 17px; + .scrollable { + overflow-y: auto; + overflow-x: hidden; + } + > .content { height: 100%; max-height: 100%; diff --git a/app/assets/stylesheets/app/_notes.scss b/app/assets/stylesheets/app/_notes.scss index d71413110..4f05bf620 100644 --- a/app/assets/stylesheets/app/_notes.scss +++ b/app/assets/stylesheets/app/_notes.scss @@ -2,6 +2,8 @@ width: 25%; border-left: 1px solid #dddddd; border-right: 1px solid #dddddd; + // overflow-y: hidden !important; + // height: calc(100vh - 130px) !important; .notes-title-bar { color: rgba(black, 0.40); @@ -39,6 +41,15 @@ } } + .scrollable { + height: calc(100vh - (130px + #{$header-height})); + } + + .infinite-scroll { + overflow-x: hidden; + height: inherit; + } + .note { width: 100%; padding: 15px; diff --git a/app/assets/templates/frontend/notes.html.haml b/app/assets/templates/frontend/notes.html.haml index 300154c56..1bfaacf2a 100644 --- a/app/assets/templates/frontend/notes.html.haml +++ b/app/assets/templates/frontend/notes.html.haml @@ -18,11 +18,12 @@ %li %a.text{"ng-click" => "ctrl.selectedMenuItem(); ctrl.selectedTagDelete()"} Delete Tag - %div{"infinite-scroll" => "ctrl.paginate()", "can-load" => "true", "threshold" => "200"} - .note{"ng-repeat" => "note in ctrl.tag.notes | limitTo:ctrl.notesToDisplay | filter: ctrl.filterNotes", - "ng-click" => "ctrl.selectNote(note)", "ng-class" => "{'selected' : ctrl.selectedNote == note}"} - .name{"ng-if" => "note.title"} - {{note.title}} - .note-preview - {{note.text}} - .date {{(note.created_at | appDateTime) || 'Now'}} + .scrollable + .infinite-scroll{"infinite-scroll" => "ctrl.paginate()", "can-load" => "true", "threshold" => "200"} + .note{"ng-repeat" => "note in ctrl.tag.notes | limitTo:ctrl.notesToDisplay | filter: ctrl.filterNotes", + "ng-click" => "ctrl.selectNote(note)", "ng-class" => "{'selected' : ctrl.selectedNote == note}"} + .name{"ng-if" => "note.title"} + {{note.title}} + .note-preview + {{note.text}} + .date {{(note.created_at | appDateTime) || 'Now'}}