From 6dbaba697355c90fd1f1bcb4abc441a1b5a6959b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 10 Feb 2016 17:45:26 +0100 Subject: [PATCH] Fix: previous and next arrow --- htdocs/comm/action/index.php | 12 ++++++------ htdocs/core/lib/functions.lib.php | 12 +++++++----- htdocs/theme/eldy/img/next.png | Bin 157 -> 106 bytes htdocs/theme/eldy/img/previous.png | Bin 151 -> 106 bytes htdocs/theme/eldy/style.css.php | 3 +++ htdocs/theme/md/img/next.png | Bin 157 -> 106 bytes htdocs/theme/md/img/previous.png | Bin 151 -> 106 bytes htdocs/theme/md/style.css.php | 3 +++ 8 files changed, 19 insertions(+), 11 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 913b46a852b..fe7b15c66fe 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -305,28 +305,28 @@ $param.="&maxprint=".$maxprint; // Show navigation bar if (empty($action) || $action=='show_month') { - $nav ="".img_previous($langs->trans("Previous"))."\n"; + $nav ="".img_previous($langs->trans("Previous"), 'class="valignbottom"')."\n"; $nav.=" ".dol_print_date(dol_mktime(0,0,0,$month,1,$year),"%b %Y"); $nav.=" \n"; - $nav.="".img_next($langs->trans("Next"))."\n"; + $nav.="".img_next($langs->trans("Next"), 'class="valignbottom"')."\n"; $nav.="   (".$langs->trans("Today").")"; $picto='calendar'; } if ($action=='show_week') { - $nav ="".img_previous($langs->trans("Previous"))."\n"; + $nav ="".img_previous($langs->trans("Previous"), 'class="valignbottom"')."\n"; $nav.=" ".dol_print_date(dol_mktime(0,0,0,$first_month,$first_day,$first_year),"%Y").", ".$langs->trans("Week")." ".$week; $nav.=" \n"; - $nav.="".img_next($langs->trans("Next"))."\n"; + $nav.="".img_next($langs->trans("Next"), 'class="valignbottom"')."\n"; $nav.="   (".$langs->trans("Today").")"; $picto='calendarweek'; } if ($action=='show_day') { - $nav ="".img_previous($langs->trans("Previous"))."\n"; + $nav ="".img_previous($langs->trans("Previous"), 'class="valignbottom"')."\n"; $nav.=" ".dol_print_date(dol_mktime(0,0,0,$month,$day,$year),"daytextshort"); $nav.=" \n"; - $nav.="".img_next($langs->trans("Next"))."\n"; + $nav.="".img_next($langs->trans("Next"), 'class="valignbottom"')."\n"; $nav.="   (".$langs->trans("Today").")"; $picto='calendarday'; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 73e42b22b33..1ef841a975a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2410,30 +2410,32 @@ function img_error($titlealt = 'default') * Show next logo * * @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. - * @return string Return img tag +* @param string $options Add more attribute on img tag (For example 'style="float: right"') + * @return string Return img tag */ -function img_next($titlealt = 'default') +function img_next($titlealt = 'default', $options='') { global $conf, $langs; if ($titlealt == 'default') $titlealt = $langs->trans('Next'); - return img_picto($titlealt, 'next.png'); + return img_picto($titlealt, 'next.png', $options); } /** * Show previous logo * * @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. + * @param string $options Add more attribute on img tag (For example 'style="float: right"') * @return string Return img tag */ -function img_previous($titlealt = 'default') +function img_previous($titlealt = 'default', $options='') { global $conf, $langs; if ($titlealt == 'default') $titlealt = $langs->trans('Previous'); - return img_picto($titlealt, 'previous.png'); + return img_picto($titlealt, 'previous.png', $options); } /** diff --git a/htdocs/theme/eldy/img/next.png b/htdocs/theme/eldy/img/next.png index a6152079d98ec6f0084658118994377ba5b3f003..f85bb9154bcc470d14f629ddeb7aa803e9ce93c9 100644 GIT binary patch literal 106 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+0wn(&ce?|m3_V>OLn;`PC72F0ZV;+(`_IGM zB4TKCM$PZ0%%dr1RoC=%CdzpTo}H@D)KHMXC&<8X#Z=&2^i`dyK+O!Eu6{1-oD!M< DiryZ| literal 157 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>0wld=oSO}#n3BBRT^Rni_n+Ahk}B|sEM{Qf z76xHPhFNnYfP(BLp1!W^4;b0GWCVH&GL8U+^gLZ0LpZJ{Cn&IPF*>o3yU=(~$^=L8 xEonR2wH6%y(9_6zD5Z&Orm=>>AH}0Z4D(f4E%e(?mjQJ$c)I$ztaD0e0ss}jD)ayV diff --git a/htdocs/theme/eldy/img/previous.png b/htdocs/theme/eldy/img/previous.png index 90b9e8f7bad1f31e92eb47c627138c40735aa649..95934a2b16ee026803e6501c9659085f4b953fea 100644 GIT binary patch literal 106 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+0wn(&ce?|m3_V>OLn;`PC5#RBGIj$Ry^vsi;%@>B1%IG?KfaNL|>S(w18op(hzftndSUHx3vIVCg! E0H1>&b^rhX literal 151 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>0wld=oSO}#n3BBRT^Rni_n+Ahk}B|sEM{Qf z76xHPhFNnYfP(BLp1!W^4;b0GWK55j>}duHX?VIghHzX@PEg=|VfncO}9~S+h3k5nrJq(_%elF{r5}E)o_bDR) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index b2ca926fd71..14154d01f51 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -418,6 +418,9 @@ th .button { .valignmiddle { vertical-align: middle; } +.valignbottom { + vertical-align: bottom; +} .centpercent { width: 100%; } diff --git a/htdocs/theme/md/img/next.png b/htdocs/theme/md/img/next.png index a6152079d98ec6f0084658118994377ba5b3f003..f85bb9154bcc470d14f629ddeb7aa803e9ce93c9 100644 GIT binary patch literal 106 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+0wn(&ce?|m3_V>OLn;`PC72F0ZV;+(`_IGM zB4TKCM$PZ0%%dr1RoC=%CdzpTo}H@D)KHMXC&<8X#Z=&2^i`dyK+O!Eu6{1-oD!M< DiryZ| literal 157 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>0wld=oSO}#n3BBRT^Rni_n+Ahk}B|sEM{Qf z76xHPhFNnYfP(BLp1!W^4;b0GWCVH&GL8U+^gLZ0LpZJ{Cn&IPF*>o3yU=(~$^=L8 xEonR2wH6%y(9_6zD5Z&Orm=>>AH}0Z4D(f4E%e(?mjQJ$c)I$ztaD0e0ss}jD)ayV diff --git a/htdocs/theme/md/img/previous.png b/htdocs/theme/md/img/previous.png index 90b9e8f7bad1f31e92eb47c627138c40735aa649..95934a2b16ee026803e6501c9659085f4b953fea 100644 GIT binary patch literal 106 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+0wn(&ce?|m3_V>OLn;`PC5#RBGIj$Ry^vsi;%@>B1%IG?KfaNL|>S(w18op(hzftndSUHx3vIVCg! E0H1>&b^rhX literal 151 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>0wld=oSO}#n3BBRT^Rni_n+Ahk}B|sEM{Qf z76xHPhFNnYfP(BLp1!W^4;b0GWK55j>}duHX?VIghHzX@PEg=|VfncO}9~S+h3k5nrJq(_%elF{r5}E)o_bDR) diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 9ae58bbb261..fe1e161dfc8 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -414,6 +414,9 @@ th .button { .valignmiddle { vertical-align: middle; } +.valignbottom { + vertical-align: bottom; +} .centpercent { width: 100%; }