|
|
|
@ -6,18 +6,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(".view-main").on("ptr:refresh", ".ptr-content", function () {
|
|
|
|
|
router.navigate("/home");
|
|
|
|
|
restartApplication();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function editNote(id) {
|
|
|
|
|
var note = notes.get(id);
|
|
|
|
|
router.navigate("/editnote", {
|
|
|
|
|
context: {
|
|
|
|
|
noteid: id,
|
|
|
|
|
content: note.content,
|
|
|
|
|
notetitle: note.title,
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
context: {
|
|
|
|
|
noteid: id,
|
|
|
|
|
content: note.content,
|
|
|
|
|
notetitle: note.title,
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
console.log("Editing " + id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -30,7 +30,11 @@ function makeList(id) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function deleteNote(id) {
|
|
|
|
|
|
|
|
|
|
app.dialog.confirm('Are you sure?', 'Delete Note', function () {
|
|
|
|
|
notes.del(id, function () {
|
|
|
|
|
app.ptr.refresh();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$("#app").on("click", ".edit-note-btn", function () {
|
|
|
|
@ -66,20 +70,20 @@ function openNoteActionMenu(notecard) {
|
|
|
|
|
editNote(noteid);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text: "Favorite",
|
|
|
|
|
icon: '<i class="fas fa-star fa-fw"></i>',
|
|
|
|
|
onClick: function () {
|
|
|
|
|
favoriteNote(noteid);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text: "Make a List",
|
|
|
|
|
icon: '<i class="fas fa-tasks fa-fw"></i>',
|
|
|
|
|
onClick: function () {
|
|
|
|
|
makeList(noteid);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// text: "Favorite",
|
|
|
|
|
// icon: '<i class="fas fa-star fa-fw"></i>',
|
|
|
|
|
// onClick: function () {
|
|
|
|
|
// favoriteNote(noteid);
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// text: "Make a List",
|
|
|
|
|
// icon: '<i class="fas fa-tasks fa-fw"></i>',
|
|
|
|
|
// onClick: function () {
|
|
|
|
|
// makeList(noteid);
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
text: "Delete",
|
|
|
|
|
icon: '<i class="fas fa-trash fa-fw"></i>',
|
|
|
|
|