From 25783d81529a4c20088e66ddb0250e31eb0a0ed7 Mon Sep 17 00:00:00 2001 From: Claudio Barril Date: Mon, 14 Apr 2014 18:14:32 -0300 Subject: [PATCH] sending icon data to api rest --- wise-webapp/src/main/webapp/js/mindmapList.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wise-webapp/src/main/webapp/js/mindmapList.js b/wise-webapp/src/main/webapp/js/mindmapList.js index 2147a0f0..8cb84100 100644 --- a/wise-webapp/src/main/webapp/js/mindmapList.js +++ b/wise-webapp/src/main/webapp/js/mindmapList.js @@ -91,6 +91,12 @@ jQuery.fn.dialogForm = function (options) { formData[elem.name] = elem.value; }); + // FIX: How should I do this? + var icon = $("#defaultIcon"); + if (icon) { + formData["icon"] = icon.find('i').attr('class'); + } + // Success actions ... var onSuccess = function (jqXHR, textStatus, data) { var resourceId = jqXHR ? jqXHR.getResponseHeader("ResourceId") : undefined; @@ -301,7 +307,7 @@ $(function () { postUpdate: function(data, id) { createLabelItem(data, id); if (mapIds.length > 0) { - linkLabelToMindmap(mapIds, {id: id, title: data.title, color: data.color}); + linkLabelToMindmap(mapIds, {id: id, title: data.title, color: data.color, icon: data.icon}); } } }); @@ -548,7 +554,7 @@ function createLabelItem(data, id) { var labelItem = $("
  • "); labelItem.append( " " + - "" + + "" + "
    " + "
    " + data.title + "
    " + "" +