Skip to content
Permalink
Browse files

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

  • Loading branch information...
eldy committed Mar 9, 2019
2 parents 10b9fdc + fa4467f commit d659543ac03bb5c057a3a783ac2aa0331a28a476
@@ -553,11 +553,11 @@ public function textwithpicto($text, $htmltext, $direction = 1, $type = 'help',
{
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);
@@ -43,37 +43,40 @@
// 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'))
{
@@ -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
@@ -338,3 +338,4 @@ CloneDestinationReference=Destination product reference
ErrorCopyProductCombinations=There was an error while copying the product variants
ErrorDestinationProductNotFound=Destination product not found
ErrorProductCombinationNotFound=Product variant not found
ActionAvailableOnVariantProductOnly=Action only available on the variant of product
@@ -2132,7 +2132,14 @@
if (GETPOST('editsource', 'alpha') || GETPOST('editcontent', 'alpha'))
{
$htmltext=$langs->transnoentitiesnoconv("YouCanEditHtmlSource").'<br>';
print $form->textwithpicto($langs->trans("SyntaxHelp"), $htmltext, 1, 'help', 'inline-block', 1, 2, 'tooltipsubstitution');
if ($conf->browser->layout == 'phone')
{
print $form->textwithpicto('', $htmltext, 1, 'help', 'inline-block', 1, 2, 'tooltipsubstitution');
}
else
{
print $form->textwithpicto($langs->trans("SyntaxHelp"), $htmltext, 1, 'help', 'inline-block', 1, 2, 'tooltipsubstitution');
}
}
print '</div>'; // end websitehelp

0 comments on commit d659543

Please sign in to comment.
You can’t perform that action at this time.