Responsive

This commit is contained in:
Laurent Destailleur 2016-10-24 18:43:17 +02:00
parent bc2342e9a4
commit 36c2b5afcd
5 changed files with 36 additions and 19 deletions

View File

@ -4518,7 +4518,7 @@ class Form
} }
} }
if ($d && $h) $retstring.='&nbsp;'; if ($d && $h) $retstring.=($h==2?'<br>':' ');
if ($h) if ($h)
{ {
@ -4685,7 +4685,7 @@ class Form
} }
elseif ($typehour=='text') elseif ($typehour=='text')
{ {
$retstring.='<input type="text" size="2" name="'.$prefix.'hour"'.($disabled?' disabled':'').' class="flat" value="'.($hourSelected?((int) $hourSelected):'').'">'; $retstring.='<input type="text" size="1" name="'.$prefix.'hour"'.($disabled?' disabled':'').' class="flat" value="'.($hourSelected?((int) $hourSelected):'').'">';
} }
else return 'BadValueForParameterTypeHour'; else return 'BadValueForParameterTypeHour';
@ -4708,7 +4708,7 @@ class Form
} }
elseif ($typehour=='text') elseif ($typehour=='text')
{ {
$retstring.='<input type="text" size="2" name="'.$prefix.'min"'.($disabled?' disabled':'').' class="flat" value="'.($minSelected?((int) $minSelected):'').'">'; $retstring.='<input type="text" size="1" name="'.$prefix.'min"'.($disabled?' disabled':'').' class="flat" value="'.($minSelected?((int) $minSelected):'').'">';
} }
$retstring.=' '.$langs->trans('MinuteShort'); $retstring.=' '.$langs->trans('MinuteShort');
$retstring.="&nbsp;"; $retstring.="&nbsp;";

View File

@ -406,14 +406,14 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
// Title of task // Title of task
print "<td>"; print "<td>";
if ($showlineingray) print '<i>'; if ($showlineingray) print '<i>';
else print '<a href="'.DOL_URL_ROOT.'/projet/tasks/task.php?id='.$lines[$i]->id.'&withproject=1">'; //else print '<a href="'.DOL_URL_ROOT.'/projet/tasks/task.php?id='.$lines[$i]->id.'&withproject=1">';
for ($k = 0 ; $k < $level ; $k++) for ($k = 0 ; $k < $level ; $k++)
{ {
print "&nbsp; &nbsp; &nbsp;"; print "&nbsp; &nbsp; &nbsp;";
} }
print $lines[$i]->label; print $lines[$i]->label;
if ($showlineingray) print '</i>'; if ($showlineingray) print '</i>';
else print '</a>'; //else print '</a>';
print "</td>\n"; print "</td>\n";
// Date start // Date start

View File

@ -510,7 +510,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
print '<table class="noborder nohover" width="100%">'; print '<table class="noborder nohover" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td width="100">'.$langs->trans("Date").'</td>'; print '<td>'.$langs->trans("Date").'</td>';
print '<td>'.$langs->trans("By").'</td>'; print '<td>'.$langs->trans("By").'</td>';
print '<td>'.$langs->trans("Note").'</td>'; print '<td>'.$langs->trans("Note").'</td>';
print '<td>'.$langs->trans("ProgressDeclared").'</td>'; print '<td>'.$langs->trans("ProgressDeclared").'</td>';
@ -520,20 +520,20 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
print '<tr '.$bc[false].'>'; print '<tr '.$bc[false].'>';
// Date // Date
print '<td class="nowrap">'; print '<td class="maxwidthonsmartphone">';
//$newdate=dol_mktime(12,0,0,$_POST["timemonth"],$_POST["timeday"],$_POST["timeyear"]); //$newdate=dol_mktime(12,0,0,$_POST["timemonth"],$_POST["timeday"],$_POST["timeyear"]);
$newdate=''; $newdate='';
print $form->select_date($newdate,'time',1,1,2,"timespent_date",1,0,1); print $form->select_date($newdate, 'time', ($conf->browser->layout == 'phone'?2:1), 1, 2, "timespent_date", 1, 0, 1);
print '</td>'; print '</td>';
// Contributor // Contributor
print '<td class="nowrap">'; print '<td class="maxwidthonsmartphone">';
print img_object('','user','class="hideonsmartphone"'); print img_object('','user','class="hideonsmartphone"');
$contactsoftask=$object->getListContactId('internal'); $contactsoftask=$object->getListContactId('internal');
if (count($contactsoftask)>0) if (count($contactsoftask)>0)
{ {
$userid=$contactsoftask[0]; $userid=$contactsoftask[0];
print $form->select_dolusers((GETPOST('userid')?GETPOST('userid'):$userid), 'userid', 0, '', 0, '', $contactsoftask, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToTheTask")); print $form->select_dolusers((GETPOST('userid')?GETPOST('userid'):$userid), 'userid', 0, '', 0, '', $contactsoftask, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToTheTask"), 'maxwidth200');
} }
else else
{ {
@ -542,8 +542,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
print '</td>'; print '</td>';
// Note // Note
print '<td class="nowrap">'; print '<td>';
print '<textarea name="timespent_note" width="95%" rows="'.ROWS_2.'">'.($_POST['timespent_note']?$_POST['timespent_note']:'').'</textarea>'; print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="'.ROWS_2.'">'.($_POST['timespent_note']?$_POST['timespent_note']:'').'</textarea>';
print '</td>'; print '</td>';
// Progress declared // Progress declared
@ -582,7 +582,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
$arrayfields['t.task_date']=array('label'=>$langs->trans("Date"), 'checked'=>1); $arrayfields['t.task_date']=array('label'=>$langs->trans("Date"), 'checked'=>1);
if ((empty($id) && empty($ref)) || ! empty($projectidforalltimes)) // Not a dedicated task if ((empty($id) && empty($ref)) || ! empty($projectidforalltimes)) // Not a dedicated task
{ {
$arrayfields['t.task_ref']=array('label'=>$langs->trans("Task"), 'checked'=>1); $arrayfields['t.task_ref']=array('label'=>$langs->trans("RefTask"), 'checked'=>1);
$arrayfields['t.task_label']=array('label'=>$langs->trans("LabelTask"), 'checked'=>1);
} }
$arrayfields['author']=array('label'=>$langs->trans("By"), 'checked'=>1); $arrayfields['author']=array('label'=>$langs->trans("By"), 'checked'=>1);
$arrayfields['t.note']=array('label'=>$langs->trans("Note"), 'checked'=>1); $arrayfields['t.note']=array('label'=>$langs->trans("Note"), 'checked'=>1);
@ -710,6 +711,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
if ((empty($id) && empty($ref)) || ! empty($projectidforalltimes)) // Not a dedicated task if ((empty($id) && empty($ref)) || ! empty($projectidforalltimes)) // Not a dedicated task
{ {
if (! empty($arrayfields['t.task_ref']['checked'])) print_liste_field_titre($arrayfields['t.task_ref']['label'],$_SERVER['PHP_SELF'],'pt.ref','',$params,'',$sortfield,$sortorder); if (! empty($arrayfields['t.task_ref']['checked'])) print_liste_field_titre($arrayfields['t.task_ref']['label'],$_SERVER['PHP_SELF'],'pt.ref','',$params,'',$sortfield,$sortorder);
if (! empty($arrayfields['t.task_label']['checked'])) print_liste_field_titre($arrayfields['t.task_label']['label'],$_SERVER['PHP_SELF'],'pt.label','',$params,'',$sortfield,$sortorder);
} }
if (! empty($arrayfields['author']['checked'])) print_liste_field_titre($arrayfields['author']['label'],$_SERVER['PHP_SELF'],'','',$params,'',$sortfield,$sortorder); if (! empty($arrayfields['author']['checked'])) print_liste_field_titre($arrayfields['author']['label'],$_SERVER['PHP_SELF'],'','',$params,'',$sortfield,$sortorder);
if (! empty($arrayfields['t.note']['checked'])) print_liste_field_titre($arrayfields['t.note']['label'],$_SERVER['PHP_SELF'],'t.note','',$params,'',$sortfield,$sortorder); if (! empty($arrayfields['t.note']['checked'])) print_liste_field_titre($arrayfields['t.note']['label'],$_SERVER['PHP_SELF'],'t.note','',$params,'',$sortfield,$sortorder);
@ -742,9 +744,10 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
if ((empty($id) && empty($ref)) || ! empty($projectidforalltimes)) // Not a dedicated task if ((empty($id) && empty($ref)) || ! empty($projectidforalltimes)) // Not a dedicated task
{ {
if (! empty($arrayfields['t.task_ref']['checked'])) print '<td class="liste_titre"></td>'; if (! empty($arrayfields['t.task_ref']['checked'])) print '<td class="liste_titre"></td>';
if (! empty($arrayfields['t.task_label']['checked'])) print '<td class="liste_titre"></td>';
} }
if (! empty($arrayfields['author']['checked'])) print '<td class="liste_titre"></td>'; if (! empty($arrayfields['author']['checked'])) print '<td class="liste_titre"></td>';
if (! empty($arrayfields['t.note']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" name="search_note" value="'.$search_note.'" size="10"></td>'; if (! empty($arrayfields['t.note']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" name="search_note" value="'.$search_note.'"></td>';
if (! empty($arrayfields['t.task_duration']['checked'])) print '<td class="liste_titre right"></td>'; if (! empty($arrayfields['t.task_duration']['checked'])) print '<td class="liste_titre right"></td>';
if (! empty($arrayfields['value']['checked'])) print '<td class="liste_titre"></td>'; if (! empty($arrayfields['value']['checked'])) print '<td class="liste_titre"></td>';
// Extra fields // Extra fields
@ -812,7 +815,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
} }
// Task // Task ref
if (! empty($arrayfields['t.task_ref']['checked'])) if (! empty($arrayfields['t.task_ref']['checked']))
{ {
if ((empty($id) && empty($ref)) || ! empty($projectidforalltimes)) // Not a dedicated task if ((empty($id) && empty($ref)) || ! empty($projectidforalltimes)) // Not a dedicated task
@ -827,7 +830,19 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
} }
} }
// User // Task label
if (! empty($arrayfields['t.task_label']['checked']))
{
if ((empty($id) && empty($ref)) || ! empty($projectidforalltimes)) // Not a dedicated task
{
print '<td class="nowrap">';
print $task_time->label;
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
}
// User
if (! empty($arrayfields['author']['checked'])) if (! empty($arrayfields['author']['checked']))
{ {
print '<td>'; print '<td>';

View File

@ -4574,9 +4574,6 @@ img.demothumb {
background-size: 20px auto; background-size: 20px auto;
margin-top: 2px; margin-top: 2px;
} }
select {
width: 100%;
}
} }
/* rule to reduce top menu - 3rd reduction */ /* rule to reduce top menu - 3rd reduction */
@media only screen and (max-width: <?php echo round($nbtopmenuentries * $fontsize * 3.4, 0) + 8; ?>px) @media only screen and (max-width: <?php echo round($nbtopmenuentries * $fontsize * 3.4, 0) + 8; ?>px)

View File

@ -4445,6 +4445,11 @@ img.demothumb {
position: absolute; position: absolute;
width: <?php print dol_size(300,'width'); ?>px; width: <?php print dol_size(300,'width'); ?>px;
} }
select {
width: 100%;
max-width: 100px;
min-width: 0 !important;
}
div.divphotoref { div.divphotoref {
padding-right: 5px; padding-right: 5px;
} }