From b245b97db3e9f6e64b39fec8d131152e1c7b367c Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 15 Apr 2012 06:59:32 -0300 Subject: [PATCH] Fix some usrs... --- .../src/main/webapp/js/jquery.dataTables.plugins.js | 7 +++++-- wise-webapp/src/main/webapp/jsp/mindmapList.jsp | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) 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 eaae9ee9..2d8db7e1 100644 --- a/wise-webapp/src/main/webapp/js/jquery.dataTables.plugins.js +++ b/wise-webapp/src/main/webapp/js/jquery.dataTables.plugins.js @@ -90,8 +90,11 @@ jQuery.fn.dialogForm = function(options) { contentType:"application/json; charset=utf-8", success : function(data, textStatus, jqXHR) { if (options.redirect) { - var mapId = jqXHR.getResponseHeader("ResourceId"); - window.location = options.redirect + "&mapId=" + mapId; + var resourceId = jqXHR.getResponseHeader("ResourceId"); + var redirectUrl = options.redirect; + redirectUrl = redirectUrl.replace("{header.resourceId}", resourceId); + window.location = redirectUrl; + } else if (options.postUpdate) { options.postUpdate(formData); } diff --git a/wise-webapp/src/main/webapp/jsp/mindmapList.jsp b/wise-webapp/src/main/webapp/jsp/mindmapList.jsp index c7ad7f37..a35925e7 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapList.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapList.jsp @@ -169,7 +169,7 @@ modal: true, acceptButtonLabel : "Create", cancelButtonLabel : "Cancel", - redirect: "c/editor.htm?action=open", + redirect: "c/map/{header.resourceId}/edit.htm", url : "../service/maps" }); }); @@ -195,7 +195,7 @@ modal: true, acceptButtonLabel : "Duplicated", cancelButtonLabel : "Cancel", - redirect: "c/editor.htm?action=open", + redirect: "c/map/{header.resourceId}/edit.htm", url : "../service/maps/" + mapId }); } @@ -266,7 +266,7 @@ }); $("#buttons .printMap").button({ - icons: { primary: "ui-icon-trash" } + icons: { primary: "ui-icon-print" } }).click(function() { var mapIds = $('#mindmapListTable').dataTableExt.getSelectedMapsIds(); if (mapIds.length > 0) {