[Rt-commit] r10555 - rt/branches/3.6-EXPERIMENTAL-ABERDEEN/html/Callbacks/RichText/Elements/Header
audreyt at bestpractical.com
audreyt at bestpractical.com
Tue Jan 29 13:12:49 EST 2008
Author: audreyt
Date: Tue Jan 29 13:12:48 2008
New Revision: 10555
Modified:
rt/branches/3.6-EXPERIMENTAL-ABERDEEN/html/Callbacks/RichText/Elements/Header/Default
Log:
* IE6 compatibility: getAttribute('class') may also be spelled getAttribute('className').
* When uploading attachments, don't re-render the text area.
* When re-rendering the text area, use the more compatible .value assignment instead of .innerHTML.
Modified: rt/branches/3.6-EXPERIMENTAL-ABERDEEN/html/Callbacks/RichText/Elements/Header/Default
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-ABERDEEN/html/Callbacks/RichText/Elements/Header/Default (original)
+++ rt/branches/3.6-EXPERIMENTAL-ABERDEEN/html/Callbacks/RichText/Elements/Header/Default Tue Jan 29 13:12:48 2008
@@ -54,9 +54,13 @@
for (var i=0; i < allTextAreas.length; i++) {
var textArea = allTextAreas[i];
- if ( (textArea.getAttribute('class') == 'messagebox') ) {
+ if ( (textArea.getAttribute('class') == 'messagebox')
+ || (textArea.getAttribute('className') == 'messagebox')) {
// Turn the original plain text content into HTML
- textArea.innerHTML = textArea.innerHTML.replace(
+
+%# Special case - When continuing an edit session with attachment, keep the HTMLified content.
+% if (!$m->request_args->{'AddMoreAttach'}) {
+ textArea.value = textArea.value.replace(
/&/g, "&"
).replace(
/</g, "<"
@@ -65,6 +69,7 @@
).replace(
/\n/g, "\n<br />"
);
+% }
var typeField = document.createElement('input');
typeField.setAttribute('type', 'hidden');
More information about the Rt-commit
mailing list