From 9a19e2a5ebb60d0e2c1e7a6c83f0da0962b31a81 Mon Sep 17 00:00:00 2001 From: Ezequiel Bergamaschi Date: Sat, 1 Feb 2014 23:32:55 -0300 Subject: [PATCH] some button actions --- .../src/main/resources/messages_en.properties | 6 +---- .../src/main/webapp/css/mindmapList.less | 27 ++++++++++++++++++- .../src/main/webapp/js/buttonActions.js | 25 ++++++++++------- .../src/main/webapp/jsp/mindmapList.jsp | 8 +++--- 4 files changed, 46 insertions(+), 20 deletions(-) diff --git a/wise-webapp/src/main/resources/messages_en.properties b/wise-webapp/src/main/resources/messages_en.properties index 68a7a81d..0c843c1e 100644 --- a/wise-webapp/src/main/resources/messages_en.properties +++ b/wise-webapp/src/main/resources/messages_en.properties @@ -73,7 +73,6 @@ ONLY_VIEW_PRIVATE = This mindmap can be viewed by you only. ALL_VIEW_PUBLIC = This mindmap can be viewed by any user. NEW_MAP_MSG=Create a new map NEW_LABEL_MSG=Create a new label -ADD_LABEL_MSG=Add label to maps PUBLISH=Publish PUBLISH_DETAILS=By publishing the map you make it visible to everyone on the Internet. ACCOUNT_DETAIL=Do you want to change you user options?. Here is the place. @@ -138,16 +137,13 @@ FILTERS=Filter MORE=More ADD_NEW_MAP=Add New Map ADD_NEW_LABEL=Add New Label -ADD_LABEL=Add Label +LABEL=Label IMPORTING=Importing ... NEW=New -NEW_MAP=Map -NEW_LABEL=Label MIND_FILE=File PARENT_LABEL=Nest label under CHOOSE_COLOR=Choose a color CHOOSE_LABEL=Choose a label -CREATE_NEW_LABEL=Create a new label.. SELECT_LABEL=Please select a label NO_SEARCH_RESULT=No mindmap available for the selected filter criteria SEARCH=Search diff --git a/wise-webapp/src/main/webapp/css/mindmapList.less b/wise-webapp/src/main/webapp/css/mindmapList.less index 1f3b6712..71018463 100644 --- a/wise-webapp/src/main/webapp/css/mindmapList.less +++ b/wise-webapp/src/main/webapp/css/mindmapList.less @@ -124,6 +124,7 @@ input#selectAll { display: inline-block; position: relative; left: 7px; + top: -1px; } .labelNameList { @@ -133,7 +134,7 @@ input#selectAll { .labelTag { border: 1px solid; - border-radius: 4px; + border-radius: 3px; color: white; display: inline-block; font-size: 11px; @@ -154,6 +155,30 @@ input#selectAll { background-color: #d5d3d4; } +.tableTag { + padding:0px; + margin-bottom: 0px; + margin-right: 5px; + float: right; + top: -3px; + position: relative; +} + +table.tableTag td { + user-select: none; + border-radius: 1px; + padding-left: 5px; + padding-right:5px; + padding-top:0px; + padding-bottom: 0px; + background-color: #000000; + color: #ffffff; +} + +table.tableTag td:hover { + background-color: #ffffff; +} + /* ---------------------------- Sorting --------------------------------- */ .sorting_asc { diff --git a/wise-webapp/src/main/webapp/js/buttonActions.js b/wise-webapp/src/main/webapp/js/buttonActions.js index a58d0824..4082d40d 100644 --- a/wise-webapp/src/main/webapp/js/buttonActions.js +++ b/wise-webapp/src/main/webapp/js/buttonActions.js @@ -12,8 +12,12 @@ $(function () { $(document).on('click', '#createLabelBtn', function () { var mapIds = $('#mindmapListTable').dataTableExt.getSelectedMapsIds(); + var url = mapIds.length == 0 + ? "c/restful/labels" + : "c/restful/labels/maps?ids=" + jQuery.makeArray(mapIds).join(','); + $("#new-folder-dialog-modal").dialogForm({ - url:"c/restful/labels/maps?ids=" + jQuery.makeArray(mapIds).join(','), + url: url, postUpdate: function(data, id) { createLabelItem(data, id); tagMindmaps(data.title, data.color); @@ -59,16 +63,17 @@ $(function () { var labelId = $(this).attr('value'); var labelName = $(this).text(); var labelColor = $(this).attr('color'); - - jQuery.ajax("c/restful/labels/maps?ids=" + jQuery.makeArray(mapIds).join(','), { - type:'POST', - dataType: "json", - contentType:"application/json; charset=utf-8", - data: JSON.stringify({id: labelId}), - success: function() { - tagMindmaps(labelName, labelColor); + if (mapIds.length > 0) { + jQuery.ajax("c/restful/labels/maps?ids=" + jQuery.makeArray(mapIds).join(','), { + type:'POST', + dataType: "json", + contentType:"application/json; charset=utf-8", + data: JSON.stringify({id: labelId}), + success: function() { + tagMindmaps(labelName, labelColor); + } + }); } - }); } ); } diff --git a/wise-webapp/src/main/webapp/jsp/mindmapList.jsp b/wise-webapp/src/main/webapp/jsp/mindmapList.jsp index 48961866..7f42dd60 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapList.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapList.jsp @@ -195,10 +195,10 @@ -