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 .= '<select class="flat" id="select_'.$htmlname.'" name="'.$htmlname.'">';
$return .= '<select class="flat maxwidth75" id="select_'.$htmlname.'" name="'.$htmlname.'">';
$options = array(
'HT'=>$langs->trans("HT"),
'TTC'=>$langs->trans("TTC")

View File

@@ -8372,6 +8372,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
}
$class = 'btnTitle';
// hidden conf keep during button transition TODO: remove this block
if (!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)) {
$class = 'butActionNew';
@@ -8446,10 +8447,9 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
$tag = (empty($attr['href']) ? 'span' : 'a');
$button = '<'.$tag.' '.$compiledAttributes.' >';
$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.'>';
// 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';
$formbarcode = new FormBarCode($db);
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;
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).'">';
@@ -1052,10 +1054,13 @@ else
print '<span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddWarehouse").'"></span>';
print '</a>';
print '</td>';
print '</tr>';
// Stock min level
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 '</td>';
if ($conf->browser->layout == 'phone') print '</tr><tr>';
// Stock desired level
print '<td>'.$form->textwithpicto($langs->trans("DesiredStock"), $langs->trans("DesiredStockDesc"), 1).'</td><td>';
print '<input name="desiredstock" class="maxwidth50" value="'.GETPOST('desiredstock').'">';
@@ -1094,9 +1099,9 @@ else
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 '<input name="size" size="4" value="'.GETPOST('size').'"> x ';
print '<input name="sizewidth" size="4" value="'.GETPOST('sizewidth').'"> x ';
print '<input name="sizeheight" size="4" value="'.GETPOST('sizeheight').'">';
print '<input name="size" class="width50" value="'.GETPOST('size').'"> x ';
print '<input name="sizewidth" class="width50" value="'.GETPOST('sizewidth').'"> x ';
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 '</td></tr>';
}
@@ -1140,8 +1145,10 @@ else
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>';
if ($conf->browser->layout == 'phone') print '</tr><tr>';
// 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');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print '</td></tr>';

View File

@@ -481,19 +481,21 @@ if ($resql)
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
$newcardbutton = '';
$rightskey = 'produit';
if ($type == Product::TYPE_SERVICE) $rightskey = 'service';
if ($user->rights->{$rightskey}->creer)
if ($type === "") $perm = ($user->rights->produit->creer || $user->rights->service->creer);
elseif ($type == Product::TYPE_SERVICE) $perm = $user->rights->service->creer;
elseif ($type == Product::TYPE_PRODUCT) $perm = $user->rights->produit->creer;
if ($perm)
{
$oldtype = $type;
$params = array();
if ($type === "") $params['forcenohideoftext']=1;
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;
}
$label = 'NewProduct';
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;
}

View File

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

View File

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