From 6a6efd58f40db04a257ec8da5e8e71aba1c552b2 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sat, 19 May 2012 00:13:06 -0300 Subject: [PATCH] Fix print. --- .../webapp/js/jquery.dataTables.plugins.js | 8 +- .../src/main/webapp/jsp/mindmapList.jsp | 151 ++++++------------ 2 files changed, 56 insertions(+), 103 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 cc0f98ed..51b875a3 100644 --- a/wise-webapp/src/main/webapp/js/jquery.dataTables.plugins.js +++ b/wise-webapp/src/main/webapp/js/jquery.dataTables.plugins.js @@ -71,12 +71,12 @@ jQuery.fn.dialogForm = function(options) { var containerId = this[0].id; var url = options.url; - var acceptButtonLabel = options.acceptButtonLabel; // Clean previous dialog content ... $("#" + containerId + " div[id='errorMessage']").text("").removeClass("ui-state-highlight"); - $('#' + containerId + ' .btn-accept').click(function() { + var acceptBtn = $('#' + containerId + ' .btn-accept'); + acceptBtn.click(function() { var formData = {}; $('#' + containerId + ' input').each(function(index, elem) { formData[elem.name] = elem.value; @@ -93,12 +93,14 @@ jQuery.fn.dialogForm = function(options) { var resourceId = jqXHR.getResponseHeader("ResourceId"); var redirectUrl = options.redirect; redirectUrl = redirectUrl.replace("{header.resourceId}", resourceId); + $(acceptBtn).button('loading'); + $("#" + containerId).modal('hide'); window.location = redirectUrl; } else if (options.postUpdate) { + options.postUpdate(formData); } - $(this).dialog("close"); }, error: function(jqXHR, textStatus, errorThrown) { if (jqXHR.status == 400) { diff --git a/wise-webapp/src/main/webapp/jsp/mindmapList.jsp b/wise-webapp/src/main/webapp/jsp/mindmapList.jsp index ac3b8050..eb7321cb 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapList.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapList.jsp @@ -129,52 +129,11 @@