From a0231b5c60513113357bdeca0453e2741444c786 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 1 Dec 2017 12:55:28 +0100 Subject: [PATCH] Fix responsive --- htdocs/core/class/extrafields.class.php | 17 +++++++--- htdocs/core/class/menu.class.php | 10 +++--- htdocs/core/get_menudiv.php | 12 +++++++ htdocs/core/menus/standard/auguria_menu.php | 2 +- htdocs/core/menus/standard/eldy.lib.php | 4 +-- htdocs/core/menus/standard/eldy_menu.php | 2 +- htdocs/langs/en_US/admin.lang | 2 +- htdocs/product/stock/massstockmove.php | 2 +- htdocs/product/stock/replenish.php | 35 ++------------------- htdocs/projet/activity/perday.php | 7 ++--- htdocs/projet/activity/perweek.php | 7 ++--- htdocs/theme/eldy/style.css.php | 12 ++++++- htdocs/theme/md/style.css.php | 12 ++++++- htdocs/variants/list.php | 9 ++---- 14 files changed, 70 insertions(+), 63 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index a313c1b127e..2d172dbaeda 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -900,7 +900,7 @@ class ExtraFields { $tmp=explode(',',$size); $newsize=$tmp[0]; - $out=''; + $out=''; } elseif (preg_match('/varchar/', $type)) { @@ -908,13 +908,20 @@ class ExtraFields } elseif (in_array($type, array('mail', 'phone', 'url'))) { - $out=''; + $out=''; } elseif ($type == 'text') { - require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor=new DolEditor($keyprefix.$key.$keysuffix,$value,'',200,'dolibarr_notes','In',false,false,! empty($conf->fckeditor->enabled) && $conf->global->FCKEDITOR_ENABLE_SOCIETE,ROWS_5,'90%'); - $out=$doleditor->Create(1); + if (! preg_match('/search_/', $keyprefix)) // If keyprefix is search_ or search_options_, we must just use a simple text field + { + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $doleditor=new DolEditor($keyprefix.$key.$keysuffix,$value,'',200,'dolibarr_notes','In',false,false,! empty($conf->fckeditor->enabled) && $conf->global->FCKEDITOR_ENABLE_SOCIETE,ROWS_5,'90%'); + $out=$doleditor->Create(1); + } + else + { + $out=''; + } } elseif ($type == 'boolean') { diff --git a/htdocs/core/class/menu.class.php b/htdocs/core/class/menu.class.php index d4570218ff2..17d5e06589f 100644 --- a/htdocs/core/class/menu.class.php +++ b/htdocs/core/class/menu.class.php @@ -62,11 +62,12 @@ class Menu * @param string $id Id * @param string $idsel Id sel * @param string $classname Class name + * @param string $prefix Prefix to title (image or picto) * @return void */ - function add($url, $titre, $level=0, $enabled=1, $target='',$mainmenu='',$leftmenu='',$position=0, $id='', $idsel='', $classname='') + function add($url, $titre, $level=0, $enabled=1, $target='',$mainmenu='',$leftmenu='',$position=0, $id='', $idsel='', $classname='', $prefix='') { - $this->liste[]=array('url'=>$url,'titre'=>$titre,'level'=>$level,'enabled'=>$enabled,'target'=>$target,'mainmenu'=>$mainmenu,'leftmenu'=>$leftmenu, 'position'=>$position, 'id'=>$id, 'idsel'=>$idsel, 'classname'=>$classname); + $this->liste[]=array('url'=>$url,'titre'=>$titre,'level'=>$level,'enabled'=>$enabled,'target'=>$target,'mainmenu'=>$mainmenu,'leftmenu'=>$leftmenu, 'position'=>$position, 'id'=>$id, 'idsel'=>$idsel, 'classname'=>$classname, 'prefix'=>$prefix); } /** @@ -84,12 +85,13 @@ class Menu * @param string $id Id * @param string $idsel Id sel * @param string $classname Class name + * @param string $prefix Prefix to title (image or picto) * @return void */ - function insert($idafter, $url, $titre, $level=0, $enabled=1, $target='',$mainmenu='',$leftmenu='',$position=0, $id='', $idsel='', $classname='') + function insert($idafter, $url, $titre, $level=0, $enabled=1, $target='',$mainmenu='',$leftmenu='',$position=0, $id='', $idsel='', $classname='', $prefix='') { $array_start = array_slice($this->liste,0,($idafter+1)); - $array_new = array(0=>array('url'=>$url,'titre'=>$titre,'level'=>$level,'enabled'=>$enabled,'target'=>$target,'mainmenu'=>$mainmenu,'leftmenu'=>$leftmenu,'position'=>$position, 'id'=>$id, 'idsel'=>$idsel, 'classname'=>$classname)); + $array_new = array(0=>array('url'=>$url,'titre'=>$titre,'level'=>$level,'enabled'=>$enabled,'target'=>$target,'mainmenu'=>$mainmenu,'leftmenu'=>$leftmenu,'position'=>$position, 'id'=>$id, 'idsel'=>$idsel, 'classname'=>$classname, 'prefix'=>$prefix)); $array_end = array_slice($this->liste,($idafter+1)); $this->liste=array_merge($array_start,$array_new,$array_end); } diff --git a/htdocs/core/get_menudiv.php b/htdocs/core/get_menudiv.php index 451747b4a6e..76ac972c15d 100644 --- a/htdocs/core/get_menudiv.php +++ b/htdocs/core/get_menudiv.php @@ -132,6 +132,18 @@ print ' cursor: pointer; display: block; } + li.lilevel4 a { + padding: 0.2em 15px 8px 60px; + color: #000; + cursor: pointer; + display: block; + } + li.lilevel5 a { + padding: 0.2em 15px 8px 60px; + color: #000; + cursor: pointer; + display: block; + } li.lilevel3:last-child { padding-bottom: 10px; } diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index 55941fe7c10..648d76f327e 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -190,7 +190,7 @@ class MenuManager print ''; if ($langs->trans(ucfirst($val['mainmenu'])."Dashboard") == ucfirst($val['mainmenu'])."Dashboard") // No translation { - if (in_array($val['mainmenu'], array('cashdesk', 'websites'))) print $langs->trans("Access"); + if (in_array($val['mainmenu'], array('cashdesk', 'externalsite', 'website', 'collab'))) print $langs->trans("Access"); else print $langs->trans("Dashboard"); } else print $langs->trans(ucfirst($val['mainmenu'])."Dashboard"); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 287e91947d4..cfe44b7229c 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -518,7 +518,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $langs->load("users"); // Home - dashboard - $newmenu->add("/index.php?mainmenu=home&leftmenu=home", $langs->trans("MyDashboard"), 0, 1, '', $mainmenu, 'home'); + $newmenu->add("/index.php?mainmenu=home&leftmenu=home", $langs->trans("MyDashboard"), 0, 1, '', $mainmenu, 'home', 0, '', '', '', ''); // Setup $newmenu->add("/admin/index.php?mainmenu=home&leftmenu=setup", $langs->trans("Setup"), 0, $user->admin, '', $mainmenu, 'setup'); @@ -1639,7 +1639,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { if ($menu_array[$i]['enabled']) // Enabled so visible { - print ''."\n"; + print ''."\n"; $lastlevel0='enabled'; } else if ($showmenu) // Not enabled but visible (so greyed) diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index 51442d54e51..2d41edd2d14 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -200,7 +200,7 @@ class MenuManager print ''; if ($langs->trans(ucfirst($val['mainmenu'])."Dashboard") == ucfirst($val['mainmenu'])."Dashboard") // No translation { - if (in_array($val['mainmenu'], array('cashdesk', 'websites'))) print $langs->trans("Access"); + if (in_array($val['mainmenu'], array('cashdesk', 'externalsite', 'website', 'collab'))) print $langs->trans("Access"); else print $langs->trans("Dashboard"); } else print $langs->trans(ucfirst($val['mainmenu'])."Dashboard"); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index a1172c93890..b1856809856 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1407,7 +1407,7 @@ CompressionOfResources=Compression of HTTP responses CompressionOfResourcesDesc=For exemple using the Apache directive "AddOutputFilterByType DEFLATE" TestNotPossibleWithCurrentBrowsers=Such an automatic detection is not possible with current browsers DefaultValuesDesc=You can define/force here the default value you want to get when your create a new record, and/or defaut filters or sort order when your list record. -DefaultCreateForm=Default values for creation form +DefaultCreateForm=Default values (on forms to create) DefaultSearchFilters=Default search filters DefaultSortOrder=Default sort orders DefaultFocus=Default focus fields diff --git a/htdocs/product/stock/massstockmove.php b/htdocs/product/stock/massstockmove.php index 1ca2b1b16d1..cd1f118fcd4 100644 --- a/htdocs/product/stock/massstockmove.php +++ b/htdocs/product/stock/massstockmove.php @@ -342,7 +342,7 @@ print ''; print ''; -print '
'; +print '
'; print ''; //print '
'; diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index c41577193ca..600d4e06c18 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -260,6 +260,7 @@ if ($action == 'order' && isset($_POST['valid'])) $form = new Form($db); $formproduct = new FormProduct($db); +$prod = new Product($db); $title = $langs->trans('Status'); @@ -480,6 +481,7 @@ if ($sref || $snom || $sall || $salert || $draftorder || GETPOST('search', 'alph ); } +print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print '
'; $param = (isset($type)? '&type=' . $type : ''); @@ -535,9 +537,6 @@ print_liste_field_titre('StockToBuy', $_SERVER["PHP_SELF"], '', $param, '', 'ali print_liste_field_titre('SupplierRef', $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder); print "\n"; -$prod = new Product($db); - -$var = True; while ($i < ($limit ? min($num, $limit) : $num)) { $objp = $db->fetch_object($resql); @@ -564,7 +563,6 @@ while ($i < ($limit ? min($num, $limit) : $num)) if (!empty($objtp->label)) $objp->label = $objtp->label; } } - $var =! $var; if ($usevirtualstock) { @@ -665,34 +663,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) $i++; } print '
'; - - -if ($num > $conf->liste_limit) -{ - if ($sref || $snom || $sall || $salert || $draftorder || GETPOST('search', 'alpha')) - { - $filters = '&sref=' . $sref . '&snom=' . $snom; - $filters .= '&sall=' . $sall; - $filters .= '&salert=' . $salert; - $filters .= '&draftorder=' . $draftorder; - $filters .= '&mode=' . $mode; - $filters .= '&fk_supplier=' . $fk_supplier; - $filters .= '&fk_entrepot=' . $fk_entrepot; - print_barre_liste('', $page, 'replenish.php', $filters, $sortfield, $sortorder, '', $num, 0, ''); - } - else - { - $filters = '&sref=' . $sref . '&snom=' . $snom; - $filters .= '&fourn_id=' . $fourn_id; - $filters .= (isset($type)? '&type=' . $type : ''); - $filters .= '&salert=' . $salert; - $filters .= '&draftorder=' . $draftorder; - $filters .= '&mode=' . $mode; - $filters .= '&fk_supplier=' . $fk_supplier; - $filters .= '&fk_entrepot=' . $fk_entrepot; - print_barre_liste('', $page, 'replenish.php', $filters, $sortfield, $sortorder, '', $num, 0, ''); - } -} +print '
'; $db->free($resql); diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index 22eabef2dfa..eb710ce62a2 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -34,13 +34,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; -$langs->load('projects'); -$langs->load('users'); +$langs->loadLangs(array('projects','users','companies')); $action=GETPOST('action','aZ09'); -$mode=GETPOST("mode"); +$mode=GETPOST("mode",'alpha'); $id=GETPOST('id','int'); -$taskid=GETPOST('taskid'); +$taskid=GETPOST('taskid','int'); $mine=0; if ($mode == 'mine') $mine=1; diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index 161ecd83274..97574ef53b9 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -34,13 +34,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; -$langs->load('projects'); -$langs->load('users'); +$langs->loadLangs(array('projects','users','companies')); $action=GETPOST('action','aZ09'); -$mode=GETPOST("mode"); +$mode=GETPOST("mode",'alpha'); $id=GETPOST('id','int'); -$taskid=GETPOST('taskid'); +$taskid=GETPOST('taskid','int'); $mine=0; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index a2b0da67c0d..ee52662cfcb 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -4775,9 +4775,19 @@ div.tabsElem a.tab { } .lilevel3 { - padding-left: 54px; + padding-left: 44px; background: #fff ! important; } +.lilevel4 +{ + padding-left: 66px; + background: #fff ! important; +} +.lilevel5 +{ + padding-left: 88px; + background: #fff ! important; +} diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 073e861a85b..f8bb78159ce 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -4780,7 +4780,17 @@ border-top-right-radius: 6px; } .lilevel3 { - padding-left: 54px; + padding-left: 44px; + background: #fff ! important; +} +.lilevel4 +{ + padding-left: 66px; + background: #fff ! important; +} +.lilevel5 +{ + padding-left: 88px; background: #fff ! important; } diff --git a/htdocs/variants/list.php b/htdocs/variants/list.php index 2e97dda0a04..74fb252147d 100644 --- a/htdocs/variants/list.php +++ b/htdocs/variants/list.php @@ -57,7 +57,9 @@ $variants = $object->fetchAll(); llxHeader('', $title); -print_fiche_titre($title); +$buttonadd='
'.$langs->trans('Create').''; + +print load_fiche_titre($title, $buttonadd); $forcereloadpage=empty($conf->global->MAIN_FORCE_RELOAD_PAGE)?0:1; ?> @@ -141,11 +143,6 @@ $forcereloadpage=empty($conf->global->MAIN_FORCE_RELOAD_PAGE)?0:1; -