diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang
index e18f397d393..48867fedb6f 100644
--- a/htdocs/langs/en_US/website.lang
+++ b/htdocs/langs/en_US/website.lang
@@ -22,7 +22,7 @@ EditCss=Edit Style/CSS or HTML header
EditMenu=Edit menu
EditMedias=Edit medias
EditPageMeta=Edit Meta
-EditInline=Edit inline
+EditInLine=Edit inline
AddWebsite=Add website
Webpage=Web page/container
AddPage=Add page/container
diff --git a/htdocs/public/website/index.php b/htdocs/public/website/index.php
index b61c02e9d63..436e352819a 100644
--- a/htdocs/public/website/index.php
+++ b/htdocs/public/website/index.php
@@ -131,7 +131,8 @@ if (empty($pageid))
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found", true, 404);
$langs->load("website");
- print $langs->trans("PreviewOfSiteNotYetAvailable");
+
+ if (! GETPOSTISSET('pageref')) print $langs->trans("PreviewOfSiteNotYetAvailable", $websitekey);
include DOL_DOCUMENT_ROOT.'/public/error-404.php';
exit;
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index 21ca0e5e586..fb19b5d8c4e 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -2931,6 +2931,11 @@ div.pagination li.paginationafterarrows {
.nohover:hover {
background: unset;
}
+.nohoverborder:hover {
+ border: unset;
+ box-shadow: unset;
+ -webkit-box-shadow: unset;
+}
.oddeven, .evenodd, .impair, .nohover .impair:hover, tr.impair td.nohover
{
font-family: ;
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index a7c102d16eb..cec44aa00af 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -2892,6 +2892,12 @@ ul.noborder li:nth-child(odd):not(.liste_titre) {
/* Set the color for hover lines */
+
+.nohoverborder:hover {
+ border: unset;
+ box-shadow: unset;
+ -webkit-box-shadow: unset;
+}
.oddeven:hover, .evenodd:hover, .impair:hover, .pair:hover
{
diff --git a/htdocs/website/index.php b/htdocs/website/index.php
index 94346b8a04f..1ba90605deb 100644
--- a/htdocs/website/index.php
+++ b/htdocs/website/index.php
@@ -172,6 +172,19 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
if ($action == 'renamefile') $action='file_manager'; // After actions_linkedfiles, if action were renamefile, we set it to 'file_manager'
+if ($action == 'seteditinline')
+{
+ dolibarr_set_const($db, 'WEBSITE_EDITINLINE', 1);
+ header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOST('website','alphanohtml').'&pageid='.GETPOST('pageid','int'));
+ exit;
+}
+if ($action == 'unseteditinline')
+{
+ dolibarr_del_const($db, 'WEBSITE_EDITINLINE');
+ header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOST('website','alphanohtml').'&pageid='.GETPOST('pageid','int'));
+ exit;
+}
+
// Add directory
/*
if ($action == 'adddir' && $permtouploadfile)
@@ -197,12 +210,12 @@ if ($action == 'adddir' && $permtouploadfile)
*/
-if (GETPOST('refreshsite')) // If we change the site, we reset the pageid and cancel addsite action.
+if (GETPOST('refreshsite','alpha')) // If we change the site, we reset the pageid and cancel addsite action.
{
$pageid=0;
if ($action == 'addsite') $action = 'preview';
}
-if (GETPOST('refreshpage') && ! in_array($action, array('updatecss'))) $action='preview';
+if (GETPOST('refreshpage','alpha') && ! in_array($action, array('updatecss'))) $action='preview';
// Add site
@@ -1657,18 +1670,18 @@ if (count($object->records) > 0)
if ($websitepage->grabbed_from)
{
//print '';
- print ''.dol_escape_htmltag($langs->trans("EditInLine")).'';
+ print ''.$langs->trans("EditInLine").img_picto($langs->trans("Disabled"),'switch_off').'';
}
else
{
//print '';
if (empty($conf->global->WEBSITE_EDITINLINE))
{
- print 'id.'&pageid='.$websitepage->id.'&action=seteditinline">'.dol_escape_htmltag($langs->trans("EditInLine")).'';
+ print 'ref.'&pageid='.$websitepage->id.'&action=seteditinline">'.$langs->trans("EditInLine").img_picto($langs->trans("Disabled"),'switch_off').'';
}
else
{
- print 'id.'&pageid='.$websitepage->id.'&action=unseteditinline">'.dol_escape_htmltag($langs->trans("EditInLine")).'';
+ print 'ref.'&pageid='.$websitepage->id.'&action=unseteditinline">'.$langs->trans("EditInLine").img_picto($langs->trans("Disabled"),'switch_on').'';
}
}
@@ -2296,7 +2309,6 @@ if ($action == 'editcontent')
print "\n\n";
-
if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone')
{
if ($pageid > 0)
@@ -2349,9 +2361,9 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa
// TODO Add the contenteditable="true" when mode Edit Inline is on
$newcontent = $objectpage->content;
- if (empty($conf->global->WEBSITE_EDITINLINE_ON))
+ if (empty($conf->global->WEBSITE_EDITINLINE))
{
- $newcontent = preg_replace('/(div|section) contenteditable="true"/', '\1', $newcontent);
+ $newcontent = preg_replace('/(div|section)(\s[^\>]*)contenteditable="true"/', '\1\2', $newcontent);
}
else
{
@@ -2400,7 +2412,7 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa
}
else
{
- print '