Prechádzať zdrojové kódy

[svn r22019] FS#2867 - Admin tools - templates and portal news: Elimination of the global variable $fck_attribute.

Ivan Tcholakov 15 rokov pred
rodič
commit
6f027147cc

+ 2 - 7
main/admin/settings.php

@@ -1,4 +1,4 @@
-<?php // $Id: settings.php 21994 2009-07-11 22:11:42Z herodoto $
+<?php // $Id: settings.php 22019 2009-07-13 06:16:38Z ivantcholakov $
 /*
 ==============================================================================
 	Dokeos - elearning and course management software
@@ -75,11 +75,6 @@ $interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAd
 // setting the name of the tool
 $tool_name = get_lang('DokeosConfigSettings');
 
-// setting for templates
-$fck_attribute['ToolbarSet'] = "AdminTemplates";
-$fck_attribute['Width'] = '100%';
-$fck_attribute['Height'] = '400';
-
 // Build the form
 if (!empty($_GET['category']) and !in_array($_GET['category'], array('Plugins', 'stylesheets', 'Search')))
 {
@@ -1027,7 +1022,7 @@ function add_edit_template()
 	$form->add_textfield('title', get_lang('Title'), false);
 	
 	// settting the form elements: the content of the template (wysiwyg editor)
-	$form->addElement('html_editor', 'template_text', get_lang('Text'));
+	$form->addElement('html_editor', 'template_text', get_lang('Text'), null, array('ToolbarSet' => 'AdminTemplates', 'Width' => '100%', 'Height' => '400'));
 	
 	// settting the form elements: the form to upload an image to be used with the template
 	$form->addElement('file','template_image',get_lang('Image'),'');

+ 2 - 6
main/admin/system_announcements.php

@@ -1,4 +1,4 @@
-<?php // $Id: system_announcements.php 20441 2009-05-10 07:39:15Z ivantcholakov $
+<?php // $Id: system_announcements.php 22019 2009-07-13 06:16:38Z ivantcholakov $
 /*
 ==============================================================================
 	Dokeos - elearning and course management software
@@ -179,15 +179,11 @@ if ($action_todo)
 		$language_list_with_keys[$language_list['folder'][$i]] = $language_list['name'][$i];
 	}
 
-	$fck_attribute['Width'] = '100%';
-	$fck_attribute['Height'] = '300';
-	$fck_attribute['ToolbarSet'] = 'SystemAnnouncements';
-	
 	$form->addElement('select', 'lang',get_lang('Language'),$language_list_with_keys);
 	if (api_get_setting('wcag_anysurfer_public_pages')=='true') {
 		$form->addElement('textarea', 'content', get_lang('Content'));
 	} else {
-		$form->add_html_editor('content', get_lang('Content'));
+		$form->add_html_editor('content', get_lang('Content'), true, false, array('ToolbarSet' => 'SystemAnnouncements', 'Width' => '100%', 'Height' => '300'));
 	}
 	$form->add_timewindow('start','end',get_lang('StartTimeWindow'),get_lang('EndTimeWindow'));
 	$form->addElement('checkbox', 'visible_teacher', get_lang('Visible'), get_lang('Teacher'));

+ 1 - 1
main/inc/lib/fckeditor/toolbars/admin_templates.php

@@ -44,4 +44,4 @@ $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['Height'] = '400';