Improved handling of text/plain mimetype fields for inline editing

This commit is contained in:
ninadsp
2010-07-30 00:16:24 +05:30
parent 43ed78a0f8
commit b66f8f7fb9

View File

@@ -321,8 +321,15 @@ $(document).ready(function() {
$.each(data.transformations, function(key, value) { $.each(data.transformations, function(key, value) {
if(key == field_name) { if(key == field_name) {
var new_value = $(this_field).find('textarea').val(); if($(this_field).hasClass('text_plain')) {
new_html = $(value).append(new_value); 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); alert(value);
var new_value = $(this_field).find('select').val(); var new_value = $(this_field).find('select').val();
new_html = $(value).append(new_value); new_html = $(value).append(new_value);
return false;
} }
}) })
} }