select first note in list, after delete
This commit is contained in:
@@ -239,9 +239,16 @@ angular.module('app.frontend')
|
||||
if(confirm("Are you sure you want to delete this note?")) {
|
||||
this.remove()(this.note);
|
||||
this.showMenu = false;
|
||||
this.notifyDelete();
|
||||
}
|
||||
}
|
||||
|
||||
this.notifyDelete = function() {
|
||||
$timeout(function() {
|
||||
$rootScope.$broadcast("noteDeleted");
|
||||
}.bind(this), 500);
|
||||
}
|
||||
|
||||
this.clickedEditNote = function() {
|
||||
this.editorMode = 'edit';
|
||||
this.focusEditor(100);
|
||||
|
||||
@@ -30,6 +30,10 @@ angular.module('app.frontend')
|
||||
this.showMenu = false;
|
||||
}.bind(this))
|
||||
|
||||
$rootScope.$on("noteDeleted", function() {
|
||||
this.selectFirstNote(false);
|
||||
}.bind(this))
|
||||
|
||||
var isFirstLoad = true;
|
||||
|
||||
this.notesToDisplay = 20;
|
||||
|
||||
Reference in New Issue
Block a user