Look and feel v6

This commit is contained in:
Laurent Destailleur
2017-05-20 20:59:54 +02:00
parent a53fb25cfa
commit 2dd2ab1003
7 changed files with 28 additions and 15 deletions

View File

@@ -167,7 +167,7 @@ class DolEditor
{ {
$found=1; $found=1;
//$out.= '<textarea id="'.$this->htmlname.'" name="'.$this->htmlname.'" rows="'.$this->rows.'" cols="'.$this->cols.'"'.($this->readonly?' disabled':'').' class="flat">'; //$out.= '<textarea id="'.$this->htmlname.'" name="'.$this->htmlname.'" rows="'.$this->rows.'" cols="'.$this->cols.'"'.($this->readonly?' disabled':'').' class="flat">';
$out.= '<textarea id="'.$this->htmlname.'" name="'.$this->htmlname.'" rows="'.$this->rows.'"'.(preg_match('/%/',$this->cols)?' style="margin-top: 2px; width: '.$this->cols.'"':' cols="'.$this->cols.'"').' class="flat">'; $out.= '<textarea id="'.$this->htmlname.'" name="'.$this->htmlname.'" rows="'.$this->rows.'"'.(preg_match('/%/',$this->cols)?' style="margin-top: 5px; width: '.$this->cols.'"':' cols="'.$this->cols.'"').' class="flat">';
$out.= $this->content; $out.= $this->content;
$out.= '</textarea>'; $out.= '</textarea>';

View File

@@ -1685,7 +1685,7 @@ class FormFile
global $langs, $conf; global $langs, $conf;
$out=''; $out='';
if ($conf->browser->layout != 'phone') if ($conf->browser->layout != 'phone' && ! empty($conf->use_javascript_ajax))
{ {
$urladvancedpreview=getAdvancedPreviewUrl($modulepart, $relativepath, 1, $param); // Return if a file is qualified for preview. $urladvancedpreview=getAdvancedPreviewUrl($modulepart, $relativepath, 1, $param); // Return if a file is qualified for preview.
if (count($urladvancedpreview)) if (count($urladvancedpreview))

View File

@@ -214,6 +214,7 @@ class FormMargin
if (!empty($hidemargininfos)) print '<script>$(document).ready(function() {$(".margininfos").hide();});</script>'; if (!empty($hidemargininfos)) print '<script>$(document).ready(function() {$(".margininfos").hide();});</script>';
} }
print '<!-- Margin table -->'."\n";
print '<table class="noborder margintable centpercent">'; print '<table class="noborder margintable centpercent">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td class="liste_titre">'.$langs->trans('Margins').'</td>'; print '<td class="liste_titre">'.$langs->trans('Margins').'</td>';
@@ -232,7 +233,7 @@ class FormMargin
if (! empty($conf->product->enabled)) if (! empty($conf->product->enabled))
{ {
//if ($marginInfo['margin_on_products'] != 0 && $marginInfo['margin_on_services'] != 0) { //if ($marginInfo['margin_on_products'] != 0 && $marginInfo['margin_on_services'] != 0) {
print '<tr class="impair">'; print '<tr class="oddeven">';
print '<td>'.$langs->trans('MarginOnProducts').'</td>'; print '<td>'.$langs->trans('MarginOnProducts').'</td>';
print '<td align="right">'.price($marginInfo['pv_products'], null, null, null, null, $rounding).'</td>'; print '<td align="right">'.price($marginInfo['pv_products'], null, null, null, null, $rounding).'</td>';
print '<td align="right">'.price($marginInfo['pa_products'], null, null, null, null, $rounding).'</td>'; print '<td align="right">'.price($marginInfo['pa_products'], null, null, null, null, $rounding).'</td>';
@@ -246,7 +247,7 @@ class FormMargin
if (! empty($conf->service->enabled)) if (! empty($conf->service->enabled))
{ {
print '<tr class="pair">'; print '<tr class="oddeven">';
print '<td>'.$langs->trans('MarginOnServices').'</td>'; print '<td>'.$langs->trans('MarginOnServices').'</td>';
print '<td align="right">'.price($marginInfo['pv_services'], null, null, null, null, $rounding).'</td>'; print '<td align="right">'.price($marginInfo['pv_services'], null, null, null, null, $rounding).'</td>';
print '<td align="right">'.price($marginInfo['pa_services'], null, null, null, null, $rounding).'</td>'; print '<td align="right">'.price($marginInfo['pa_services'], null, null, null, null, $rounding).'</td>';

View File

@@ -2734,7 +2734,7 @@ function img_edit($titlealt = 'default', $float = 0, $other = 'class="pictoedit"
if ($titlealt == 'default') $titlealt = $langs->trans('Modify'); if ($titlealt == 'default') $titlealt = $langs->trans('Modify');
return img_picto($titlealt, 'edit.png', ($float ? 'style="float: '.($langs->tab_translate["DIRECTION"] == 'rtl'?'left':'right').'"' : $other)); return img_picto($titlealt, 'edit.png', ($float ? 'style="float: '.($langs->tab_translate["DIRECTION"] == 'rtl'?'left':'right').'"' : "") . ($other?' '.$other:''));
} }
/** /**

View File

@@ -780,11 +780,26 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
$masktype_value=''; $masktype_value='';
} }
// Personalized field {XXX-1} à {XXX-9}
$maskperso=array();
$maskpersonew=array();
$tmpmask=$mask;
while (preg_match('/\{([A-Z]+)\-([1-9])\}/i',$tmpmask,$regKey))
{
$maskperso[$regKey[1]]='\{'.$regKey[1]+'\-'.$regKey[2].'\}';
$maskpersonew[$regKey[1]]=str_pad('', '_', $regKey[2], STR_PAD_RIGHT);
$tmpmask=preg_replace('/\{'.$regKey[1].'\-'.$regKey[2].'\}/i', $maskpersonew, $tmpmask);
}
$maskwithonlyymcode=$mask; $maskwithonlyymcode=$mask;
$maskwithonlyymcode=preg_replace('/\{(0+)([@\+][0-9\-\+\=]+)?([@\+][0-9\-\+\=]+)?\}/i',$maskcounter,$maskwithonlyymcode); $maskwithonlyymcode=preg_replace('/\{(0+)([@\+][0-9\-\+\=]+)?([@\+][0-9\-\+\=]+)?\}/i',$maskcounter,$maskwithonlyymcode);
$maskwithonlyymcode=preg_replace('/\{dd\}/i','dd',$maskwithonlyymcode); $maskwithonlyymcode=preg_replace('/\{dd\}/i','dd',$maskwithonlyymcode);
$maskwithonlyymcode=preg_replace('/\{(c+)(0*)\}/i',$maskrefclient,$maskwithonlyymcode); $maskwithonlyymcode=preg_replace('/\{(c+)(0*)\}/i',$maskrefclient,$maskwithonlyymcode);
$maskwithonlyymcode=preg_replace('/\{(t+)\}/i',$masktype_value,$maskwithonlyymcode); $maskwithonlyymcode=preg_replace('/\{(t+)\}/i',$masktype_value,$maskwithonlyymcode);
foreach($maskperso as $key => $val)
{
$maskwithonlyymcode=preg_replace('/'.$val.'/i', $maskpersonew[$key], $maskwithonlyymcode);
}
$maskwithnocode=$maskwithonlyymcode; $maskwithnocode=$maskwithonlyymcode;
$maskwithnocode=preg_replace('/\{yyyy\}/i','yyyy',$maskwithnocode); $maskwithnocode=preg_replace('/\{yyyy\}/i','yyyy',$maskwithnocode);
$maskwithnocode=preg_replace('/\{yy\}/i','yy',$maskwithnocode); $maskwithnocode=preg_replace('/\{yy\}/i','yy',$maskwithnocode);

View File

@@ -273,7 +273,7 @@ input[type=submit] {
} }
input, input.flat, form.flat select, select, select.flat, .dataTables_length label select { input, input.flat, form.flat select, select, select.flat, .dataTables_length label select {
<?php if (empty($conf->global->THEME_ELDY_SHOW_BORDER_INPUT)) <?php if (empty($conf->global->THEME_ELDY_SHOW_BORDER_INPUT))
print "border: none;" print "border: none;"
?> ?>
} }
input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select { input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select {
@@ -281,7 +281,7 @@ input, input.flat, textarea, textarea.flat, form.flat select, select, select.fla
font-family: <?php print $fontlist ?>; font-family: <?php print $fontlist ?>;
outline: none; outline: none;
margin: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;
border-bottom: solid 1px rgba(0,0,0,.2); border-bottom: solid 1px rgba(0,0,0,.4);
} }
input { input {
@@ -460,6 +460,9 @@ form {
padding:0px; padding:0px;
margin:0px; margin:0px;
} }
form#addproduct {
padding-top: 6px;
}
div.float div.float
{ {
float:<?php print $left; ?>; float:<?php print $left; ?>;
@@ -2238,12 +2241,12 @@ div .tdtop {
} }
table.border td, div.border div div.tagtd { table.border td, div.border div div.tagtd {
padding: 3px 2px 3px 2px; padding: 5px 2px 5px 2px;
border-collapse: collapse; border-collapse: collapse;
} }
div.tabBar .fichecenter table.border>tbody>tr>td, div.tabBar .fichecenter div.border div div.tagtd, div.tabBar div.border div div.tagtd div.tabBar .fichecenter table.border>tbody>tr>td, div.tabBar .fichecenter div.border div div.tagtd, div.tabBar div.border div div.tagtd
{ {
padding-top: 4px; padding-top: 5px;
border-bottom: 1px solid #E0E0E0; border-bottom: 1px solid #E0E0E0;
} }
@@ -2709,9 +2712,6 @@ tr.liste_sub_total, tr.liste_sub_total td {
{ {
padding-left: 2px; padding-left: 2px;
} }
.margintable td {
border: 0px !important;
}
/* Disable shadows */ /* Disable shadows */
.noshadow { .noshadow {

View File

@@ -2801,9 +2801,6 @@ tr.liste_sub_total, tr.liste_sub_total td {
{ {
padding-left: 2px; padding-left: 2px;
} }
.margintable td {
border: 0px !important;
}
/* Disable shadows */ /* Disable shadows */
.noshadow { .noshadow {