New: Can define if ckeditor is opened or not in editval
New: Can use a width of 100% in ckeditor
This commit is contained in:
parent
e5190a00c8
commit
4c2da4f5fa
@ -65,7 +65,7 @@ class DolEditor
|
|||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
dol_syslog("DolEditor::DolEditor htmlname=".$htmlname." toolbarname=".$toolbarname);
|
dol_syslog(get_class($this)."::DolEditor htmlname=".$htmlname." toolbarname=".$toolbarname);
|
||||||
|
|
||||||
if (! $rows) $rows=round($height/20);
|
if (! $rows) $rows=round($height/20);
|
||||||
if (! $cols) $cols=($width?round($width/6):80);
|
if (! $cols) $cols=($width?round($width/6):80);
|
||||||
@ -177,7 +177,7 @@ class DolEditor
|
|||||||
customConfig : \''.dol_buildpath('/theme/'.$conf->theme.'/ckeditor/config.js',1).'\',
|
customConfig : \''.dol_buildpath('/theme/'.$conf->theme.'/ckeditor/config.js',1).'\',
|
||||||
toolbar: \''.$this->toolbarname.'\',
|
toolbar: \''.$this->toolbarname.'\',
|
||||||
toolbarStartupExpanded: '.($this->toolbarstartexpanded ? 'true' : 'false').',
|
toolbarStartupExpanded: '.($this->toolbarstartexpanded ? 'true' : 'false').',
|
||||||
width: '.($this->width ? $this->width : '\'\'').',
|
width: '.($this->width ? '\''.$this->width.'\'' : '\'\'').',
|
||||||
height: '.$this->height.',
|
height: '.$this->height.',
|
||||||
skin: \''.$skin.'\',
|
skin: \''.$skin.'\',
|
||||||
on :
|
on :
|
||||||
|
|||||||
@ -118,7 +118,7 @@ class Form
|
|||||||
* @param string $value Value to show/edit
|
* @param string $value Value to show/edit
|
||||||
* @param object $object Object
|
* @param object $object Object
|
||||||
* @param boolean $perm Permission to allow button to edit parameter
|
* @param boolean $perm Permission to allow button to edit parameter
|
||||||
* @param string $typeofdata Type of data ('string' by default, 'email', 'numeric:99', 'text' or 'textarea', 'day' or 'datepicker', 'ckeditor:dolibarr_zzz:width:height', 'select:xxx'...)
|
* @param string $typeofdata Type of data ('string' by default, 'email', 'numeric:99', 'text' or 'textarea', 'day' or 'datepicker', 'ckeditor:dolibarr_zzz:width:height:1', 'select:xxx'...)
|
||||||
* @param string $editvalue When in edit mode, use this value as $value instead of value
|
* @param string $editvalue When in edit mode, use this value as $value instead of value
|
||||||
* @param object $extObject External object
|
* @param object $extObject External object
|
||||||
* @param string $success Success message
|
* @param string $success Success message
|
||||||
@ -174,7 +174,7 @@ class Form
|
|||||||
{
|
{
|
||||||
$tmp=explode(':',$typeofdata);
|
$tmp=explode(':',$typeofdata);
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
|
||||||
$doleditor=new DolEditor($htmlname,($editvalue?$editvalue:$value),($tmp[2]?$tmp[2]:''),($tmp[3]?$tmp[3]:'100'),($tmp[1]?$tmp[1]:'dolibarr_notes'),'In',false,true,true);
|
$doleditor=new DolEditor($htmlname, ($editvalue?$editvalue:$value), ($tmp[2]?$tmp[2]:''), ($tmp[3]?$tmp[3]:'100'), ($tmp[1]?$tmp[1]:'dolibarr_notes'), 'In', ($tmp[4]?$tmp[4]:0), true, true);
|
||||||
$ret.=$doleditor->Create(1);
|
$ret.=$doleditor->Create(1);
|
||||||
}
|
}
|
||||||
$ret.='</td>';
|
$ret.='</td>';
|
||||||
|
|||||||
@ -22,18 +22,19 @@ $note_private = 'note';
|
|||||||
if ($module == 'propal') $module = 'propale';
|
if ($module == 'propal') $module = 'propale';
|
||||||
else if ($module == 'fichinter') { $module = 'ficheinter'; $note_private = 'note_private'; }
|
else if ($module == 'fichinter') { $module = 'ficheinter'; $note_private = 'note_private'; }
|
||||||
|
|
||||||
|
$typeofdata='ckeditor:dolibarr_notes:100%:200:1';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE NOTES -->
|
<!-- BEGIN PHP TEMPLATE NOTES -->
|
||||||
<div class="table-border">
|
<div class="table-border">
|
||||||
<div class="table-border-row">
|
<div class="table-border-row">
|
||||||
<div class="table-key-border-col"><?php echo $form->editfieldkey("NotePublic",$note_public,$object->note_public,$object,$user->rights->$module->creer,'textarea'); ?></div>
|
<div class="table-key-border-col"><?php echo $form->editfieldkey("NotePublic",$note_public,$object->note_public,$object,$user->rights->$module->creer,$typeofdata); ?></div>
|
||||||
<div class="table-val-border-col"><?php echo $form->editfieldval("NotePublic",$note_public,$object->note_public,$object,$user->rights->$module->creer,'textarea'); ?></div>
|
<div class="table-val-border-col"><?php echo $form->editfieldval("NotePublic",$note_public,$object->note_public,$object,$user->rights->$module->creer,$typeofdata); ?></div>
|
||||||
</div>
|
</div>
|
||||||
<?php if (! $user->societe_id) { ?>
|
<?php if (! $user->societe_id) { ?>
|
||||||
<div class="table-border-row">
|
<div class="table-border-row">
|
||||||
<div class="table-key-border-col"><?php echo $form->editfieldkey("NotePrivate",$note_private,$object->note_private,$object,$user->rights->$module->creer,'textarea'); ?></div>
|
<div class="table-key-border-col"><?php echo $form->editfieldkey("NotePrivate",$note_private,$object->note_private,$object,$user->rights->$module->creer,$typeofdata); ?></div>
|
||||||
<div class="table-val-border-col"><?php echo $form->editfieldval("NotePrivate",$note_private,$object->note_private,$object,$user->rights->$module->creer,'textarea'); ?></div>
|
<div class="table-val-border-col"><?php echo $form->editfieldval("NotePrivate",$note_private,$object->note_private,$object,$user->rights->$module->creer,$typeofdata); ?></div>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1402,22 +1402,22 @@ border-top: 1px solid #333;
|
|||||||
div#stats {
|
div#stats {
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.liste_titre {
|
div.liste_titre, tr.liste_titre {
|
||||||
text-align: <?php echo $left; ?>;
|
text-align: <?php echo $left; ?>;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.liste_titre a {
|
div.liste_titre a, tr.liste_titre a {
|
||||||
color: #333333;
|
color: #333333;
|
||||||
margin: 0px 5px;
|
margin: 0px 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.liste_titre td {
|
div.liste_titre td, tr.liste_titre td {
|
||||||
padding: 0px 5px;
|
padding: 0px 5px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
background: none !important;
|
background: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
th.liste_titre, td.liste_titre
|
div.liste_titre, th.liste_titre, td.liste_titre
|
||||||
{
|
{
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
@ -1428,14 +1428,7 @@ th.liste_titre, td.liste_titre
|
|||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*tr.liste_titre select.flat {
|
div.liste_titre input.button, tr.liste_titre input.button {
|
||||||
float: left;
|
|
||||||
width: 200px;
|
|
||||||
position: relative;
|
|
||||||
margin: 30px 10px 10px 0px;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
tr.liste_titre input.button {
|
|
||||||
float: left;
|
float: left;
|
||||||
position: relative;
|
position: relative;
|
||||||
/*margin: 30px 10px 10px 0px;*/
|
/*margin: 30px 10px 10px 0px;*/
|
||||||
@ -2200,6 +2193,36 @@ a.cke_dialog_ui_button
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ============================================================================== */
|
||||||
|
/* Table with div */
|
||||||
|
/* ============================================================================== */
|
||||||
|
|
||||||
|
div.table-border {
|
||||||
|
display:table;
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border: 1px solid #9CACBB;
|
||||||
|
}
|
||||||
|
div.table-border-row {
|
||||||
|
display:table-row;
|
||||||
|
}
|
||||||
|
div.table-key-border-col {
|
||||||
|
display:table-cell;
|
||||||
|
width: 25%;
|
||||||
|
vertical-align:top;
|
||||||
|
padding: 1px 2px 1px 1px;
|
||||||
|
border: 1px solid #9CACBB;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
div.table-val-border-col {
|
||||||
|
display:table-cell;
|
||||||
|
width:auto;
|
||||||
|
padding: 1px 2px 1px 1px;
|
||||||
|
border: 1px solid #9CACBB;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
/* Login */
|
/* Login */
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
|
|||||||
@ -1319,7 +1319,7 @@ table.liste td {
|
|||||||
padding-right: 2px;
|
padding-right: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.liste_titre {
|
div.liste_titre, tr.liste_titre {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
color: #842F00;
|
color: #842F00;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@ -2130,6 +2130,37 @@ a.cke_dialog_ui_button
|
|||||||
height: 72px !important;
|
height: 72px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ============================================================================== */
|
||||||
|
/* Table with div */
|
||||||
|
/* ============================================================================== */
|
||||||
|
|
||||||
|
div.table-border {
|
||||||
|
display:table;
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border: 1px solid #9CACBB;
|
||||||
|
}
|
||||||
|
div.table-border-row {
|
||||||
|
display:table-row;
|
||||||
|
}
|
||||||
|
div.table-key-border-col {
|
||||||
|
display:table-cell;
|
||||||
|
width: 25%;
|
||||||
|
vertical-align:top;
|
||||||
|
padding: 1px 2px 1px 1px;
|
||||||
|
border: 1px solid #9CACBB;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
div.table-val-border-col {
|
||||||
|
display:table-cell;
|
||||||
|
width:auto;
|
||||||
|
padding: 1px 2px 1px 1px;
|
||||||
|
border: 1px solid #9CACBB;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (is_object($db)) $db->close();
|
if (is_object($db)) $db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user