diff --git a/wise-webapp/src/main/java/com/wisemapping/ncontroller/MindmapController.java b/wise-webapp/src/main/java/com/wisemapping/ncontroller/MindmapController.java index ad5f5631..3d3cbfb7 100644 --- a/wise-webapp/src/main/java/com/wisemapping/ncontroller/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/ncontroller/MindmapController.java @@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.io.IOException; import java.util.ArrayList; diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java index d01dcf06..48d83031 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java @@ -121,7 +121,7 @@ public class MindmapController extends BaseController { @RequestMapping(method = RequestMethod.DELETE, value = "/maps/batch") @ResponseStatus(value = HttpStatus.NO_CONTENT) - public void batchDelete(@RequestParam(required = false) String ids) throws IOException, WiseMappingException { + public void batchDelete(@RequestParam(required = true) String ids) throws IOException, WiseMappingException { final User user = Utils.getUser(); final String[] mapsIds = ids.split(","); for (final String mapId : mapsIds) { diff --git a/wise-webapp/src/main/webapp/css/mymaps.less b/wise-webapp/src/main/webapp/css/mymaps.less index 3e0c244c..14a588bf 100644 --- a/wise-webapp/src/main/webapp/css/mymaps.less +++ b/wise-webapp/src/main/webapp/css/mymaps.less @@ -247,18 +247,6 @@ table.display { background: @th-background-color url('../images/sort_desc_disabled.png') no-repeat center right; } - -/* ----------------------------- Rows ----------------------------------- */ - -tr.odd { - background-color: @odd-color; -} - -tr.even { - background-color: @even-color; -} - - /* ----------------------------- Misc ----------------------------------- */ .dataTables_scroll { @@ -331,62 +319,3 @@ td.details { background-color: #ccc; } -.paging_full_numbers span.paginate_active { - background-color: #99B3FF; -} - -table.display tr.even.row_selected td { - background-color: #B0BED9; -} - -table.display tr.odd.row_selected td { - background-color: #9FAFD1; -} - - -/* ------------------------ Sorting classes ----------------------------- */ - -tr.odd { - td.sorting_1 { - background-color: @sorting-odd-color; - } - - td.sorting_2 { - background-color: #DADCFF; - } - - td.sorting_3 { - background-color: #E0E2FF; - } -} - -tr.even { - td.sorting_1 { - background-color: @sorting-even-color; - } - - td.sorting_2 { - background-color: #F2F3FF; - } - - td.sorting_3 { - background-color: #F9F9FF; - } -} - -/* ------------------------------ Tags ---------------------------------- */ - -table.display span.tag { - color: white; - padding: 5px 10px; - background: desaturate(@red, 30%); - .rounded-corners(3px); -} - -#mindmapListTable .columName { - cursor: pointer -} - -#mindmapListTable tr:hover { - background: #e0ffff; -} \ No newline at end of file diff --git a/wise-webapp/src/main/webapp/js/jquery.dataTables.plugins.js b/wise-webapp/src/main/webapp/js/jquery.dataTables.plugins.js index 51b875a3..c71932d3 100644 --- a/wise-webapp/src/main/webapp/js/jquery.dataTables.plugins.js +++ b/wise-webapp/src/main/webapp/js/jquery.dataTables.plugins.js @@ -72,8 +72,11 @@ jQuery.fn.dialogForm = function(options) { var containerId = this[0].id; var url = options.url; - // Clean previous dialog content ... - $("#" + containerId + " div[id='errorMessage']").text("").removeClass("ui-state-highlight"); + // Clear previous state ... + $("#" + containerId + " .errorMessage").text("").removeClass("alert alert-error"); + $("#" + containerId + " .control-group").removeClass('error'); + $("#" + containerId + " input").attr('value',''); + var acceptBtn = $('#' + containerId + ' .btn-accept'); acceptBtn.click(function() { @@ -117,7 +120,9 @@ jQuery.fn.dialogForm = function(options) { // Mark the field ... var message = fieldErrors[fieldName]; var inputField = $("#" + containerId + " input[name='" + fieldName + "']"); - $("#" + containerId + " div[id='errorMessage']").text(message).addClass("alert alert-error"); + + $("#" + containerId + " .errorMessage").text(message).addClass("alert alert-error"); + inputField.parent().addClass('error'); } } diff --git a/wise-webapp/src/main/webapp/jsp/mindmapList.jsp b/wise-webapp/src/main/webapp/jsp/mindmapList.jsp index 665f6506..4b6baef0 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapList.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapList.jsp @@ -202,21 +202,19 @@ }); $("#deleteBtn").click(function() { - var mapIds = $('#mindmapListTable').dataTableExt.getSelectedMapsIds(); + var tableUI = $('#mindmapListTable'); + + var mapIds = tableUI.dataTableExt.getSelectedMapsIds(); if (mapIds.length > 0) { - var html2 = $('#delete-dialog-modal p span'); - $("#delete-dialog-modal").dialog({ - height: 140, + // Initialize dialog ... + $("#delete-dialog-modal").dialogForm({ modal: true, - buttons: { - "Delete": function() { - $('#mindmapListTable').dataTableExt.removeSelectedRows(); - $(this).dialog("close"); - }, - Cancel: function() { - $(this).dialog("close"); - } - } + type: 'DELETE', + postUpdate: function(reqBodyData) { + // Remove old entry ... + tableUI.dataTableExt.removeSelectedRows(); + }, + url : "../service/maps/batch?ids="+mapIds.join(',') }); } }); @@ -245,6 +243,7 @@ }); + // Register time update functions .... setTimeout(function() { jQuery("abbr.timeago").timeago() @@ -253,7 +252,6 @@
-