From: Sabri <lab...@us...> - 2007-07-17 14:19:16
|
Update of /cvsroot/phpwiki/phpwiki/lib/WysiwygEdit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18558/lib/WysiwygEdit Modified Files: Wikiwyg.php Log Message: - Make wikiwyg only available when hitting the new 'Wysiwyg Editor' button. - Display the beta quality Wikiwyg message only when Wikiwyg is running. Index: Wikiwyg.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/WysiwygEdit/Wikiwyg.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -2 -b -p -d -r1.9 -r1.10 --- Wikiwyg.php 7 Jan 2007 18:44:00 -0000 1.9 +++ Wikiwyg.php 17 Jul 2007 14:18:52 -0000 1.10 @@ -46,6 +46,7 @@ var pagename = '".$request->getArg('page $doubleClickToEdit = ($GLOBALS['request']->getPref('doubleClickEdit') or ENABLE_DOUBLECLICKEDIT) ? 'true' : 'false'; + if ($GLOBALS['request']->getArg('mode') && $GLOBALS['request']->getArg('mode') == 'wysiwyg'){ return JavaScript($this->_jsdefault . " -window.onload = function() { + window.onload = function() { var wikiwyg = new Wikiwyg.Phpwiki(); var config = { @@ -96,12 +97,16 @@ window.onload = function() { wikiwyg.createWikiwygArea(div, config); wikiwyg_divs.push(wikiwyg); - wikiwyg.editMode(); -}"); + wikiwyg.editMode();}" + ); + } } function Textarea ($textarea, $wikitext, $name='edit[content]') { + global $request; + $htmltextid = $this->_htmltextid; $textarea->SetAttr('id', $htmltextid); $iframe0 = new RawXml('<iframe id="iframe0" height="0" width="0" frameborder="0"></iframe>'); + if ($request->getArg('mode') and $request->getArg('mode') == 'wysiwyg'){ $out = HTML(HTML::div(array('class' => 'hint'), _("Warning: This Wikiwyg editor has only Beta quality!")), @@ -109,4 +114,7 @@ window.onload = function() { $iframe0, "\n"); + }else{ + $out = HTML($textarea, $iframe0, "\n"); + } return $out; } @@ -298,4 +306,8 @@ function replace_rich_table($matched) { /* $Log$ + Revision 1.10 2007/07/17 14:18:52 labbenes + - Make wikiwyg only available when hitting the new 'Wysiwyg Editor' button. + - Display the beta quality Wikiwyg message only when Wikiwyg is running. + Revision 1.9 2007/01/07 18:44:00 rurban Improve id: edit: to edit- |