Fix responsive

This commit is contained in:
Laurent Destailleur
2019-12-04 15:09:20 +01:00
parent 9878eddd75
commit bde917d7fc
6 changed files with 23 additions and 26 deletions

View File

@@ -3550,7 +3550,7 @@ class Form
$return = ''; $return = '';
$return .= '<select class="flat" id="select_'.$htmlname.'" name="'.$htmlname.'">'; $return .= '<select class="flat maxwidth75" id="select_'.$htmlname.'" name="'.$htmlname.'">';
$options = array( $options = array(
'HT'=>$langs->trans("HT"), 'HT'=>$langs->trans("HT"),
'TTC'=>$langs->trans("TTC") 'TTC'=>$langs->trans("TTC")

View File

@@ -8372,6 +8372,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
} }
$class = 'btnTitle'; $class = 'btnTitle';
// hidden conf keep during button transition TODO: remove this block // hidden conf keep during button transition TODO: remove this block
if (!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)) { if (!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)) {
$class = 'butActionNew'; $class = 'butActionNew';
@@ -8446,10 +8447,9 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
$tag = (empty($attr['href']) ? 'span' : 'a'); $tag = (empty($attr['href']) ? 'span' : 'a');
$button = '<'.$tag.' '.$compiledAttributes.' >'; $button = '<'.$tag.' '.$compiledAttributes.' >';
$button .= '<span class="'.$iconClass.' valignmiddle btnTitle-icon"></span>'; $button .= '<span class="'.$iconClass.' valignmiddle btnTitle-icon"></span>';
$button .= '<span class="valignmiddle text-plus-circle btnTitle-label">'.$label.'</span>'; $button .= '<span class="valignmiddle text-plus-circle btnTitle-label'.(empty($params['forcenohideoftext']) ? ' hideonsmartphone' : '').'">'.$label.'</span>';
$button .= '</'.$tag.'>'; $button .= '</'.$tag.'>';
// hidden conf keep during button transition TODO: remove this block // hidden conf keep during button transition TODO: remove this block

View File

@@ -1023,7 +1023,9 @@ else
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php';
$formbarcode = new FormBarCode($db); $formbarcode = new FormBarCode($db);
print $formbarcode->selectBarcodeType($fk_barcode_type, 'fk_barcode_type', 1); print $formbarcode->selectBarcodeType($fk_barcode_type, 'fk_barcode_type', 1);
print '</td><td>'.$langs->trans("BarcodeValue").'</td><td>'; print '</td>';
if ($conf->browser->layout == 'phone') print '</tr><tr>';
print '<td>'.$langs->trans("BarcodeValue").'</td><td>';
$tmpcode = isset($_POST['barcode']) ?GETPOST('barcode') : $object->barcode; $tmpcode = isset($_POST['barcode']) ?GETPOST('barcode') : $object->barcode;
if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) $tmpcode = $modBarCodeProduct->getNextValue($object, $type); if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) $tmpcode = $modBarCodeProduct->getNextValue($object, $type);
print '<input class="maxwidth100" type="text" name="barcode" value="'.dol_escape_htmltag($tmpcode).'">'; print '<input class="maxwidth100" type="text" name="barcode" value="'.dol_escape_htmltag($tmpcode).'">';
@@ -1052,10 +1054,13 @@ else
print '<span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddWarehouse").'"></span>'; print '<span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddWarehouse").'"></span>';
print '</a>'; print '</a>';
print '</td>'; print '</td>';
print '</tr>';
// Stock min level // Stock min level
print '<tr><td>'.$form->textwithpicto($langs->trans("StockLimit"), $langs->trans("StockLimitDesc"), 1).'</td><td>'; print '<tr><td>'.$form->textwithpicto($langs->trans("StockLimit"), $langs->trans("StockLimitDesc"), 1).'</td><td>';
print '<input name="seuil_stock_alerte" class="maxwidth50" value="'.GETPOST('seuil_stock_alerte').'">'; print '<input name="seuil_stock_alerte" class="maxwidth50" value="'.GETPOST('seuil_stock_alerte').'">';
print '</td>'; print '</td>';
if ($conf->browser->layout == 'phone') print '</tr><tr>';
// Stock desired level // Stock desired level
print '<td>'.$form->textwithpicto($langs->trans("DesiredStock"), $langs->trans("DesiredStockDesc"), 1).'</td><td>'; print '<td>'.$form->textwithpicto($langs->trans("DesiredStock"), $langs->trans("DesiredStockDesc"), 1).'</td><td>';
print '<input name="desiredstock" class="maxwidth50" value="'.GETPOST('desiredstock').'">'; print '<input name="desiredstock" class="maxwidth50" value="'.GETPOST('desiredstock').'">';
@@ -1094,9 +1099,9 @@ else
if (empty($conf->global->PRODUCT_DISABLE_SIZE)) if (empty($conf->global->PRODUCT_DISABLE_SIZE))
{ {
print '<tr><td>'.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").'</td><td colspan="3">'; print '<tr><td>'.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").'</td><td colspan="3">';
print '<input name="size" size="4" value="'.GETPOST('size').'"> x '; print '<input name="size" class="width50" value="'.GETPOST('size').'"> x ';
print '<input name="sizewidth" size="4" value="'.GETPOST('sizewidth').'"> x '; print '<input name="sizewidth" class="width50" value="'.GETPOST('sizewidth').'"> x ';
print '<input name="sizeheight" size="4" value="'.GETPOST('sizeheight').'">'; print '<input name="sizeheight" class="width50" value="'.GETPOST('sizeheight').'">';
print $formproduct->selectMeasuringUnits("size_units", "size", GETPOSTISSET('size_units') ?GETPOST('size_units', 'alpha') : '0', 0, 2); print $formproduct->selectMeasuringUnits("size_units", "size", GETPOSTISSET('size_units') ?GETPOST('size_units', 'alpha') : '0', 0, 2);
print '</td></tr>'; print '</td></tr>';
} }
@@ -1140,8 +1145,10 @@ else
if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO) && empty($type)) if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO) && empty($type))
{ {
print '<tr><td>'.$langs->trans("CustomCode").'</td><td><input name="customcode" class="maxwidth100onsmartphone" value="'.GETPOST('customcode').'"></td>'; print '<tr><td>'.$langs->trans("CustomCode").'</td><td><input name="customcode" class="maxwidth100onsmartphone" value="'.GETPOST('customcode').'"></td>';
if ($conf->browser->layout == 'phone') print '</tr><tr>';
// Origin country // Origin country
print '<td>'.$langs->trans("CountryOrigin").'</td><td>'; print '<td>'.$langs->trans("CountryOrigin").'</td>';
print '<td>';
print $form->select_country(GETPOST('country_id', 'int'), 'country_id'); print $form->select_country(GETPOST('country_id', 'int'), 'country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print '</td></tr>'; print '</td></tr>';

View File

@@ -481,19 +481,21 @@ if ($resql)
$massactionbutton = $form->selectMassAction('', $arrayofmassactions); $massactionbutton = $form->selectMassAction('', $arrayofmassactions);
$newcardbutton = ''; $newcardbutton = '';
$rightskey = 'produit'; if ($type === "") $perm = ($user->rights->produit->creer || $user->rights->service->creer);
if ($type == Product::TYPE_SERVICE) $rightskey = 'service'; elseif ($type == Product::TYPE_SERVICE) $perm = $user->rights->service->creer;
if ($user->rights->{$rightskey}->creer) elseif ($type == Product::TYPE_PRODUCT) $perm = $user->rights->produit->creer;
if ($perm)
{ {
$oldtype = $type; $oldtype = $type;
$params = array();
if ($type === "") $params['forcenohideoftext']=1;
if ($type === "") { if ($type === "") {
$newcardbutton .= dolGetButtonTitle($langs->trans('NewProduct'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&amp;type=0'); $newcardbutton .= dolGetButtonTitle($langs->trans('NewProduct'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type=0', '', 1, $params);
$type = Product::TYPE_SERVICE; $type = Product::TYPE_SERVICE;
} }
$label = 'NewProduct'; $label = 'NewProduct';
if ($type == Product::TYPE_SERVICE) $label = 'NewService'; if ($type == Product::TYPE_SERVICE) $label = 'NewService';
$newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&amp;type='.$type); $newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type='.$type, '', 1, $params);
$type = $oldtype; $type = $oldtype;
} }

View File

@@ -5951,17 +5951,9 @@ div.tabsElem a.tab {
font-size: 12px; font-size: 12px;
} }
.text-plus-circle {
display: none;
}
table.table-fiche-title .col-title div.titre{ table.table-fiche-title .col-title div.titre{
line-height: unset; line-height: unset;
} }
.btnTitle-label {
display: none;
}
} }
<?php <?php

View File

@@ -6041,10 +6041,6 @@ border-top-right-radius: 6px;
table.table-fiche-title .col-title div.titre{ table.table-fiche-title .col-title div.titre{
line-height: unset; line-height: unset;
} }
.btnTitle-label {
display: none;
}
} }