New: add width parameter in editor
This commit is contained in:
parent
6500a64ea3
commit
09f6fab2cc
@ -373,7 +373,7 @@ function form_constantes($tableau)
|
||||
else if (in_array($const,array('ADHERENT_AUTOREGISTER_MAIL','ADHERENT_MAIL_VALID','ADHERENT_MAIL_COTIS','ADHERENT_MAIL_RESIL')))
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('constvalue'.$const,$obj->value,160,'dolibarr_notes','',false,false,$conf->fckeditor->enabled,5,60);
|
||||
$doleditor=new DolEditor('constvalue'.$const,$obj->value,'',160,'dolibarr_notes','',false,false,$conf->fckeditor->enabled,5,60);
|
||||
$doleditor->Create();
|
||||
|
||||
print '</td><td>';
|
||||
|
||||
@ -122,7 +122,7 @@ if ($id)
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
||||
print "<input type=\"hidden\" name=\"id\" value=\"".$adh->id."\">";
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('note',$adh->note,280,'dolibarr_notes','',true,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MEMBER,10,80);
|
||||
$doleditor=new DolEditor('note',$adh->note,'',280,'dolibarr_notes','',true,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MEMBER,10,80);
|
||||
$doleditor->Create();
|
||||
}
|
||||
else
|
||||
|
||||
@ -233,7 +233,7 @@ if ($_GET["action"] == 'create')
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("WelcomeEMail").'</td><td>';
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('mail_valid',$adht->mail_valid,280,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,15,90);
|
||||
$doleditor=new DolEditor('mail_valid',$adht->mail_valid,'',280,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,15,90);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
@ -612,7 +612,7 @@ if ($rowid > 0)
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("WelcomeEMail").'</td><td>';
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('mail_valid',$adht->mail_valid,280,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,15,90);
|
||||
$doleditor=new DolEditor('mail_valid',$adht->mail_valid,'',280,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,15,90);
|
||||
$doleditor->Create();
|
||||
print "</td></tr>";
|
||||
|
||||
|
||||
@ -161,7 +161,7 @@ print '<br>'."\n";
|
||||
print '<!-- Editor name = '.$conf->global->FCKEDITOR_EDITORNAME.' -->';
|
||||
print_fiche_titre($langs->trans("TestSubmitForm"),'','');
|
||||
print '<form name="formtest" method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
$editor=new DolEditor('formtestfield',isset($conf->global->FCKEDITOR_TEST)?$conf->global->FCKEDITOR_TEST:'Test',200,'dolibarr_notes','In', true);
|
||||
$editor=new DolEditor('formtestfield',isset($conf->global->FCKEDITOR_TEST)?$conf->global->FCKEDITOR_TEST:'Test','',200,'dolibarr_notes','In', true);
|
||||
$editor->Create();
|
||||
print '<center><input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"></center>'."\n";
|
||||
print '</form>'."\n";
|
||||
|
||||
@ -267,7 +267,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') // Edit
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
|
||||
// Editeur wysiwyg
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('main_home',$conf->global->MAIN_HOME,142,'dolibarr_notes','In',false,true,true,ROWS_4,90);
|
||||
$doleditor=new DolEditor('main_home',$conf->global->MAIN_HOME,'',142,'dolibarr_notes','In',false,true,true,ROWS_4,90);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
@ -275,7 +275,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') // Edit
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageOfDay").'</td><td colspan="2">';
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('main_motd',$conf->global->MAIN_MOTD,142,'dolibarr_notes','In',false,true,true,ROWS_4,90);
|
||||
$doleditor=new DolEditor('main_motd',$conf->global->MAIN_MOTD,'',142,'dolibarr_notes','In',false,true,true,ROWS_4,90);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
|
||||
@ -131,7 +131,7 @@ print '<tr>';
|
||||
print '<td width="25%">'.$langs->trans("Description").'</td>';
|
||||
print '<td>';
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('description',$categorie->description,200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,ROWS_6,50);
|
||||
$doleditor=new DolEditor('description',$categorie->description,'',200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,ROWS_6,50);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -229,7 +229,7 @@ if ($user->rights->categorie->creer)
|
||||
// Description
|
||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('description',$categorie->description,200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,ROWS_6,50);
|
||||
$doleditor=new DolEditor('description',$categorie->description,'',200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,ROWS_6,50);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -610,7 +610,7 @@ if (GETPOST('action') == 'create')
|
||||
// Description
|
||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('note',($_POST["note"]?$_POST["note"]:$actioncomm->note),280,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_7,90);
|
||||
$doleditor=new DolEditor('note',($_POST["note"]?$_POST["note"]:$actioncomm->note),'',280,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_7,90);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
@ -824,7 +824,7 @@ if ($id)
|
||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="3">';
|
||||
// Editeur wysiwyg
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('note',$act->note,240,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_5,90);
|
||||
$doleditor=new DolEditor('note',$act->note,'',240,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_5,90);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -635,7 +635,7 @@ if ($_GET["action"] == 'create')
|
||||
print '<td>';
|
||||
// Editeur wysiwyg
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('body',$_POST['body'],320,'dolibarr_mailings','',true,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MAILING,20,70);
|
||||
$doleditor=new DolEditor('body',$_POST['body'],'',320,'dolibarr_mailings','',true,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MAILING,20,70);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
@ -1038,7 +1038,7 @@ else
|
||||
print '<td colspan="3">';
|
||||
// Editeur wysiwyg
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('body',$mil->body,320,'dolibarr_mailings','',true,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MAILING,20,70);
|
||||
$doleditor=new DolEditor('body',$mil->body,'',320,'dolibarr_mailings','',true,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MAILING,20,70);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -275,7 +275,7 @@ if ($_REQUEST["action"] == 'create')
|
||||
print '<td colspan="3">';
|
||||
// Editor wysiwyg
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('account_comment',$account->comment,200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE,10,70);
|
||||
$doleditor=new DolEditor('account_comment',$account->comment,'',200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE,10,70);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
@ -559,7 +559,7 @@ else
|
||||
print '<td colspan="3">';
|
||||
// Editor wysiwyg
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('account_comment',(isset($_POST["account_comment"])?$_POST["account_comment"]:$account->comment),200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE,10,70);
|
||||
$doleditor=new DolEditor('account_comment',(isset($_POST["account_comment"])?$_POST["account_comment"]:$account->comment),'',200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE,10,70);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -488,7 +488,7 @@ class FormMail
|
||||
{
|
||||
// Editeur wysiwyg
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('message',$defaultmessage,280,'dolibarr_notes','In',true,false,$this->withfckeditor,8,72);
|
||||
$doleditor=new DolEditor('message',$defaultmessage,'',280,'dolibarr_notes','In',true,false,$this->withfckeditor,8,72);
|
||||
$doleditor->Create();
|
||||
}
|
||||
print "</td></tr>\n";
|
||||
|
||||
@ -56,7 +56,7 @@ if ($conf->global->PRODUIT_USE_MARKUP) $colspan = 'colspan="2"';
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$nbrows=ROWS_2;
|
||||
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
||||
$doleditor=new DolEditor('dp_desc',$_POST["dp_desc"],100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||
$doleditor=new DolEditor('dp_desc',$_POST["dp_desc"],'',100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||
$doleditor->Create();
|
||||
?>
|
||||
</td>
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
$nbrows=ROWS_2;
|
||||
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('desc',$line->description,164,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||
$doleditor=new DolEditor('desc',$line->description,'',164,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||
$doleditor->Create();
|
||||
?>
|
||||
</td>
|
||||
|
||||
@ -70,7 +70,7 @@ $colspan = 'colspan="3"';
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$nbrows=ROWS_2;
|
||||
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
||||
$doleditor=new DolEditor('np_desc',$_POST["np_desc"],100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||
$doleditor=new DolEditor('np_desc',$_POST["np_desc"],'',100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||
$doleditor->Create();
|
||||
?>
|
||||
</td>
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
$nbrows=ROWS_2;
|
||||
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('desc',$line->description,164,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||
$doleditor=new DolEditor('desc',$line->description,'',164,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||
$doleditor->Create();
|
||||
?>
|
||||
</td>
|
||||
|
||||
438
htdocs/custom2/milestone/class/actions_milestone.class.php
Normal file
438
htdocs/custom2/milestone/class/actions_milestone.class.php
Normal file
@ -0,0 +1,438 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/milestone/class/actions_milestone.class.php
|
||||
* \ingroup milestone
|
||||
* \brief Fichier de la classe des jalons
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \class ActionsMilestone
|
||||
* \brief Classe permettant la gestion des jalons
|
||||
*/
|
||||
class ActionsMilestone
|
||||
{
|
||||
var $db;
|
||||
var $error;
|
||||
var $element='milestone';
|
||||
var $table_element='milestone';
|
||||
|
||||
// Id of module
|
||||
var $module_number=1790;
|
||||
|
||||
var $id;
|
||||
var $label;
|
||||
var $description;
|
||||
var $priority;
|
||||
|
||||
var $object;
|
||||
var $objParent;
|
||||
var $elementid;
|
||||
var $elementtype;
|
||||
|
||||
var $rang;
|
||||
var $rangtouse;
|
||||
|
||||
var $datec;
|
||||
var $dateo;
|
||||
var $datee;
|
||||
|
||||
var $lines=array(); // Tableau en memoire des jalons
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param DB acces base de donnees
|
||||
* @param id milestone id
|
||||
*/
|
||||
function ActionsMilestone($DB)
|
||||
{
|
||||
$this->db = $DB;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return HTML form for add a milestone
|
||||
*/
|
||||
function formAddObject($object)
|
||||
{
|
||||
global $conf,$langs;
|
||||
global $bcnd,$var;
|
||||
|
||||
$langs->load('@milestone');
|
||||
|
||||
dol_include_once('/milestone/tpl/addmilestoneform.tpl.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* Return HTML with selected milestone
|
||||
* @param object Parent object
|
||||
* TODO mettre le html dans un template
|
||||
*/
|
||||
function printObjectLine($object,$line,$num=0,$i=0)
|
||||
{
|
||||
global $conf,$langs,$user;
|
||||
global $html,$bc,$bcnd;
|
||||
|
||||
$return = $this->object->fetch($object,$line);
|
||||
|
||||
$element = $object->element;
|
||||
// TODO uniformiser
|
||||
if ($element == 'propal') $element = 'propale';
|
||||
|
||||
// Ligne en mode visu
|
||||
if ($_GET['action'] != 'editline' || $_GET['lineid'] != $line->rowid)
|
||||
{
|
||||
print '<tr id="row-'.$line->id.'" '.$bc[$var].'>';
|
||||
|
||||
print '<td colspan="6">';
|
||||
print '<a name="'.$line->rowid.'"></a>'; // ancre pour retourner sur la ligne;
|
||||
|
||||
$text = img_object($langs->trans('Milestone'),'milestone@milestone');
|
||||
$text.= ' '.$this->object->label.'<br>';
|
||||
$description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($line->description));
|
||||
print $html->textwithtooltip($text,$description,3,'','',$i);
|
||||
|
||||
// Show range
|
||||
//print_date_range($line->date_start,$line->date_end);
|
||||
|
||||
// Add description in form
|
||||
if ($conf->global->PRODUIT_DESC_IN_FORM)
|
||||
{
|
||||
print ($line->description?'<br>'.dol_htmlentitiesbr($line->description):'');
|
||||
}
|
||||
|
||||
print "</td>\n";
|
||||
|
||||
// Icone d'edition et suppression
|
||||
if ($object->statut == 0 && $user->rights->$element->creer)
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editline&lineid='.$line->rowid.'#'.$line->rowid.'">';
|
||||
print img_edit();
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=ask_deletemilestone&lineid='.$line->rowid.'">';
|
||||
print img_delete();
|
||||
print '</a></td>';
|
||||
if ($num > 1)
|
||||
{
|
||||
print '<td align="center" class="tdlineupdown">';
|
||||
if ($i > 0)
|
||||
{
|
||||
print '<a class="lineupdown" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=up&rowid='.$line->rowid.'">';
|
||||
print img_up();
|
||||
print '</a>';
|
||||
}
|
||||
if ($i < $num-1)
|
||||
{
|
||||
print '<a class="lineupdown" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=down&rowid='.$line->rowid.'">';
|
||||
print img_down();
|
||||
print '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td colspan="3"> </td>';
|
||||
}
|
||||
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Ligne en mode update
|
||||
if ($object->statut == 0 && $_GET["action"] == 'editline' && $user->rights->$element->creer && $_GET["lineid"] == $line->rowid)
|
||||
{
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'#'.$line->rowid.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="updatemilestone">';
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
print '<input type="hidden" name="lineid" value="'.$_GET["lineid"].'">';
|
||||
print '<input type="hidden" name="special_code" value="'.$line->special_code.'">';
|
||||
print '<input type="hidden" name="product_type" value="'.$line->product_type.'">';
|
||||
|
||||
print '<tr '.$bcnd[$var].'>';
|
||||
print '<td>';
|
||||
print '<a name="'.$line->rowid.'"></a>'; // ancre pour retourner sur la ligne
|
||||
|
||||
// Label
|
||||
print '<tr '.$bcnd[$var].'>';
|
||||
print '<td colspan="5">';
|
||||
print '<input size="30" type="text" id="label" name="label" value="'.$this->object->label.'">';
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center" colspan="5" rowspan="2" valign="center"><input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||
print '<br><input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></td>';
|
||||
|
||||
print '</tr>';
|
||||
|
||||
// Description
|
||||
print '<tr '.$bcnd[$var].'>';
|
||||
print '<td colspan="5">';
|
||||
|
||||
// Editor wysiwyg
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$nbrows=ROWS_2;
|
||||
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
||||
$doleditor=new DolEditor('description',$line->description,'',100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||
$doleditor->Create();
|
||||
|
||||
print '</td>';
|
||||
print '</tr>' . "\n";
|
||||
|
||||
print "</form>\n";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return HTML with origin selected milestone
|
||||
* @param object Parent object
|
||||
* TODO mettre le html dans un template
|
||||
*/
|
||||
function printOriginObjectLine($line,$i=0)
|
||||
{
|
||||
global $conf,$langs;
|
||||
global $html, $bc;
|
||||
|
||||
// Ligne en mode visu
|
||||
if ($_GET['action'] != 'editline' || $_GET['lineid'] != $line->rowid)
|
||||
{
|
||||
print '<tr '.$bc[$var].'>';
|
||||
|
||||
print '<td colspan="6">';
|
||||
|
||||
$text = img_object($langs->trans('Milestone'),'milestone@milestone');
|
||||
$text.= ' '.$line->desc.'<br>';
|
||||
$description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($line->desc));
|
||||
print $html->textwithtooltip($text,$description,3,'','',$i);
|
||||
|
||||
print "</td>\n";
|
||||
|
||||
print '</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return action of hook
|
||||
* @param object Linked object
|
||||
*/
|
||||
function doActions($objParent)
|
||||
{
|
||||
global $conf,$user,$langs;
|
||||
global $html;
|
||||
|
||||
$element = $objParent->element;
|
||||
// TODO uniformiser
|
||||
if ($element == 'propal') $element = 'propale';
|
||||
|
||||
/*
|
||||
* Add milestone
|
||||
*/
|
||||
if ($_POST['action'] == 'addmilestone' && $user->rights->milestone->creer && $user->rights->$element->creer)
|
||||
{
|
||||
if ($_POST['milestone_label'] == $langs->trans('Label') || $_POST['milestone_desc'] == $langs->trans('Description'))
|
||||
{
|
||||
$this->error = '<div class="error">'.$langs->trans("MilestoneFieldsIsRequired").'</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = ( GETPOST("id") ? GETPOST("id") : GETPOST("facid") );
|
||||
|
||||
$objParent->fetch($id);
|
||||
|
||||
$linemax = $objParent->line_max();
|
||||
$rangtouse = $linemax+1;
|
||||
|
||||
$this->object->objParent = $objParent;
|
||||
$this->object->label = $_POST['milestone_label'];
|
||||
$this->object->description = $_POST['milestone_desc'];
|
||||
$this->object->product_type = $_POST['product_type'];
|
||||
$this->object->special_code = $_POST['special_code'];
|
||||
$this->object->rang = $rangtouse;
|
||||
|
||||
$ret = $this->object->create($user);
|
||||
|
||||
if ($ret < 0)
|
||||
{
|
||||
$this->error = '<div class="error">'.$this->object->error.'</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$objParent->id);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Update Milestone
|
||||
*/
|
||||
if ($_POST['action'] == 'updatemilestone' && $user->rights->milestone->creer && $user->rights->$element->creer && $_POST["save"] == $langs->trans("Save"))
|
||||
{
|
||||
$id = $_GET["id"]?$_GET["id"]:$_GET["facid"];
|
||||
|
||||
if (! $objParent->fetch($id) > 0)
|
||||
{
|
||||
dol_print_error($db,$objParent->error);
|
||||
exit;
|
||||
}
|
||||
|
||||
$objParent->fetch_thirdparty();
|
||||
|
||||
$this->object->objParent = $objParent;
|
||||
$this->object->id = $_POST['lineid'];
|
||||
$this->object->label = $_POST['label'];
|
||||
$this->object->description = $_POST['description'];
|
||||
$this->object->product_type = $_POST['product_type'];
|
||||
$this->object->special_code = $_POST['special_code'];
|
||||
|
||||
$result = $this->object->update($user);
|
||||
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
$newlang='';
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$objParent->client->default_lang;
|
||||
if (! empty($newlang))
|
||||
{
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
//propale_pdf_create($db, $propal->id, $propal->modelpdf, $outputlangs);
|
||||
}
|
||||
|
||||
// Remove line
|
||||
if ($_REQUEST['action'] == 'confirm_deletemilestone' && $_REQUEST['confirm'] == 'yes' && $user->rights->milestone->creer && $user->rights->$element->creer)
|
||||
{
|
||||
$id = $_GET["id"]?$_GET["id"]:$_GET["facid"];
|
||||
|
||||
$objParent->fetch($id);
|
||||
$objParent->fetch_thirdparty();
|
||||
|
||||
$this->object->objParent = $objParent;
|
||||
|
||||
$result = $this->object->delete($_GET['lineid']);
|
||||
|
||||
// reorder lines
|
||||
if ($result) $objParent->line_order(true);
|
||||
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
$newlang='';
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$objParent->client->default_lang;
|
||||
if (! empty($newlang))
|
||||
{
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
//propale_pdf_create($db, $propal->id, $propal->modelpdf, $outputlangs);
|
||||
|
||||
if ($objParent->element != 'facture') Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$objParent->id);
|
||||
else Header ('Location: '.$_SERVER["PHP_SELF"].'?facid='.$objParent->id);
|
||||
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return line description translated in outputlangs and encoded in UTF8
|
||||
* @param objectParent Object parent
|
||||
* @param $i Current line
|
||||
* @param outputlang Object lang for output
|
||||
* @param hideref Hide reference
|
||||
* @param hidedesc Hide description
|
||||
*/
|
||||
function pdf_writelinedesc(&$pdf,$object,$i,$outputlangs,$w,$h,$posx,$posy,$hideref=0,$hidedesc=0)
|
||||
{
|
||||
$this->object->fetch($object,$object->lines[$i]);
|
||||
|
||||
$pdf->SetFont('','BU', 9);
|
||||
|
||||
$pdf->SetXY ($posx, $posy);
|
||||
$pdf->MultiCell($w, $h, $outputlangs->convToOutputCharset($this->object->label), 0, 'L');
|
||||
|
||||
$nexy = $pdf->GetY();
|
||||
|
||||
$pdf->SetFont('','I', 9);
|
||||
$description = dol_htmlentitiesbr($object->lines[$i]->desc,1);
|
||||
|
||||
if ($object->lines[$i]->date_start || $object->lines[$i]->date_end)
|
||||
{
|
||||
// Show duration if exists
|
||||
if ($object->lines[$i]->date_start && $object->lines[$i]->date_end)
|
||||
{
|
||||
$period='('.$outputlangs->transnoentitiesnoconv('DateFromTo',dol_print_date($object->lines[$i]->date_start, $format, false, $outputlangs),dol_print_date($object->lines[$i]->date_end, $format, false, $outputlangs)).')';
|
||||
}
|
||||
if ($object->lines[$i]->date_start && ! $object->lines[$i]->date_end)
|
||||
{
|
||||
$period='('.$outputlangs->transnoentitiesnoconv('DateFrom',dol_print_date($object->lines[$i]->date_start, $format, false, $outputlangs)).')';
|
||||
}
|
||||
if (! $object->lines[$i]->date_start && $object->lines[$i]->date_end)
|
||||
{
|
||||
$period='('.$outputlangs->transnoentitiesnoconv('DateUntil',dol_print_date($object->lines[$i]->date_end, $format, false, $outputlangs)).')';
|
||||
}
|
||||
|
||||
$description.="<br>".dol_htmlentitiesbr($period,1);
|
||||
}
|
||||
|
||||
$pdf->writeHTMLCell($w, $h, $posx, $nexy+1, $outputlangs->convToOutputCharset($description), 0, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load an object from its id and create a new one in database
|
||||
* @param objFrom From object
|
||||
* @param idTo To object id
|
||||
* @return int New id of clone
|
||||
*/
|
||||
function createfrom($objFrom,$idTo,$elementTo)
|
||||
{
|
||||
global $user;
|
||||
|
||||
$error=0;
|
||||
|
||||
if ((!empty($objFrom) && is_object($objFrom)) && !empty($idTo) && !empty($elementTo))
|
||||
{
|
||||
$classname = ucfirst($elementTo);
|
||||
$objTo = new $classname($this->db);
|
||||
$objTo->fetch($idTo);
|
||||
|
||||
$this->object->objParent = $objTo;
|
||||
|
||||
for($i=0; $i < count($objTo->lines); $i++)
|
||||
{
|
||||
if ($objTo->lines[$i]->product_type == 9 && $objTo->lines[$i]->special_code == $this->module_number)
|
||||
{
|
||||
$this->object->fetch($objFrom,$objFrom->lines[$i]);
|
||||
$this->object->objParent->line = $objTo->lines[$i];
|
||||
$ret = $this->object->create($user,1);
|
||||
if ($ret < 0) $error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error) return 1;
|
||||
else return -1;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
82
htdocs/custom2/milestone/tpl/addmilestoneform.tpl.php
Normal file
82
htdocs/custom2/milestone/tpl/addmilestoneform.tpl.php
Normal file
@ -0,0 +1,82 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- BEGIN PHP TEMPLATE -->
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
jQuery(document).ready(function () {
|
||||
jQuery("#milestone_label").focus(function() {
|
||||
hideMessage("milestone_label","<?php echo $langs->transnoentities('Label'); ?>");
|
||||
});
|
||||
jQuery("#milestone_label").blur(function() {
|
||||
displayMessage("milestone_label","<?php echo $langs->transnoentities('Label'); ?>");
|
||||
});
|
||||
jQuery("#milestone_desc").focus(function() {
|
||||
hideMessage("milestone_desc","<?php echo $langs->transnoentities('Description'); ?>");
|
||||
});
|
||||
jQuery("#milestone_desc").blur(function() {
|
||||
displayMessage("milestone_desc","<?php echo $langs->transnoentities('Description'); ?>");
|
||||
});
|
||||
displayMessage("milestone_label","<?php echo $langs->transnoentities('Label'); ?>");
|
||||
displayMessage("milestone_desc","<?php echo $langs->transnoentities('Description'); ?>");
|
||||
jQuery("#milestone_label").css("color","grey");
|
||||
jQuery("#milestone_desc").css("color","grey");
|
||||
})
|
||||
</script>
|
||||
|
||||
<tr class="liste_titre nodrag nodrop">
|
||||
<td><?php echo $langs->trans('AddMilestone'); ?></td>
|
||||
<td colspan="10"> </td>
|
||||
</tr>
|
||||
|
||||
<form name="addmilestone" id="addmilestone" action="<?php echo $_SERVER["PHP_SELF"].'?id='.$GLOBALS['object']->id; ?>" method="POST">
|
||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
|
||||
<input type="hidden" name="action" value="addmilestone">
|
||||
<input type="hidden" name="id" value="<?php echo $GLOBALS['object']->id; ?>">
|
||||
<input type="hidden" name="special_code" value="1790">
|
||||
<input type="hidden" name="product_type" value="9">
|
||||
|
||||
<tr <?php echo $GLOBALS['bcnd'][$GLOBALS['var']]; ?>>
|
||||
<td colspan="5">
|
||||
<input size="30" type="text" id="milestone_label" name="milestone_label" value="<?php echo $_POST["milestone_label"]; ?>">
|
||||
</td>
|
||||
|
||||
<td align="center" valign="middle" rowspan="2" colspan="4">
|
||||
<input type="submit" class="button" value="<?php echo $langs->trans('Add'); ?>" name="addmilestone">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr <?php echo $GLOBALS['bcnd'][$GLOBALS['var']]; ?>>
|
||||
<td colspan="5">
|
||||
|
||||
<?php
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$nbrows=ROWS_2;
|
||||
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
||||
$doleditor=new DolEditor('milestone_desc',$_POST["milestone_desc"],'',100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||
$doleditor->Create();
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</form>
|
||||
|
||||
<!-- END PHP TEMPLATE -->
|
||||
@ -757,7 +757,7 @@ elseif ($fichinterid)
|
||||
|
||||
// Editeur wysiwyg
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('np_desc',$objp->description,164,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,ROWS_2,70);
|
||||
$doleditor=new DolEditor('np_desc',$objp->description,'',164,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,ROWS_2,70);
|
||||
$doleditor->Create();
|
||||
print '</td>';
|
||||
|
||||
@ -812,7 +812,7 @@ elseif ($fichinterid)
|
||||
print '<td>';
|
||||
// editeur wysiwyg
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('np_desc',$_POST["np_desc"],100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,ROWS_2,70);
|
||||
$doleditor=new DolEditor('np_desc',$_POST["np_desc"],'',100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,ROWS_2,70);
|
||||
$doleditor->Create();
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -1108,7 +1108,7 @@ if ($id > 0 || ! empty($ref))
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$nbrows=ROWS_2;
|
||||
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
||||
$doleditor=new DolEditor('eldesc',$line->description,200,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||
$doleditor=new DolEditor('eldesc',$line->description,'',200,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||
$doleditor->Create();
|
||||
|
||||
print '</td>';
|
||||
@ -1161,7 +1161,7 @@ if ($id > 0 || ! empty($ref))
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$nbrows=ROWS_2;
|
||||
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
||||
$doleditor=new DolEditor('dp_desc',$_POST["dp_desc"],100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||
$doleditor=new DolEditor('dp_desc',$_POST["dp_desc"],'',100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||
$doleditor->Create();
|
||||
|
||||
print '</td>';
|
||||
@ -1215,7 +1215,7 @@ if ($id > 0 || ! empty($ref))
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$nbrows=ROWS_2;
|
||||
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
||||
$doleditor=new DolEditor('np_desc',$_POST["np_desc"],100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||
$doleditor=new DolEditor('np_desc',$_POST["np_desc"],'',100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||
$doleditor->Create();
|
||||
|
||||
print '</td>';
|
||||
|
||||
@ -1500,7 +1500,7 @@ else
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$nbrows=ROWS_2;
|
||||
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
||||
$doleditor=new DolEditor('label',$fac->lines[$i]->description,200,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||
$doleditor=new DolEditor('label',$fac->lines[$i]->description,'',200,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||
$doleditor->Create();
|
||||
print '</td>';
|
||||
|
||||
@ -1630,7 +1630,7 @@ else
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$nbrows=ROWS_2;
|
||||
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
||||
$doleditor=new DolEditor('label',GETPOST("label"),100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||
$doleditor=new DolEditor('label',GETPOST("label"),'',100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||
$doleditor->Create();
|
||||
|
||||
print '</td>';
|
||||
|
||||
@ -53,7 +53,8 @@ class DolEditor
|
||||
*
|
||||
* @param htmlname Nom formulaire html WYSIWIG
|
||||
* @param content Contenu edition WYSIWIG
|
||||
* @param height Hauteur en pixel de la zone edition
|
||||
* @param width Largeur en pixel de la zone edition (auto by default)
|
||||
* @param height Hauteur en pixel de la zone edition (200px by default)
|
||||
* @param toolbarname Nom barre de menu editeur
|
||||
* @param toolbarlocation Emplacement de la barre de menu :
|
||||
* 'In' chaque fenetre d'edition a la propre barre d'outils
|
||||
@ -64,7 +65,7 @@ class DolEditor
|
||||
* @param rows Size of rows for textarea tool
|
||||
* @param cols Size of cols for textarea tool
|
||||
*/
|
||||
function DolEditor($htmlname,$content,$height=200,$toolbarname='Basic',$toolbarlocation='In',$toolbarstartexpanded=false,$uselocalbrowser=true,$okforextendededitor=true,$rows=0,$cols=0)
|
||||
function DolEditor($htmlname,$content,$width='',$height=200,$toolbarname='Basic',$toolbarlocation='In',$toolbarstartexpanded=false,$uselocalbrowser=true,$okforextendededitor=true,$rows=0,$cols=0)
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
@ -89,6 +90,7 @@ class DolEditor
|
||||
$this->editor->BasePath = DOL_URL_ROOT.'/includes/fckeditor/' ;
|
||||
$this->editor->Value = $content;
|
||||
$this->editor->Height = $height;
|
||||
if (! empty($width)) $this->editor->Width = $width;
|
||||
$this->editor->ToolbarSet = $toolbarname;
|
||||
$this->editor->Config['AutoDetectLanguage'] = 'true';
|
||||
$this->editor->Config['ToolbarLocation'] = $toolbarlocation ? $toolbarlocation : 'In';
|
||||
@ -120,7 +122,7 @@ class DolEditor
|
||||
$this->rows = max(ROWS_3,$rows);
|
||||
$this->cols = max(40,$cols);
|
||||
$this->height = $height;
|
||||
$this->width = 600;
|
||||
$this->width = $width;
|
||||
}
|
||||
|
||||
}
|
||||
@ -157,7 +159,7 @@ class DolEditor
|
||||
customConfig : \''.DOL_URL_ROOT.'/theme/'.$conf->theme.'/ckeditor/config.js\',
|
||||
toolbar: \''.$this->toolbarname.'\',
|
||||
toolbarStartupExpanded: '.($this->toolbarstartexpanded ? 'true' : 'false').',
|
||||
//width: '.$this->width.',
|
||||
width: '.($this->width ? $this->width : '\'\'').',
|
||||
height: '.$this->height.'
|
||||
});
|
||||
|
||||
|
||||
@ -166,14 +166,14 @@ print '</td></tr>';
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("MessageOK").'</td><td>';
|
||||
$doleditor=new DolEditor('PAYBOX_MESSAGE_OK',$conf->global->PAYBOX_MESSAGE_OK,60,'Basic','In',false,true,true,ROWS_2,60);
|
||||
$doleditor=new DolEditor('PAYBOX_MESSAGE_OK',$conf->global->PAYBOX_MESSAGE_OK,'',60,'Basic','In',false,true,true,ROWS_2,60);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("MessageKO").'</td><td>';
|
||||
$doleditor=new DolEditor('PAYBOX_MESSAGE_KO',$conf->global->PAYBOX_MESSAGE_KO,60,'Basic','In',false,true,true,ROWS_2,60);
|
||||
$doleditor=new DolEditor('PAYBOX_MESSAGE_KO',$conf->global->PAYBOX_MESSAGE_KO,'',60,'Basic','In',false,true,true,ROWS_2,60);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -167,14 +167,14 @@ print '</td></tr>';
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("MessageOK").'</td><td>';
|
||||
$doleditor=new DolEditor('PAYPAL_MESSAGE_OK',$conf->global->PAYPAL_MESSAGE_OK,60,'Basic','In',false,true,true,ROWS_2,60);
|
||||
$doleditor=new DolEditor('PAYPAL_MESSAGE_OK',$conf->global->PAYPAL_MESSAGE_OK,'',60,'Basic','In',false,true,true,ROWS_2,60);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("MessageKO").'</td><td>';
|
||||
$doleditor=new DolEditor('PAYPAL_MESSAGE_KO',$conf->global->PAYPAL_MESSAGE_KO,60,'Basic','In',false,true,true,ROWS_2,60);
|
||||
$doleditor=new DolEditor('PAYPAL_MESSAGE_KO',$conf->global->PAYPAL_MESSAGE_KO,'',60,'Basic','In',false,true,true,ROWS_2,60);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -701,7 +701,7 @@ if ($_GET["action"] == 'create' && ($user->rights->produit->creer || $user->righ
|
||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('desc',$_POST["desc"],160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,4,90);
|
||||
$doleditor=new DolEditor('desc',$_POST["desc"],'',160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,4,90);
|
||||
$doleditor->Create();
|
||||
|
||||
print "</td></tr>";
|
||||
@ -780,7 +780,7 @@ if ($_GET["action"] == 'create' && ($user->rights->produit->creer || $user->righ
|
||||
// Note (invisible sur facture, propales...)
|
||||
print '<tr><td valign="top">'.$langs->trans("NoteNotVisibleOnBill").'</td><td>';
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('note',$_POST["note"],180,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70);
|
||||
$doleditor=new DolEditor('note',$_POST["note"],'',180,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70);
|
||||
$doleditor->Create();
|
||||
|
||||
print "</td></tr>";
|
||||
@ -926,7 +926,7 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
// Description (used in invoice, propal...)
|
||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="2">';
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('desc',$product->description,160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,4,90);
|
||||
$doleditor=new DolEditor('desc',$product->description,'',160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,4,90);
|
||||
$doleditor->Create();
|
||||
print "</td></tr>";
|
||||
print "\n";
|
||||
@ -1021,7 +1021,7 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
// Note
|
||||
print '<tr><td valign="top">'.$langs->trans("NoteNotVisibleOnBill").'</td><td colspan="2">';
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('note',$product->note,200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70);
|
||||
$doleditor=new DolEditor('note',$product->note,'',200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70);
|
||||
$doleditor->Create();
|
||||
print "</td></tr>";
|
||||
print '</table>';
|
||||
|
||||
@ -179,7 +179,7 @@ if ($_GET["action"] == 'create')
|
||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="3">';
|
||||
// Editeur wysiwyg
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('desc',$entrepot->description,180,'dolibarr_notes','In',false,true,$conf->fckeditor->enabled,5,70);
|
||||
$doleditor=new DolEditor('desc',$entrepot->description,'',180,'dolibarr_notes','In',false,true,$conf->fckeditor->enabled,5,70);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
@ -471,7 +471,7 @@ else
|
||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="3">';
|
||||
// Editeur wysiwyg
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('desc',$entrepot->description,180,'dolibarr_notes','In',false,true,$conf->fckeditor->enabled,5,70);
|
||||
$doleditor=new DolEditor('desc',$entrepot->description,'',180,'dolibarr_notes','In',false,true,$conf->fckeditor->enabled,5,70);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -171,12 +171,12 @@ if ($_GET["action"] == 'edit')
|
||||
print '<tr><td valign="top" width="15%" class="fieldrequired">'.$langs->trans('Label').'</td><td><input name="libelle-'.$key.'" size="40" value="'.$product->multilangs[$key]["libelle"].'"></td></tr>';
|
||||
print '<tr><td valign="top" width="15%">'.$langs->trans('Description').'</td><td>';
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('desc-'.$key.'',$product->multilangs[$key]["description"],160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,3,80);
|
||||
$doleditor=new DolEditor('desc-'.$key.'',$product->multilangs[$key]["description"],'',160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,3,80);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
print '<tr><td valign="top" width="15%">'.$langs->trans('Note').'</td><td>';
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('note-'.$key.'',$product->multilangs[$key]["note"],160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,3,80);
|
||||
$doleditor=new DolEditor('note-'.$key.'',$product->multilangs[$key]["note"],'',160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,3,80);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
print '</tr>';
|
||||
@ -247,12 +247,12 @@ if ($_GET["action"] == 'add' && ($user->rights->produit->creer || $user->rights-
|
||||
print '<tr><td valign="top" width="15%" class="fieldrequired">'.$langs->trans('Label').'</td><td><input name="libelle" size="40"></td></tr>';
|
||||
print '<tr><td valign="top" width="15%">'.$langs->trans('Description').'</td><td>';
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('desc','',160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,3,80);
|
||||
$doleditor=new DolEditor('desc','','',160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,3,80);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
print '<tr><td valign="top" width="15%">'.$langs->trans('Note').'</td><td>';
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('note','',160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,3,80);
|
||||
$doleditor=new DolEditor('note','','',160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,3,80);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
print '</tr>';
|
||||
|
||||
@ -121,7 +121,7 @@ if ($socid > 0)
|
||||
|
||||
// Editeur wysiwyg
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('note',$societe->note,360,'dolibarr_notes','In',true,false,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE,20,70);
|
||||
$doleditor=new DolEditor('note',$societe->note,'',360,'dolibarr_notes','In',true,false,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE,20,70);
|
||||
$doleditor->Create();
|
||||
}
|
||||
else
|
||||
|
||||
@ -738,7 +738,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_USER)
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('note','',180,'dolibarr_notes','',false);
|
||||
$doleditor=new DolEditor('note','','',180,'dolibarr_notes','',false);
|
||||
$doleditor->Create();
|
||||
}
|
||||
else
|
||||
|
||||
@ -241,7 +241,7 @@ if ($action == 'create')
|
||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_USER)
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('note','',240,'dolibarr_notes','',false);
|
||||
$doleditor=new DolEditor('note','','',240,'dolibarr_notes','',false);
|
||||
$doleditor->Create();
|
||||
}
|
||||
else
|
||||
@ -543,7 +543,7 @@ else
|
||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_USER)
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('note',$group->note,240,'dolibarr_notes','',true);
|
||||
$doleditor=new DolEditor('note',$group->note,'',240,'dolibarr_notes','',true);
|
||||
$doleditor->Create();
|
||||
}
|
||||
else
|
||||
|
||||
@ -127,7 +127,7 @@ if ($id)
|
||||
{
|
||||
// Editeur wysiwyg
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('note',$fuser->note,280,'dolibarr_notes','In',true);
|
||||
$doleditor=new DolEditor('note',$fuser->note,'',280,'dolibarr_notes','In',true);
|
||||
$doleditor->Create();
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user