From 36c2b5afcdd635cea366dd4556a5dc667ab0b4fc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Oct 2016 18:43:17 +0200 Subject: [PATCH] Responsive --- htdocs/core/class/html.form.class.php | 6 ++--- htdocs/core/lib/project.lib.php | 4 +-- htdocs/projet/tasks/time.php | 37 +++++++++++++++++++-------- htdocs/theme/eldy/style.css.php | 3 --- htdocs/theme/md/style.css.php | 5 ++++ 5 files changed, 36 insertions(+), 19 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 69d8adc7352..e4dc71fcb9a 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4518,7 +4518,7 @@ class Form } } - if ($d && $h) $retstring.=' '; + if ($d && $h) $retstring.=($h==2?'
':' '); if ($h) { @@ -4685,7 +4685,7 @@ class Form } elseif ($typehour=='text') { - $retstring.=''; + $retstring.=''; } else return 'BadValueForParameterTypeHour'; @@ -4708,7 +4708,7 @@ class Form } elseif ($typehour=='text') { - $retstring.=''; + $retstring.=''; } $retstring.=' '.$langs->trans('MinuteShort'); $retstring.=" "; diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index d009ac793a0..173aee8ce26 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -406,14 +406,14 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t // Title of task print ""; if ($showlineingray) print ''; - else print ''; + //else print ''; for ($k = 0 ; $k < $level ; $k++) { print "     "; } print $lines[$i]->label; if ($showlineingray) print ''; - else print ''; + //else print ''; print "\n"; // Date start diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 1041f95640a..276fc1cd722 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -510,7 +510,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -520,20 +520,20 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print ''; // Date - print ''; // Contributor - print ''; // Note - print ''; // Progress declared @@ -582,7 +582,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) $arrayfields['t.task_date']=array('label'=>$langs->trans("Date"), 'checked'=>1); 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['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($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['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($arrayfields['t.task_ref']['checked'])) print ''; + if (! empty($arrayfields['t.task_label']['checked'])) print ''; } if (! empty($arrayfields['author']['checked'])) print ''; - if (! empty($arrayfields['t.note']['checked'])) print ''; + if (! empty($arrayfields['t.note']['checked'])) print ''; if (! empty($arrayfields['t.task_duration']['checked'])) print ''; if (! empty($arrayfields['value']['checked'])) print ''; // Extra fields @@ -812,7 +815,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) if (! $i) $totalarray['nbfield']++; } - // Task + // Task ref if (! empty($arrayfields['t.task_ref']['checked'])) { 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 ''; + if (! $i) $totalarray['nbfield']++; + } + } + + // User if (! empty($arrayfields['author']['checked'])) { print '
'.$langs->trans("Date").''.$langs->trans("Date").''.$langs->trans("By").''.$langs->trans("Note").''.$langs->trans("ProgressDeclared").'
'; + print ''; //$newdate=dol_mktime(12,0,0,$_POST["timemonth"],$_POST["timeday"],$_POST["timeyear"]); $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 ''; + print ''; print img_object('','user','class="hideonsmartphone"'); $contactsoftask=$object->getListContactId('internal'); if (count($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 { @@ -542,8 +542,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print ''; - print ''; + print ''; + print ''; print ''; + print $task_time->label; + print ''; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 6da9077d5d2..c805106d784 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -4574,9 +4574,6 @@ img.demothumb { background-size: 20px auto; margin-top: 2px; } - select { - width: 100%; - } } /* rule to reduce top menu - 3rd reduction */ @media only screen and (max-width: px) diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 016cb4f05c3..d97f73045bc 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -4445,6 +4445,11 @@ img.demothumb { position: absolute; width: px; } + select { + width: 100%; + max-width: 100px; + min-width: 0 !important; + } div.divphotoref { padding-right: 5px; }