From 2b805cc63df86c9d9824e5d2ab49f4648a1d1dbe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 14 Aug 2019 23:47:01 +0200 Subject: [PATCH] Add tooltip help in CSS edition --- htdocs/langs/en_US/website.lang | 3 ++- htdocs/website/index.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index f01494fcdac..a05ead24df7 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -106,4 +106,5 @@ DeleteAlsoJs=Delete also all javascript files specific to this website? DeleteAlsoMedias=Delete also all medias files specific to this website? MyWebsitePages=My website pages SearchReplaceInto=Search | Replace into -ReplaceString=New string \ No newline at end of file +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 diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 04642d0dc84..3624843dba7 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2557,7 +2557,8 @@ if ($action == 'editcss') // CSS file print ''; - print $langs->trans('WEBSITE_CSS_INLINE'); + $htmlhelp=$langs->trans("CSSContentTooltipHelp"); + print $form->textwithpicto($langs->trans('WEBSITE_CSS_INLINE'), $htmlhelp, 1, 'help', '', 0, 2, 'csstooltip'); print ''; $doleditor=new DolEditor('WEBSITE_CSS_INLINE', $csscontent, '', '220', 'ace', 'In', true, false, 'ace', 0, '100%', '');