diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 9c77da6776588acfe9cb0f2220ef4cd046736496..b2cae60f115a93fa10060a2151ff44dc1b4b761d 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -9,7 +9,7 @@ * Copyright (C) 2010-2011 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or @@ -2124,8 +2124,9 @@ else if ($action != 'presend') { - print '<table width="100%"><tr><td width="50%" valign="top">'; - print '<a name="builddoc"></a>'; // ancre + print '<div class="fichecenter"><div class="fichehalfleft">'; + //print '<table width="100%"><tr><td width="50%" valign="top">'; + //print '<a name="builddoc"></a>'; // ancre /* @@ -2147,14 +2148,19 @@ else */ $somethingshown=$object->showLinkedObjectBlock(); - print '</td><td valign="top" width="50%">'; + + print '</div><div class="fichehalfright"><div class="ficheaddleft">'; + //print '</td><td valign="top" width="50%">'; + // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions=new FormActions($db); $somethingshown=$formactions->showactions($object,'propal',$socid); - print '</td></tr></table>'; + + //print '</td></tr></table>'; + print '</div></div></div>'; } diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 1588a0761d3ac433312e13b1b9ad9b95267a81b5..7f92b7e65c0d6d5a6495401cbd9b9a6bccc01cc8 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -269,7 +269,8 @@ if ($socid > 0) print_fiche_titre($langs->trans("NewGlobalDiscount"),'',''); print '<table class="border" width="100%">'; print '<tr><td width="38%">'.$langs->trans("AmountHT").'</td>'; - print '<td><input type="text" size="5" name="amount_ht" value="'.$_POST["amount_ht"].'"> '.$langs->trans("Currency".$conf->currency).'</td></tr>'; + print '<td><input type="text" size="5" name="amount_ht" value="'.$_POST["amount_ht"].'">'; + print '<span class="hideonsmartphone"> '.$langs->trans("Currency".$conf->currency).'</span></td></tr>'; print '<tr><td width="38%">'.$langs->trans("VAT").'</td>'; print '<td>'; print $form->load_tva('tva_tx',GETPOST('tva_tx'),$mysoc,$objsoc); diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 150a55923dd34e3a06d7cea190023c29da61eaf9..b8658408e487afb3409ede6d1d54c7ba2b80f8ad 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -9,17 +9,17 @@ * Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr> * Copyright (C) 2012 Marcos GarcĂa <marcosgdf@gmail.com> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -272,7 +272,7 @@ else if ($action == 'add' && $user->rights->commande->creer) { $object->linked_objects = array_merge($object->linked_objects, $other_linked_objects); } - + // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost($extralabels,$object); @@ -373,7 +373,7 @@ else if ($action == 'add' && $user->rights->commande->creer) { // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost($extralabels,$object); - + $object_id = $object->create($user); // If some invoice's lines already known @@ -2441,13 +2441,13 @@ else if ($action != 'presend') { - print '<table width="100%"><tr><td width="50%" valign="top">'; - print '<a name="builddoc"></a>'; // ancre + print '<div class="fichecenter"><div class="fichehalfleft">'; + //print '<table width="100%"><tr><td width="50%" valign="top">'; + //print '<a name="builddoc"></a>'; // ancre /* * Documents generes - * - */ + */ $comref = dol_sanitizeFileName($object->ref); $file = $conf->commande->dir_output . '/' . $comref . '/' . $comref . '.pdf'; $relativepath = $comref.'/'.$comref.'.pdf'; @@ -2461,17 +2461,19 @@ else /* * Linked object block - */ + */ $somethingshown=$object->showLinkedObjectBlock(); - print '</td><td valign="top" width="50%">'; + print '</div><div class="fichehalfright"><div class="ficheaddleft">'; + //print '</td><td valign="top" width="50%">'; // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions=new FormActions($db); $somethingshown=$formactions->showactions($object,'order',$socid); - print '</td></tr></table>'; + //print '</td></tr></table>'; + print '</div></div></div>'; } diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 3cc3677d30137f02ab7a9dff852c5c02cf005f71..76ecaa5b1ade55cc2c2760e65422512eca01381c 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2122,7 +2122,7 @@ if ($action == 'create') } $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); print $doleditor->Create(1); - + //print '<textarea name="note_public" wrap="soft" cols="70" rows="'.ROWS_3.'">'.$note_public.'</textarea></td></tr>'; // Private note @@ -3444,8 +3444,9 @@ else if ($id > 0 || ! empty($ref)) if ($action != 'prerelance' && $action != 'presend') { - print '<table width="100%"><tr><td width="50%" valign="top">'; - print '<a name="builddoc"></a>'; // ancre + print '<div class="fichecenter"><div class="fichehalfleft">'; + //print '<table width="100%"><tr><td width="50%" valign="top">'; + //print '<a name="builddoc"></a>'; // ancre /* * Documents generes @@ -3472,7 +3473,8 @@ else if ($id > 0 || ! empty($ref)) print showPaypalPaymentUrl('invoice',$object->ref); } - print '</td><td valign="top" width="50%">'; + print '</div><div class="fichehalfright"><div class="ficheaddleft">'; + //print '</td><td valign="top" width="50%">'; print '<br>'; @@ -3481,7 +3483,8 @@ else if ($id > 0 || ! empty($ref)) $formactions=new FormActions($db); $somethingshown=$formactions->showactions($object,'invoice',$socid); - print '</td></tr></table>'; + //print '</td></tr></table>'; + print '</div></div></div>'; } else { diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 124447bb81c1b571c2cffad9364c6762f5e0b9ea..013d80e350f21163fcb8fa03d14f3dbacbda7bf1 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1418,7 +1418,7 @@ abstract class CommonObject dol_syslog(get_class($this)."::upate_note Parameter suffix must be empty, '_private' or '_public'", LOG_ERR); return -2; } - + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; $sql.= " SET note".$suffix." = ".(!empty($note)?("'".$this->db->escape($note)."'"):"NULL"); $sql.= " WHERE rowid =". $this->id; @@ -1441,7 +1441,7 @@ abstract class CommonObject /** * Update public note (kept for backward compatibility) - * + * * @param string $note New value for note * @return int <0 if KO, >0 if OK * @deprecated @@ -1450,7 +1450,7 @@ abstract class CommonObject { return $this->update_note($note,'_public'); } - + /** * Update total_ht, total_ttc and total_vat for an object (sum of lines) * @@ -2702,31 +2702,47 @@ abstract class CommonObject global $conf,$langs,$hookmanager; print '<tr class="liste_titre nodrag nodrop">'; - if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) - { - print '<td align="center" width="5"> </td>'; - } + + if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) print '<td align="center" width="5"> </td>'; + + // Description print '<td>'.$langs->trans('Description').'</td>'; + + // VAT print '<td align="right" width="50">'.$langs->trans('VAT').'</td>'; + + // Price HT print '<td align="right" width="80">'.$langs->trans('PriceUHT').'</td>'; - if ($conf->global->MAIN_FEATURES_LEVEL > 1) - print '<td align="right" width="80"> </td>'; + + if ($conf->global->MAIN_FEATURES_LEVEL > 1) print '<td align="right" width="80"> </td>'; + + // Qty print '<td align="right" width="50">'.$langs->trans('Qty').'</td>'; + + // Reduction short print '<td align="right" width="50">'.$langs->trans('ReductionShort').'</td>'; + if (! empty($conf->margin->enabled)) { if ($conf->global->MARGIN_TYPE == "1") print '<td align="right" width="80">'.$langs->trans('BuyingPrice').'</td>'; else print '<td align="right" width="80">'.$langs->trans('CostPrice').'</td>'; + if (! empty($conf->global->DISPLAY_MARGIN_RATES)) print '<td align="right" width="50">'.$langs->trans('MarginRate').'</td>'; if (! empty($conf->global->DISPLAY_MARK_RATES)) print '<td align="right" width="50">'.$langs->trans('MarkRate').'</td>'; } + + // Total HT print '<td align="right" width="50">'.$langs->trans('TotalHTShort').'</td>'; - print '<td width="10"> </td>'; - print '<td width="10"> </td>'; - print '<td nowrap="nowrap"> </td>'; // No width to allow autodim + + print '<td width="10"></td>'; + + print '<td width="10"></td>'; + + print '<td nowrap="nowrap"></td>'; // No width to allow autodim + print "</tr>\n"; $num = count($this->lines); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index d1e6f216b2ed2460eb382a2922b429e92fb0313c..7ea8087613ea75046f5dbd9c70d1a9a2bd4f641b 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1216,9 +1216,14 @@ function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ=" } } - if (! empty($addlink)) + if (! empty($addlink)) // Link on phone number + link to add action (if conf->global->AGENDA_ADDACTIONFORPHONE set) { - if (! empty($conf->clicktodial->enabled) && $addlink == 'AC_TEL') + if (! empty($conf->browser)) // If phone, we use link of phone + { + $newphone ='<a href="tel:'.$phone.'"'; + $newphone.='>'.$phone.'</a>'; + } + else if (! empty($conf->clicktodial->enabled) && $addlink == 'AC_TEL') // If click to dial, we use click to dial url { if (empty($user->clicktodial_loaded)) $user->fetch_clicktodial(); diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index ac8140a2239464e1e423eb159cee32cc3faf83b4..7f4be0bc8a3369957ab9c5e543e51510835592b0 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -438,7 +438,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t // Tick to drag and drop if ($addordertick) { - print '<td align="center" class="tdlineupdown"> </td>'; + print '<td align="center" class="tdlineupdown hideonsmartphone"> </td>'; } print "</tr>\n"; @@ -459,13 +459,16 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t if ($total>0) { - print '<tr class="liste_total"><td class="liste_total">'.$langs->trans("Total").'</td>'; + print '<tr class="liste_total">'; + print '<td class="liste_total">'.$langs->trans("Total").'</td>'; if ($showproject) print '<td></td>'; print '<td></td>'; print '<td></td>'; print '<td></td>'; print '<td></td>'; - print '<td align="right" nowrap="nowrap" class="liste_total">'.convertSecondToTime($total).'</td></tr>'; + if ($addordertick) print '<td class="hideonsmartphone"></td>'; + print '<td align="right" nowrap="nowrap" class="liste_total">'.convertSecondToTime($total).'</td>'; + print '</tr>'; } return $inc; diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index 051f4f98071ea57236d576aa9fddc79d292c7561..059cf7b83d421447968507f9e93a0d28908c3596 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -125,8 +125,8 @@ <?php if (! empty($conf->global->DISPLAY_MARGIN_RATES)) {?> <td align="right" nowrap="nowrap"><?php echo (($line->pa_ht == 0)?'n/a':price($line->marge_tx).'%'); ?></td> <?php - } - if (! empty($conf->global->DISPLAY_MARK_RATES)) {?> + } + if (! empty($conf->global->DISPLAY_MARK_RATES)) {?> <td align="right" nowrap="nowrap"><?php echo price($line->marque_tx).'%'; ?></td> <?php } } ?> @@ -152,7 +152,7 @@ </a> </td> - <?php if ($num > 1) { ?> + <?php if ($num > 1 && empty($conf->browser->phone)) { ?> <td align="center" class="tdlineupdown"> <?php if ($i > 0) { ?> <a class="lineupdown" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=up&rowid='.$line->id; ?>"> @@ -166,10 +166,10 @@ <?php } ?> </td> <?php } else { ?> - <td align="center" class="tdlineupdown"> </td> + <td align="center"<?php echo (empty($conf->browser->phone)?' class="tdlineupdown"':''); ?>></td> <?php } ?> <?php } else { ?> - <td colspan="3"> </td> + <td colspan="3"></td> <?php } ?> </tr> diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 4e8b9e2b1d82205588218be1ca9b42ea053d5cbd..70fed335c9358ba65da5efff9b9142593224a88c 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -1442,7 +1442,9 @@ else if ($id > 0 || ! empty($ref)) if ($action != 'presend') { - print '<table width="100%"><tr><td width="50%" valign="top">'; + print '<div class="fichecenter"><div class="fichehalfleft">'; + //print '<table width="100%"><tr><td width="50%" valign="top">'; + /* * Built documents */ @@ -1464,14 +1466,16 @@ else if ($id > 0 || ! empty($ref)) */ $somethingshown=$object->showLinkedObjectBlock(); - print '</td><td valign="top" width="50%">'; + //print '</td><td valign="top" width="50%">'; + print '</div><div class="fichehalfright"><div class="ficheaddleft">'; + // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions=new FormActions($db); $somethingshown=$formactions->showactions($object,'fichinter',$socid); - print "</td><td>"; - print " </td>"; - print "</tr></table>\n"; + + print '</div></div></div>'; + //print "</td></tr></table>\n"; } diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 6d405305d6a3ef6004de5e3cbd7b8130493d6c6a..a97148ab53122f55c9cd007b1b965807d1073087 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2004-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es> @@ -999,7 +999,7 @@ if ($action=="create") print '</tr>'; print '</td></tr>'; - + print '<tr><td>'.$langs->trans('NotePublic').'</td>'; print '<td>'; $doleditor = new DolEditor('note_public', GETPOST('note_public'), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); @@ -1016,7 +1016,7 @@ if ($action=="create") //print '<td><textarea name="note_private" wrap="soft" cols="60" rows="'.ROWS_5.'"></textarea></td>'; print '</tr>'; - + // Other options $parameters=array(); @@ -1516,7 +1516,7 @@ elseif (! empty($object->id)) $parameters=array('fk_parent_line'=>$line->fk_parent_line, 'line'=>$line,'var'=>$var,'num'=>$num,'i'=>$i); $reshook=$hookmanager->executeHooks('formEditProductOptions',$parameters,$object,$action); } - + $nbrows=ROWS_2; if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; $doleditor=new DolEditor('eldesc',$line->description,'',200,'dolibarr_details','',false,true,$conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); @@ -1671,7 +1671,7 @@ elseif (! empty($object->id)) */ if ($user->societe_id == 0 && $action != 'editline' && $action != 'delete') { - print '<div class="tabsAction">'; + print '<div class="tabsAction">'; // Validate if ($object->statut == 0 && $num > 0) @@ -1763,8 +1763,9 @@ elseif (! empty($object->id)) print "</div>"; } - print '<table width="100%"><tr><td width="50%" valign="top">'; - print '<a name="builddoc"></a>'; // ancre + print '<div class="fichecenter"><div class="fichehalfleft">'; + //print '<table width="100%"><tr><td width="50%" valign="top">'; + //print '<a name="builddoc"></a>'; // ancre /* * Documents generes @@ -1785,7 +1786,8 @@ elseif (! empty($object->id)) */ $somethingshown=$object->showLinkedObjectBlock(); - print '</td><td valign="top" width="50%">'; + //print '</td><td valign="top" width="50%">'; + print '</div><div class="fichehalfright"><div class="ficheaddleft">'; if ($user->rights->fournisseur->commande->commander && $object->statut == 2) { @@ -1853,7 +1855,8 @@ elseif (! empty($object->id)) $somethingshown=$formactions->showactions($object,'order_supplier',$socid); */ - print '</td></tr></table>'; + print '</div></div></div>'; + //print '</td></tr></table>'; } /* diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 0264b6b3c3a0a7ef0aeb58ff9cc2db9b309b5ca6..3c9b268e49209567a788ceed630474b61f63157c 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -2057,8 +2057,9 @@ else if ($action != 'edit') { - print '<table width="100%"><tr><td width="50%" valign="top">'; - print '<a name="builddoc"></a>'; // ancre + print '</div><div class="fichehalfright"><div class="ficheaddleft">'; + //print '<table width="100%"><tr><td width="50%" valign="top">'; + //print '<a name="builddoc"></a>'; // ancre /* * Documents generes @@ -2081,15 +2082,17 @@ else */ $somethingshown=$object->showLinkedObjectBlock(); - print '</td><td valign="top" width="50%">'; - print '<br>'; + print '</div><div class="fichehalfright"><div class="ficheaddleft">'; + //print '</td><td valign="top" width="50%">'; + //print '<br>'; // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions=new FormActions($db); $somethingshown=$formactions->showactions($object,'invoice_supplier',$socid); - print '</td></tr></table>'; + print '</div></div></div>'; + //print '</td></tr></table>'; } } /*