[eGroupWare-svn] r55993 - in /trunk: calendar/inc/class.calendar_hooks.inc.php egroupware/api/src/Etemplate/Widget/Select.php

[email protected] Tue, 03 May 2016 13:24:21 -0000
Newsgroups gmane.comp.web.egroupware.cvs
Message-ID <[email protected]>
Author: ralfbecker
Date: Tue May  3 15:24:21 2016
New Revision: 55993

URL: http://svn.stylite.de/viewvc/egroupware?rev=55993&view=rev
Log:
fix calendar preferences to show start- and end-time of day

Modified:
    trunk/calendar/inc/class.calendar_hooks.inc.php
    trunk/egroupware/api/src/Etemplate/Widget/Select.php

Modified: trunk/calendar/inc/class.calendar_hooks.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/calendar/inc/class.calendar_hooks.inc.php?rev=55993&r1=55992&r2=55993&view=diff
==============================================================================
--- trunk/calendar/inc/class.calendar_hooks.inc.php (original)
+++ trunk/calendar/inc/class.calendar_hooks.inc.php Tue May  3 15:24:21 2016
@@ -157,7 +157,7 @@
 
 		if (!isset($hook_data['setup']))
 		{
-			$times = Api\Etemplate\Widget\Select::typeOptions('select-time', '');
+			$times = Api\Etemplate\Widget\Select::typeOptions('select-hour', '');
 		}
 		for ($i = 2; $i <= 4; ++$i)
 		{

Modified: trunk/egroupware/api/src/Etemplate/Widget/Select.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/egroupware/api/src/Etemplate/Widget/Select.php?rev=55993&r1=55992&r2=55993&view=diff
==============================================================================
--- trunk/egroupware/api/src/Etemplate/Widget/Select.php (original)
+++ trunk/egroupware/api/src/Etemplate/Widget/Select.php Tue May  3 15:24:21 2016
@@ -716,11 +716,12 @@
 				break;
 
 			case 'select-hour':
+				$minutes = !$type2 ? ':00' : '';
 				for ($h = 0; $h <= 23; ++$h)
 				{
 					$options[$h] = $GLOBALS['egw_info']['user']['preferences']['common']['timeformat'] == 12 ?
-						(($h % 12 ? $h % 12 : 12).' '.($h < 12 ? lang('am') : lang('pm'))) :
-						sprintf('%02d',$h);
+						(($h % 12 ? $h % 12 : 12).$minutes.' '.($h < 12 ? lang('am') : lang('pm'))) :
+						sprintf('%02d',$h).$minutes;
 				}
 				$no_lang = True;
 				break;


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z