diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index e96e60f14f9c7..dd90533ba28f0 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -64,5 +64,6 @@ BackToListOfThirdParty=Back to list for Third Party DisableSiteFirst=Disable website first MyContainerTitle=My web site title AnotherContainer=Another container +YouMustDefineTheHomePage=You must first define the default Home page OnlyEditionOfSourceForGrabbedContentFuture=Note: only edition of HTML source will be possible when a page content is intiliazed by grabbing it from an external page (WYSIWYG editor will not be available) OnlyEditionOfSourceForGrabbedContent=Only edition of HTML source is possible when content was grabber from an external site \ No newline at end of file diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 385863de840ed..c5a49a9fd7ed3 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -3546,14 +3546,14 @@ .websiteiframenoborder { border: 0px; } -a.websitebuttonsitepreview { +span.websitebuttonsitepreview, a.websitebuttonsitepreview { vertical-align: middle; } -a.websitebuttonsitepreview img { +span.websitebuttonsitepreview img, a.websitebuttonsitepreview img { width: 26px; display: inline-block; } -a.websitebuttonsitepreviewdisabled img { +span.websitebuttonsitepreviewdisabled img, a.websitebuttonsitepreviewdisabled img { opacity: 0.2; } .websitehelp { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index e54da2bdc9292..0cd0023a46bab 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -3599,11 +3599,11 @@ .websiteiframenoborder { border: 0px; } -a.websitebuttonsitepreview img { +span.websitebuttonsitepreview img, a.websitebuttonsitepreview img { width: 26px; display: inline-block; } -a.websitebuttonsitepreviewdisabled img { +span.websitebuttonsitepreviewdisabled img, a.websitebuttonsitepreviewdisabled img { opacity: 0.2; } .websiteiframenoborder { diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 26c4243d382fc..8db771113ca34 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -1388,9 +1388,18 @@ $urlext=$virtualurl; $urlint=$urlwithroot.'/public/website/index.php?website='.$website; - print 'transnoentitiesnoconv("Site"), $langs->transnoentitiesnoconv("Site"), $dataroot, $urlext)).'">'; - print $form->textwithpicto('', $langs->trans("PreviewSiteServedByWebServer", $langs->transnoentitiesnoconv("Site"), $langs->transnoentitiesnoconv("Site"), $dataroot, $urlext?$urlext:''.$langs->trans("VirtualHostUrlNotDefined").''), 1, 'preview_ext'); - print ''; + if (empty($object->fk_default_home)) + { + print 'transnoentitiesnoconv("Site"), $langs->transnoentitiesnoconv("Site"), $dataroot, $urlext)).'">'; + print $form->textwithpicto('', ''.$langs->trans("YouMustDefineTheHomePage").'
'.$langs->trans("PreviewSiteServedByWebServer", $langs->transnoentitiesnoconv("Site"), $langs->transnoentitiesnoconv("Site"), $dataroot, $urlext?$urlext:''.$langs->trans("VirtualHostUrlNotDefined").''), 1, 'preview_ext'); + print '
'; + } + else + { + print 'transnoentitiesnoconv("Site"), $langs->transnoentitiesnoconv("Site"), $dataroot, $urlext)).'">'; + print $form->textwithpicto('', $langs->trans("PreviewSiteServedByWebServer", $langs->transnoentitiesnoconv("Site"), $langs->transnoentitiesnoconv("Site"), $dataroot, $urlext?$urlext:''.$langs->trans("VirtualHostUrlNotDefined").''), 1, 'preview_ext'); + print ''; + } } if (in_array($action, array('editcss','editmenu','file_manager'))) @@ -1587,6 +1596,8 @@ console.log("Website external url modified "+jQuery("#previewsiteurl").val()); if (jQuery("#previewsiteurl").val() != "") jQuery("a.websitebuttonsitepreviewdisabled img").css({ opacity: 1 }); else jQuery("a.websitebuttonsitepreviewdisabled img").css({ opacity: 0.2 }); + '; + print ' }); jQuery("#previewsiteext,#previewpageext").click(function() { newurl=jQuery("#previewsiteurl").val();