[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] news_admin/inc class.uinews.inc.php
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] news_admin/inc class.uinews.inc.php |
Date: |
Tue, 04 Apr 2006 11:46:00 +0000 |
CVSROOT: /cvsroot/phpgroupware
Module name: news_admin
Branch:
Changes by: Dave Hall <address@hidden> 06/04/04 11:45:59
Modified files:
inc : class.uinews.inc.php
Log message:
switch to api richtext class
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/news_admin/inc/class.uinews.inc.php.diff?tr1=1.36&tr2=1.37&r1=text&r2=text
Patches:
Index: news_admin/inc/class.uinews.inc.php
diff -u news_admin/inc/class.uinews.inc.php:1.36
news_admin/inc/class.uinews.inc.php:1.37
--- news_admin/inc/class.uinews.inc.php:1.36 Thu Dec 15 14:16:19 2005
+++ news_admin/inc/class.uinews.inc.php Tue Apr 4 11:45:59 2006
@@ -14,7 +14,7 @@
* Many enhancements were sponsored by ecotrader.net
*
\**************************************************************************/
- /* $Id: class.uinews.inc.php,v 1.36 2005/12/15 14:16:19 skwashd Exp $ */
+ /* $Id: class.uinews.inc.php,v 1.37 2006/04/04 11:45:59 skwashd Exp $ */
class uinews
{
@@ -544,29 +544,22 @@
.
$config->config_data['newsletter_footer_html'];
}
- if ( !is_object($GLOBALS['phpgw']->js) )
- {
- $GLOBALS['phpgw']->js =
CreateObject('phpgwapi.javascript');
- }
+ if ( !isset($GLOBALS['phpgw']->richtext) ||
!is_object($GLOBALS['phpgw']->richtext) )
+ {
+ $GLOBALS['phpgw']->richtext =&
createObject('phpgwapi.richtext');
+ }
+
$GLOBALS['phpgw']->richtext->replace_element('nl_content');
+ $GLOBALS['phpgw']->richtext->generate_script();
$GLOBALS['phpgw']->js->validate_file('base', 'tabs',
'news_admin');
$GLOBALS['phpgw']->js->validate_file('base',
'news_builder', 'news_admin');
- $GLOBALS['phpgw']->js->validate_file('fckeditor',
'fckeditor', 'news_admin');
+
$GLOBALS['phpgw_info']['flags']['java_script'] = '
<script type="text/javascript">
<!--
//Global scope
var oTabs;
var strLinkURL = \'' .
$config->config_data['more_link_url'] . '\';
- window.onload = function()
- {
- var oFCKEditor = new
FCKeditor(\'nl_content\');
- oFCKEditor.BasePath =
"' . $GLOBALS['phpgw_info']['server']['webserver_url'] .
'/news_admin/js/fckeditor/";
- oFCKEditor.SpellChecker
= \'' . (extension_loaded('pspell') ? 'SpellerPages' : 'ieSpell') . '\'
-
oFCKEditor.ReplaceTextarea();
-
setTimeout("nlbLoaded()", 2000); //stops FCK FCKing up
- }
-
oLang = {
read_more: "' .
lang('read more') . ' >>"
}
@@ -822,21 +815,15 @@
{
$GLOBALS['phpgw']->js =
CreateObject('phpgwapi.javascript');
}
-
$GLOBALS['phpgw']->js->validate_file('base', 'toggle',
'news_admin');
- $GLOBALS['phpgw']->js->validate_file('fckeditor',
'fckeditor', 'news_admin');
- $GLOBALS['phpgw_info']['flags']['java_script'] = '
- <script type="text/javascript">
- <!--
- window.onload = function()
- {
- var oFCKeditor = new
FCKeditor(\'news[content]\');
- oFCKeditor.BasePath = "' .
$GLOBALS['phpgw_info']['server']['webserver_url'] . '/news_admin/js/fckeditor/";
- oFCKeditor.ReplaceTextarea();
- toggle();
- }
- //-->
- </script>';
+
+ if ( !isset($GLOBALS['phpgw']->richtext) ||
!is_object($GLOBALS['phpgw']->richtext) )
+ {
+ $GLOBALS['phpgw']->richtext =&
createObject('phpgwapi.richtext');
+ }
+
$GLOBALS['phpgw']->richtext->replace_element('nl_content');
+ $GLOBALS['phpgw']->richtext->generate_script();
+ $GLOBALS['phpgw']->js->add_event('load', 'toggle();');
$jscal = createObject('phpgwapi.jscalendar');
- [Phpgroupware-cvs] news_admin/inc class.uinews.inc.php,
Dave Hall <=