Ignore:
Timestamp:
01/10/12 08:46:31 (12 years ago)
Author:
niltonneto
Message:

Ticket #663 - Alterado editor WYSIWYG para utilizar CKEditor da lib da API.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/inc/class.uimainscreen.inc.php

    r1362 r5333  
    148148                                $current_message = $GLOBALS['phpgw']->db->f('content'); 
    149149                                 
    150                                 if($_POST['htmlarea']) 
    151                                 { 
    152                                    $text_or_htmlarea=$html->htmlarea('message',stripslashes($current_message)); 
    153                                    $htmlarea_button='<input type="submit" name="no-htmlarea" onclick="self.location.href=\''.$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index&htmlarea=true').'\'" value="'.lang('disable WYSIWYG-editor').'">';        
    154                                 } 
    155                                 else 
    156                                 { 
    157                                    $text_or_htmlarea='<textarea name="message" style="width:100%; min-width:350px; height:300px;" wrap="virtual">' . stripslashes($current_message) . '</textarea>'; 
    158                                    $htmlarea_button='<input type="submit" name="htmlarea" onclick="self.location.href=\''.$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index&htmlarea=true').'\'" value="'.lang('activate WYSIWYG-editor').'">'; 
     150                                $text_or_htmlarea.= '<script type="text/javascript" src="./library/ckeditor/ckeditor.js"></script>'; 
     151                                $text_or_htmlarea.= '<textarea name="message">'.$current_message.'</textarea>';                          
     152                                $text_or_htmlarea.= '<script type="text/javascript">'. 
     153                                                'CKEDITOR.replace( \'message\',{'. 
     154                                                'removePlugins : \'elementspath\','. 
     155                                                'skin : \'office2003\','. 
     156                                                'toolbar : \'Full\''. 
     157                                                '}'. 
     158                                                ');</script>'; 
    159159 
    160                                 }                           
    161  
    162                                 $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); 
    163160                                $GLOBALS['phpgw']->common->phpgw_header(); 
    164161                                echo parse_navbar(); 
     
    184181                                $GLOBALS['phpgw']->template->set_var('tr_color',$tr_color); 
    185182                                $GLOBALS['phpgw']->template->set_var('value','<input type="submit" name="submit" value="' . lang('Save') 
    186                                 . '"><input type="submit" name="cancel" value="'. lang('cancel') .'">'.$htmlarea_button); 
     183                                . '"><input type="submit" name="cancel" value="'. lang('cancel') .'">'); 
    187184                                $GLOBALS['phpgw']->template->fp('rows','row_2',True); 
    188185                        } 
Note: See TracChangeset for help on using the changeset viewer.