Changeset 5333


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.

Location:
trunk/admin
Files:
2 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                        } 
  • trunk/admin/templates/default/mainscreen_message.tpl

    r1362 r5333  
    88 </table> 
    99</form> 
    10 <script language="Javascript"> 
    11 // FIX WYSIWYG IFRAME POSITION 
    12 setTimeout("setIframeTop()",1); 
    13 function setIframeTop() 
    14 { 
    15         var iframe = document.getElementsByTagName("IFRAME")[0]; 
    16         if(iframe){ 
    17                 var div = document.createElement("DIV"); 
    18                 div.style.height = "70px"; 
    19                 iframe.parentNode.insertBefore( div, iframe); 
    20         } 
    21         else  
    22                 setTimeout("setIframeTop()",1); 
    23 } 
    24 </script> 
    2510<!-- END form --> 
    2611  
     
    3318<!-- BEGIN row_2 --> 
    3419  <tr > 
    35         <td style="width:580px" colspan="2" align="left">{value}</td> 
     20        <td style="width:100%" colspan="2" align="left">{value}</td> 
    3621  </tr> 
    3722<!-- END row_2 --> 
Note: See TracChangeset for help on using the changeset viewer.