[svn r16594] create an empty template and load it by default when creating a document

skala
Eric Marguin 17 years ago
parent e0ac8e46d0
commit d4d88cc0bc
  1. 5
      main/inc/lib/fckeditor/editor/dialog/fck_template.html
  2. 11
      main/inc/lib/fckeditor/fcktemplates.xml.php
  3. 5
      main/inc/lib/fckeditor/myconfig.js
  4. 9
      main/inc/lib/formvalidator/Element/html_editor.php

@ -70,7 +70,10 @@ window.onload = function()
// Translate the dialog box texts. // Translate the dialog box texts.
oEditor.FCKLanguageManager.TranslatePage(document) ; oEditor.FCKLanguageManager.TranslatePage(document) ;
//window.parent.SetAutoSize( true ) ; //window.parent.SetAutoSize( true ) ;
LoadTemplatesXml() ; LoadTemplatesXml() ;
// select first by default (Dokeos customization)
SelectTemplate( 0 ) ;
} }
function LoadTemplatesXml() function LoadTemplatesXml()

@ -76,6 +76,17 @@ $default_course_dir = api_get_path(REL_CODE_PATH).'default_course_document/';
echo '</Template>'; echo '</Template>';
} }
?> ?>
<Template title="<?php echo s('Empty'); ?>" >
<Description></Description>
<Html>
<![CDATA[
<head>
<?php echo $css ?>
</head>
]]>
</Html>
</Template>
<Template title="<?php echo s('TemplateTitleCourseTitle'); ?>" > <Template title="<?php echo s('TemplateTitleCourseTitle'); ?>" >
<Description><?php echo s('TemplateTitleCourseTitleDescription'); ?></Description> <Description><?php echo s('TemplateTitleCourseTitleDescription'); ?></Description>
<Html> <Html>

@ -41,7 +41,7 @@ FCKConfig.ToolbarSets["Announcements"] = [
] ; ] ;
FCKConfig.ToolbarSets["Full"] = [ FCKConfig.ToolbarSets["Full"] = [
['PasteWord','Link','Anchor','-','ImageManager','flvPlayer','Flash','EmbedMovies','MP3','Table','Rule','-','Subscript', 'Superscript','-','OrderedList','UnorderedList','Outdent','Indent','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],'/',['FontName','FontSize','Bold','Italic','Underline','StrikeThrough','TextColor', 'BGColor','-','Source'] ['PasteWord','Link','Anchor','-','ImageManager','flvPlayer','Flash','EmbedMovies','MP3','Table','Rule','-','Subscript', 'Superscript','-','OrderedList','UnorderedList','Outdent','Indent','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],'/',['FontFormat','FontName','FontSize','Bold','Italic','Underline','StrikeThrough','TextColor', 'BGColor','-','Source']
] ; ] ;
FCKConfig.ToolbarSets["Comment"] = [ FCKConfig.ToolbarSets["Comment"] = [
@ -93,3 +93,6 @@ FCKConfig.Plugins.Add("Flash", "en");
FCKConfig.Plugins.Add('fckEmbedMovies'); FCKConfig.Plugins.Add('fckEmbedMovies');
FCKConfig.Plugins.Add("wikilink", "en,es", sOtherPluginPath ) ; // support to english, spanish FCKConfig.Plugins.Add("wikilink", "en,es", sOtherPluginPath ) ; // support to english, spanish
FCKConfig.Plugins.Add("imgmap", "en,es", sOtherPluginPath ); FCKConfig.Plugins.Add("imgmap", "en,es", sOtherPluginPath );
// reduce format list
FCKConfig.FontFormats = 'p;h1;h2;h3' ;

@ -1,5 +1,5 @@
<?php <?php
// $Id: html_editor.php 15984 2008-08-13 17:24:24Z juliomontoya $ // $Id: html_editor.php 16594 2008-10-22 17:28:53Z elixir_inter $
/* /*
============================================================================== ==============================================================================
Dokeos - elearning and course management software Dokeos - elearning and course management software
@ -92,9 +92,9 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea
$this -> fck_editor->Config['DefaultLanguage'] = $isocode_language; $this -> fck_editor->Config['DefaultLanguage'] = $isocode_language;
$this -> fck_editor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js"; $this -> fck_editor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$this -> fck_editor->ToolbarSet = $fck_attribute['ToolbarSet'] ; $this -> fck_editor->ToolbarSet = $fck_attribute['ToolbarSet'] ;
$this -> fck_editor->Config['EditorAreaCSS'] = api_get_path(REL_PATH).'main/css/'.api_get_setting('stylesheets').'/course.css'; // css should be dokeos ones
$this -> fck_editor->Config['EditorAreaCSS'] = $this -> fck_editor->Config['ToolbarComboPreviewCSS'] = api_get_path(REL_PATH).'main/css/'.api_get_setting('stylesheets').'/default.css';
//FCKeditor Configuration for documents //FCKeditor Configuration for documents
if(isset($_SESSION['_course']) && $_SESSION['_course']['path']!='') if(isset($_SESSION['_course']) && $_SESSION['_course']['path']!='')
{ {
@ -155,6 +155,7 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea
function toHtml() function toHtml()
{ {
$value = $this->getValue(); $value = $this->getValue();
if ($this->fullPage) if ($this->fullPage)
{ {
if (strlen(trim($value)) == 0) if (strlen(trim($value)) == 0)

Loading…
Cancel
Save