details: https://code.openbravo.com/erp/devel/pi/rev/ecffeb5a82ad changeset: 35637:ecffeb5a82ad user: Asier Lostalé <asier.lostale <at> openbravo.com> date: Fri Apr 05 14:25:15 2019 +0200 summary: fixed bug 40525: use proper JSON conversion
diffstat: src/org/openbravo/erpCommon/ad_forms/ModuleManagementInstalled.html | 4 ++-- src/org/openbravo/erpCommon/ad_process/ApplyModules.html | 8 ++++---- src/org/openbravo/erpCommon/utility/WindowTree.html | 5 ++--- src/org/openbravo/erpCommon/utility/reporting/printing/EmailOptions.html | 9 ++++----- 4 files changed, 12 insertions(+), 14 deletions(-) diffs (129 lines): diff -r 4b126c414eb5 -r ecffeb5a82ad src/org/openbravo/erpCommon/ad_forms/ModuleManagementInstalled.html --- a/src/org/openbravo/erpCommon/ad_forms/ModuleManagementInstalled.html Fri Apr 05 10:03:16 2019 +0200 +++ b/src/org/openbravo/erpCommon/ad_forms/ModuleManagementInstalled.html Fri Apr 05 14:25:15 2019 +0200 @@ -13,7 +13,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2008-2012 Openbravo SLU + * All portions are Copyright (C) 2008-2019 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -99,7 +99,7 @@ if (getReadyStateHandler(XMLHttpRequestObj)) { try { if (XMLHttpRequestObj.responseText) { - jsonResponse = eval("(" + XMLHttpRequestObj.responseText + ")"); + jsonResponse = JSON.parse(XMLHttpRequestObj.responseText); // revert all tree item icons to default state var treeItems = getElementsByClassName('Tree_Row'); diff -r 4b126c414eb5 -r ecffeb5a82ad src/org/openbravo/erpCommon/ad_process/ApplyModules.html --- a/src/org/openbravo/erpCommon/ad_process/ApplyModules.html Fri Apr 05 10:03:16 2019 +0200 +++ b/src/org/openbravo/erpCommon/ad_process/ApplyModules.html Fri Apr 05 14:25:15 2019 +0200 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2008-2017 Openbravo SLU + * All portions are Copyright (C) 2008-2019 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -328,7 +328,7 @@ } pending_states=pending_states-1; strText = strText.toString(); - var msg = eval("("+strText+")"); + var msg = JSON.parse(strText); var state=msg.Response.state; var errorStatus=msg.Response.statusofstate; @@ -359,7 +359,7 @@ } else { //Expecting msg in JSON format strText = strText.toString(); - var msg = eval("("+strText+")"); + var msg = JSON.parse(strText); initialize_MessageBox('messageBoxID'); setValues_MessageBox('messageBoxID',msg.OBError.type, msg.OBError.title, msg.OBError.message); if(msg.OBError.type!="Error"){ @@ -401,7 +401,7 @@ strText = XMLHttpRequestObj.responseText; } strText = strText.toString(); - var msg = eval("("+strText+")"); + var msg = JSON.parse(strText); var state=msg.Response.state; var errorStatus=msg.Response.statusofstate; diff -r 4b126c414eb5 -r ecffeb5a82ad src/org/openbravo/erpCommon/utility/WindowTree.html --- a/src/org/openbravo/erpCommon/utility/WindowTree.html Fri Apr 05 10:03:16 2019 +0200 +++ b/src/org/openbravo/erpCommon/utility/WindowTree.html Fri Apr 05 14:25:15 2019 +0200 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2001-2012 Openbravo SLU + * All portions are Copyright (C) 2001-2019 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -85,8 +85,7 @@ if (strText == "") { showJSMessage(22); } else { - //Expecting msg in JSON format - var msg = eval("("+strText+")");; + var msg = JSON.parse(strText); initialize_MessageBox('messageBoxID'); setValues_MessageBox('messageBoxID',msg.OBError.type, msg.OBError.title, msg.OBError.message); } diff -r 4b126c414eb5 -r ecffeb5a82ad src/org/openbravo/erpCommon/utility/reporting/printing/EmailOptions.html --- a/src/org/openbravo/erpCommon/utility/reporting/printing/EmailOptions.html Fri Apr 05 10:03:16 2019 +0200 +++ b/src/org/openbravo/erpCommon/utility/reporting/printing/EmailOptions.html Fri Apr 05 14:25:15 2019 +0200 @@ -13,7 +13,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2008-2013 Openbravo SLU + * All portions are Copyright (C) 2008-2019 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -45,7 +45,6 @@ dojo.hostenv.writeIncludes(); //makes debugging in Venkman possible </script> <SCRIPT language="JavaScript" type="text/javascript"> - function closeThisPage() { closePage(); return true; @@ -167,7 +166,7 @@ var fieldName = field.substring(0, field.length-5)+'Name'; if (document.getElementById(field) && document.getElementById(fieldName)) { currentValue = document.getElementById(field).value; - originalValue = eval(field + 'Orig'); + originalValue = window[field + 'Orig']; if (originalValue !== currentValue) { document.getElementById(fieldName).style.display = 'none'; } else { @@ -205,7 +204,7 @@ strText = XMLHttpRequestObj.responseText; } } catch (e) {} - o = eval('('+strText+')'); + o = JSON.parse(strText); if (!o.error) { document.getElementById('emailSubject').value = o.subject; document.getElementById('emailBody').innerHTML = o.body; @@ -232,7 +231,7 @@ strText = XMLHttpRequestObj.responseText; } } catch (e) {} - o = eval('('+strText+')'); + o = JSON.parse(strText); if (!o.error) { document.getElementById('emailSubject').value = o.subject; document.getElementById('emailBody').innerHTML = o.body; _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits