Better responsive

This commit is contained in:
Laurent Destailleur 2016-11-20 10:58:28 +01:00
parent 34b42d5913
commit e6894eda0e
2 changed files with 11 additions and 10 deletions

View File

@ -1459,7 +1459,8 @@ class Form
$nodatarole=($comboenhancement?' data-role="none"':'');
}
$out.= '<select class="flat maxwidth200onsmartphone'.($morecss?' minwidth100 '.$morecss:' minwidth200').'" id="'.$htmlname.'" name="'.$htmlname.'"'.($disabled?' disabled':'').$nodatarole.'>';
// do not use maxwidthonsmartphone by default. Set it by caller so auto size to 100% will work when not defined
$out.= '<select class="flat'.($morecss?' minwidth100 '.$morecss:' minwidth200').'" id="'.$htmlname.'" name="'.$htmlname.'"'.($disabled?' disabled':'').$nodatarole.'>';
if ($show_empty) $out.= '<option value="-1"'.((empty($selected) || $selected==-1)?' selected':'').'>&nbsp;</option>'."\n";
if ($show_every) $out.= '<option value="-2"'.(($selected==-2)?' selected':'').'>-- '.$langs->trans("Everybody").' --</option>'."\n";

View File

@ -68,14 +68,14 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
if (! empty($conf->browser->phone)) print '<div class="fichehalfleft">';
else print '<table class="nobordernopadding" width="100%"><tr><td class="borderright">';
print '<table class="nobordernopadding">';
print '<table class="nobordernopadding centpercent">';
if ($canedit)
{
print '<tr>';
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
print $langs->trans("ActionsToDoBy").' &nbsp; ';
print '</td><td class="maxwidthonsmartphone" style="padding-bottom: 2px; padding-right: 4px;">';
print '</td><td style="padding-bottom: 2px; padding-right: 4px;">';
print $form->select_dolusers($filtert, 'usertodo', 1, '', ! $canedit, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
if (empty($conf->dol_optimize_smallscreen)) print ' &nbsp; '.$langs->trans("or") . ' '.$langs->trans("ToUserOfGroup").' &nbsp; ';
print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', ! $canedit);
@ -102,7 +102,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
print '<tr>';
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
print $langs->trans("Type");
print ' &nbsp;</td><td class="nowrap maxwidthonsmartphone" style="padding-bottom: 2px; padding-right: 4px;">';
print ' &nbsp;</td><td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
$multiselect=0;
if (! empty($conf->global->MAIN_ENABLE_MULTISELECT_TYPE)) // We use an option here because it adds bugs when used on agenda page "peruser" and "list"
{
@ -117,7 +117,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
print '<tr>';
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
print $langs->trans("ThirdParty").' &nbsp; ';
print '</td><td class="nowrap maxwidthonsmartphone" style="padding-bottom: 2px;">';
print '</td><td class="nowrap" style="padding-bottom: 2px;">';
print $form->select_company($socid, 'socid', '', 1);
print '</td></tr>';
}
@ -130,7 +130,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
print '<tr>';
print '<td class="nowrap" style="padding-bottom: 2px;">';
print $langs->trans("Project").' &nbsp; ';
print '</td><td class="nowrap maxwidthonsmartphone" style="padding-bottom: 2px;">';
print '</td><td class="nowrap" style="padding-bottom: 2px;">';
$formproject->select_projects($socid?$socid:-1, $pid, 'projectid', 0);
print '</td></tr>';
}
@ -141,7 +141,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
print '<tr>';
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
print $langs->trans("Status");
print ' &nbsp;</td><td class="nowrap maxwidthonsmartphone" style="padding-bottom: 2px; padding-right: 4px;">';
print ' &nbsp;</td><td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
$formactions->form_select_status_action('formaction',$status,1,'status',1,2);
print '</td></tr>';
}
@ -151,7 +151,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
// Filter on hours
print '<tr>';
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">'.$langs->trans("VisibleTimeRange").'</td>';
print "<td class='nowrap maxwidthonsmartphone'>";
print "<td class='nowrap'>";
print '<div class="ui-grid-a"><div class="ui-block-a">';
print '<input type="number" class="short" name="begin_h" value="'.$begin_h.'" min="0" max="23">';
if (empty($conf->dol_use_jmobile)) print ' - ';
@ -164,7 +164,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
// Filter on days
print '<tr>';
print '<td class="nowrap">'.$langs->trans("VisibleDaysRange").'</td>';
print "<td class='nowrap maxwidthonsmartphone'>";
print "<td class='nowrap'>";
print '<div class="ui-grid-a"><div class="ui-block-a">';
print '<input type="number" class="short" name="begin_d" value="'.$begin_d.'" min="1" max="7">';
if (empty($conf->dol_use_jmobile)) print ' - ';
@ -186,7 +186,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
if (! empty($conf->browser->phone)) print '<div class="fichehalfright">';
else print '<td align="center" valign="middle" class="nowrap">';
print '<table><tr><td align="center">';
print '<table class="centpercent"><tr><td align="center">';
print '<div class="formleftzone">';
print '<input type="submit" class="button" style="min-width:120px" name="refresh" value="' . $langs->trans("Refresh") . '">';
print '</div>';