gunnar: server/patches/horde-webmail/1.2.0 horde-webmail-1.2.0_kolab_openpkg.patch, 1.32.2.15, 1.32.2.16

cvs at kolab.org cvs at kolab.org
Thu Nov 5 12:14:11 CET 2009


Author: gunnar

Update of /kolabrepository/server/patches/horde-webmail/1.2.0
In directory doto:/tmp/cvs-serv9695/patches/horde-webmail/1.2.0

Modified Files:
      Tag: kolab_2_2_branch
	horde-webmail-1.2.0_kolab_openpkg.patch 
Log Message:
 kolab/issue3844 (New user preference to specify order of date input fields)

Index: horde-webmail-1.2.0_kolab_openpkg.patch
===================================================================
RCS file: /kolabrepository/server/patches/horde-webmail/1.2.0/Attic/horde-webmail-1.2.0_kolab_openpkg.patch,v
retrieving revision 1.32.2.15
retrieving revision 1.32.2.16
diff -u -d -r1.32.2.15 -r1.32.2.16
--- horde-webmail-1.2.0_kolab_openpkg.patch	15 Oct 2009 15:15:03 -0000	1.32.2.15
+++ horde-webmail-1.2.0_kolab_openpkg.patch	5 Nov 2009 11:14:08 -0000	1.32.2.16
@@ -27613,6 +27613,158 @@
 Date:   Wed Oct 7 22:19:43 2009 +0200
 
     Export a list of events.
+From: Soenke Schwardt-Krummrich <schwardt at univention.de>
+Subject: [PATCH] t/kronolith/HK/UV/dateInputFieldOrder
+
+Currently in kronolith the order of date input fields is hardcoded to
+year-month-day. Some parts of the world usually use a different order.
+The attached patch adds a user preference to specify input field order.
+
+REFERENCE_KOLAB: https://issues.kolab.org/issue3844
+REFERENCE_HORDE:
+
+STATUS_KOLAB_2.2:             UNTESTED
+STATUS_KOLAB_2.3:             NONE
+STATUS_HORDE_KRONOLITH_2.3.3: SUBMIT
+STATUS_HORDE_KRONOLITH_3.0:   SUBMIT
+
+Signed-off-by: Gunnar Wrobel <p at rdus.de>
+
+---
+ horde-webmail/config/prefs.php                     |   17 ++++++++++-
+ horde-webmail/config/prefs.php.dist                |   17 ++++++++++-
+ .../kronolith/templates/edit/edit_timespan.inc     |   30 +++++++++++++------
+ 3 files changed, 52 insertions(+), 12 deletions(-)
+
+diff --git a/horde-webmail/config/prefs.php b/horde-webmail/config/prefs.php
+index c9e5d80..e3c591b 100644
+--- a/horde-webmail/config/prefs.php
++++ b/horde-webmail/config/prefs.php
+@@ -105,7 +105,7 @@ $prefGroups['language'] = array(
+     'column' => _("Your Information"),
+     'label' => _("Locale and Time"),
+     'desc' => _("Set your preferred language, timezone and date options."),
+-    'members' => array('language', 'timezone', 'twentyFour', 'date_format', 'first_week_day')
++    'members' => array('language', 'timezone', 'twentyFour', 'date_format', 'date_input_format', 'first_week_day')
+ );
+ 
+ $prefGroups['categories'] = array(
+@@ -346,6 +346,21 @@ $_prefs['date_format'] = array(
+     'desc' => _("Choose how to display dates:"),
+ );
+ 
++// date input format
++$_prefs['date_input_format'] = array(
++    'value' => 'year-month-day',
++    'locked' => false,
++    'shared' => true,
++    'type' => 'enum',
++    'enum' => array(
++        'day-month-year' => strftime('%d %b %Y'),
++        'month-day-year' => strftime('%b %d %Y'),
++        'year-day-month' => strftime('%Y %d %b'),
++        'year-month-day' => strftime('%Y %b %d'),
++    ),
++    'desc' => _("Choose order how to enter dates:"),
++);
++
+ // what day should be displayed as the first day of the week?
+ $_prefs['first_week_day'] = array(
+     'value' => '0',
+diff --git a/horde-webmail/config/prefs.php.dist b/horde-webmail/config/prefs.php.dist
+index 6e513ae..2d745f9 100644
+--- a/horde-webmail/config/prefs.php.dist
++++ b/horde-webmail/config/prefs.php.dist
+@@ -105,7 +105,7 @@ $prefGroups['language'] = array(
+     'column' => _("Your Information"),
+     'label' => _("Locale and Time"),
+     'desc' => _("Set your preferred language, timezone and date options."),
+-    'members' => array('language', 'timezone', 'twentyFour', 'date_format', 'first_week_day')
++    'members' => array('language', 'timezone', 'twentyFour', 'date_format', 'date_input_format', 'first_week_day')
+ );
+ 
+ $prefGroups['categories'] = array(
+@@ -344,6 +344,21 @@ $_prefs['date_format'] = array(
+     'desc' => _("Choose how to display dates:"),
+ );
+ 
++// date input format
++$_prefs['date_input_format'] = array(
++    'value' => 'year-month-day',
++    'locked' => false,
++    'shared' => true,
++    'type' => 'enum',
++    'enum' => array(
++        'day-month-year' => strftime('%d %b %Y'),
++        'month-day-year' => strftime('%b %d %Y'),
++        'year-day-month' => strftime('%Y %d %b'),
++        'year-month-day' => strftime('%Y %b %d'),
++    ),
++    'desc' => _("Choose order how to enter dates:"),
++);
++
+ // what day should be displayed as the first day of the week?
+ $_prefs['first_week_day'] = array(
+     'value' => '0',
+diff --git a/horde-webmail/kronolith/templates/edit/edit_timespan.inc b/horde-webmail/kronolith/templates/edit/edit_timespan.inc
+index 9926617..05f5042 100644
+--- a/horde-webmail/kronolith/templates/edit/edit_timespan.inc
++++ b/horde-webmail/kronolith/templates/edit/edit_timespan.inc
+@@ -12,11 +12,16 @@
+  </td>
+  <td colspan="2" class="rightAlign"><?php echo _("On") ?> </td>
+  <td>
+-  <?php echo $event->html('start[year]') ?>
+-  -
+-  <?php echo $event->html('start[month]') ?>
+-  -
+-  <?php echo $event->html('start[day]') ?>
++ <?php
++     $dateorder = $GLOBALS['prefs']->getValue('date_input_format');
++     $dateorder = $dateorder != "" ? $dateorder : "year-month-day";
++     $dateorder = explode("-", $dateorder );
++     $datefields = array();
++     foreach ($dateorder as $fld) {
++	   $datefields[] = $event->html('start['.$fld.']');
++	 }
++     echo implode("-", $datefields);
++ ?>
+ <?php if ($GLOBALS['browser']->hasFeature('dom')): ?>
+   <span id="start_wday"></span>
+   <script type="text/javascript">
+@@ -62,11 +67,16 @@
+   <?php echo Horde::label('end_year', _("On")) ?> 
+  </td>
+  <td>
+-  <?php echo $event->html('end[year]') ?>
+-  -
+-  <?php echo $event->html('end[month]') ?>
+-  -
+-  <?php echo $event->html('end[day]') ?>
++ <?php
++     $dateorder = $GLOBALS['prefs']->getValue('date_input_format');
++     $dateorder = $dateorder != "" ? $dateorder : "year-month-day";
++     $dateorder = explode("-", $dateorder );
++     $datefields = array();
++     foreach ($dateorder as $fld) {
++	   $datefields[] = $event->html('end['.$fld.']');
++	 }
++     echo implode("-", $datefields);
++ ?>
+ <?php if ($GLOBALS['browser']->hasFeature('dom')): ?>
+   <span id="end_wday"></span>
+   <script type="text/javascript">
+-- 
+tg: (8d3a749..) t/kronolith/HK/UV/dateInputFieldOrder (depends on: t/kronolith/HK/GW/ExportEventList)
+-- 
+TOPGIT patch commit log
+=======================
+
+commit 09e3d2df656b820ae7fbaacce1060958e4b889b9
+Author: Gunnar Wrobel <p at rdus.de>
+Date:   Thu Nov 5 09:26:25 2009 +0100
+
+    Imported patch from kolab/issue3844 (New user preference to specify order of date input fields)
 diff -c a/horde-webmail/lib/Horde/Kolab/Storage/Folder.php b/horde-webmail/lib/Horde/Kolab/Storage/Folder.php
 --- a/horde-webmail/lib/Horde/Kolab/Storage/Folder.php
 +++ b/horde-webmail/lib/Horde/Kolab/Storage/Folder.php





More information about the commits mailing list