diff --git a/main/admin/user_add.php b/main/admin/user_add.php index 9f8b1d26f5..a6f0d8e9ca 100644 --- a/main/admin/user_add.php +++ b/main/admin/user_add.php @@ -1,4 +1,4 @@ - $field_details) $form->applyFilter('extra_'.$field_details[1], 'trim'); break; case USER_FIELD_TYPE_TEXTAREA: - $form->add_html_editor('extra_'.$field_details[1], $field_details[3], false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130', 'ToolbarStartExpanded' => false)); + $form->add_html_editor('extra_'.$field_details[1], $field_details[3], false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130')); //$form->addElement('textarea', 'extra_'.$field_details[1], $field_details[3], array('size' => 80)); $form->applyFilter('extra_'.$field_details[1], 'stripslashes'); $form->applyFilter('extra_'.$field_details[1], 'trim'); diff --git a/main/admin/user_edit.php b/main/admin/user_edit.php index 2390f76711..6bf88bea33 100644 --- a/main/admin/user_edit.php +++ b/main/admin/user_edit.php @@ -1,4 +1,4 @@ - $field_details) $form->applyFilter('extra_'.$field_details[1], 'trim'); break; case USER_FIELD_TYPE_TEXTAREA: - $form->add_html_editor('extra_'.$field_details[1], $field_details[3], false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130', 'ToolbarStartExpanded' => false)); + $form->add_html_editor('extra_'.$field_details[1], $field_details[3], false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130')); //$form->addElement('textarea', 'extra_'.$field_details[1], $field_details[3], array('size' => 80)); $form->applyFilter('extra_'.$field_details[1], 'stripslashes'); $form->applyFilter('extra_'.$field_details[1], 'trim'); diff --git a/main/auth/inscription.php b/main/auth/inscription.php index b38f406dcf..2799756ce7 100644 --- a/main/auth/inscription.php +++ b/main/auth/inscription.php @@ -1,5 +1,5 @@ 'false') { // EXTENDED FIELDS if (api_get_setting('extended_profile') == 'true' AND api_get_setting('extendedprofile_registration','mycomptetences') == 'true') { - $form->add_html_editor('competences', get_lang('MyCompetences'), false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130', 'ToolbarStartExpanded' => false)); + $form->add_html_editor('competences', get_lang('MyCompetences'), false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130')); } if (api_get_setting('extended_profile') == 'true' AND api_get_setting('extendedprofile_registration','mydiplomas') == 'true') { - $form->add_html_editor('diplomas', get_lang('MyDiplomas'), false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130', 'ToolbarStartExpanded' => false)); + $form->add_html_editor('diplomas', get_lang('MyDiplomas'), false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130')); } if (api_get_setting('extended_profile') == 'true' AND api_get_setting('extendedprofile_registration','myteach') == 'true') { - $form->add_html_editor('teach', get_lang('MyTeach'), false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130', 'ToolbarStartExpanded' => false)); + $form->add_html_editor('teach', get_lang('MyTeach'), false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130')); } if (api_get_setting('extended_profile') == 'true' AND api_get_setting('extendedprofile_registration','mypersonalopenarea') == 'true') { - $form->add_html_editor('openarea', get_lang('MyPersonalOpenArea'), false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130', 'ToolbarStartExpanded' => false)); + $form->add_html_editor('openarea', get_lang('MyPersonalOpenArea'), false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130')); } if (api_get_setting('extended_profile') == 'true') { @@ -173,7 +173,7 @@ foreach ($extra as $id => $field_details) { if ($field_details[7] == 0) $form->freeze('extra_'.$field_details[1]); break; case USER_FIELD_TYPE_TEXTAREA: - $form->add_html_editor('extra_'.$field_details[1], $field_details[3], false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130', 'ToolbarStartExpanded' => false)); + $form->add_html_editor('extra_'.$field_details[1], $field_details[3], false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130')); //$form->addElement('textarea', 'extra_'.$field_details[1], $field_details[3], array('size' => 80)); $form->applyFilter('extra_'.$field_details[1], 'stripslashes'); $form->applyFilter('extra_'.$field_details[1], 'trim'); diff --git a/main/auth/profile.php b/main/auth/profile.php index c40bef6a17..f1174be888 100644 --- a/main/auth/profile.php +++ b/main/auth/profile.php @@ -1,4 +1,4 @@ -addElement('html', ' show_extend_profile'); $form->addElement('static', null, ''.get_lang('OptionalTextFields').''); // MY COMPETENCES - $form->add_html_editor('competences', get_lang('MyCompetences'), false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130', 'ToolbarStartExpanded' => false)); + $form->add_html_editor('competences', get_lang('MyCompetences'), false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130')); // MY DIPLOMAS - $form->add_html_editor('diplomas', get_lang('MyDiplomas'), false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130', 'ToolbarStartExpanded' => false)); + $form->add_html_editor('diplomas', get_lang('MyDiplomas'), false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130')); // WHAT I AM ABLE TO TEACH - $form->add_html_editor('teach', get_lang('MyTeach'), false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130', 'ToolbarStartExpanded' => false)); + $form->add_html_editor('teach', get_lang('MyTeach'), false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130')); // MY PRODUCTIONS $form->addElement('file', 'production', get_lang('MyProductions')); @@ -258,7 +258,7 @@ if (api_get_setting('extended_profile') == 'true') { $form->addElement('static', 'productions_list', null, $production_list); } // MY PERSONAL OPEN AREA - $form->add_html_editor('openarea', get_lang('MyPersonalOpenArea'), false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130', 'ToolbarStartExpanded' => false)); + $form->add_html_editor('openarea', get_lang('MyPersonalOpenArea'), false, false, array('ToolbarSet' => 'Profil', 'Width' => '100%', 'Height' => '130')); $form->applyFilter(array('competences', 'diplomas', 'teach', 'openarea'), 'stripslashes'); $form->applyFilter(array('competences', 'diplomas', 'teach'), 'trim'); // openarea is untrimmed for maximum openness } diff --git a/main/course_description/index.php b/main/course_description/index.php index 0f81af11ae..6137f98f88 100644 --- a/main/course_description/index.php +++ b/main/course_description/index.php @@ -1,4 +1,4 @@ -add_html_editor('contentDescription', get_lang('Content')); + $form->add_html_editor('contentDescription', get_lang('Content'), true, false, array('ToolbarSet' => 'CourseDescription', 'Width' => '100%', 'Height' => '200')); } $form->addElement('style_submit_button', null, get_lang('Save'), 'class="save"'); // Set some default values diff --git a/main/document/create_document.php b/main/document/create_document.php index 2d18a04dfc..5e2ac92c41 100644 --- a/main/document/create_document.php +++ b/main/document/create_document.php @@ -1,4 +1,4 @@ - (api_is_allowed_to_edit() ? 'Documents' :'Documents_Student'), + 'Width' => '100%', + 'Height' => '600', + 'FullPage' => true, + 'InDocument' => true, + 'CreateDocumentDir' => $relative_url, + 'CreateDocumentWebDir' => (empty($group_properties['directory'])) + ? api_get_path('WEB_COURSE_PATH').$_course['path'].'/document/' + : api_get_path('WEB_COURSE_PATH').api_get_course_path().'/document'.$group_properties['directory'].'/', + 'BaseHref' => api_get_path('WEB_COURSE_PATH').$_course['path'].'/document'.$dir +); $filepath = api_get_path('SYS_COURSE_PATH').$_course['path'].'/document'.$dir; @@ -398,7 +393,7 @@ if (api_get_setting('use_document_title') == 'true') { // HTML-editor $renderer->setElementTemplate('
{element}
', 'content'); -$form->add_html_editor('content','', false, false); +$form->add_html_editor('content','', false, false, $html_editor_config); // Comment-field //$form->addElement('textarea', 'comment', get_lang('Comment'), array ('rows' => 5, 'cols' => 50)); diff --git a/main/document/edit_document.php b/main/document/edit_document.php index 51b08972a1..c2a1f43eda 100644 --- a/main/document/edit_document.php +++ b/main/document/edit_document.php @@ -1,4 +1,4 @@ - (api_is_allowed_to_edit() ? 'Documents' :'Documents_Student'), + 'Width' => '100%', + 'Height' => '600', + 'FullPage' => true, + 'InDocument' => true, + 'CreateDocumentDir' => $relative_url, + 'CreateDocumentWebDir' => (empty($group_properties['directory'])) + ? api_get_path('WEB_COURSE_PATH').$_course['path'].'/document/' + : api_get_path('WEB_COURSE_PATH').api_get_course_path().'/document'.$group_properties['directory'].'/', + 'BaseHref' => api_get_path('WEB_COURSE_PATH').$_course['path'].'/document'.$dir +); $use_document_title = (get_setting('use_document_title')=='true')?true:false; $noPHP_SELF=true; @@ -673,7 +660,7 @@ if ($owner_id == $_user['user_id'] || api_is_platform_admin() || api_is_allowed_ { $_SESSION['showedit']=1; $renderer->setElementTemplate('
{element}
', 'texte'); - $form->add_html_editor('texte','',false,true); + $form->add_html_editor('texte', '', false, true, $html_editor_config); } } diff --git a/main/inc/lib/fckeditor/toolbars/course_description.php b/main/inc/lib/fckeditor/toolbars/course_description.php index 967b00728b..cc7f35cdcf 100644 --- a/main/inc/lib/fckeditor/toolbars/course_description.php +++ b/main/inc/lib/fckeditor/toolbars/course_description.php @@ -45,4 +45,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'] = '200'; diff --git a/main/inc/lib/fckeditor/toolbars/documents.php b/main/inc/lib/fckeditor/toolbars/documents.php index 3ca650323c..bcf09bacc5 100644 --- a/main/inc/lib/fckeditor/toolbars/documents.php +++ b/main/inc/lib/fckeditor/toolbars/documents.php @@ -45,4 +45,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'] = '600'; diff --git a/main/inc/lib/fckeditor/toolbars/documents_student.php b/main/inc/lib/fckeditor/toolbars/documents_student.php index ff29ef9f39..baf1893942 100644 --- a/main/inc/lib/fckeditor/toolbars/documents_student.php +++ b/main/inc/lib/fckeditor/toolbars/documents_student.php @@ -46,4 +46,4 @@ $config['BlockCopyPaste'] = true; // 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'] = '600'; diff --git a/main/inc/lib/fckeditor/toolbars/profil.php b/main/inc/lib/fckeditor/toolbars/profil.php index ef19db8a00..233a890562 100644 --- a/main/inc/lib/fckeditor/toolbars/profil.php +++ b/main/inc/lib/fckeditor/toolbars/profil.php @@ -31,7 +31,7 @@ $config['ToolbarSets']['Maximized'] = array( // Sets how the editor's toolbar should start - expanded or collapsed. // Possible values: true , false -//$config['ToolbarStartExpanded'] = false; +$config['ToolbarStartExpanded'] = false; //This option sets the location of the toolbar. // Possible values: 'In' , 'None' , 'Out:[TargetId]' , 'Out:[TargetWindow]([TargetId])' diff --git a/main/inc/lib/formvalidator/Element/html_editor.php b/main/inc/lib/formvalidator/Element/html_editor.php index ab335728dd..d5158bf693 100644 --- a/main/inc/lib/formvalidator/Element/html_editor.php +++ b/main/inc/lib/formvalidator/Element/html_editor.php @@ -1,5 +1,5 @@ fck_editor->Height = $config['Height']; } + if (isset($config['FullPage'])) { + $this->fullPage = $config['FullPage']; + } } }