From 7e7751de5f7e5daccfad2fcf3f0341e20bef7d21 Mon Sep 17 00:00:00 2001 From: Neil Brommer Date: Sat, 9 Dec 2017 20:37:25 -0800 Subject: [PATCH] Fix bug with group ordering --- js/main.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/js/main.js b/js/main.js index 1a2c3ff..6024cc9 100644 --- a/js/main.js +++ b/js/main.js @@ -28,6 +28,7 @@ $(document).ready(function () { }); $("#btnEdit").click(function (e) { + // TODO: editing bookmarks window.alert("Editing is currently not implemented"); }); @@ -74,9 +75,11 @@ function loadBookmarks() { // and groups could finish loading in a different order var cardList = $("#cardList"); for (var i = 0; i < indexes.length; i++) { - var placeholder = $("
").attr("id", "group-" + i) - .appendTo(cardList); - buildGroup(indexes[i], placeholder); + $("
").attr("id", "group-" + i).appendTo(cardList); + } + + for (let item of indexes) { + buildGroup(item, $("#group-" + item.groupIndex)); } db.close();