diff --git a/wise-webapp/src/main/webapp/js/mindmapList.js b/wise-webapp/src/main/webapp/js/mindmapList.js index 8cb84100..70867cb9 100644 --- a/wise-webapp/src/main/webapp/js/mindmapList.js +++ b/wise-webapp/src/main/webapp/js/mindmapList.js @@ -78,7 +78,8 @@ jQuery.fn.dialogForm = function (options) { // Clear form values ... if (options.clearForm == undefined || options.clearForm) { - $("#" + containerId).find('input[name!="color"]').val(''); + //FIXME: icon and color should be handled as exceptions.. + $("#" + containerId).find('input[name!="color"]input[name!="icon"]').val(''); } // Clear button "Saving..." state ... @@ -91,12 +92,6 @@ 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; @@ -545,6 +540,7 @@ $(function () { defaultIcon.find("i").remove(); var myClass = $(this).attr("class"); defaultIcon.prepend(""); + defaultIcon.closest("#iconGroup").find('input').val(myClass); }); }); diff --git a/wise-webapp/src/main/webapp/jsp/mindmapList.jsp b/wise-webapp/src/main/webapp/jsp/mindmapList.jsp index e8c848f1..39df6061 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapList.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapList.jsp @@ -353,7 +353,8 @@
- + +