forked from Wavyzz/dolibarr
Responsive design
This commit is contained in:
@@ -337,17 +337,17 @@ abstract class CommonInvoice extends CommonObject
|
|||||||
$prefix='Short';
|
$prefix='Short';
|
||||||
if (! $paye)
|
if (! $paye)
|
||||||
{
|
{
|
||||||
if ($status == 0) return '<span class="hideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusDraft').' </span>'.img_picto($langs->trans('BillStatusDraft'),'statut0');
|
if ($status == 0) return '<span class="xhideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusDraft').' </span>'.img_picto($langs->trans('BillStatusDraft'),'statut0');
|
||||||
if (($status == 3 || $status == 2) && $alreadypaid <= 0) return '<span class="hideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusCanceled').' </span>'.img_picto($langs->trans('BillStatusCanceled'),'statut5');
|
if (($status == 3 || $status == 2) && $alreadypaid <= 0) return '<span class="xhideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusCanceled').' </span>'.img_picto($langs->trans('BillStatusCanceled'),'statut5');
|
||||||
if (($status == 3 || $status == 2) && $alreadypaid > 0) return '<span class="hideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusClosedPaidPartially').' </span>'.img_picto($langs->trans('BillStatusClosedPaidPartially'),'statut7');
|
if (($status == 3 || $status == 2) && $alreadypaid > 0) return '<span class="xhideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusClosedPaidPartially').' </span>'.img_picto($langs->trans('BillStatusClosedPaidPartially'),'statut7');
|
||||||
if ($alreadypaid <= 0) return '<span class="hideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusNotPaid').' </span>'.img_picto($langs->trans('BillStatusNotPaid'),'statut1');
|
if ($alreadypaid <= 0) return '<span class="xhideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusNotPaid').' </span>'.img_picto($langs->trans('BillStatusNotPaid'),'statut1');
|
||||||
return '<span class="hideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusStarted').' </span>'.img_picto($langs->trans('BillStatusStarted'),'statut3');
|
return '<span class="xhideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusStarted').' </span>'.img_picto($langs->trans('BillStatusStarted'),'statut3');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($type == 2) return '<span class="hideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusPaidBackOrConverted').' </span>'.img_picto($langs->trans('BillStatusPaidBackOrConverted'),'statut6');
|
if ($type == 2) return '<span class="xhideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusPaidBackOrConverted').' </span>'.img_picto($langs->trans('BillStatusPaidBackOrConverted'),'statut6');
|
||||||
elseif ($type == 3) return '<span class="hideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusConverted').' </span>'.img_picto($langs->trans('BillStatusConverted'),'statut6');
|
elseif ($type == 3) return '<span class="xhideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusConverted').' </span>'.img_picto($langs->trans('BillStatusConverted'),'statut6');
|
||||||
else return '<span class="hideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusPaid').' </span>'.img_picto($langs->trans('BillStatusPaid'),'statut6');
|
else return '<span class="xhideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusPaid').' </span>'.img_picto($langs->trans('BillStatusPaid'),'statut6');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5578,32 +5578,9 @@ class Form
|
|||||||
$next_ref = $object->ref_next?'<a data-role="button" data-icon="arrow-r" data-iconpos="right" href="'.$_SERVER["PHP_SELF"].'?'.$paramid.'='.urlencode($object->ref_next).$moreparam.'">'.(($conf->dol_use_jmobile != 4)?'>':' ').'</a>':'<span class="inactive">'.(($conf->dol_use_jmobile != 4)?'>':' ').'</span>';
|
$next_ref = $object->ref_next?'<a data-role="button" data-icon="arrow-r" data-iconpos="right" href="'.$_SERVER["PHP_SELF"].'?'.$paramid.'='.urlencode($object->ref_next).$moreparam.'">'.(($conf->dol_use_jmobile != 4)?'>':' ').'</a>':'<span class="inactive">'.(($conf->dol_use_jmobile != 4)?'>':' ').'</span>';
|
||||||
|
|
||||||
//print "xx".$previous_ref."x".$next_ref;
|
//print "xx".$previous_ref."x".$next_ref;
|
||||||
$ret.='<div style="vertical-align: middle">';
|
$ret.='<!-- Start banner content --><div style="vertical-align: middle">';
|
||||||
|
|
||||||
if ($morehtmlleft)
|
|
||||||
{
|
|
||||||
if ($conf->browser->layout == 'phone') $ret.='<div class="center">'.$morehtmlleft.'</div>';
|
|
||||||
else $ret.='<div class="inline-block floatleft">'.$morehtmlleft.'</div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
$ret.='<div class="inline-block floatleft valignmiddle refid'.(($shownav && ($previous_ref || $next_ref))?' refidpadding':'').'">';
|
|
||||||
|
|
||||||
// For thirdparty, contact, user, member, the ref is the id, so we show something else
|
|
||||||
if ($object->element == 'societe')
|
|
||||||
{
|
|
||||||
$ret.=dol_htmlentities($object->name);
|
|
||||||
}
|
|
||||||
else if (in_array($object->element, array('contact', 'user', 'member')))
|
|
||||||
{
|
|
||||||
$ret.=dol_htmlentities($object->getFullName($langs));
|
|
||||||
}
|
|
||||||
else if ($fieldref != 'none') $ret.=dol_htmlentities($object->$fieldref);
|
|
||||||
if ($morehtmlref)
|
|
||||||
{
|
|
||||||
$ret.=' '.$morehtmlref;
|
|
||||||
}
|
|
||||||
$ret.='</div>';
|
|
||||||
|
|
||||||
|
// Right part of banner
|
||||||
if ($morehtmlright) $ret.='<div class="inline-block floatleft">'.$morehtmlright.'</div>';
|
if ($morehtmlright) $ret.='<div class="inline-block floatleft">'.$morehtmlright.'</div>';
|
||||||
|
|
||||||
if ($previous_ref || $next_ref || $morehtml)
|
if ($previous_ref || $next_ref || $morehtml)
|
||||||
@@ -5624,7 +5601,34 @@ class Form
|
|||||||
$ret.='</ul></div>';
|
$ret.='</ul></div>';
|
||||||
}
|
}
|
||||||
if ($morehtmlstatus) $ret.='<div class="statusref">'.$morehtmlstatus.'</div>';
|
if ($morehtmlstatus) $ret.='<div class="statusref">'.$morehtmlstatus.'</div>';
|
||||||
$ret.='</div>';
|
|
||||||
|
// Left part of banner
|
||||||
|
if ($morehtmlleft)
|
||||||
|
{
|
||||||
|
if ($conf->browser->layout == 'phone') $ret.='<div class="floatleft">'.$morehtmlleft.'</div>'; // class="center" to have photo in middle
|
||||||
|
else $ret.='<div class="inline-block floatleft">'.$morehtmlleft.'</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
//if ($conf->browser->layout == 'phone') $ret.='<div class="clearboth"></div>';
|
||||||
|
$ret.='<div class="inline-block floatleft valignmiddle refid'.(($shownav && ($previous_ref || $next_ref))?' refidpadding':'').'">';
|
||||||
|
|
||||||
|
// For thirdparty, contact, user, member, the ref is the id, so we show something else
|
||||||
|
if ($object->element == 'societe')
|
||||||
|
{
|
||||||
|
$ret.=dol_htmlentities($object->name);
|
||||||
|
}
|
||||||
|
else if (in_array($object->element, array('contact', 'user', 'member')))
|
||||||
|
{
|
||||||
|
$ret.=dol_htmlentities($object->getFullName($langs));
|
||||||
|
}
|
||||||
|
else if ($fieldref != 'none') $ret.=dol_htmlentities($object->$fieldref);
|
||||||
|
if ($morehtmlref)
|
||||||
|
{
|
||||||
|
$ret.=' '.$morehtmlref;
|
||||||
|
}
|
||||||
|
$ret.='</div>';
|
||||||
|
|
||||||
|
$ret.='</div><!-- End banner content -->';
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -939,11 +939,12 @@ function dol_get_fiche_end($notab=0)
|
|||||||
* @param string $moreparam More param to add in nav link url.
|
* @param string $moreparam More param to add in nav link url.
|
||||||
* @param int $nodbprefix Do not include DB prefix to forge table name
|
* @param int $nodbprefix Do not include DB prefix to forge table name
|
||||||
* @param string $morehtmlleft More html code to show before ref
|
* @param string $morehtmlleft More html code to show before ref
|
||||||
|
* @param string $morehtmlstatus More html code to show under navigation arrows
|
||||||
* @param string $morehtmlright More html code to show before navigation arrows
|
* @param string $morehtmlright More html code to show before navigation arrows
|
||||||
* @param int $onlybanner Put this to 1, if the card will contains only a banner
|
* @param int $onlybanner Put this to 1, if the card will contains only a banner
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlright='', $onlybanner=0)
|
function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
|
||||||
{
|
{
|
||||||
global $conf, $form, $user, $langs;
|
global $conf, $form, $user, $langs;
|
||||||
|
|
||||||
@@ -1013,38 +1014,38 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|||||||
}
|
}
|
||||||
if ($showbarcode) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showbarcode($object).'</div>';
|
if ($showbarcode) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showbarcode($object).'</div>';
|
||||||
if ($object->element == 'societe' && ! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
|
if ($object->element == 'societe' && ! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
|
||||||
$morehtmlright.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased');
|
$morehtmlstatus.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased');
|
||||||
}
|
}
|
||||||
elseif ($object->element == 'product')
|
elseif ($object->element == 'product')
|
||||||
{
|
{
|
||||||
//$morehtmlright.=$langs->trans("Status").' ('.$langs->trans("Sell").') ';
|
//$morehtmlstatus.=$langs->trans("Status").' ('.$langs->trans("Sell").') ';
|
||||||
if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
|
if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
|
||||||
$morehtmlright.=ajax_object_onoff($object, 'status', 'tosell', 'ProductStatusOnSell', 'ProductStatusNotOnSell');
|
$morehtmlstatus.=ajax_object_onoff($object, 'status', 'tosell', 'ProductStatusOnSell', 'ProductStatusNotOnSell');
|
||||||
} else {
|
} else {
|
||||||
$morehtmlright.=$object->getLibStatut(5,0);
|
$morehtmlstatus.=$object->getLibStatut(5,0);
|
||||||
}
|
}
|
||||||
$morehtmlright.=' ';
|
$morehtmlstatus.=' ';
|
||||||
//$morehtmlright.=$langs->trans("Status").' ('.$langs->trans("Buy").') ';
|
//$morehtmlstatus.=$langs->trans("Status").' ('.$langs->trans("Buy").') ';
|
||||||
if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
|
if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
|
||||||
$morehtmlright.=ajax_object_onoff($object, 'status_buy', 'tobuy', 'ProductStatusOnBuy', 'ProductStatusNotOnBuy');
|
$morehtmlstatus.=ajax_object_onoff($object, 'status_buy', 'tobuy', 'ProductStatusOnBuy', 'ProductStatusNotOnBuy');
|
||||||
} else {
|
} else {
|
||||||
$morehtmlright.=$object->getLibStatut(5,1);
|
$morehtmlstatus.=$object->getLibStatut(5,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ($object->element == 'facture' || $object->element == 'invoice' || $object->element == 'invoice_supplier')
|
elseif ($object->element == 'facture' || $object->element == 'invoice' || $object->element == 'invoice_supplier')
|
||||||
{
|
{
|
||||||
$tmptxt=$object->getLibStatut(6, $object->totalpaye);
|
$tmptxt=$object->getLibStatut(6, $object->totalpaye);
|
||||||
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3)) $tmptxt=$object->getLibStatut(5, $object->totalpaye);
|
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5, $object->totalpaye);
|
||||||
$morehtmlright.=$tmptxt;
|
$morehtmlstatus.=$tmptxt;
|
||||||
}
|
}
|
||||||
elseif ($object->element == 'facturerec')
|
elseif ($object->element == 'facturerec')
|
||||||
{
|
{
|
||||||
$morehtmlright.='<!-- No status for recurring invoice -->';
|
$morehtmlstatus.='<!-- No status for recurring invoice -->';
|
||||||
}
|
}
|
||||||
else {
|
else { // Generic case
|
||||||
$tmptxt=$object->getLibStatut(6);
|
$tmptxt=$object->getLibStatut(6);
|
||||||
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3)) $tmptxt=$object->getLibStatut(5);
|
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5);
|
||||||
$morehtmlright.=$tmptxt;
|
$morehtmlstatus.=$tmptxt;
|
||||||
}
|
}
|
||||||
if (! empty($object->name_alias)) $morehtmlref.='<div class="refidno">'.$object->name_alias.'</div>'; // For thirdparty
|
if (! empty($object->name_alias)) $morehtmlref.='<div class="refidno">'.$object->name_alias.'</div>'; // For thirdparty
|
||||||
if (! empty($object->label)) $morehtmlref.='<div class="refidno">'.$object->label.'</div>'; // For product
|
if (! empty($object->label)) $morehtmlref.='<div class="refidno">'.$object->label.'</div>'; // For product
|
||||||
@@ -1062,7 +1063,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<div class="'.($onlybanner?'':'arearef ').'heightref valignmiddle" width="100%">';
|
print '<div class="'.($onlybanner?'':'arearef ').'heightref valignmiddle" width="100%">';
|
||||||
print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlright);
|
print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlstatus, $morehtmlright);
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '<div class="underrefbanner clearboth"></div>';
|
print '<div class="underrefbanner clearboth"></div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -673,16 +673,16 @@ div.myavailability {
|
|||||||
line-height: 1.4em;
|
line-height: 1.4em;
|
||||||
padding: .4em .1em;
|
padding: .4em .1em;
|
||||||
border: 1px solid #BBB;
|
border: 1px solid #BBB;
|
||||||
max-width: inherit;
|
/* max-width: inherit; why this ? */
|
||||||
}
|
}
|
||||||
|
|
||||||
.hideonsmartphone { display: none; }
|
.hideonsmartphone { display: none; }
|
||||||
.noenlargeonsmartphone { width : 50px !important; display: inline !important; }
|
.noenlargeonsmartphone { width : 50px !important; display: inline !important; }
|
||||||
.maxwidthonsmartphone { max-width: 100px; }
|
.maxwidthonsmartphone { max-width: 100px; }
|
||||||
.maxwidth50onsmartphone { max-width: 50px; }
|
.maxwidth50onsmartphone { max-width: 40px; }
|
||||||
.maxwidth75onsmartphone { max-width: 75px; }
|
.maxwidth75onsmartphone { max-width: 50px; }
|
||||||
.maxwidth100onsmartphone { max-width: 100px; }
|
.maxwidth100onsmartphone { max-width: 70px; }
|
||||||
.maxwidth150onsmartphone { max-width: 150px; }
|
.maxwidth150onsmartphone { max-width: 120px; }
|
||||||
.maxwidth200onsmartphone { max-width: 200px; }
|
.maxwidth200onsmartphone { max-width: 200px; }
|
||||||
.maxwidth300onsmartphone { max-width: 300px; }
|
.maxwidth300onsmartphone { max-width: 300px; }
|
||||||
.maxwidth400onsmartphone { max-width: 400px; }
|
.maxwidth400onsmartphone { max-width: 400px; }
|
||||||
|
|||||||
@@ -677,16 +677,16 @@ div.myavailability {
|
|||||||
line-height: 1.4em;
|
line-height: 1.4em;
|
||||||
padding: .4em .1em;
|
padding: .4em .1em;
|
||||||
border: 1px solid #BBB;
|
border: 1px solid #BBB;
|
||||||
max-width: inherit;
|
/* max-width: inherit; why this */
|
||||||
}
|
}
|
||||||
|
|
||||||
.hideonsmartphone { display: none; }
|
.hideonsmartphone { display: none; }
|
||||||
.noenlargeonsmartphone { width : 50px !important; display: inline !important; }
|
.noenlargeonsmartphone { width : 50px !important; display: inline !important; }
|
||||||
.maxwidthonsmartphone { max-width: 100px; }
|
.maxwidthonsmartphone { max-width: 100px; }
|
||||||
.maxwidth50onsmartphone { max-width: 50px; }
|
.maxwidth50onsmartphone { max-width: 40px; }
|
||||||
.maxwidth75onsmartphone { max-width: 75px; }
|
.maxwidth75onsmartphone { max-width: 50px; }
|
||||||
.maxwidth100onsmartphone { max-width: 100px; }
|
.maxwidth100onsmartphone { max-width: 70px; }
|
||||||
.maxwidth150onsmartphone { max-width: 150px; }
|
.maxwidth150onsmartphone { max-width: 120px; }
|
||||||
.maxwidth200onsmartphone { max-width: 200px; }
|
.maxwidth200onsmartphone { max-width: 200px; }
|
||||||
.maxwidth300onsmartphone { max-width: 300px; }
|
.maxwidth300onsmartphone { max-width: 300px; }
|
||||||
.maxwidth400onsmartphone { max-width: 400px; }
|
.maxwidth400onsmartphone { max-width: 400px; }
|
||||||
@@ -703,10 +703,13 @@ div.myavailability {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
width: <?php print dol_size(300,'width'); ?>px;
|
width: <?php print dol_size(300,'width'); ?>px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* intput, input[type=text], */
|
||||||
select {
|
select {
|
||||||
width: 98%;
|
width: 98%;
|
||||||
min-width: 40px;
|
min-width: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.divphotoref {
|
div.divphotoref {
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user