Desktop search on note change
This commit is contained in:
@@ -184,12 +184,16 @@ angular.module('app')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.selectNote = function(note) {
|
this.selectNote = function(note, viaClick = false) {
|
||||||
if(!note) { return; }
|
if(!note) { return; }
|
||||||
this.selectedNote = note;
|
this.selectedNote = note;
|
||||||
note.conflict_of = null; // clear conflict
|
note.conflict_of = null; // clear conflict
|
||||||
this.selectionMade()(note);
|
this.selectionMade()(note);
|
||||||
this.selectedIndex = this.visibleNotes().indexOf(note);
|
this.selectedIndex = this.visibleNotes().indexOf(note);
|
||||||
|
|
||||||
|
if(viaClick && this.noteFilter.text) {
|
||||||
|
desktopManager.searchText(this.noteFilter.text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.createNewNote = function() {
|
this.createNewNote = function() {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
.scrollable
|
.scrollable
|
||||||
.infinite-scroll#notes-scrollable{"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",
|
.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}"}
|
"ng-click" => "ctrl.selectNote(note, true)", "ng-class" => "{'selected' : ctrl.selectedNote == note}"}
|
||||||
%strong.red.medium{"ng-if" => "note.conflict_of"} Conflicted copy
|
%strong.red.medium{"ng-if" => "note.conflict_of"} Conflicted copy
|
||||||
%strong.red.medium{"ng-if" => "note.errorDecrypting"} Error decrypting
|
%strong.red.medium{"ng-if" => "note.errorDecrypting"} Error decrypting
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user