[svn r22097] FS#2867 - The "Messages" tool: Eliminating the global variable $fck_attribute.

skala
Ivan Tcholakov 16 years ago
parent b6c324f368
commit a9d6827e8c
  1. 18
      main/inc/lib/fckeditor/toolbars/messages.php
  2. 4
      main/messages/message.class.php
  3. 9
      main/messages/new_message.php

@ -6,13 +6,15 @@
// This is the visible toolbar set when the editor has "normal" size.
$config['ToolbarSets']['Normal'] = array(
array('FitWindow','Undo','Redo'),
array('Link','Unlink'),
array('FitWindow','-','PasteWord','-','Undo','Redo'),
array('Link','Unlink','Anchor'),
array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
array('Table','Smiley','googlemaps'),
array('Table','Smiley'),
'/',
array('FontName','FontSize'),
array('Bold','Italic','Underline'),
array('OrderedList','UnorderedList','-','Blockquote','-','TextColor'),
array('ShowBlocks')
array('JustifyLeft','JustifyCenter','-','OrderedList','UnorderedList','-','TextColor','BGColor'),
array('Source')
);
// This is the visible toolbar set when the editor is maximized.
@ -29,7 +31,7 @@ $config['ToolbarSets']['Maximized'] = array(
// Sets how the editor's toolbar should start - expanded or collapsed.
// Possible values: true , false
//$config['ToolbarStartExpanded'] = true;
$config['ToolbarStartExpanded'] = false;
//This option sets the location of the toolbar.
// Possible values: 'In' , 'None' , 'Out:[TargetId]' , 'Out:[TargetWindow]([TargetId])'
@ -42,5 +44,5 @@ $config['ToolbarSets']['Maximized'] = array(
// Here new width and height of the editor may be set.
// Possible values, examples: 300 , '250' , '100%' , ...
//$config['Width'] = '100%';
//$config['Height'] = '300';
//$config['Width'] = '95%';
//$config['Height'] = '250';

@ -70,8 +70,8 @@ class MessageManager
/**
* Displays the wysiwyg html editor.
*/
public static function display_html_editor_area($name,$resp) {
api_disp_html_area($name, get_lang('TypeYourMessage'), '', '100%');
public static function display_html_editor_area($name, $resp) {
api_disp_html_area($name, get_lang('TypeYourMessage'), '', '100%', null, array('ToolbarSet' => 'Messages', 'Width' => '95%', 'Height' => '250'));
}
/**

@ -1,4 +1,4 @@
<?php // $Id: new_message.php 21554 2009-06-21 20:58:47Z iflorespaz $
<?php // $Id: new_message.php 22097 2009-07-15 04:30:05Z ivantcholakov $
/*
==============================================================================
Dokeos - elearning and course management software
@ -101,10 +101,7 @@ $(document).ready(function (){
</script>';
$nameTools = api_xml_http_response_encode(get_lang('ComposeMessage'));
$fck_attribute['Height'] = "250";
$fck_attribute['Width'] = "95%";
$fck_attribute['ToolbarSet'] = "Profil";
$fck_attribute['Config']['ToolbarStartExpanded']='false';
/*
==============================================================================
FUNCTIONS
@ -169,7 +166,7 @@ function manage_form ($default, $select_from_user_list = null) {
$form->addElement('hidden','user_list',0,array('id'=>'user_list'));
}
$form->add_textfield('title', api_xml_http_response_encode(get_lang('Title')));
$form->add_html_editor('content', '',false,false);
$form->add_html_editor('content', '', false, false, array('ToolbarSet' => 'Messages', 'Width' => '95%', 'Height' => '250'));
if (isset($_GET['re_id'])) {
$form->addElement('hidden','re_id',Security::remove_XSS($_GET['re_id']));
$form->addElement('hidden','save_form','save_form');

Loading…
Cancel
Save