$Id$
+-- 2008-12-04 version 6.x-1.x-dev
+* #341806 Fixed: Random problems with teaser break
+
-- 2008-12-01 version 6.x-1.x-dev
* #321818 Fixed: FCKeditor not displaying on any posts except initial ones
$formats = element_children($element);
foreach ($formats as $format_id) {
- $format = $element[$format_id]['#default_value'];
+ $format = !empty($element[$format_id]['#default_value']) ? $element[$format_id]['#default_value'] : $element[$format_id]['#value'];
break;
}
// if no popup mode, add the editor initialization to the footer
// this obviously needs print($closure) in page.tpl.php
if ($fckeditor_on && !$processed) {
- drupal_add_js('if (Drupal.jsEnabled) {$(document).ready(function() {if (typeof ('. $js_id .') != "undefined") {
- if ($("#edit-teaser-js").size() && $("#edit-teaser-js").val().length){
- $("#edit-body").val($("#edit-teaser-js").val() + "<!--break-->" + $("#edit-body").val());
- }
+ $str = "";
+ if ($element['#id'] == 'edit-body') {
+ $str = 'if ($("#edit-teaser-js").size() && $("#edit-teaser-js").val().length){
+ $("#edit-body").val($("#edit-teaser-js").val() + "<!--break-->" + $("#edit-body").val());
+ }';
+ }
+ drupal_add_js('if (Drupal.jsEnabled) {$(document).ready(function() {if (typeof ('. $js_id .') != "undefined") { '. $str .'
window.setTimeout("FCKeditorReplaceTextarea(\''. $textarea_id .'\','. $js_id .','. $xss_check .');",100);}});}', 'inline', 'footer');
}
}
if (oElem != null) {
oElem.style.display = '';
}
-
- editorInstance.LinkedField.form.onsubmit = doFCKeditorSave;
// If the textarea isn't visible update the content from the editor.
$(editorInstance.LinkedField.form).submit(DoFCKeditorTeaserStuff);
+ editorInstance.Events.AttachEvent( 'OnAfterLinkedFieldUpdate', DoFCKeditorTeaserStuff ) ;
+
var teaser = false;
var teaserCheckbox = false;