New: Update ckeditor to version 4 (part 2)
This commit is contained in:
parent
c65d681d87
commit
2c0f1340d5
@ -4,6 +4,7 @@ English Dolibarr ChangeLog
|
|||||||
|
|
||||||
***** ChangeLog for 3.6 compared to 3.5.* *****
|
***** ChangeLog for 3.6 compared to 3.5.* *****
|
||||||
For users:
|
For users:
|
||||||
|
- New: Update ckeditor to version 4.
|
||||||
- New: Add form search customer order on commercial main page.
|
- New: Add form search customer order on commercial main page.
|
||||||
- New: Can input barcode during product creation step.
|
- New: Can input barcode during product creation step.
|
||||||
- New: Add autonumbering of barcode value for products.
|
- New: Add autonumbering of barcode value for products.
|
||||||
|
|||||||
@ -32,6 +32,13 @@ $langs->load("admin");
|
|||||||
$langs->load("fckeditor");
|
$langs->load("fckeditor");
|
||||||
|
|
||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
|
// Possible modes are:
|
||||||
|
// dolibarr_details
|
||||||
|
// dolibarr_notes
|
||||||
|
// dolibarr_readonly
|
||||||
|
// dolibarr_mailings
|
||||||
|
// Full (not sure this one is used)
|
||||||
|
$mode=GETPOST('mode')?GETPOST('mode','alpha'):'dolibarr_notes';
|
||||||
|
|
||||||
if (!$user->admin) accessforbidden();
|
if (!$user->admin) accessforbidden();
|
||||||
|
|
||||||
@ -152,10 +159,12 @@ else
|
|||||||
print '</table>'."\n";
|
print '</table>'."\n";
|
||||||
|
|
||||||
print '<br>'."\n";
|
print '<br>'."\n";
|
||||||
print_fiche_titre($langs->trans("TestSubmitForm"),'','');
|
print_fiche_titre($langs->trans("TestSubmitForm"),'(mode='.$mode.')','');
|
||||||
print '<form name="formtest" method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
print '<form name="formtest" method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||||
|
print '<input type="hidden" name="mode" value="'.dol_escape_htmltag($mode).'">';
|
||||||
$uselocalbrowser=true;
|
$uselocalbrowser=true;
|
||||||
$editor=new DolEditor('formtestfield',isset($conf->global->FCKEDITOR_TEST)?$conf->global->FCKEDITOR_TEST:'Test','',200,'dolibarr_notes','In', true, $uselocalbrowser);
|
$readonly=($mode=='dolibarr_readonly'?1:0);
|
||||||
|
$editor=new DolEditor('formtestfield',isset($conf->global->FCKEDITOR_TEST)?$conf->global->FCKEDITOR_TEST:'Test','',200,$mode,'In', true, $uselocalbrowser, 1, 120, 8, $readonly);
|
||||||
$editor->Create();
|
$editor->Create();
|
||||||
print '<center><br><input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"></center>'."\n";
|
print '<center><br><input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"></center>'."\n";
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
|
|||||||
@ -146,7 +146,7 @@ class DolEditor
|
|||||||
*/
|
*/
|
||||||
function Create($noprint=0,$morejs='')
|
function Create($noprint=0,$morejs='')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf,$langs;
|
||||||
|
|
||||||
$found=0;
|
$found=0;
|
||||||
$out='';
|
$out='';
|
||||||
@ -169,9 +169,7 @@ class DolEditor
|
|||||||
if (! defined('REQUIRE_CKEDITOR')) define('REQUIRE_CKEDITOR','1');
|
if (! defined('REQUIRE_CKEDITOR')) define('REQUIRE_CKEDITOR','1');
|
||||||
|
|
||||||
//$skin='kama';
|
//$skin='kama';
|
||||||
//$skin='office2003';
|
$skin='moono'; // default with cdeditor 4
|
||||||
//$skin='v2';
|
|
||||||
$skin='kama';
|
|
||||||
|
|
||||||
$htmlencode_force=preg_match('/_encoded$/',$this->toolbarname)?'true':'false';
|
$htmlencode_force=preg_match('/_encoded$/',$this->toolbarname)?'true':'false';
|
||||||
|
|
||||||
@ -190,6 +188,8 @@ class DolEditor
|
|||||||
width: '.($this->width ? '\''.$this->width.'\'' : '\'\'').',
|
width: '.($this->width ? '\''.$this->width.'\'' : '\'\'').',
|
||||||
height: '.$this->height.',
|
height: '.$this->height.',
|
||||||
skin: \''.$skin.'\',
|
skin: \''.$skin.'\',
|
||||||
|
language: \''.$langs->defaultlang.'\',
|
||||||
|
textDirection: \''.$langs->trans("DIRECTION").'\',
|
||||||
on :
|
on :
|
||||||
{
|
{
|
||||||
instanceReady : function( ev )
|
instanceReady : function( ev )
|
||||||
@ -215,13 +215,13 @@ class DolEditor
|
|||||||
//$out.= ' filebrowserImageUploadUrl : \''.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanagerdol/connectors/php/upload.php?Type=Image\',';
|
//$out.= ' filebrowserImageUploadUrl : \''.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanagerdol/connectors/php/upload.php?Type=Image\',';
|
||||||
$out.= "\n";
|
$out.= "\n";
|
||||||
// To use filemanager with ckfinder (Non free) and ckfinder directory is inside htdocs/includes
|
// To use filemanager with ckfinder (Non free) and ckfinder directory is inside htdocs/includes
|
||||||
/* $out.= ' filebrowserBrowseUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/ckfinder.html\',
|
/* $out.= ' filebrowserBrowseUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/ckfinder.html\',
|
||||||
filebrowserImageBrowseUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/ckfinder.html?Type=Images\',
|
filebrowserImageBrowseUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/ckfinder.html?Type=Images\',
|
||||||
filebrowserFlashBrowseUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/ckfinder.html?Type=Flash\',
|
filebrowserFlashBrowseUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/ckfinder.html?Type=Flash\',
|
||||||
filebrowserUploadUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files\',
|
filebrowserUploadUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files\',
|
||||||
filebrowserImageUploadUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images\',
|
filebrowserImageUploadUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images\',
|
||||||
filebrowserFlashUploadUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash\','."\n";
|
filebrowserFlashUploadUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash\','."\n";
|
||||||
*/
|
*/
|
||||||
$out.= ' filebrowserWindowWidth : \'900\',
|
$out.= ' filebrowserWindowWidth : \'900\',
|
||||||
filebrowserWindowHeight : \'500\',
|
filebrowserWindowHeight : \'500\',
|
||||||
filebrowserImageWindowWidth : \'900\',
|
filebrowserImageWindowWidth : \'900\',
|
||||||
|
|||||||
@ -1210,7 +1210,8 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
print 'var ckeditorFilebrowserBrowseUrl = \''.DOL_URL_ROOT.'/core/filemanagerdol/browser/default/browser.php?Connector='.DOL_URL_ROOT.'/core/filemanagerdol/connectors/php/connector.php\';'."\n";
|
print 'var ckeditorFilebrowserBrowseUrl = \''.DOL_URL_ROOT.'/core/filemanagerdol/browser/default/browser.php?Connector='.DOL_URL_ROOT.'/core/filemanagerdol/connectors/php/connector.php\';'."\n";
|
||||||
print 'var ckeditorFilebrowserImageBrowseUrl = \''.DOL_URL_ROOT.'/core/filemanagerdol/browser/default/browser.php?Type=Image&Connector='.DOL_URL_ROOT.'/core/filemanagerdol/connectors/php/connector.php\';'."\n";
|
print 'var ckeditorFilebrowserImageBrowseUrl = \''.DOL_URL_ROOT.'/core/filemanagerdol/browser/default/browser.php?Type=Image&Connector='.DOL_URL_ROOT.'/core/filemanagerdol/connectors/php/connector.php\';'."\n";
|
||||||
print '</script>'."\n";
|
print '</script>'."\n";
|
||||||
print '<script type="text/javascript" src="'.$pathckeditor.'ckeditor_basic.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
//print '<script type="text/javascript" src="'.$pathckeditor.'ckeditor_basic.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
||||||
|
print '<script type="text/javascript" src="'.$pathckeditor.'ckeditor.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Global js function
|
// Global js function
|
||||||
|
|||||||
@ -54,7 +54,7 @@ CKEDITOR.editorConfig = function( config )
|
|||||||
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
||||||
['NumberedList','BulletedList','Outdent','Indent'],
|
['NumberedList','BulletedList','Outdent','Indent'],
|
||||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
||||||
['Link','Unlink','Anchor','Image','Table','SpecialChar']
|
['Link','Unlink','Anchor','Image','Table','HorizontalRule','SpecialChar']
|
||||||
];
|
];
|
||||||
|
|
||||||
config.toolbar_dolibarr_notes =
|
config.toolbar_dolibarr_notes =
|
||||||
@ -66,7 +66,7 @@ CKEDITOR.editorConfig = function( config )
|
|||||||
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
||||||
['NumberedList','BulletedList','Outdent','Indent'],
|
['NumberedList','BulletedList','Outdent','Indent'],
|
||||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
||||||
['Link','Unlink','Image','Table','SpecialChar']
|
['Link','Unlink','Image','Table','HorizontalRule','SpecialChar']
|
||||||
];
|
];
|
||||||
|
|
||||||
config.toolbar_dolibarr_details =
|
config.toolbar_dolibarr_details =
|
||||||
|
|||||||
@ -54,7 +54,7 @@ CKEDITOR.editorConfig = function( config )
|
|||||||
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
||||||
['NumberedList','BulletedList','Outdent','Indent','CreateDiv'],
|
['NumberedList','BulletedList','Outdent','Indent','CreateDiv'],
|
||||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
||||||
['Link','Unlink','Anchor','Image','Table','SpecialChar']
|
['Link','Unlink','Anchor','Image','Table','HorizontalRule','SpecialChar']
|
||||||
];
|
];
|
||||||
|
|
||||||
config.toolbar_dolibarr_notes =
|
config.toolbar_dolibarr_notes =
|
||||||
@ -66,7 +66,7 @@ CKEDITOR.editorConfig = function( config )
|
|||||||
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
||||||
['NumberedList','BulletedList','Outdent','Indent'],
|
['NumberedList','BulletedList','Outdent','Indent'],
|
||||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
||||||
['Link','Unlink','Image','Table','SpecialChar']
|
['Link','Unlink','Image','Table','HorizontalRule','SpecialChar']
|
||||||
];
|
];
|
||||||
|
|
||||||
config.toolbar_dolibarr_details =
|
config.toolbar_dolibarr_details =
|
||||||
|
|||||||
@ -54,7 +54,7 @@ CKEDITOR.editorConfig = function( config )
|
|||||||
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
||||||
['NumberedList','BulletedList','Outdent','Indent','CreateDiv'],
|
['NumberedList','BulletedList','Outdent','Indent','CreateDiv'],
|
||||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
||||||
['Link','Unlink','Anchor','Image','Table','SpecialChar']
|
['Link','Unlink','Anchor','Image','Table','HorizontalRule','SpecialChar']
|
||||||
];
|
];
|
||||||
|
|
||||||
config.toolbar_dolibarr_notes =
|
config.toolbar_dolibarr_notes =
|
||||||
@ -66,7 +66,7 @@ CKEDITOR.editorConfig = function( config )
|
|||||||
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
||||||
['NumberedList','BulletedList','Outdent','Indent'],
|
['NumberedList','BulletedList','Outdent','Indent'],
|
||||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
||||||
['Link','Unlink','Image','Table','SpecialChar']
|
['Link','Unlink','Image','Table','HorizontalRule','SpecialChar']
|
||||||
];
|
];
|
||||||
|
|
||||||
config.toolbar_dolibarr_details =
|
config.toolbar_dolibarr_details =
|
||||||
|
|||||||
@ -55,7 +55,7 @@ CKEDITOR.editorConfig = function( config )
|
|||||||
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
||||||
['NumberedList','BulletedList','Outdent','Indent','CreateDiv'],
|
['NumberedList','BulletedList','Outdent','Indent','CreateDiv'],
|
||||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
||||||
['Link','Unlink','Anchor','Image','Table','SpecialChar']
|
['Link','Unlink','Anchor','Image','Table','HorizontalRule','SpecialChar']
|
||||||
];
|
];
|
||||||
|
|
||||||
// Used for notes fields
|
// Used for notes fields
|
||||||
@ -68,7 +68,7 @@ CKEDITOR.editorConfig = function( config )
|
|||||||
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
['Bold','Italic','Underline','Strike','Subscript','Superscript','-','TextColor','RemoveFormat'],
|
||||||
['NumberedList','BulletedList','Outdent','Indent'],
|
['NumberedList','BulletedList','Outdent','Indent'],
|
||||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
|
||||||
['Link','Unlink','Image','Table','SpecialChar']
|
['Link','Unlink','Image','Table','HorizontalRule','SpecialChar']
|
||||||
];
|
];
|
||||||
|
|
||||||
// Used for details lines
|
// Used for details lines
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user