From: Yves K. <yku...@us...> - 2004-11-07 00:27:49
|
Update of /cvsroot/phpwebsite-comm/modules/xwysiwyg/js In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30205/modules/xwysiwyg/js Modified Files: wysiwyg.php Log Message: bugfix: for some notice: undefined variables Index: wysiwyg.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/xwysiwyg/js/wysiwyg.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** wysiwyg.php 5 Nov 2004 22:40:30 -0000 1.6 --- wysiwyg.php 7 Nov 2004 00:26:35 -0000 1.7 *************** *** 5,12 **** require_once(PHPWS_SOURCE_DIR.'mod/xwysiwyg/class/xwysiwyg.php');//include the xwysiwyg code $answer = PHPWS_xwysiwyg::isSupported($section_name); ! $onRequest = $answer[onRequest]; ! $xwysiwyg = $answer[xwysiwyg]; ! $xw_button = $answer[xwButton]; } if ($xwysiwyg) { $GLOBALS['xwysiwyg_areas'][] = $section_name; //write an array for the theme.php --- 5,15 ---- require_once(PHPWS_SOURCE_DIR.'mod/xwysiwyg/class/xwysiwyg.php');//include the xwysiwyg code $answer = PHPWS_xwysiwyg::isSupported($section_name); ! $onRequest = $answer["onRequest"]; ! $xwysiwyg = $answer["xwysiwyg"]; ! $xw_button = $answer["xwButton"]; } + + if(!isset($GLOBALS['xwysiwyg'])AND($xwysiwyg)) $GLOBALS['xwysiwyg'] = 0; + if ($xwysiwyg) { $GLOBALS['xwysiwyg_areas'][] = $section_name; //write an array for the theme.php *************** *** 23,27 **** if(!isset($GLOBALS['wysiwyg'])) $GLOBALS['wysiwyg'] = 1; - if(!isset($GLOBALS['xwysiwyg'])AND($xwysiwyg)) $GLOBALS['xwysiwyg'] = 1; if(!$xwysiwyg|$onRequest) { --- 26,29 ---- *************** *** 124,128 **** } ! $eid = $GLOBALS['xwysiwyg']; // ykuendig added a div here to hide the buttons in request-mode $js = "<div id=\"xw$eid\" class=\"xw$eid\"><a name=\"wysiwyg{$GLOBALS['wysiwyg']}\" />\n"; $js .= "<a href=\"#wysiwyg{$GLOBALS['wysiwyg']}\" tabindex=\"".$GLOBALS['wysiwyg_tab_index']++."\" onclick=\"addBold('{$form_name}', '{$section_name}');\" onmouseover=\"window.status='Add bold'; return true;\" onmouseout=\"window.status='';\">" . phpws_text::imageTag("./images/javascript/wysiwyg/bold.gif", "Bold", 21, 20) . "</a>\n"; --- 126,130 ---- } ! if(isset($GLOBALS['xwysiwyg'])) $eid = $GLOBALS['xwysiwyg']; else $eid = 0; // ykuendig added a div here to hide the buttons in request-mode $js = "<div id=\"xw$eid\" class=\"xw$eid\"><a name=\"wysiwyg{$GLOBALS['wysiwyg']}\" />\n"; $js .= "<a href=\"#wysiwyg{$GLOBALS['wysiwyg']}\" tabindex=\"".$GLOBALS['wysiwyg_tab_index']++."\" onclick=\"addBold('{$form_name}', '{$section_name}');\" onmouseover=\"window.status='Add bold'; return true;\" onmouseout=\"window.status='';\">" . phpws_text::imageTag("./images/javascript/wysiwyg/bold.gif", "Bold", 21, 20) . "</a>\n"; |