summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt1
-rw-r--r--fckeditor.module9
-rw-r--r--fckeditor.popup.html6
3 files changed, 13 insertions, 3 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 387225d..92bdc54 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -3,6 +3,7 @@ $Id$
-- 2009-08-05 version 6.x-1.x-dev
* #448242 Textarea is not valid
* #293976 Add parameters to clear static variables in functions
+* #409054 Pop-up window not showing teaser
-- 2009-08-02 version 6.x-1.x-dev
* #380146 Image Assist still not working
diff --git a/fckeditor.module b/fckeditor.module
index 5595ea5..c5036fc 100644
--- a/fckeditor.module
+++ b/fckeditor.module
@@ -1211,7 +1211,14 @@ function fckeditor_process_textarea($element) {
if (!$processed) {
drupal_add_js($module_drupal_path .'/fckeditor.popup.js');
}
- $element['#suffix'] .= " <span class=\"fckeditor_popuplink\">(<a href=\"#\" onclick=\"FCKeditor_OpenPopup('". $module_full_path ."/fckeditor.popup.html?var=". $js_id ."&el=". $element['#id'] ."');return false;\">". t('Open rich editor') ."</a>)</span>";
+
+ if ($element['#id'] == 'edit-body') {
+ $teasersuffix = '&amp;teaser=edit-teaser-js';
+ } else {
+ $teasersuffix = '';
+ }
+
+ $element['#suffix'] .= '<span class="fckeditor_popuplink">(<a href="#" onclick="FCKeditor_OpenPopup(\''. $module_full_path .'/fckeditor.popup.html?var='. $js_id .'&amp;el='. $element['#id'] . $teasersuffix .'\');return false;">'. t('Open rich editor') .'</a>)</span>';
}
else {
// if no popup mode, add the editor initialization to the footer
diff --git a/fckeditor.popup.html b/fckeditor.popup.html
index 454b929..eaff9df 100644
--- a/fckeditor.popup.html
+++ b/fckeditor.popup.html
@@ -24,8 +24,10 @@ var oFCKeditor = window.opener[ FCKURLParams[ 'var' ] ] ;
oFCKeditor.Width = '100%' ;
oFCKeditor.Height = '100%' ;
-if (FCKURLParams[ 'teaser' ]) {
- var text = window.opener.document.getElementById( FCKURLParams[ 'teaser' ] ).value ;
+var teaserfield;
+
+if (FCKURLParams[ 'teaser' ] && (teaserfield = window.opener.document.getElementById( FCKURLParams[ 'teaser' ] ))) {
+ var text = teaserfield.value ;
if (text.length > 0) {
text = text + '\n<!--break-->\n';
}