Feature #2479 new bar for careers

skala
Juan Carlos Raña 15 years ago
parent eacd75c33e
commit 6ef67b2d0b
  1. 15
      main/inc/lib/career.lib.php
  2. 53
      main/inc/lib/fckeditor/toolbars/default/careers.php
  3. 73
      main/inc/lib/fckeditor/toolbars/extended/careers.php

@ -9,7 +9,7 @@
require_once 'model.lib.php';
require_once 'promotion.lib.php';
require_once 'fckeditor/fckeditor.php';
define ('CAREER_STATUS_ACTIVE', 1);
define ('CAREER_STATUS_INACTIVE',0);
@ -70,6 +70,15 @@ class Career extends Model {
* @return obj form validator obj
*/
public function return_form($url, $action) {
$oFCKeditor = new FCKeditor('description') ;
$oFCKeditor->ToolbarSet = 'careers';
$oFCKeditor->Width = '100%';
$oFCKeditor->Height = '200';
$oFCKeditor->Value = $message;
$oFCKeditor->CreateHtml();
$form = new FormValidator('career', 'post', $url);
// Settting the form elements
$header = get_lang('add');
@ -80,8 +89,8 @@ class Career extends Model {
$form->addElement('header', '', $header);
$form->addElement('hidden', 'id',intval($_GET['id']));
$form->addElement('text', 'name', get_lang('Name'), array('size' => '70'));
$form->add_html_editor('description', get_lang('Description'), false, false, array('Width' => '95%', 'Height' => '250'));
$status_list = $this->get_status_list();
$form->add_html_editor('description', get_lang('Description'), false, false, array('ToolbarSet' => 'careers','Width' => '100%', 'Height' => '250'));
$status_list = $this->get_status_list();
$form->addElement('select', 'status', get_lang('Status'), $status_list);
if ($action == 'edit') {
$form->addElement('text', 'created_at', get_lang('CreatedAt'));

@ -0,0 +1,53 @@
<?php
// Chamilo LMS
// See license terms in chamilo/documentation/license.txt
// Admin tools
// Careers
// For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
//NOTE: Does not include Replace because it is redundant, being in the same tab to Find
//TODO: DocProps, asciimath, asciisvg don't run ok here.
// Hide/show SpellCheck buttom
if ((api_get_setting('allow_spellcheck') == 'true')) {
$VSpellCheck='SpellCheck';
}
else{
$VSpellCheck='';
}
// This is the visible toolbar set when the editor has "normal" size.
$config['ToolbarSets']['Normal'] = array(
array('Save','NewPage','Templates','-','PasteText'),
array('Undo','Redo'),
array('Link','Image','flvPlayer','Flash','MP3','TableOC','mimetex'),
array('UnorderedList','OrderedList','Rule'),
array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor','Source'),
array('FitWindow')
);
// Sets whether the toolbar can be collapsed/expanded or not.
// Possible values: true , false
//$config['ToolbarCanCollapse'] = true;
// Sets how the editor's toolbar should start - expanded or collapsed.
// Possible values: true , false
//$config['ToolbarStartExpanded'] = true;
//This option sets the location of the toolbar.
// Possible values: 'In' , 'None' , 'Out:[TargetId]' , 'Out:[TargetWindow]([TargetId])'
//$config['ToolbarLocation'] = 'In';
// A setting for blocking copy/paste functions of the editor.
// This setting activates on leaners only. For users with other statuses there is no blocking copy/paste.
// Possible values: true , false
//$config['BlockCopyPaste'] = false;
// Here new width and height of the editor may be set.
// Possible values, examples: 300 , '250' , '100%' , ...
//$config['Width'] = '100%';
//$config['Height'] = '300';

@ -0,0 +1,73 @@
<?php
// Chamilo LMS
// See license terms in chamilo/documentation/license.txt
// Admin tools
// Careers
// For more information: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
//NOTE: Does not include Replace because it is redundant, being in the same tab to Find
//TODO: DocProps, asciimath, asciisvg don't run ok here.
// Hide/show SpellCheck buttom
if ((api_get_setting('allow_spellcheck') == 'true')) {
$VSpellCheck='SpellCheck';
}
else{
$VSpellCheck='';
}
// This is the visible toolbar set when the editor has "normal" size.
$config['ToolbarSets']['Normal'] = array(
array('Save','NewPage','Templates','-','PasteText'),
array('Undo','Redo'),
array('Link','Image','flvPlayer','Flash','MP3','TableOC','mimetex'),
array('UnorderedList','OrderedList','Rule'),
array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
array('FontFormat','FontName','FontSize','Bold','Italic','Underline','TextColor','BGColor','Source'),
array('FitWindow')
);
// This is the visible toolbar set when the editor is maximized.
// If it has not been defined, then the toolbar set for the "normal" size is used.
$config['ToolbarSets']['Maximized'] = array(
array('Save','NewPage','Templates','-','Preview','Print'),
array('Cut','Copy','Paste','PasteText','PasteWord'),
array('Undo','Redo','-','SelectAll','Find','-','RemoveFormat'),
array('Link','Unlink','Anchor','Glossary'),
array('Image','imgmapPopup','flvPlayer','EmbedMovies','YouTube','Flash','MP3','googlemaps','Smiley','SpecialChar','insertHtml','mimetex','fckeditor_wiris_openFormulaEditor','fckeditor_wiris_openCAS'),
'/',
array('TableOC','Table','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableVerticalSplitCell','TableCellProp','-','CreateDiv'),
array('UnorderedList','OrderedList','Rule','-','Outdent','Indent','Blockquote'),
array('JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
array('Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor'),
array($VSpellCheck),
array('Style','FontFormat','FontName','FontSize'),
array('PageBreak','ShowBlocks','Source'),
array('FitWindow')
);
// Sets whether the toolbar can be collapsed/expanded or not.
// Possible values: true , false
//$config['ToolbarCanCollapse'] = true;
// Sets how the editor's toolbar should start - expanded or collapsed.
// Possible values: true , false
//$config['ToolbarStartExpanded'] = true;
//This option sets the location of the toolbar.
// Possible values: 'In' , 'None' , 'Out:[TargetId]' , 'Out:[TargetWindow]([TargetId])'
//$config['ToolbarLocation'] = 'In';
// A setting for blocking copy/paste functions of the editor.
// This setting activates on leaners only. For users with other statuses there is no blocking copy/paste.
// Possible values: true , false
//$config['BlockCopyPaste'] = false;
// Here new width and height of the editor may be set.
// Possible values, examples: 300 , '250' , '100%' , ...
//$config['Width'] = '100%';
//$config['Height'] = '300';
Loading…
Cancel
Save