Debug responsive of v7

This commit is contained in:
Laurent Destailleur 2017-11-24 14:23:25 +01:00
parent 8450c78dff
commit 3db52b5f9e
8 changed files with 90 additions and 43 deletions

View File

@ -41,10 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
$langs->load("banks"); $langs->loadLangs(array("banks","categories","companies","bills","trips"));
$langs->load("categories");
$langs->load("companies");
$langs->load("bills");
$action=GETPOST('action', 'alpha'); $action=GETPOST('action', 'alpha');
$id=GETPOST('account','int'); $id=GETPOST('account','int');
@ -705,7 +702,7 @@ else
$newline=0; $newline=0;
} }
elseif ($links[$key]['type']=='user') { elseif ($links[$key]['type']=='user') {
print '<a href="'.DOL_URL_ROOT.'/user/card.php?rowid='.$links[$key]['url_id'].'">'; print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$links[$key]['url_id'].'">';
print img_object($langs->trans('ShowUser'),'user').' '; print img_object($langs->trans('ShowUser'),'user').' ';
print $links[$key]['label']; print $links[$key]['label'];
print '</a>'; print '</a>';

View File

@ -3791,7 +3791,7 @@ else if ($id > 0 || ! empty($ref))
// List of payments already done // List of payments already done
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder paymenttable" width="100%">'; print '<table class="noborder paymenttable" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
@ -4002,6 +4002,7 @@ else if ($id > 0 || ! empty($ref))
} }
print '</table>'; print '</table>';
print '</div>';
// Margin Infos // Margin Infos
if (! empty($conf->margin->enabled)) { if (! empty($conf->margin->enabled)) {

View File

@ -592,6 +592,8 @@ if ($object->id > 0)
/* /*
* Withdrawals * Withdrawals
*/ */
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
@ -664,7 +666,6 @@ if ($object->id > 0)
{ {
$obj = $db->fetch_object($result); $obj = $db->fetch_object($result);
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td align="left">'.dol_print_date($db->jdate($obj->date_demande),'day')."</td>\n"; print '<td align="left">'.dol_print_date($db->jdate($obj->date_demande),'day')."</td>\n";
@ -689,7 +690,8 @@ if ($object->id > 0)
print "</tr>\n"; print "</tr>\n";
$i++; $i++;
} }
if (! $num)
print '<tr class="oddeven"><td colspan="7" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
$db->free($result); $db->free($result);
} }
else else
@ -698,6 +700,7 @@ if ($object->id > 0)
} }
print "</table>"; print "</table>";
print '</div>';
} }

View File

@ -1067,6 +1067,8 @@ if (empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY) && ! defined('DISABLE_JQUE
?> ?>
// Defined properties for JNotify // Defined properties for JNotify
$(document).ready(function() { $(document).ready(function() {
if (typeof $.jnotify == 'function')
{
$.jnotify.setup({ $.jnotify.setup({
delay: 3000 // the default time to show each notification (in milliseconds) delay: 3000 // the default time to show each notification (in milliseconds)
, sticky: false // determines if the message should be considered "sticky" (user must manually close notification) , sticky: false // determines if the message should be considered "sticky" (user must manually close notification)
@ -1083,6 +1085,7 @@ $(document).ready(function() {
, create: null // callback that occurs when when the note is created (occurs just before appearing in DOM) , create: null // callback that occurs when when the note is created (occurs just before appearing in DOM)
, beforeRemove: null // callback that occurs when before the notification starts to fade away , beforeRemove: null // callback that occurs when before the notification starts to fade away
}); });
}
}); });
<?php } ?> <?php } ?>

View File

@ -1119,7 +1119,7 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi
if (count($keys)) $maxkey=max($keys); if (count($keys)) $maxkey=max($keys);
} }
//$conf->global->MAIN_MAXTABS_IN_CARD=3; if (! empty($conf->dol_optimize_smallscreen)) $conf->global->MAIN_MAXTABS_IN_CARD=2;
// Show tabs // Show tabs
$bactive=false; $bactive=false;
@ -1132,9 +1132,8 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi
{ {
if ((is_numeric($active) && $i == $active) || (! empty($links[$i][2]) && ! is_numeric($active) && $active == $links[$i][2])) if ((is_numeric($active) && $i == $active) || (! empty($links[$i][2]) && ! is_numeric($active) && $active == $links[$i][2]))
{ {
// si l'active est présent dans la box // If active tab is already present
if ($i >= $limittoshow) if ($i >= $limittoshow) $limittoshow--;
$limittoshow--;
} }
} }
@ -1146,7 +1145,9 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi
$bactive=true; $bactive=true;
} }
else else
{
$isactive=false; $isactive=false;
}
if ($i < $limittoshow || $isactive) if ($i < $limittoshow || $isactive)
{ {
@ -1155,11 +1156,11 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi
{ {
if (!empty($links[$i][0])) if (!empty($links[$i][0]))
{ {
$out.='<a data-role="button" class="tabimage" href="'.$links[$i][0].'">'.$links[$i][1].'</a>'."\n"; $out.='<a class="tabimage" href="'.$links[$i][0].'">'.$links[$i][1].'</a>'."\n";
} }
else else
{ {
$out.='<span data-role="button" class="tabspan">'.$links[$i][1].'</span>'."\n"; $out.='<span class="tabspan">'.$links[$i][1].'</span>'."\n";
} }
} }
else if (! empty($links[$i][1])) else if (! empty($links[$i][1]))
@ -1167,11 +1168,15 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi
//print "x $i $active ".$links[$i][2]." z"; //print "x $i $active ".$links[$i][2]." z";
if ($isactive) if ($isactive)
{ {
$out.='<a data-role="button"'.(! empty($links[$i][2])?' id="'.$links[$i][2].'"':'').' class="tabactive tab inline-block" href="'.$links[$i][0].'">'.$links[$i][1].'</a>'."\n"; $out.='<a'.(! empty($links[$i][2])?' id="'.$links[$i][2].'"':'').' class="tabactive tab inline-block" href="'.$links[$i][0].'">';
$out.=$links[$i][1];
$out.='</a>'."\n";
} }
else else
{ {
$out.='<a data-role="button"'.(! empty($links[$i][2])?' id="'.$links[$i][2].'"':'').' class="tabunactive tab inline-block" href="'.$links[$i][0].'">'.$links[$i][1].'</a>'."\n"; $out.='<a'.(! empty($links[$i][2])?' id="'.$links[$i][2].'"':'').' class="tabunactive tab inline-block" href="'.$links[$i][0].'">';
$out.=$links[$i][1];
$out.='</a>'."\n";
} }
} }
$out.='</div>'; $out.='</div>';
@ -1182,9 +1187,9 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi
if (! $popuptab) if (! $popuptab)
{ {
$popuptab=1; $popuptab=1;
$outmore.='<div class="popuptabset">'; $outmore.='<div class="popuptabset wordwrap">'; // The css used to hide/show popup
} }
$outmore.='<div class="popuptab" style="display:inherit;">'; $outmore.='<div class="popuptab wordwrap" style="display:inherit;">';
if (isset($links[$i][2]) && $links[$i][2] == 'image') if (isset($links[$i][2]) && $links[$i][2] == 'image')
{ {
if (!empty($links[$i][0])) if (!empty($links[$i][0]))
@ -1194,8 +1199,11 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi
} }
else if (! empty($links[$i][1])) else if (! empty($links[$i][1]))
$outmore.='<a'.(! empty($links[$i][2])?' id="'.$links[$i][2].'"':'').' class="inline-block" href="'.$links[$i][0].'">'.$links[$i][1].'</a>'."\n"; {
$outmore.='<a'.(! empty($links[$i][2])?' id="'.$links[$i][2].'"':'').' class="wordwrap inline-block" href="'.$links[$i][0].'">';
$outmore.=preg_replace('/([a-z])\/([a-z])/i', '\\1 / \\2', $links[$i][1]); // Replace x/y with x / y to allow wrap on long composed texts.
$outmore.='</a>'."\n";
}
$outmore.='</div>'; $outmore.='</div>';
$nbintab++; $nbintab++;
@ -1206,15 +1214,21 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi
if ($displaytab > $limittoshow) if ($displaytab > $limittoshow)
{ {
$left=($langs->trans("DIRECTION") == 'rtl'?'right':'left');
$right=($langs->trans("DIRECTION") == 'rtl'?'left':'right');
$tabsname=str_replace("@", "", $picto); $tabsname=str_replace("@", "", $picto);
$out.='<div id="moretabs'.$tabsname.'" class="inline-block tabsElem">'; $out.='<div id="moretabs'.$tabsname.'" class="inline-block tabsElem">';
$out.='<a href="#" data-role="button" class="tab moretab inline-block tabunactive">'.$langs->trans("More").'... ('.$nbintab.')</a>'; $out.='<a href="#" class="tab moretab inline-block tabunactive">'.$langs->trans("More").'... ('.$nbintab.')</a>';
$out.='<div id="moretabsList'.$tabsname.'" style="position: absolute; left: -999em;text-align: left;margin:0px;padding:2px">'.$outmore.'</div>'; $out.='<div id="moretabsList'.$tabsname.'" style="position: absolute; '.$left.': -999em; text-align: '.$left.'; margin:0px; padding:2px">';
$out.=$outmore;
$out.='</div>';
$out.='<div></div>';
$out.="</div>\n"; $out.="</div>\n";
$out.="<script>"; $out.="<script>";
$out.="$('#moretabs".$tabsname."').mouseenter( function() { $('#moretabsList".$tabsname."').css('left','auto');});"; $out.="$('#moretabs".$tabsname."').mouseenter( function() { console.log('mouseenter ".$left."'); $('#moretabsList".$tabsname."').css('".$left."','auto');});";
$out.="$('#moretabs".$tabsname."').mouseleave( function() { $('#moretabsList".$tabsname."').css('left','-999em');});"; $out.="$('#moretabs".$tabsname."').mouseleave( function() { console.log('mouseleave ".$left."'); $('#moretabsList".$tabsname."').css('".$left."','-999em');});";
$out.="</script>"; $out.="</script>";
} }

View File

@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$langs->load('companies');
$langs->load('bills'); $langs->load('bills');
$id = GETPOST("facid",'int')?GETPOST("facid",'int'):GETPOST("id",'int'); $id = GETPOST("facid",'int')?GETPOST("facid",'int'):GETPOST("id",'int');

View File

@ -456,6 +456,9 @@ fieldset { border: 1px solid #AAAAAA !important; }
.trextrafieldseparator td { .trextrafieldseparator td {
border-bottom: 2px solid rgb(120,120,120) !important; border-bottom: 2px solid rgb(120,120,120) !important;
} }
input#onlinepaymenturl, input#directdownloadlink {
opacity: 0.7;
}
hr { border: 0; border-top: 1px solid #ccc; } hr { border: 0; border-top: 1px solid #ccc; }
@ -581,6 +584,9 @@ textarea.centpercent {
.nowraponall { .nowraponall {
white-space: nowrap; white-space: nowrap;
} }
.wordwrap {
word-wrap: break-word;
}
.nobold { .nobold {
font-weight: normal !important; font-weight: normal !important;
} }
@ -911,6 +917,9 @@ select.selectarrowonleft option {
body { body {
font-size: <?php print $fontsize+3; ?>px; font-size: <?php print $fontsize+3; ?>px;
} }
div.refidno {
font-size: <?php print $fontsize+3; ?>px !important;
}
} }
/* Force values for small screen 570 */ /* Force values for small screen 570 */
@ -919,6 +928,9 @@ select.selectarrowonleft option {
body { body {
font-size: <?php print $fontsize+3; ?>px; font-size: <?php print $fontsize+3; ?>px;
} }
div.refidno {
font-size: <?php print $fontsize+3; ?>px !important;
}
.divmainbodylarge { margin-left: 20px !important; margin-right: 20px !important; } .divmainbodylarge { margin-left: 20px !important; margin-right: 20px !important; }
@ -932,7 +944,8 @@ select.selectarrowonleft option {
margin-top: <?php print ($dol_hide_topmenu?'12':'6'); ?>px !important; margin-top: <?php print ($dol_hide_topmenu?'12':'6'); ?>px !important;
} }
div.titre { div.titre {
line-height: 2em; margin-top: 12px;
/* line-height: 2em; */
} }
.border tbody tr, .border tbody tr td, div.tabBar table.border tr, div.tabBar table.border tr td, div.tabBar div.border .table-border-row, div.tabBar div.border .table-key-border-col, div.tabBar div.border .table-val-border-col { .border tbody tr, .border tbody tr td, div.tabBar table.border tr, div.tabBar table.border tr td, div.tabBar div.border .table-border-row, div.tabBar div.border .table-key-border-col, div.tabBar div.border .table-val-border-col {
height: 40px !important; height: 40px !important;
@ -4080,6 +4093,7 @@ div#ecm-layout-center {
max-width: 1024px; max-width: 1024px;
padding-left: 10px !important; padding-left: 10px !important;
padding-right: 10px !important; padding-right: 10px !important;
word-wrap: break-word;
} }
.jnotify-container .jnotify-notification .jnotify-message { .jnotify-container .jnotify-notification .jnotify-message {
font-weight: normal; font-weight: normal;
@ -4887,6 +4901,10 @@ div.tabsElem a.tab {
div.tmenuleft { div.tmenuleft {
display: none; display: none;
} }
.dropdown dd ul {
max-width: 300px;
}
} }
/* rule to reduce top menu - 2nd reduction */ /* rule to reduce top menu - 2nd reduction */
@media only screen and (max-width: <?php echo round($nbtopmenuentries * $fontsize * 5, 0) + 24; ?>px) /* reduction 2 */ @media only screen and (max-width: <?php echo round($nbtopmenuentries * $fontsize * 5, 0) + 24; ?>px) /* reduction 2 */

View File

@ -589,6 +589,9 @@ textarea.centpercent {
.nowraponall { .nowraponall {
white-space: nowrap; white-space: nowrap;
} }
.wordwrap {
word-wrap: break-word;
}
.nobold { .nobold {
font-weight: normal !important; font-weight: normal !important;
} }
@ -908,6 +911,9 @@ select.selectarrowonleft option {
body { body {
font-size: <?php print $fontsize+3; ?>px; font-size: <?php print $fontsize+3; ?>px;
} }
div.refidno {
font-size: <?php print $fontsize+3; ?>px !important;
}
} }
/* Force values for small screen 570 */ /* Force values for small screen 570 */
@ -916,6 +922,9 @@ select.selectarrowonleft option {
body { body {
font-size: <?php print $fontsize+3; ?>px; font-size: <?php print $fontsize+3; ?>px;
} }
div.refidno {
font-size: <?php print $fontsize+3; ?>px !important;
}
.divmainbodylarge { margin-left: 20px; margin-right: 20px; } .divmainbodylarge { margin-left: 20px; margin-right: 20px; }
@ -929,7 +938,8 @@ select.selectarrowonleft option {
margin-top: <?php print ($dol_hide_topmenu?'12':'6'); ?>px !important; margin-top: <?php print ($dol_hide_topmenu?'12':'6'); ?>px !important;
} }
div.titre { div.titre {
line-height: 2em; margin-top: 12px;
/* line-height: 2em; */
} }
.border tbody tr, .border tbody tr td, div.tabBar table.border tr { .border tbody tr, .border tbody tr td, div.tabBar table.border tr {
height: 40px !important; height: 40px !important;