Reset notes to display length on tag change
This commit is contained in:
@@ -49,9 +49,11 @@ angular.module('app.frontend')
|
||||
this.selectFirstNote(false);
|
||||
}.bind(this))
|
||||
|
||||
this.notesToDisplay = 20;
|
||||
this.DefaultNotesToDisplayValue = 20;
|
||||
|
||||
this.notesToDisplay = this.DefaultNotesToDisplayValue;
|
||||
this.paginate = function() {
|
||||
this.notesToDisplay += 20
|
||||
this.notesToDisplay += this.DefaultNotesToDisplayValue
|
||||
}
|
||||
|
||||
this.optionsSubtitle = function() {
|
||||
@@ -77,6 +79,14 @@ angular.module('app.frontend')
|
||||
}
|
||||
|
||||
this.tagDidChange = function(tag, oldTag) {
|
||||
var scrollable = document.getElementById("notes-scrollable");
|
||||
if(scrollable) {
|
||||
scrollable.scrollTop = 0;
|
||||
scrollable.scrollLeft = 0;
|
||||
}
|
||||
|
||||
this.notesToDisplay = this.DefaultNotesToDisplayValue;
|
||||
|
||||
this.showMenu = false;
|
||||
|
||||
if(this.selectedNote && this.selectedNote.dummy) {
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
Show archived notes
|
||||
|
||||
.scrollable
|
||||
.infinite-scroll{"infinite-scroll" => "ctrl.paginate()", "can-load" => "true", "threshold" => "200"}
|
||||
.infinite-scroll#notes-scrollable{"infinite-scroll" => "ctrl.paginate()", "can-load" => "true", "threshold" => "200"}
|
||||
.note{"ng-repeat" => "note in (ctrl.sortedNotes = (ctrl.tag.notes | filter: ctrl.filterNotes | sortBy: ctrl.sortBy| limitTo:ctrl.notesToDisplay)) track by note.uuid",
|
||||
"ng-click" => "ctrl.selectNote(note)", "ng-class" => "{'selected' : ctrl.selectedNote == note}"}
|
||||
%strong.red.medium{"ng-if" => "note.conflict_of"} Conflicted copy
|
||||
|
||||
Reference in New Issue
Block a user