From 346e9f3e1b26128cb5fa672edff74881dee11aeb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 9 Oct 2019 15:01:19 +0200 Subject: [PATCH] Fix import of web site Fix sort on constant setup page lost --- htdocs/admin/const.php | 2 ++ htdocs/theme/eldy/dropdown.inc.php | 7 +++++++ htdocs/theme/eldy/global.inc.php | 14 ++++++++++---- htdocs/theme/md/style.css.php | 3 ++- htdocs/website/class/website.class.php | 5 +++-- htdocs/website/index.php | 7 +++++-- 6 files changed, 29 insertions(+), 9 deletions(-) diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index a5b1170d552..53555a35586 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -195,6 +195,8 @@ $param = ''; print '
entity) && $debug)?'?debug=1':'').'" method="POST">'; print ''; print ''; +print ''; +print ''; print '
'; print ''; diff --git a/htdocs/theme/eldy/dropdown.inc.php b/htdocs/theme/eldy/dropdown.inc.php index 4ffb781a33b..22ff1a87a22 100644 --- a/htdocs/theme/eldy/dropdown.inc.php +++ b/htdocs/theme/eldy/dropdown.inc.php @@ -111,6 +111,13 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> max-width: 100%; } +div#topmenu-global-search-dropdown, div#topmenu-bookmark-dropdown { + line-height: 46px; +} +a.top-menu-dropdown-link { + padding: 8px; +} + .dropdown-user-image { border-radius: 50%; vertical-align: middle; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index d900459e22f..fe1d1f675e5 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1039,15 +1039,21 @@ td.showDragHandle { } #id-right, #id-left { padding-top: 20px; - padding-bottom: 20px; display: table-cell; /* DOL_XXX Empeche fonctionnement correct du scroll horizontal sur tableau, avec datatable ou CSS */ float: none; vertical-align: top; } +#id-left { + padding-bottom: 5px; + global->MAIN_USE_TOP_MENU_SEARCH_DROPDOWN) && ! empty($conf->global->MAIN_USE_TOP_MENU_BOOKMARK_DROPDOWN)) { ?> + padding-top: 8px; + +} #id-right { /* This must stay id-right and not be replaced with echo $right */ width: 100%; background: rgb(); + padding-bottom: 20px; } #id-left { /* background-color: #fff; @@ -1130,7 +1136,7 @@ div.vmenu, td.vmenu { } .blockvmenu .menu_titre { margin-top: 4px; - margin-bottom: 3px; + margin-bottom: 1px; } /* Try responsive even not on smartphone @@ -2183,8 +2189,8 @@ div.blockvmenupair, div.blockvmenuimpair, div.blockvmenubookmarks, div.blockvmen text-decoration: none; padding-left: 5px; padding-right: 1px; - padding-top: 3px; - padding-bottom: 3px; + padding-top: 4px; + padding-bottom: 7px; margin: 0 0 0 2px; background: rgb(); diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 851829e89df..25f2bde7e60 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2104,7 +2104,7 @@ table.login_table_securitycode tr td { div.login_block { border-right: 1px solid rgba(0,0,0,0.3); - padding-top: 5px; + padding-top: 3px; padding-bottom: 3px; : 0; top: 0px; @@ -2316,6 +2316,7 @@ a.vsmenu.addbookmarkpicto { } div.blockvmenufirst { padding-top: 10px; +/* border-top: 1px solid #e0e0e0; */ } div.blockvmenusearch, div.blockvmenubookmarks { diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index bacc644a824..94735a65eff 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -1012,8 +1012,8 @@ class Website extends CommonObject return -1; } - dol_delete_dir_recursive(dirname($pathtofile).'/'.$object->ref); - dol_mkdir(dirname($pathtofile).'/'.$object->ref); + dol_delete_dir_recursive($conf->website->dir_temp.'/'.$object->ref); + dol_mkdir($conf->website->dir_temp.'/'.$object->ref); $filename = basename($pathtofile); if (! preg_match('/^website_(.*)-(.*)$/', $filename, $reg)) @@ -1023,6 +1023,7 @@ class Website extends CommonObject } $result = dol_uncompress($pathtofile, $conf->website->dir_temp.'/'.$object->ref); + if (! empty($result['error'])) { $this->errors[]='Failed to unzip file '.$pathtofile.'.'; diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 2769fb33cd0..fa13e88b481 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -1836,6 +1836,9 @@ if ($action == 'importsiteconfirm') } else { + // Force mode dynamic on + dolibarr_set_const($db, 'WEBSITE_SUBCONTAINERSINLINE', 1, 'chaine', 0, '', $conf->entity); + header("Location: ".$_SERVER["PHP_SELF"].'?website='.$object->ref); exit(); } @@ -3489,12 +3492,12 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa { if (empty($websitekey) || $websitekey == '-1') { - print '

'.$langs->trans("NoWebSiteCreateOneFirst").'


'; + print '

'.$langs->trans("NoWebSiteCreateOneFirst").'



'; print '
'; } else { - print '

'.$langs->trans("PreviewOfSiteNotYetAvailable", $object->ref).'


'; + print '

'.$langs->trans("PreviewOfSiteNotYetAvailable", $object->ref).'



'; print '
'; } }