Require unlock to delete
This commit is contained in:
@@ -373,6 +373,11 @@ angular.module('app')
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.deleteNote = function() {
|
this.deleteNote = function() {
|
||||||
|
if(this.note.locked) {
|
||||||
|
alert("This note is locked. If you'd like to delete it, unlock it, and try again.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let title = this.note.safeTitle().length ? `'${this.note.title}'` : "this note";
|
let title = this.note.safeTitle().length ? `'${this.note.title}'` : "this note";
|
||||||
if(confirm(`Are you sure you want to delete ${title}?`)) {
|
if(confirm(`Are you sure you want to delete ${title}?`)) {
|
||||||
this.remove()(this.note);
|
this.remove()(this.note);
|
||||||
|
|||||||
Reference in New Issue
Block a user