From c671b157873622e7c5b79dc3ffe3d0bd8fb5da0d Mon Sep 17 00:00:00 2001 From: Rodrigo Quelca Date: Tue, 28 Aug 2018 15:38:41 +0000 Subject: [PATCH 1/2] FBI-2476: Message History > when it is resend a second time, an error occurs by console and the main screen goes blank --- .../templates/cases/caseMessageHistory.js | 28 +++++-------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/workflow/engine/templates/cases/caseMessageHistory.js b/workflow/engine/templates/cases/caseMessageHistory.js index 750d3e322..882e7bf2c 100644 --- a/workflow/engine/templates/cases/caseMessageHistory.js +++ b/workflow/engine/templates/cases/caseMessageHistory.js @@ -124,9 +124,8 @@ messageHistoryGridListMask = new Ext.LoadMask(Ext.getBody(), {msg:_('ID_LOADING')}); messageHistoryGridListMask.show(); - var url = "caseMessageHistory_Ajax.php?actionAjax=sendMailMessage_JXP&APP_UID=" + APP_UID + "&APP_MSG_UID=" + APP_MSG_UID + "&APP_NUMBER=" + appNumber; - ajaxPostRequest(url,'caseMessageHistory_RSP'); + ajaxPostRequest(url, caseMessageHistory_RSP); } @@ -173,9 +172,9 @@ if (http_request.readyState === 4) { if (http_request.status === 200) { if (return_xml) { - eval(callback_function + '(http_request.responseXML)'); + callback_function(http_request.responseXML); } else { - eval(callback_function + '(http_request.responseText, \'' + id + '\')'); + callback_function(http_request.responseText, id); } } else { alert('Error found on request:(Code: ' + http_request.status + ')'); @@ -242,7 +241,7 @@ var ActionTabFrameGlobal = ''; var idHistory = historyGridListChangeLogGlobal.idHistory; var url = "caseHistory_Ajax.php?actionAjax=historyGridListChangeLogPanelBody_JXP&idHistory="+idHistory; - ajaxPostRequest(url,'historyGridListChangeLogPanelBody_RSP'); + ajaxPostRequest(url, historyGridListChangeLogPanelBody_RSP); } function historyGridListChangeLogPanel(){ @@ -302,22 +301,9 @@ var ActionTabFrameGlobal = ''; function caseMessageHistory_RSP (response, id) { messageHistoryGridListMask.hide(); - if (response === "") { - Ext.Msg.show({ - title: '', - msg: _('ID_MAIL_SENT_SUCCESSFULLY'), - buttons: Ext.Msg.INFO, - animEl: 'elId', - icon: Ext.MessageBox.INFO, - buttons: Ext.MessageBox.OK - }); - Ext.destroy(Ext.getCmp('processesGrid')); - store.destroy(); - messageHistoryGridList(); - } - else { - alert(response); - } + PMExt.notify( _('ID_SUCSESS'), response === "" ? _('ID_MAIL_SENT_SUCCESSFULLY') : response); + Ext.getCmp('processesGrid').store.reload(); + Ext.getCmp('processesGrid').getView().refresh(); } function messageHistoryGridList () { From 99c3e15689cbcc0e351e990fff9367c6af0115ad Mon Sep 17 00:00:00 2001 From: Rodrigo Quelca Date: Tue, 2 Oct 2018 13:32:32 +0000 Subject: [PATCH 2/2] fix labels --- workflow/engine/templates/cases/caseMessageHistory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/engine/templates/cases/caseMessageHistory.js b/workflow/engine/templates/cases/caseMessageHistory.js index 882e7bf2c..0e802e46b 100644 --- a/workflow/engine/templates/cases/caseMessageHistory.js +++ b/workflow/engine/templates/cases/caseMessageHistory.js @@ -301,7 +301,7 @@ var ActionTabFrameGlobal = ''; function caseMessageHistory_RSP (response, id) { messageHistoryGridListMask.hide(); - PMExt.notify( _('ID_SUCSESS'), response === "" ? _('ID_MAIL_SENT_SUCCESSFULLY') : response); + PMExt.notify( _('ID_SUCCESS'), response === "" ? _('ID_MAIL_SENT_SUCCESSFULLY') : response); Ext.getCmp('processesGrid').store.reload(); Ext.getCmp('processesGrid').getView().refresh(); }