diff --git a/wise-webapp/src/main/webapp/js/mindmapList.js b/wise-webapp/src/main/webapp/js/mindmapList.js index 024a4605..f0b4c969 100644 --- a/wise-webapp/src/main/webapp/js/mindmapList.js +++ b/wise-webapp/src/main/webapp/js/mindmapList.js @@ -190,6 +190,23 @@ function updateStatusToolbar() { } } +function fetchLabels() { + jQuery.ajax("c/restful/labels/", { + async:false, + dataType:'json', + type:'GET', + success:function (data) { + var labels = data.labels; + for (var i = 0; i < labels.length; i++) { + createLabelItem(labels[i]) + } + }, + error:function (jqXHR, textStatus, errorThrown) { + $('#messagesPanel div').text(errorThrown).parent().show(); + } + }); +} + // Update toolbar events ... function updateStarred(spanElem) { @@ -244,6 +261,14 @@ function callbackOnTableInit() { updateStatusToolbar(); } +function createLabelItem(data) { + $("#foldersContainer").find("ul").append( + $("