Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2012-07-18 22:41:06 +02:00
commit 1d89c172d0
3 changed files with 17 additions and 14 deletions

View File

@ -77,10 +77,10 @@ print "</tr>\n";
clearstatcache(); clearstatcache();
$workflowcodes=array( $workflowcodes=array(
'WORKFLOW_PROPAL_AUTOCREATE_ORDER'=>array('enabled'=>($conf->propal->enabled && $conf->commande->enabled),'child'=>'order','parent'=>'propal'), 'WORKFLOW_PROPAL_AUTOCREATE_ORDER'=>array('enabled'=>($conf->propal->enabled && $conf->commande->enabled), 'picto'=>'order'),
'WORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL'=>array('enabled'=>($conf->propal->enabled && $conf->commande->enabled),'child'=>'propal','parent'=>'order'), 'WORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL'=>array('enabled'=>($conf->propal->enabled && $conf->commande->enabled), 'picto'=>'order'),
'WORKFLOW_ORDER_AUTOCREATE_INVOICE'=>array('enabled'=>($conf->commande->enabled && $conf->facture->enabled),'child'=>'invoice','parent'=>'order'), 'WORKFLOW_ORDER_AUTOCREATE_INVOICE'=>array('enabled'=>($conf->commande->enabled && $conf->facture->enabled), 'picto'=>'bill'),
'WORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER'=>array('enabled'=>($conf->facture->enabled && $conf->commande->enabled),'child'=>'order','parent'=>'invoice'), 'WORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER'=>array('enabled'=>($conf->facture->enabled && $conf->commande->enabled), 'picto'=>'bill'),
); );
if (! empty($conf->modules_parts['workflow']) && is_array($conf->modules_parts['workflow'])) $workflow = array_merge($workflow, $conf->modules_parts['workflow']); if (! empty($conf->modules_parts['workflow']) && is_array($conf->modules_parts['workflow'])) $workflow = array_merge($workflow, $conf->modules_parts['workflow']);
@ -89,14 +89,14 @@ $nbqualified=0;
foreach($workflowcodes as $key => $tmparray) foreach($workflowcodes as $key => $tmparray)
{ {
$child=$tmparray['child']; $picto=$tmparray['picto'];
$parent=$tmparray['parent']; $enabled=$tmparray['enabled'];
if (empty($conf->$child->enabled) || empty($conf->$parent->enabled)) continue; if (empty($enabled)) continue;
$nbqualified++; $nbqualified++;
$var = !$var; $var = !$var;
print "<tr ".$bc[$var].">\n"; print "<tr ".$bc[$var].">\n";
print "<td>".img_object('', $tmparray['child']).$langs->trans('desc'.$key)."</td>\n"; print "<td>".img_object('', $picto).$langs->trans('desc'.$key)."</td>\n";
print '<td align="center">'; print '<td align="center">';
if ($conf->use_javascript_ajax) if ($conf->use_javascript_ajax)
{ {

View File

@ -821,7 +821,7 @@ else
// Note (private, no output on invoices, propales...) // Note (private, no output on invoices, propales...)
print '<tr><td valign="top">'.$langs->trans("NoteNotVisibleOnBill").'</td><td>'; print '<tr><td valign="top">'.$langs->trans("NoteNotVisibleOnBill").'</td><td>';
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
$doleditor=new DolEditor('note',$_POST["note"],'',180,'dolibarr_details','',false,true,$conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70); $doleditor=new DolEditor('note',$_POST["note"],'',180,'dolibarr_notes','',false,true,$conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70);
$doleditor->Create(); $doleditor->Create();
print "</td></tr>"; print "</td></tr>";
@ -1024,7 +1024,7 @@ else
// Note // Note
print '<tr><td valign="top">'.$langs->trans("NoteNotVisibleOnBill").'</td><td colspan="2">'; print '<tr><td valign="top">'.$langs->trans("NoteNotVisibleOnBill").'</td><td colspan="2">';
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
$doleditor=new DolEditor('note',$object->note,'',200,'dolibarr_details','',false,true,$conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70); $doleditor=new DolEditor('note',$object->note,'',200,'dolibarr_notes','',false,true,$conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70);
$doleditor->Create(); $doleditor->Create();
print "</td></tr>"; print "</td></tr>";
print '</table>'; print '</table>';
@ -1302,9 +1302,9 @@ if ($action == '' || $action == 'view')
{ {
if ($user->rights->produit->creer || $user->rights->service->creer) if ($user->rights->produit->creer || $user->rights->service->creer)
{ {
if (isset($object->no_button_edit) && $object->no_button_edit <> 1) print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&amp;id='.$object->id.'">'.$langs->trans("Modify").'</a>'; if (! isset($object->no_button_edit) || $object->no_button_edit <> 1) print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&amp;id='.$object->id.'">'.$langs->trans("Modify").'</a>';
if (isset($object->no_button_copy) && $object->no_button_copy <> 1) if (! isset($object->no_button_copy) || $object->no_button_copy <> 1)
{ {
if (! empty($conf->use_javascript_ajax)) if (! empty($conf->use_javascript_ajax))
{ {
@ -1317,8 +1317,8 @@ if ($action == '' || $action == 'view')
} }
} }
} }
$object_is_used = $object->isObjectUsed($object->id); $object_is_used = $object->isObjectUsed($object->id);
if (($object->type == 0 && $user->rights->produit->supprimer) if (($object->type == 0 && $user->rights->produit->supprimer)
|| ($object->type == 1 && $user->rights->service->supprimer)) || ($object->type == 1 && $user->rights->service->supprimer))
{ {

View File

@ -45,6 +45,7 @@ CKEDITOR.editorConfig = function( config )
['Maximize', 'ShowBlocks','-','About'] ['Maximize', 'ShowBlocks','-','About']
]; ];
// Used for mailing fields
config.toolbar_dolibarr_mailings = config.toolbar_dolibarr_mailings =
[ [
['Source','Maximize'], ['Source','Maximize'],
@ -57,9 +58,10 @@ CKEDITOR.editorConfig = function( config )
['Link','Unlink','Anchor','Image','Table','SpecialChar'] ['Link','Unlink','Anchor','Image','Table','SpecialChar']
]; ];
// Used for notes fields
config.toolbar_dolibarr_notes = config.toolbar_dolibarr_notes =
[ [
['Source'], ['Source','Maximize'],
['Cut','Copy','Paste','-','SpellChecker'], ['Cut','Copy','Paste','-','SpellChecker'],
['Undo','Redo','-','Find','Replace'], ['Undo','Redo','-','Find','Replace'],
['Font','FontSize'], ['Font','FontSize'],
@ -69,6 +71,7 @@ CKEDITOR.editorConfig = function( config )
['Link','Unlink','Image','Table','SpecialChar'] ['Link','Unlink','Image','Table','SpecialChar']
]; ];
// Used for details lines
config.toolbar_dolibarr_details = config.toolbar_dolibarr_details =
[ [
['Source','Maximize'], ['Source','Maximize'],