From b66f8f7fb91e5c7956b7c3884a9f3bc09ed685bc Mon Sep 17 00:00:00 2001 From: ninadsp Date: Fri, 30 Jul 2010 00:16:24 +0530 Subject: [PATCH] Improved handling of text/plain mimetype fields for inline editing --- js/sql.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/js/sql.js b/js/sql.js index 9bc28e343..545ae1b60 100644 --- a/js/sql.js +++ b/js/sql.js @@ -321,8 +321,15 @@ $(document).ready(function() { $.each(data.transformations, function(key, value) { if(key == field_name) { - var new_value = $(this_field).find('textarea').val(); - new_html = $(value).append(new_value); + if($(this_field).hasClass('text_plain')) { + new_html = value; + return false; + } + else { + var new_value = $(this_field).find('textarea').val(); + new_html = $(value).append(new_value); + return false; + } } }) } @@ -338,6 +345,7 @@ $(document).ready(function() { alert(value); var new_value = $(this_field).find('select').val(); new_html = $(value).append(new_value); + return false; } }) }