fix tooltip
This commit is contained in:
parent
6e07cee3fc
commit
19631fef74
@ -1727,6 +1727,18 @@ class ActionComm extends CommonObject
|
|||||||
$tooltip .= '</div>';
|
$tooltip .= '</div>';
|
||||||
}
|
}
|
||||||
$linkclose = '';
|
$linkclose = '';
|
||||||
|
$classfortooltip = 'classfortooltip';
|
||||||
|
$dataparams = '';
|
||||||
|
if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
|
||||||
|
$params = [
|
||||||
|
'id' => $this->id,
|
||||||
|
'objecttype' => $this->element,
|
||||||
|
'option' => $option,
|
||||||
|
];
|
||||||
|
$classfortooltip = 'classforajaxtooltip';
|
||||||
|
$dataparams = ' data-params='.json_encode($params);
|
||||||
|
$label = $langs->trans('Loading');
|
||||||
|
}
|
||||||
//if (!empty($conf->global->AGENDA_USE_EVENT_TYPE) && $this->type_color)
|
//if (!empty($conf->global->AGENDA_USE_EVENT_TYPE) && $this->type_color)
|
||||||
// $linkclose = ' style="background-color:#'.$this->type_color.'"';
|
// $linkclose = ' style="background-color:#'.$this->type_color.'"';
|
||||||
|
|
||||||
@ -1735,18 +1747,8 @@ class ActionComm extends CommonObject
|
|||||||
$label = $langs->trans("ShowAction");
|
$label = $langs->trans("ShowAction");
|
||||||
$linkclose .= ' alt="'.dol_escape_htmltag($tooltip, 1).'"';
|
$linkclose .= ' alt="'.dol_escape_htmltag($tooltip, 1).'"';
|
||||||
}
|
}
|
||||||
if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
|
$linkclose .= ' title="'.dol_escape_htmltag($tooltip, 1, 0, '', 1).'"';
|
||||||
$params = [
|
$linkclose .= $dataparams.' class="'.$classname.' '.$classfortooltip.'"';
|
||||||
'id' => $this->id,
|
|
||||||
'objecttype' => $this->element,
|
|
||||||
'option' => $option,
|
|
||||||
];
|
|
||||||
$linkclose .= '" data-params='.json_encode($params).' title="' . $langs->trans('Loading') . '"';
|
|
||||||
$linkclose .= ' class="'.$classname.' classforajaxtooltip"';
|
|
||||||
} else {
|
|
||||||
$linkclose .= ' title="'.dol_escape_htmltag($tooltip, 1, 0, '', 1).'"';
|
|
||||||
$linkclose .= ' class="'.$classname.' classfortooltip"';
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$linkclose .= ' class="'.$classname.'"';
|
$linkclose .= ' class="'.$classname.'"';
|
||||||
}
|
}
|
||||||
@ -1806,7 +1808,7 @@ class ActionComm extends CommonObject
|
|||||||
|
|
||||||
$result .= $linkstart;
|
$result .= $linkstart;
|
||||||
if ($withpicto) {
|
if ($withpicto) {
|
||||||
$result .= img_object(($notooltip ? '' : $langs->trans("ShowAction").': '.$label), ($overwritepicto ? $overwritepicto : 'action'), (($this->type_color && $overwritepicto) ? 'style="color: #'.$this->type_color.' !important;" ' : '').($notooltip ? 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'"' : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
|
$result .= img_object(($notooltip ? '' : $langs->trans("ShowAction").': '.$label), ($overwritepicto ? $overwritepicto : 'action'), (($this->type_color && $overwritepicto) ? 'style="color: #'.$this->type_color.' !important;" ' : '').($notooltip ? 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'"' : $dataparams.' class="'.(($withpicto != 2) ? 'paddingright ' : '').$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1);
|
||||||
}
|
}
|
||||||
$result .= dol_escape_htmltag($labelshort);
|
$result .= dol_escape_htmltag($labelshort);
|
||||||
$result .= $linkend;
|
$result .= $linkend;
|
||||||
|
|||||||
@ -3832,23 +3832,25 @@ class Commande extends CommonOrder
|
|||||||
}
|
}
|
||||||
|
|
||||||
$linkclose = '';
|
$linkclose = '';
|
||||||
|
$classfortooltip = 'classfortooltip';
|
||||||
|
$dataparams = '';
|
||||||
|
if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
|
||||||
|
$params = [
|
||||||
|
'id' => $this->id,
|
||||||
|
'objecttype' => $this->element,
|
||||||
|
'option' => $option,
|
||||||
|
];
|
||||||
|
$classfortooltip = 'classforajaxtooltip';
|
||||||
|
$dataparams = ' data-params='.json_encode($params);
|
||||||
|
$label = $langs->trans('Loading');
|
||||||
|
}
|
||||||
if (empty($notooltip) && $user->rights->commande->lire) {
|
if (empty($notooltip) && $user->rights->commande->lire) {
|
||||||
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||||
$label = $langs->trans("Order");
|
$label = $langs->trans("Order");
|
||||||
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
|
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||||
}
|
}
|
||||||
if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
|
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||||
$params = [
|
$linkclose .= $dataparams.' class="'.$classfortooltip.'"';
|
||||||
'id' => $this->id,
|
|
||||||
'objecttype' => $this->element,
|
|
||||||
'option' => $option,
|
|
||||||
];
|
|
||||||
$linkclose .= ' data-params='.json_encode($params).' title="' . $langs->trans('Loading') . '"';
|
|
||||||
$linkclose .= ' class="classforajaxtooltip"';
|
|
||||||
} else {
|
|
||||||
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
|
|
||||||
$linkclose .= ' class="classfortooltip"';
|
|
||||||
}
|
|
||||||
|
|
||||||
$target_value = array('_self', '_blank', '_parent', '_top');
|
$target_value = array('_self', '_blank', '_parent', '_top');
|
||||||
if (in_array($target, $target_value)) {
|
if (in_array($target, $target_value)) {
|
||||||
@ -3867,7 +3869,7 @@ class Commande extends CommonOrder
|
|||||||
|
|
||||||
$result .= $linkstart;
|
$result .= $linkstart;
|
||||||
if ($withpicto) {
|
if ($withpicto) {
|
||||||
$result .= img_object(($notooltip ? '' : $label), $this->picto, ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
|
$result .= img_object(($notooltip ? '' : $label), $this->picto, ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : $dataparams.' class="'.(($withpicto != 2) ? 'paddingright ' : '').$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1);
|
||||||
}
|
}
|
||||||
if ($withpicto != 2) {
|
if ($withpicto != 2) {
|
||||||
$result .= $this->ref;
|
$result .= $this->ref;
|
||||||
|
|||||||
@ -5009,6 +5009,8 @@ class Product extends CommonObject
|
|||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
|
$langs->load('products');
|
||||||
|
|
||||||
$datas = [];
|
$datas = [];
|
||||||
|
|
||||||
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||||
|
|||||||
@ -2665,15 +2665,16 @@ class Societe extends CommonObject
|
|||||||
if (isset($this->client) && isset($this->fournisseur)) {
|
if (isset($this->client) && isset($this->fournisseur)) {
|
||||||
$datas['type'] = ' ' . $this->getTypeUrl(1);
|
$datas['type'] = ' ' . $this->getTypeUrl(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$datas['name'] = '<br><b>'.$langs->trans('Name').':</b> '.dol_escape_htmltag($this->name);
|
$datas['name'] = '<br><b>'.$langs->trans('Name').':</b> '.dol_escape_htmltag($this->name);
|
||||||
if (!empty($this->name_alias)) {
|
if (!empty($this->name_alias)) {
|
||||||
$datas['namealias'] = ' ('.dol_escape_htmltag($this->name_alias).')';
|
$datas['namealias'] = ' ('.dol_escape_htmltag($this->name_alias).')';
|
||||||
}
|
}
|
||||||
|
if (!empty($this->email)) {
|
||||||
if ($this->email) {
|
|
||||||
$datas['email'] = '<br>'.img_picto('', 'email', 'class="pictofixedwidth"').$this->email;
|
$datas['email'] = '<br>'.img_picto('', 'email', 'class="pictofixedwidth"').$this->email;
|
||||||
}
|
}
|
||||||
|
if (!empty($this->url)) {
|
||||||
|
$datas['url'] = '<br>'.img_picto('', 'globe', 'class="pictofixedwidth"').$this->url;
|
||||||
|
}
|
||||||
if (!empty($this->phone) || !empty($this->fax)) {
|
if (!empty($this->phone) || !empty($this->fax)) {
|
||||||
$phonelist = array();
|
$phonelist = array();
|
||||||
if ($this->phone) {
|
if ($this->phone) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user