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

This commit is contained in:
Laurent Destailleur 2017-10-11 12:21:52 +02:00
commit 1e7f726168
11 changed files with 105 additions and 88 deletions

View File

@ -366,7 +366,7 @@ if ($mode == 'desc')
if ($mode == 'feature') if ($mode == 'feature')
{ {
$text.='<br><strong>'.$langs->trans("DependsOn").':</strong> '; $text.='<br><strong>'.$langs->trans("DependsOn").':</strong> ';
if (count($objMod->requiredby)) $text.=join(',', $objMod->depends); if (count($objMod->depends)) $text.=join(',', $objMod->depends);
else $text.=$langs->trans("None"); else $text.=$langs->trans("None");
$text.='<br><strong>'.$langs->trans("RequiredBy").':</strong> '; $text.='<br><strong>'.$langs->trans("RequiredBy").':</strong> ';
if (count($objMod->requiredby)) $text.=join(',', $objMod->requiredby); if (count($objMod->requiredby)) $text.=join(',', $objMod->requiredby);

View File

@ -623,7 +623,7 @@ if ($mode == 'common')
$imginfo="info_black"; $imginfo="info_black";
} }
print '<tr>'."\n"; print '<tr class="oddeven">'."\n";
// Picto + Name of module // Picto + Name of module
print ' <td width="200px">'; print ' <td width="200px">';

View File

@ -747,7 +747,7 @@ class ExtraFields
$this->attribute_pos[$tab->name]=$tab->pos; $this->attribute_pos[$tab->name]=$tab->pos;
$this->attribute_alwayseditable[$tab->name]=$tab->alwayseditable; $this->attribute_alwayseditable[$tab->name]=$tab->alwayseditable;
$this->attribute_perms[$tab->name]=$tab->perms; $this->attribute_perms[$tab->name]=$tab->perms;
$this->attribute_langfile[$tab->langs]=$tab->langs; $this->attribute_langfile[$tab->name]=$tab->langs;
$this->attribute_list[$tab->name]=$tab->list; $this->attribute_list[$tab->name]=$tab->list;
$this->attribute_hidden[$tab->name]=$tab->ishidden; $this->attribute_hidden[$tab->name]=$tab->ishidden;
$this->attribute_entityid[$tab->name]=$tab->entity; $this->attribute_entityid[$tab->name]=$tab->entity;

View File

@ -4750,7 +4750,9 @@ class Form
// You can set MAIN_POPUP_CALENDAR to 'eldy' or 'jquery' // You can set MAIN_POPUP_CALENDAR to 'eldy' or 'jquery'
$usecalendar='combo'; $usecalendar='combo';
if (! empty($conf->use_javascript_ajax) && (empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR != "none")) $usecalendar=empty($conf->global->MAIN_POPUP_CALENDAR)?'jquery':$conf->global->MAIN_POPUP_CALENDAR; if (! empty($conf->use_javascript_ajax) && (empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR != "none")) {
$usecalendar = ((empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR == 'eldy')?'jquery':$conf->global->MAIN_POPUP_CALENDAR);
}
//if (! empty($conf->browser->phone)) $usecalendar='combo'; //if (! empty($conf->browser->phone)) $usecalendar='combo';
if ($d) if ($d)
@ -4795,7 +4797,6 @@ class Form
{ {
$retstring.="<script type='text/javascript'>"; $retstring.="<script type='text/javascript'>";
$retstring.="$(function(){ $('#".$prefix."').datepicker({ $retstring.="$(function(){ $('#".$prefix."').datepicker({
dateFormat: '".$langs->trans("FormatDateShortJQueryInput")."',
autoclose: true, autoclose: true,
todayHighlight: true,"; todayHighlight: true,";
if (empty($conf->global->MAIN_POPUP_CALENDAR_ON_FOCUS)) if (empty($conf->global->MAIN_POPUP_CALENDAR_ON_FOCUS))

View File

@ -106,7 +106,7 @@ $langs->trans("SaturdayMin")
?> ?>
// For eldy and jQuery date picker // For jQuery date picker
var tradMonths = <?php echo json_encode($tradMonths) ?>; var tradMonths = <?php echo json_encode($tradMonths) ?>;
var tradMonthsShort = <?php echo json_encode($tradMonthsShort) ?>; var tradMonthsShort = <?php echo json_encode($tradMonthsShort) ?>;
var tradDays = <?php echo json_encode($tradDays) ?>; var tradDays = <?php echo json_encode($tradDays) ?>;
@ -140,8 +140,8 @@ jQuery(function($){
dateFormat: '<?php echo $langs->trans("FormatDateShortJQuery"); ?>', dateFormat: '<?php echo $langs->trans("FormatDateShortJQuery"); ?>',
firstDay: <?php echo (isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:'1'); ?>, firstDay: <?php echo (isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:'1'); ?>,
isRTL: <?php echo ($langs->trans("DIRECTION")=='rtl'?'true':'false'); ?>, isRTL: <?php echo ($langs->trans("DIRECTION")=='rtl'?'true':'false'); ?>,
showMonthAfterYear: false, // TODO add specific to country showMonthAfterYear: false, /* TODO add specific to country */
yearSuffix: '' // TODO add specific to country yearSuffix: '' /* TODO add specific to country */
}; };
$.datepicker.setDefaults($.datepicker.regional['<?php echo $langs->defaultlang ?>']); $.datepicker.setDefaults($.datepicker.regional['<?php echo $langs->defaultlang ?>']);
}); });

View File

@ -2194,9 +2194,21 @@ function dol_print_phone($phone,$countrycode='',$cid=0,$socid=0,$addlink='',$sep
$titlealt=($withpicto=='fax'?$langs->trans("Fax"):$langs->trans("Phone")); $titlealt=($withpicto=='fax'?$langs->trans("Fax"):$langs->trans("Phone"));
} }
$rep=''; $rep='';
$picto = '';
if($withpicto){
if($withpicto=='fax'){
$picto = 'phoning_fax';
}elseif($withpicto=='phone'){
$picto = 'phoning';
}elseif($withpicto=='mobile'){
$picto = 'phoning_mobile';
}else{
$picto = '';
}
}
if ($adddivfloat) $rep.='<div class="nospan float" style="margin-right: 10px">'; if ($adddivfloat) $rep.='<div class="nospan float" style="margin-right: 10px">';
else $rep.='<span style="margin-right: 10px;">'; else $rep.='<span style="margin-right: 10px;">';
$rep.=($withpicto?img_picto($titlealt, 'object_'.($withpicto=='fax'?'phoning_fax':'phoning').'.png').' ':'').$newphone; $rep.=($withpicto?img_picto($titlealt, 'object_'.$picto.'.png').' ':'').$newphone;
if ($adddivfloat) $rep.='</div>'; if ($adddivfloat) $rep.='</div>';
else $rep.='</span>'; else $rep.='</span>';
return $rep; return $rep;

View File

@ -1566,7 +1566,7 @@ class pdf_crabe extends ModelePDFFactures
if ($object->type == 1) $title=$outputlangs->transnoentities("InvoiceReplacement"); if ($object->type == 1) $title=$outputlangs->transnoentities("InvoiceReplacement");
if ($object->type == 2) $title=$outputlangs->transnoentities("InvoiceAvoir"); if ($object->type == 2) $title=$outputlangs->transnoentities("InvoiceAvoir");
if ($object->type == 3) $title=$outputlangs->transnoentities("InvoiceDeposit"); if ($object->type == 3) $title=$outputlangs->transnoentities("InvoiceDeposit");
if ($object->type == 4) $title=$outputlangs->transnoentities("InvoiceProFormat"); if ($object->type == 4) $title=$outputlangs->transnoentities("InvoiceProForma");
if ($this->situationinvoice) $title=$outputlangs->transnoentities("InvoiceSituation"); if ($this->situationinvoice) $title=$outputlangs->transnoentities("InvoiceSituation");
$pdf->MultiCell($w, 3, $title, '', 'R'); $pdf->MultiCell($w, 3, $title, '', 'R');

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2010-2017 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2010-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2012-2017 Regis Houssin <regis.houssin@capnetworks.com>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -63,10 +63,14 @@ if (count($extrafields->attribute_type))
{ {
foreach($extrafields->attribute_type as $key => $value) foreach($extrafields->attribute_type as $key => $value)
{ {
// Load language if required
if (! empty($extrafields->attribute_langfile[$key])) {
$langs->load($extrafields->attribute_langfile[$key]);
}
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print "<td>".$extrafields->attribute_pos[$key]."</td>\n"; print "<td>".$extrafields->attribute_pos[$key]."</td>\n";
print "<td>".$extrafields->attribute_label[$key]."</td>\n"; print "<td>".$extrafields->attribute_label[$key]."</td>\n"; // We don't translate here, we want admin to know what is the key not translated value
print "<td>".$key."</td>\n"; print "<td>".$key."</td>\n";
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n"; print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n"; print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
@ -76,7 +80,7 @@ if (count($extrafields->attribute_type))
print '<td align="center">'.yn($extrafields->attribute_alwayseditable[$key])."</td>\n"; print '<td align="center">'.yn($extrafields->attribute_alwayseditable[$key])."</td>\n";
print '<td align="center">'.$extrafields->attribute_list[$key]."</td>\n"; print '<td align="center">'.$extrafields->attribute_list[$key]."</td>\n";
if (! empty($conf->global->MAIN_CAN_HIDE_EXTRAFIELDS)) print '<td align="center">'.yn($extrafields->attribute_hidden[$key])."</td>\n"; // Add hidden option on not working feature. Why hide if user can't see it. if (! empty($conf->global->MAIN_CAN_HIDE_EXTRAFIELDS)) print '<td align="center">'.yn($extrafields->attribute_hidden[$key])."</td>\n"; // Add hidden option on not working feature. Why hide if user can't see it.
if ($conf->multicompany->enabled) { if (! empty($conf->multicompany->enabled)) {
print '<td align="center">'.($extrafields->attribute_entityid[$key]==0?$langs->trans("All"):$extrafields->attribute_entitylabel[$key]).'</td>'; print '<td align="center">'.($extrafields->attribute_entityid[$key]==0?$langs->trans("All"):$extrafields->attribute_entitylabel[$key]).'</td>';
} }
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>'; print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';

View File

@ -1322,11 +1322,11 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
print '<!-- Includes JS of Dolibarr -->'."\n"; print '<!-- Includes JS of Dolibarr -->'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/lib_head.js.php?lang='.$langs->defaultlang.($ext?'&amp;'.$ext:'').'"></script>'."\n"; print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/lib_head.js.php?lang='.$langs->defaultlang.($ext?'&amp;'.$ext:'').'"></script>'."\n";
// Add datepicker default options // Add datepicker default options (needed by jquery datepicker!)
/*if (! defined('DISABLE_DATE_PICKER')) if (! defined('DISABLE_DATE_PICKER'))
{ {
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/datepicker.js.php?lang='.$langs->defaultlang.($ext?'&'.$ext:'').'"></script>'."\n"; print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/datepicker.js.php?lang='.$langs->defaultlang.($ext?'&'.$ext:'').'"></script>'."\n";
}*/ }
// JS forced by modules (relative url starting with /) // JS forced by modules (relative url starting with /)
if (! empty($conf->modules_parts['js'])) // $conf->modules_parts['js'] is array('module'=>array('file1','file2')) if (! empty($conf->modules_parts['js'])) // $conf->modules_parts['js'] is array('module'=>array('file1','file2'))

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B