From 6ffdbf91ec57b6b0bc00913785b84d401e9d8517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Wed, 16 Sep 2015 21:35:20 +0200 Subject: [PATCH 1/7] FIX #3533 Load categories language --- htdocs/societe/soc.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index b80f0f2c086..5b0b6968b9e 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1274,6 +1274,8 @@ else // Categories if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) { + $langs->load('categories'); + // Customer if ($object->prospect || $object->client) { print '' . fieldLabel('CustomersCategoriesShort', 'custcats') . ''; From 14b6a74b2d10120bf9b95c574dc35724028fd93f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Sep 2015 14:11:06 +0200 Subject: [PATCH 2/7] Fix javascript error on POS --- htdocs/cashdesk/javascript/dhtml.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/cashdesk/javascript/dhtml.js b/htdocs/cashdesk/javascript/dhtml.js index a2af98d65a8..7f5df55a767 100644 --- a/htdocs/cashdesk/javascript/dhtml.js +++ b/htdocs/cashdesk/javascript/dhtml.js @@ -60,10 +60,10 @@ function afficheDonnees(aId, aTexte) { // aCible : id du bloc de destination; aCode : argument a passer a la page php chargee du traitement et de l'affichage -function verifResultat(aCible, aCode, iLimit = 1) { +function verifResultat(aCible, aCode, iLimit) { if (aCode != '' && aCode.length >= iLimit) { - if (texte = file ('facturation_dhtml.php?code='+escape(aCode))) { + if (texte = file('facturation_dhtml.php?code='+escape(aCode))) { afficheDonnees (aCible, texte); From f72f652d98ba8a9eb53d226e6cbdb615623e7c96 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Sep 2015 15:51:27 +0200 Subject: [PATCH 3/7] FIX Pb into pagination scroll widget FIX Style of previous-next card when using dolidroid --- htdocs/core/class/html.form.class.php | 5 +---- htdocs/core/lib/functions.lib.php | 12 ++++++++---- htdocs/theme/eldy/style.css.php | 26 ++++++++------------------ 3 files changed, 17 insertions(+), 26 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index c732b8cd673..a4716ba40cc 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5061,10 +5061,7 @@ class Form $next_ref = $object->ref_next?''.(empty($conf->dol_use_jmobile)?'>':' ').'':''; //print "xx".$previous_ref."x".$next_ref; - //if ($previous_ref || $next_ref || $morehtml) { - //$ret.='
'; - $ret.='
'; - //} + $ret.='
'; $ret.=dol_htmlentities($object->$fieldref); if ($morehtmlref) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 618de434575..080b4b3bccf 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -768,7 +768,7 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p } else { - $out.=''.$links[$i][1].''."\n"; + $out.=''.$links[$i][1].''."\n"; } } $out.='
'; @@ -2847,7 +2847,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so { if ($totalnboflines) // If we know total nb of lines { - $maxnbofpage=(empty($conf->dol_optimize_smallscreen)?10:3); // nb before and after selected page + $maxnbofpage=(empty($conf->dol_optimize_smallscreen) ? 6 : 3); // nb before and after selected page + ... + first or last $nbpages=ceil($totalnboflines/$conf->liste_limit); $cpt=($page-$maxnbofpage); @@ -2856,8 +2856,10 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so if ($cpt>=1) { $pagelist.= 'dol_use_jmobile)?' class="pagination"':'').'>dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page=0'.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">1'; - if ($cpt >= 2) $pagelist.='
  • ...
  • '; + if ($cpt > 2) $pagelist.='dol_use_jmobile)?' class="pagination"':'').'>dol_use_jmobile)?'class="inactive"':'data-role="button"').'>...'; + else if ($cpt == 2) $pagelist.='dol_use_jmobile)?' class="pagination"':'').'>dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page=1'.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">2'; } + do { if ($cpt==$page) @@ -2871,9 +2873,11 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so $cpt++; } while ($cpt < $nbpages && $cpt<=$page+$maxnbofpage); + if ($cpt<$nbpages) { - if ($cpt<$nbpages-1) $pagelist.= 'dol_use_jmobile)?' class="pagination"':'').'>dol_use_jmobile)?'class="inactive"':'data-role="button"').'>...'; + if ($cpt<$nbpages-2) $pagelist.= 'dol_use_jmobile)?' class="pagination"':'').'>dol_use_jmobile)?'class="inactive"':'data-role="button"').'>...'; + else if ($cpt == $nbpages-2) $pagelist.= 'dol_use_jmobile)?' class="pagination"':'').'>dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.($nbpages-2).$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.($nbpages - 1).''; $pagelist.= 'dol_use_jmobile)?' class="pagination"':'').'>dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.($nbpages-1).$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.$nbpages.''; } } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index b88fcb187de..a3734e1e1ab 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1516,27 +1516,16 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active { text-decoration: none; white-space: nowrap; - /*-moz-border-radius:6px 6px 0px 0px; - -webkit-border-radius:6px 6px 0px 0px; - border-radius:6px 6px 0px 0px; - - background: rgb(); - - border-right: 1px solid #BBB; - border-left: 1px solid #BBB; - border-top: 1px solid #CCC; - */ - border-right: 1px solid transparent; border-left: 1px solid transparent; border-top: 1px solid transparent; + border-bottom: 0px !important; -moz-border-radius:4px 4px 0 0; -webkit-border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0; background-image: none !important; } - .tabactive, a.tab#active { color: # !important; background: rgb() !important; @@ -2072,14 +2061,12 @@ div.pagination li.pagination a, div.pagination li.pagination span { dol_use_jmobile)) { ?> padding: 6px 12px; - + border-color: #ccc; margin-left: -1px; line-height: 1.42857143; color: #000; text-decoration: none; - border-color: #ccc; - background-color: #f5f5f5; background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); @@ -2087,6 +2074,7 @@ div.pagination li.pagination span { background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); background-repeat: repeat-x; + } div.pagination li.pagination span.inactive { cursor: default; @@ -3617,7 +3605,9 @@ ul.ulmenu { color: # !important; text-shadow: 1px 0px 1px #; } - +.ui-btn-icon-right { + border-right: 1px solid #ccc !important; +} .ui-body-c { border: 1px solid #ccc; text-shadow: none; @@ -3641,14 +3631,14 @@ ul.ulmenu { div.tabsElem a.tab { background: transparent; } -.ui-controlgroup-horizontal .ui-btn.ui-first-child { +/*.ui-controlgroup-horizontal .ui-btn.ui-first-child { -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; } .ui-controlgroup-horizontal .ui-btn.ui-last-child { -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; -} +}*/ .alilevel1 { color: # !important; text-shadow: 1px 0px 1px #; From e974b07b09077dbf1d90becc52d33f68a8d0767f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Sep 2015 16:05:38 +0200 Subject: [PATCH 4/7] Fix javascript error --- htdocs/compta/facture.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index f409cbeb815..8972e59eeef 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2187,8 +2187,8 @@ if ($action == 'create') print $desc; print '
    '; - print '    0 ? 'checked':'').' /> "; - print '
        0 ? 'checked':'').' /> "; + print '    0 ? 'checked':'').' /> "; + print '
        0 ? 'checked':'').' /> "; print '
    '; print '
    '; From 8699776930bd77f8c58d673d487d355ef3712c97 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Sep 2015 16:17:52 +0200 Subject: [PATCH 5/7] Better usability with dolidroid --- htdocs/compta/facture.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 8972e59eeef..86d3af1fcf8 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2186,9 +2186,9 @@ if ($action == 'create') $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3); print $desc; - print '
    '; - print '    0 ? 'checked':'').' /> "; - print '
        0 ? 'checked':'').' /> "; + print '
    '; + print '    0 ? 'checked':'').' /> "; + print '
        0 ? 'checked':'').' /> "; print '
    '; print '
    '; From 5f507cbbd864fbe8a0dfa8ae9f450d5f28978a15 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Sep 2015 20:23:06 +0200 Subject: [PATCH 6/7] Fix missing closing div making jmobile crazy --- htdocs/core/lib/functions.lib.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 080b4b3bccf..290cdb2300b 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -807,6 +807,8 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p $out.=""; } + $out.="\n"; + if (! $notab) $out.="\n".'
    '."\n"; return $out; From 378da082bdd01a10be03557e88931d96d773643c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Sep 2015 20:43:10 +0200 Subject: [PATCH 7/7] Fix selector or margin with jmobile --- htdocs/core/tpl/objectline_create.tpl.php | 4 ++-- htdocs/core/tpl/objectline_edit.tpl.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index b1426f4a391..938a615ea77 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -249,7 +249,7 @@ else {
    product->enabled) || ! empty($conf->service->enabled)) { ?> - + "> @@ -552,7 +552,7 @@ jQuery(document).ready(function() { /* Define default price at loading */ var defaultprice = $("#fournprice_predef").find('option:selected').attr("price"); - $("#buying_price").val(defaultprice); + $("#buying_price").val(Math.round(defaultprice,global->MAIN_MAX_DECIMALS_UNIT ? $conf->global->MAIN_MAX_DECIMALS_UNIT : 5); ?>)); $("#fournprice_predef").change(function() { /* Hide field buying_price according to choice into list (if 'inputprice' or not) */ diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 4b024175423..d61831cfec2 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -172,7 +172,7 @@ $coldisplay=-1; // We remove first td product->enabled) || ! empty($conf->service->enabled)) { ?> - +