mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-15 22:11:36 +01:00
Add auto tooltip
This commit is contained in:
@@ -9979,6 +9979,7 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url =
|
||||
$attr['id'] = $id;
|
||||
}
|
||||
|
||||
|
||||
// Override attr
|
||||
if (!empty($params['attr']) && is_array($params['attr'])) {
|
||||
foreach ($params['attr'] as $key => $value) {
|
||||
@@ -9992,6 +9993,11 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url =
|
||||
}
|
||||
}
|
||||
|
||||
// automatic add tooltip when title is detected
|
||||
if (!empty($attr['title']) && !empty($attr['class']) && strpos($attr['class'], 'classfortooltip') === false) {
|
||||
$attr['class'].= ' classfortooltip';
|
||||
}
|
||||
|
||||
// Js Confirm button
|
||||
if ($userRight && !empty($params['confirm'])) {
|
||||
if (!is_array($params['confirm'])) {
|
||||
|
||||
Reference in New Issue
Block a user