You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by sa...@apache.org on 2011/03/21 14:23:05 UTC
svn commit: r1083774 -
/ofbiz/trunk/framework/images/webapp/images/selectall.js
Author: sascharodekamp
Date: Mon Mar 21 13:23:05 2011
New Revision: 1083774
URL: http://svn.apache.org/viewvc?rev=1083774&view=rev
Log:
Bug - The In Place Editor threw an exception when a message with more than one linebreak was entered.No he replaced all line breaks with a space.
Modified:
ofbiz/trunk/framework/images/webapp/images/selectall.js
Modified: ofbiz/trunk/framework/images/webapp/images/selectall.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/selectall.js?rev=1083774&r1=1083773&r2=1083774&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/selectall.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/selectall.js Mon Mar 21 13:23:05 2011
@@ -656,7 +656,10 @@ function ajaxInPlaceEditDisplayField(ele
jElement.editable(function(value, settings){
// removes all line breaks from the value param, because the parseJSON Function can't work with line breaks
- value = value.replace("\n", " ");
+ alert(value);
+ value = value.replace(/\n/g, " ");
+ alert(value);
+
var resultField = jQuery.parseJSON('{"' + settings.name + '":"' + value + '"}');
// merge both parameter objects together
jQuery.extend(settings.submitdata, resultField);