Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into patch-1

This commit is contained in:
markus
2019-03-10 15:26:35 +01:00
51 changed files with 817 additions and 732 deletions

View File

@@ -109,7 +109,7 @@ class Ctypent // extends CommonObject
$sql.= " ".(! isset($this->id)?'NULL':"'".$this->db->escape($this->id)."'").",";
$sql.= " ".(! isset($this->code)?'NULL':"'".$this->db->escape($this->code)."'").",";
$sql.= " ".(! isset($this->libelle)?'NULL':"'".$this->db->escape($this->libelle)."'").",";
$sql.= " ".(! isset($this->active)?'NULL':"'".$this->db->active($this->active)."'").",";
$sql.= " ".(! isset($this->active)?'NULL':"'".$this->db->escape($this->active)."'").",";
$sql.= " ".(! isset($this->module)?'NULL':"'".$this->db->escape($this->module)."'")."";

View File

@@ -553,11 +553,11 @@ class Form
{
if ($type == 'info' || $type == 'help') return $text;
}
// If info or help with smartphone, show only text (tooltip on lick does not works with dialog on smaprtphone)
if (! empty($conf->dol_no_mouse_hover) && ! empty($tooltiptrigger))
{
if ($type == 'info' || $type == 'help') return $text;
}
// If info or help with smartphone, show only text (tooltip on click does not works with dialog on smaprtphone)
//if (! empty($conf->dol_no_mouse_hover) && ! empty($tooltiptrigger))
//{
//if ($type == 'info' || $type == 'help') return '<a href="'..'">'.$text.''</a>';
//}
$img='';
if ($type == 'info') $img = img_help(0, $alt);
@@ -6651,7 +6651,7 @@ class Form
$objp = $this->db->fetch_object($resqllist);
print '<tr class="oddeven">';
print '<td aling="left">';
print '<td class="left">';
print '<input type="radio" name="idtolinkto" value=' . $objp->rowid . '>';
print '</td>';
print '<td class="center">' . $objp->ref . '</td>';

View File

@@ -30,7 +30,7 @@
abstract class Stats
{
protected $db;
private $_lastfetchdate=array(); // Dates of cache file read by methods
protected $lastfetchdate=array(); // Dates of cache file read by methods
public $cachefilesuffix=''; // Suffix to add to name of cache file (to avoid file name conflicts)
/**
@@ -70,7 +70,7 @@ abstract class Stats
{
$foundintocache=1;
$this->_lastfetchdate[get_class($this).'_'.__FUNCTION__]=$filedate;
$this->lastfetchdate[get_class($this).'_'.__FUNCTION__]=$filedate;
}
else
{
@@ -117,7 +117,7 @@ abstract class Stats
if (! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK;
@chmod($newpathofdestfile, octdec($newmask));
$this->_lastfetchdate[get_class($this).'_'.__FUNCTION__]=$nowgmt;
$this->lastfetchdate[get_class($this).'_'.__FUNCTION__]=$nowgmt;
}
// return array(array('Month',val1,val2,val3),...)
@@ -164,7 +164,7 @@ abstract class Stats
{
$foundintocache=1;
$this->_lastfetchdate[get_class($this).'_'.__FUNCTION__]=$filedate;
$this->lastfetchdate[get_class($this).'_'.__FUNCTION__]=$filedate;
}
else
{
@@ -215,7 +215,7 @@ abstract class Stats
@chmod($newpathofdestfile, octdec($newmask));
}
else dol_syslog("Failed to write cache file", LOG_ERR);
$this->_lastfetchdate[get_class($this).'_'.__FUNCTION__]=$nowgmt;
$this->lastfetchdate[get_class($this).'_'.__FUNCTION__]=$nowgmt;
}
return $data;
@@ -290,7 +290,7 @@ abstract class Stats
{
$foundintocache=1;
$this->_lastfetchdate[get_class($this).'_'.__FUNCTION__]=$filedate;
$this->lastfetchdate[get_class($this).'_'.__FUNCTION__]=$filedate;
}
else
{
@@ -323,7 +323,7 @@ abstract class Stats
if (! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK;
@chmod($newpathofdestfile, octdec($newmask));
}
$this->_lastfetchdate[get_class($this).'_'.__FUNCTION__]=$nowgmt;
$this->lastfetchdate[get_class($this).'_'.__FUNCTION__]=$nowgmt;
}
return $data;

View File

@@ -43,37 +43,40 @@ else header('Cache-Control: no-cache');
// Wrapper to show tooltips (html or onclick popup)
print "\n/* JS CODE TO ENABLE Tooltips on all object with class classfortooltip */\n";
print "jQuery(document).ready(function () {\n";
if (empty($conf->dol_no_mouse_hover))
{
print "\n/* JS CODE TO ENABLE Tooltips on all object with class classfortooltip */\n";
print '
jQuery(document).ready(function () {
jQuery(".classfortooltip").tooltip({
show: { collision: "flipfit", effect:\'toggle\', delay:50 },
hide: { delay: 50 },
tooltipClass: "mytooltip",
content: function () {
return $(this).prop(\'title\'); /* To force to get title as is */
}
});
jQuery(".classfortooltiponclicktext").dialog(
{ closeOnEscape: true, classes: { "ui-dialog": "highlight" },
maxHeight: window.innerHeight-60, width: '.($conf->browser->layout == 'phone' ? 400 : 700).',
modal: true,
autoOpen: false }).css("z-index: 5000");
jQuery(".classfortooltiponclick").click(function () {
console.log("We click on tooltip for element with dolid="+$(this).attr(\'dolid\'));
if ($(this).attr(\'dolid\'))
{
obj=$("#idfortooltiponclick_"+$(this).attr(\'dolid\')); /* obj is a div component */
obj.dialog("open");
return false;
}
});
});
' . "\n";
print 'jQuery(".classfortooltip").tooltip({
show: { collision: "flipfit", effect:\'toggle\', delay:50 },
hide: { delay: 50 },
tooltipClass: "mytooltip",
content: function () {
return $(this).prop(\'title\'); /* To force to get title as is */
}
});'."\n";
}
print '
jQuery(".classfortooltiponclicktext").dialog(
{ closeOnEscape: true, classes: { "ui-dialog": "highlight" },
maxHeight: window.innerHeight-60, width: '.($conf->browser->layout == 'phone' ? max($_SESSION['dol_screenwidth']-20, 320) : 700).',
modal: true,
autoOpen: false }).css("z-index: 5000");
jQuery(".classfortooltiponclick").click(function () {
console.log("We click on tooltip for element with dolid="+$(this).attr(\'dolid\'));
if ($(this).attr(\'dolid\'))
{
obj=$("#idfortooltiponclick_"+$(this).attr(\'dolid\')); /* obj is a div component */
obj.dialog("open");
return false;
}
});'."\n";
print "});\n";
// Wrapper to manage dropdown
if (! defined('JS_JQUERY_DISABLE_DROPDOWN'))
{

View File

@@ -816,7 +816,7 @@ function confirmConstantAction(action, url, code, input, box, entity, yesButton,
/**
* Function to output a dialog bog for copy/paste
* Function to output a dialog box for copy/paste
*
* @param string text Text to put into copy/paste area
* @param string text2 Text to put under the copy/paste area

View File

@@ -95,8 +95,11 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
$tooltip=$langs->trans("GenericMaskCodes", $langs->transnoentities("BarCode"), $langs->transnoentities("BarCode"));
$tooltip.=$langs->trans("GenericMaskCodes3");
$tooltip.=$langs->trans("GenericMaskCodes4c");
$tooltip.=$langs->trans("GenericMaskCodes5");
$tooltip.='<strong>'.$langs->trans("Example").':</strong><br>';
$tooltip.='020{000000000} (for internal use)<br>';
$tooltip.='9771234{00000} (example of ISSN code with prefix 1234)<br>';
$tooltip.='9791234{00000} (example of ISMN code with prefix 1234)<br>';
//$tooltip.=$langs->trans("GenericMaskCodes5");
// Mask parameter
//$texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("BarCodeModel").'):</td>';

View File

@@ -420,6 +420,6 @@ class modAgenda extends DolibarrModules
$this->export_sql_end[$r] .=' WHERE ac.entity IN ('.getEntity('agenda').')';
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .=' AND (sc.fk_user = '.(empty($user)?0:$user->id).' OR ac.fk_soc IS NULL)';
if (empty($user->rights->agenda->allactions->read)) $this->export_sql_end[$r] .=' AND acr.fk_element = '.(empty($user)?0:$user->id);
$this->export_sql_order[$r] .=' ORDER BY ac.datep';
$this->export_sql_order[$r] =' ORDER BY ac.datep';
}
}

View File

@@ -283,6 +283,8 @@ class modExpedition extends DolibarrModules
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
$keyforselect='expeditiondet'; $keyforelement='shipment_line'; $keyforaliasextra='extra2';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
$keyforselect='product'; $keyforelement='product'; $keyforaliasextra='extraprod';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
$this->export_sql_start[$r]='SELECT DISTINCT ';
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'expedition as c';
@@ -295,6 +297,7 @@ class modExpedition extends DolibarrModules
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'expeditiondet_extrafields as extra2 ON ed.rowid = extra2.fk_object';
$this->export_sql_end[$r] .=' , '.MAIN_DB_PREFIX.'commandedet as cd';
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on cd.fk_product = p.rowid';
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extraprod ON p.rowid = extraprod.fk_object';
if ($idcontacts && ! empty($conf->global->SHIPMENT_ADD_CONTACTS_IN_EXPORT))
{
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'element_contact as ee ON ee.element_id = cd.fk_commande AND ee.fk_c_type_contact IN ('.$idcontacts.')';