From b2f1cb22e8459a2085efc2fd737dfda6bcba9693 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 14 Aug 2019 23:57:44 +0200 Subject: [PATCH] Add tooltip in website module --- htdocs/langs/en_US/website.lang | 3 ++- htdocs/website/index.php | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index a05ead24df7..ec8bc0c2232 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -107,4 +107,5 @@ DeleteAlsoMedias=Delete also all medias files specific to this website? MyWebsitePages=My website pages SearchReplaceInto=Search | Replace into ReplaceString=New string -CSSContentTooltipHelp=Enter here CSS content. To avoid any conflict with the CSS of the application, be sure to prepend all declaration with the .bodywebsite class. For example:

#mycssselector, input.myclass:hover { ... }
must be
.bodywebsite #mycssselector, .bodywebsite input.myclass:hover { ... }

Note: If you have a large file without this prefix, you can use 'lessc' to convert it to append the .bodywebsite prefix everywhere. \ No newline at end of file +CSSContentTooltipHelp=Enter here CSS content. To avoid any conflict with the CSS of the application, be sure to prepend all declaration with the .bodywebsite class. For example:

#mycssselector, input.myclass:hover { ... }
must be
.bodywebsite #mycssselector, .bodywebsite input.myclass:hover { ... }

Note: If you have a large file without this prefix, you can use 'lessc' to convert it to append the .bodywebsite prefix everywhere. +LinkAndScriptsHereAreNotLoadedInEditor=Warning: This content is output only when site is accessed from a server. It is not used in Edit mode so if you need to load javascript files also in edit mode, just add your tag 'script src=...' into the page. \ No newline at end of file diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 3624843dba7..8797020a717 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2578,9 +2578,12 @@ if ($action == 'editcss') // Common HTML header print ''; + print $langs->trans('WEBSITE_HTML_HEADER'); $htmlhelp=$langs->trans("Example").' :
'; $htmlhelp.=dol_htmlentitiesbr($htmlheadercontentdefault); - print $form->textwithpicto($langs->trans('WEBSITE_HTML_HEADER'), $htmlhelp, 1, 'help', '', 0, 2, 'htmlheadertooltip'); + $textwithhelp = $form->textwithpicto('', $htmlhelp, 1, 'help', '', 0, 2, 'htmlheadertooltip'); + $htmlhelp2=$langs->trans("LinkAndScriptsHereAreNotLoadedInEditor").'
'; + print $form->textwithpicto($textwithhelp, $htmlhelp2, 1, 'warning', '', 0, 2, 'htmlheadertooltip2'); print ''; $doleditor=new DolEditor('WEBSITE_HTML_HEADER', $htmlheadercontent, '', '220', 'ace', 'In', true, false, 'ace', 0, '100%', '');