Changeset 5329


Ignore:
Timestamp:
01/09/12 11:16:28 (12 years ago)
Author:
niltonneto
Message:

Ticket #663 - Alterado caminho do CKEditor para utilizar lib da API.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/news_admin/inc/class.uinews.inc.php

    r3463 r5329  
    408408                function modify($type = 'edit') 
    409409                {                         
    410                         include_once("fckeditor.php");                                                 
    411                         $this->news_data['is_html'] = ($type == 'add' ? '1' : $this->news_data['is_html'] );  
     410                        $this->news_data['is_html'] = ($type == 'add' ? '1' : $this->news_data['is_html'] );  
    412411                        $options = $this->bo->get_options($this->news_data); 
    413412                        $GLOBALS['phpgw']->common->phpgw_header(); 
     
    440439                        ); 
    441440                         
    442                         $oFCKeditor = new FCKeditor('news[content]') ;                         
    443                         $oFCKeditor->BasePath = 'news_admin/templates/' . ($GLOBALS['phpgw_info']['server']['template_set'] ? $GLOBALS['phpgw_info']['server']['template_set'] : 'default') . '/fckeditor/'; 
    444                         $oFCKeditor->ToolbarSet = 'ExpressoLivre'; 
    445                         $oFCKeditor->Value = $this->news_data['content'];                                         
     441                        $ckeditor = '<script type="text/javascript" src="./library/ckeditor/ckeditor.js"></script> 
     442                        <textarea cols="80" id="news[content]" name="news[content]" rows="10">' . $this->news_data['content'] . '</textarea> 
     443                        <script type="text/javascript"> CKEDITOR.replace( \'news[content]\',{ 
     444                        removePlugins : \'elementspath\', 
     445                        skin : \'office2003\', 
     446                        toolbar : [["Source","Preview","-","Cut","Copy","Paste","-","Print", 
     447                        "Undo","Redo","-","Find","Replace","-","SelectAll" ], 
     448                        ["Table","HorizontalRule","SpecialChar","PageBreak","-","Bold", 
     449                        "Italic","Underline","Smiley","Strike","-","Subscript","Superscript", 
     450                        "NumberedList","BulletedList","-","Outdent","Indent","Blockquote", 
     451                        "JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock", 
     452                        "Link", "TextColor","BGColor","Maximize"], 
     453                        ["Styles","Format","Font","FontSize"]] 
     454                        });</script>'; 
     455 
    446456                        $this->template->set_var(array( 
    447457                                'form_button' => '<input type="submit" name="submitit" value="' . lang('save') . '">', 
     
    453463                                'value_teaser' => '<input name="news[teaser]" autocomplete="off" size="60" value="' . @htmlspecialchars($this->news_data['teaser'],ENT_COMPAT,$GLOBALS['phpgw']->translation->charset()) . '" maxLength="100">', 
    454464                                'label_content' => lang('Content') . ':', 
    455                                 //'value_content' => '<textarea cols="60" rows="6" name="news[content]" wrap="virtual">' . $this->news_data['content'] . '</textarea>', 
    456                                 'value_content' => $oFCKeditor->Create(), 
     465                                'value_content' => $ckeditor, 
    457466                                'label_category' => lang('Category') . ':', 
    458467                                'value_category' => '<select name="news[category]">' . $this->selectlist('write', (int)$this->news_data['category']) . '</select>', 
Note: See TracChangeset for help on using the changeset viewer.