|
|
@ -4,6 +4,7 @@
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var force_card_refresh = false;
|
|
|
|
|
|
|
|
|
|
|
|
$(".view-main").on("ptr:refresh", ".ptr-content", function () {
|
|
|
|
$(".view-main").on("ptr:refresh", ".ptr-content", function () {
|
|
|
|
loadCards(function () {
|
|
|
|
loadCards(function () {
|
|
|
@ -51,7 +52,7 @@ $(".view-main").on("click", ".parsedown-task-list", function (e) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
function loadNotesToCards(notes, oldnotes, callback) {
|
|
|
|
function loadNotesToCards(notes, oldnotes, callback) {
|
|
|
|
if (notes.length == oldnotes.length) {
|
|
|
|
if (force_card_refresh != true && notes.length == oldnotes.length) {
|
|
|
|
var allSame = true;
|
|
|
|
var allSame = true;
|
|
|
|
var allPresent = true;
|
|
|
|
var allPresent = true;
|
|
|
|
for (var n in notes) {
|
|
|
|
for (var n in notes) {
|
|
|
@ -70,6 +71,7 @@ function loadNotesToCards(notes, oldnotes, callback) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
force_card_refresh = false;
|
|
|
|
for (i in window.shuffleInstance.items) {
|
|
|
|
for (i in window.shuffleInstance.items) {
|
|
|
|
window.shuffleInstance.remove(window.shuffleInstance.items[i]);
|
|
|
|
window.shuffleInstance.remove(window.shuffleInstance.items[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -162,6 +164,7 @@ function makeList(id) {
|
|
|
|
note.toChecklist();
|
|
|
|
note.toChecklist();
|
|
|
|
note.setModified();
|
|
|
|
note.setModified();
|
|
|
|
note.saveNote();
|
|
|
|
note.saveNote();
|
|
|
|
|
|
|
|
force_card_refresh = true;
|
|
|
|
app.ptr.refresh();
|
|
|
|
app.ptr.refresh();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|