From 8cfac3b5c3875fc9fa7e54a3062711e1fa1cfa7c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Wed, 31 Aug 2016 12:38:54 +0200 Subject: [PATCH] FIX Several problems when using smartphone --- htdocs/cashdesk/tpl/menu.tpl.php | 4 +-- htdocs/comm/index.php | 2 +- htdocs/compta/facture/info.php | 1 + htdocs/compta/index.php | 2 +- htdocs/core/menus/standard/auguria_menu.php | 6 ++++- htdocs/core/menus/standard/eldy_menu.php | 6 ++++- htdocs/don/index.php | 2 +- htdocs/hrm/hrm.php | 2 +- htdocs/langs/en_US/cashdesk.lang | 2 +- htdocs/langs/en_US/companies.lang | 4 +-- htdocs/product/index.php | 2 +- htdocs/projet/activity/index.php | 2 +- htdocs/projet/index.php | 2 +- htdocs/societe/index.php | 2 +- htdocs/societe/notify/card.php | 8 +++--- htdocs/societe/project.php | 1 + htdocs/theme/eldy/style.css.php | 27 ++++++++++++++++++--- 17 files changed, 53 insertions(+), 22 deletions(-) diff --git a/htdocs/cashdesk/tpl/menu.tpl.php b/htdocs/cashdesk/tpl/menu.tpl.php index 745ea723b49..75347427bda 100644 --- a/htdocs/cashdesk/tpl/menu.tpl.php +++ b/htdocs/cashdesk/tpl/menu.tpl.php @@ -62,9 +62,9 @@ $langs->load("main"); print '<div class="menu_bloc">'; print '<ul class="menu">'; // Link to new sell -print '<li class="menu_choix1"><a href="affIndex.php?menutpl=facturation&id=NOUV"><span>'.$langs->trans("NewSell").'</span></a></li>'; +print '<li class="menu_choix1"><a href="affIndex.php?menutpl=facturation&id=NOUV"><span class="hideonsmartphone">'.$langs->trans("NewSell").'</span></a></li>'; // Open new tab on backoffice (this is not a disconnect from POS) -print '<li class="menu_choix2"><a href=".." target="backoffice"><span>'.$langs->trans("BackOffice").'</span></a></li>'; +print '<li class="menu_choix2"><a href=".." target="backoffice"><span class="hideonsmartphone">'.$langs->trans("BackOffice").'</span></a></li>'; // Disconnect print '<li class="menu_choix0">'.$langs->trans("User").': '.$_SESSION['firstname'].' '.$_SESSION['lastname']; print ' <a href="deconnexion.php">'.img_picto($langs->trans('Logout'), 'logout.png').'</a><br>'; diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index a205ff54d1a..7c6b3622920 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -118,7 +118,7 @@ if (count($listofsearchfields)) { if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; print '<tr '.$bc[false].'>'; - print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>'; + print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>'; if ($i == 0) print '<td class="noborderbottom" rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button "></td>'; print '</tr>'; $i++; diff --git a/htdocs/compta/facture/info.php b/htdocs/compta/facture/info.php index 250848319f3..18d585291ce 100644 --- a/htdocs/compta/facture/info.php +++ b/htdocs/compta/facture/info.php @@ -28,6 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; +$langs->load("companies"); $langs->load("bills"); diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 35a56e5afb3..1dd1c46299a 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -117,7 +117,7 @@ if (count($listofsearchfields)) { if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; print '<tr '.$bc[false].'>'; - print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="14"></td>'; + print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="14"></td>'; if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>'; print '</tr>'; $i++; diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index 736f2a72380..5402ac5bbd1 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -177,7 +177,11 @@ class MenuManager // We add sub entry print str_pad('',1).'<li data-role="list-dividerxxx" class="lilevel1 ui-btn-icon-right ui-btn">'; // ui-btn to highlight on clic print '<a href="'.$relurl.'">'; - if ($langs->trans(ucfirst($val['mainmenu'])."Dashboard") == ucfirst($val['mainmenu'])."Dashboard") print $langs->trans("Access"); // No translation + if ($langs->trans(ucfirst($val['mainmenu'])."Dashboard") == ucfirst($val['mainmenu'])."Dashboard") // No translation + { + if ($val['mainmenu'] == 'cashdesk') print $langs->trans("Access"); + else print $langs->trans("Dashboard"); + } else print $langs->trans(ucfirst($val['mainmenu'])."Dashboard"); print '</a>'; print '</li>'."\n"; diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index 0d43c0af9f9..5800e4b5d7a 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -185,7 +185,11 @@ class MenuManager print '<a href="'.$relurl.'"'; //print ' data-ajax="false"'; print '>'; - if ($langs->trans(ucfirst($val['mainmenu'])."Dashboard") == ucfirst($val['mainmenu'])."Dashboard") print $langs->trans("Access"); // No translation + if ($langs->trans(ucfirst($val['mainmenu'])."Dashboard") == ucfirst($val['mainmenu'])."Dashboard") // No translation + { + if ($val['mainmenu'] == 'cashdesk') print $langs->trans("Access"); + else print $langs->trans("Dashboard"); + } else print $langs->trans(ucfirst($val['mainmenu'])."Dashboard"); print '</a>'; print '</li>'."\n"; diff --git a/htdocs/don/index.php b/htdocs/don/index.php index 6d0b9a7fafa..9894de3a2b5 100644 --- a/htdocs/don/index.php +++ b/htdocs/don/index.php @@ -96,7 +96,7 @@ if (count($listofsearchfields)) { if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; print '<tr '.$bc[false].'>'; - print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="14"></td>'; + print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="14"></td>'; if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>'; print '</tr>'; $i++; diff --git a/htdocs/hrm/hrm.php b/htdocs/hrm/hrm.php index cc2366d7e4c..1eaa45de97d 100644 --- a/htdocs/hrm/hrm.php +++ b/htdocs/hrm/hrm.php @@ -97,7 +97,7 @@ if (count($listofsearchfields)) { if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; print '<tr '.$bc[false].'>'; - print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>'; + print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>'; if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>'; print '</tr>'; $i++; diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index 7b80d1a6f47..a797b8d9756 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -15,7 +15,7 @@ NewSell=New sell BackOffice=Back office AddThisArticle=Add this article RestartSelling=Go back on sell -SellFinished=Sell finished +SellFinished=Sale complete PrintTicket=Print ticket NoProductFound=No article found ProductFound=product found diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 76bf2961c62..22a7844ee07 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -354,9 +354,9 @@ ExportCardToFormat=Export card to format ContactNotLinkedToCompany=Contact not linked to any third party DolibarrLogin=Dolibarr login NoDolibarrAccess=No Dolibarr access -ExportDataset_company_1=Third parties (Companies/foundations/physical people) and properties +ExportDataset_company_1=Third parties (Companies / foundations / physical people) and properties ExportDataset_company_2=Contacts and properties -ImportDataset_company_1=Third parties (Companies/foundations/physical people) and properties +ImportDataset_company_1=Third parties (Companies / foundations / physical people) and properties ImportDataset_company_2=Contacts/Addresses (of thirdparties or not) and attributes ImportDataset_company_3=Bank details ImportDataset_company_4=Third parties/Sales representatives (Affect sales representatives users to companies) diff --git a/htdocs/product/index.php b/htdocs/product/index.php index a0306af338e..f31159e044d 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -96,7 +96,7 @@ if (count($listofsearchfields)) { if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; print '<tr '.$bc[false].'>'; - print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>'; + print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>'; if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>'; print '</tr>'; $i++; diff --git a/htdocs/projet/activity/index.php b/htdocs/projet/activity/index.php index b9c8e455751..adf6efbc95c 100644 --- a/htdocs/projet/activity/index.php +++ b/htdocs/projet/activity/index.php @@ -90,7 +90,7 @@ if (count($listofsearchfields)) { if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; print '<tr '.$bc[false].'>'; - print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>'; + print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>'; if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>'; print '</tr>'; $i++; diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index 1b0dec4d9f8..752e3615464 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -114,7 +114,7 @@ if (count($listofsearchfields)) { if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; print '<tr '.$bc[false].'>'; - print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>'; + print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>'; if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>'; print '</tr>'; $i++; diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index 1cc44777438..02b1fb94448 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -79,7 +79,7 @@ if (count($listofsearchfields)) { if ($i == 0) print '<tr class="liste_titre"><th colspan="3">'.$langs->trans("Search").'</th></tr>'; print '<tr '.$bc[false].'>'; - print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>'; + print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>'; if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>'; print '</tr>'; $i++; diff --git a/htdocs/societe/notify/card.php b/htdocs/societe/notify/card.php index d90d978e7d4..b1fd1bb585c 100644 --- a/htdocs/societe/notify/card.php +++ b/htdocs/societe/notify/card.php @@ -238,11 +238,11 @@ if ($result > 0) $label=($langs->trans("Notify_".$managedeventfornotification['code'])!="Notify_".$managedeventfornotification['code']?$langs->trans("Notify_".$managedeventfornotification['code']):$managedeventfornotification['label']); $actions[$managedeventfornotification['rowid']]=$label; } - print '<tr '.$bc[$var].'><td>'; - print $form->selectarray("contactid",$listofemails); + print '<tr '.$bc[$var].'><td class="maxwidthonsmartphone">'; + print $form->selectarray("contactid", $listofemails, '', 0, 0, 0, '', 0, 0, 0, '', 'maxwidthonsmartphone'); print '</td>'; - print '<td>'; - print $form->selectarray("actionid",$actions,'',1); + print '<td class="maxwidthonsmartphone">'; + print $form->selectarray("actionid", $actions, '', 1, 0, 0, '', 0, 0, 0, '', 'maxwidthonsmartphone'); print '</td>'; print '<td>'; $type=array('email'=>$langs->trans("EMail")); diff --git a/htdocs/societe/project.php b/htdocs/societe/project.php index 707fe21a010..f99bd517975 100644 --- a/htdocs/societe/project.php +++ b/htdocs/societe/project.php @@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $langs->load("companies"); +$langs->load("projects"); // Security check $socid = GETPOST('socid','int'); diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 9b4a1addc78..d9df3205c68 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -4310,7 +4310,6 @@ border-top-right-radius: 6px; .menu_choix1 a { background: url('<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus_black/money.png',1) ?>') top left no-repeat; } - .menu_choix2 a { background: url('<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus_black/home.png',1) ?>') top left no-repeat; } @@ -4327,12 +4326,34 @@ border-top-right-radius: 6px; padding-top: 18px; padding-left: 54px; font-size: 14px; - height: 40px; + height: 38px; } .menu_choix1 a:hover,.menu_choix2 a:hover { color: #6d3f6d; } - +.menu li.menu_choix1 { + padding-top: 6px; + padding-right: 10px; +} +.menu li.menu_choix2 { + padding-top: 6px; + padding-right: 10px; +} +@media only screen and (max-width: 767px) +{ + .menu_choix1 a, .menu_choix2 a { + background-size: 30px 30px; + height: 30px; + padding-left: 40px; + } + .menu li.menu_choix1, .menu li.menu_choix2 { + padding-left: 4px; + padding-right: 0; + } + .liste_articles { + margin-right: 0 !important; + } +} /* ============================================================================== */ -- GitLab