Fix responsive design

This commit is contained in:
Laurent Destailleur 2016-11-27 14:21:23 +01:00
parent 2c9edd4205
commit 2e5634e60f
4 changed files with 38 additions and 31 deletions

View File

@ -286,23 +286,10 @@ if ($mode==='expdev') print $langs->trans("ModuleFamilyExperimental")."<br>
$h = 0; $h = 0;
$categidx='common'; // Main $categidx='common'; // Main
//if (! empty($categ[$categidx]))
//{
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
$head[$h][1] = $langs->trans("AvailableModules"); $head[$h][1] = $langs->trans("AvailableModules");
$head[$h][2] = 'common'; $head[$h][2] = 'common';
$h++; $h++;
//}
/*$categidx='expdev';
if (! empty($categ[$categidx]))
{
$categidx='expdev';
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
$head[$h][1] = $form->textwithpicto($langs->trans("ModuleFamilyExperimental"), $langs->trans('DoNotUseInProduction'), 1, 'warning', '', 0, 3);
$head[$h][2] = 'expdev';
$h++;
}*/
$categidx='marketplace'; $categidx='marketplace';
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
@ -314,18 +301,19 @@ $h++;
print "<br>\n"; print "<br>\n";
dol_fiche_head($head, $mode, '');
$var=true; $var=true;
if ($mode != 'marketplace') if ($mode != 'marketplace')
{ {
print '<form method="GET" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="GET" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
dol_fiche_head($head, $mode, '');
$moreforfilter = ''; $moreforfilter = '';
$moreforfilter.='<div class="divsearchfield">'; $moreforfilter.='<div class="divsearchfield">';
$moreforfilter.= $langs->trans('Keyword') . ': <input type="text" name="search_keyword" value="'.dol_escape_htmltag($search_keyword).'">'; $moreforfilter.= $langs->trans('Keyword') . ': <input type="text" name="search_keyword" value="'.dol_escape_htmltag($search_keyword).'">';
@ -363,11 +351,16 @@ if ($mode != 'marketplace')
//print '</div>'; //print '</div>';
} }
print '<br><br><br><br>'; //dol_fiche_end();
print '<div class="clearboth"></div><br>';
//print '<br><br><br><br>';
$moreforfilter='';
// Show list of modules // Show list of modules
print '<div class="div-table-responsive">';
print '<table summary="list_of_modules" id="list_of_modules" class="liste" width="100%">'."\n"; print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'" summary="list_of_modules" id="list_of_modules" >'."\n";
$oldfamily=''; $oldfamily='';
@ -766,9 +759,12 @@ if ($mode != 'marketplace')
} }
print "</table>\n"; print "</table>\n";
print '</div>';
} }
else else
{ {
dol_fiche_head($head, $mode, '');
// Marketplace // Marketplace
print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n"; print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
print "<tr class=\"liste_titre\">\n"; print "<tr class=\"liste_titre\">\n";
@ -780,7 +776,7 @@ else
$var=!$var; $var=!$var;
print "<tr ".$bc[$var].">\n"; print "<tr ".$bc[$var].">\n";
$url='https://www.dolistore.com'; $url='https://www.dolistore.com';
print '<td align="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" width="180" src="'.DOL_URL_ROOT.'/theme/dolistore_logo.png"></a></td>'; print '<td align="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolistore_logo.png"></a></td>';
print '<td>'.$langs->trans("DoliStoreDesc").'</td>'; print '<td>'.$langs->trans("DoliStoreDesc").'</td>';
print '<td><a href="'.$url.'" target="_blank" rel="external">'.$url.'</a></td>'; print '<td><a href="'.$url.'" target="_blank" rel="external">'.$url.'</a></td>';
print '</tr>'; print '</tr>';
@ -788,18 +784,18 @@ else
$var=!$var; $var=!$var;
print "<tr ".$bc[$var].">\n"; print "<tr ".$bc[$var].">\n";
$url='https://partners.dolibarr.org'; $url='https://partners.dolibarr.org';
print '<td align="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" width="180" src="'.DOL_URL_ROOT.'/theme/dolibarr_preferred_partner_int.png"></a></td>'; print '<td align="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolibarr_preferred_partner_int.png"></a></td>';
print '<td>'.$langs->trans("DoliPartnersDesc").'</td>'; print '<td>'.$langs->trans("DoliPartnersDesc").'</td>';
print '<td><a href="'.$url.'" target="_blank" rel="external">'.$url.'</a></td>'; print '<td><a href="'.$url.'" target="_blank" rel="external">'.$url.'</a></td>';
print '</tr>'; print '</tr>';
print "</table>\n"; print "</table>\n";
//dol_fiche_end();
} }
dol_fiche_end(); dol_fiche_end();
// Show warning about external users // Show warning about external users
if ($mode != 'marketplace') print info_admin(showModulesExludedForExternal($modules))."\n"; if ($mode != 'marketplace') print info_admin(showModulesExludedForExternal($modules))."\n";

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2010-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -33,6 +33,7 @@ print '<br>';
// Load attribute_label // Load attribute_label
$extrafields->fetch_name_optionals_label($elementtype); $extrafields->fetch_name_optionals_label($elementtype);
print '<div class="div-table-responsive">';
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">"; print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
@ -68,6 +69,6 @@ foreach($extrafields->attribute_type as $key => $value)
} }
print "</table>"; print "</table>";
print '</div>';
?> ?>
<!-- END PHP TEMPLATE admin_extrafields_view.tpl.php --> <!-- END PHP TEMPLATE admin_extrafields_view.tpl.php -->

View File

@ -631,6 +631,7 @@ div.myavailability {
.titlefieldcreate { width: 20%; } .titlefieldcreate { width: 20%; }
.titlefield { width: 25%; } .titlefield { width: 25%; }
.titlefieldmiddle { width: 50%; } .titlefieldmiddle { width: 50%; }
.imgmaxwidth180 { max-width: 180px; }
/* Force values for small screen 1400 */ /* Force values for small screen 1400 */
@media only screen and (max-width: 1400px) @media only screen and (max-width: 1400px)
@ -990,6 +991,9 @@ img.photoref, div.photoref {
width: 80px; width: 80px;
object-fit: contain; object-fit: contain;
} }
img.fitcontain {
object-fit: contain;
}
div.photoref { div.photoref {
display:table-cell; display:table-cell;
vertical-align:middle; vertical-align:middle;
@ -4514,7 +4518,7 @@ img.demothumb {
} }
@media only screen and (max-width: 767px) @media only screen and (max-width: 767px)
{ {
.imgopensurveywizard { width:95%; height: auto; } .imgopensurveywizard, .imgautosize { width:95%; height: auto; }
#tooltip { #tooltip {
position: absolute; position: absolute;

View File

@ -636,6 +636,8 @@ div.myavailability {
.titlefieldcreate { width: 20%; } .titlefieldcreate { width: 20%; }
.titlefield { width: 25%; } .titlefield { width: 25%; }
.titlefieldmiddle { width: 50%; } .titlefieldmiddle { width: 50%; }
.imgmaxwidth180 { max-width: 180px; }
/* Force values for small screen 1400 */ /* Force values for small screen 1400 */
@media only screen and (max-width: 1400px) @media only screen and (max-width: 1400px)
@ -1038,6 +1040,9 @@ img.photoref, div.photoref {
width: 80px; width: 80px;
object-fit: contain; object-fit: contain;
} }
img.fitcontain {
object-fit: contain;
}
div.photoref { div.photoref {
display:table-cell; display:table-cell;
vertical-align:middle; vertical-align:middle;
@ -1051,6 +1056,7 @@ img.photorefnoborder {
object-fit: contain; object-fit: contain;
border: 1px solid #CCC; border: 1px solid #CCC;
} }
.underrefbanner { .underrefbanner {
} }
.underbanner { .underbanner {
@ -4441,7 +4447,7 @@ img.demothumb {
} }
@media only screen and (max-width: 767px) @media only screen and (max-width: 767px)
{ {
.imgopensurveywizard { width:95%; height: auto; } .imgopensurveywizard, .imgautosize { width:95%; height: auto; }
#tooltip { #tooltip {
position: absolute; position: absolute;