[kronolith] Feature requests

Jan Schneider janmailing@gmx.de
Mon, 25 Jun 2001 22:42:50 +0200


---------------------- multipart/mixed attachment
Ooops.

Zitat von Chuck Hagenbuch <chuck@horde.org>:

> Quoting Jan Schneider <janmailing@gmx.de>:
> 
> > This one is easy. Attached is the patch. It also fixes some redundant
> border 
> > attributes.
> 
> The patch you sent just fixed some things to use Horde::getFormData()...
> 
> > Not as easy but is on my todo list.
> 
> Cool. :)
> 
> -chuck
> 
> --
> Charles Hagenbuch, <chuck@horde.org>
> Some fallen angels have their good reasons.
> 
> -- 
> Kronolith mailing list: http://horde.org/kronolith/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: kronolith-unsubscribe@lists.horde.org
> 
> 


::::::::::::::::::::::::::::::::::::::::
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax  +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::
---------------------- multipart/mixed attachment
Index: lib/DayView.php
===================================================================
RCS file: /cvs/horde/kronolith/lib/DayView.php,v
retrieving revision 1.36
diff -u -r1.36 DayView.php
--- lib/DayView.php	2001/05/31 03:59:03	1.36
+++ lib/DayView.php	2001/06/25 12:25:29
@@ -51,7 +51,7 @@
             $row_set = false;
             $current = 0;
             $time = date(($prefs->getValue('24hr')) ? 'G:i' : 'g:ia', $hours[$i]['timestamp']);
-            $style = (floor($i/2) % 2) ? 'item1' : 'item0';
+            $style = ((($prefs->getValue('half')) ? $i : floor($i/2)) % 2) ? 'item1' : 'item0';
         
             if (count($current_arr) > 0) {
                 reset($current_arr);
@@ -97,10 +97,16 @@
                 $row = '<td width="100%" colspan="' . $this->columns . '" class="' . $style . '">&nbsp;</td>' . "\n";
             }
         
-            if ($i % 2) {
-                include $template_path . '/day/row_half.inc';
-            } else {
+            if ($prefs->getValue('half')) {
+                $rowspan = false;
                 include $template_path . '/day/row.inc';
+            } else {
+                $rowspan = true;
+                if ($i % 2) {
+                    include $template_path . '/day/row_half.inc';
+                } else {
+                    include $template_path . '/day/row.inc';
+                }
             }
         }
         include $template_path . '/day/foot.inc';
Index: lib/WeekView.php
===================================================================
RCS file: /cvs/horde/kronolith/lib/WeekView.php,v
retrieving revision 1.8
diff -u -r1.8 WeekView.php
--- lib/WeekView.php	2001/06/14 14:34:01	1.8
+++ lib/WeekView.php	2001/06/25 12:25:29
@@ -79,7 +79,7 @@
             $started = true;
             $row = '';
             $time = date(($prefs->getValue('24hr')) ? 'G:i' : 'g:ia', $hours[$i]['timestamp']);
-            $style = (floor($i/2) % 2) ? 'item1' : 'item0';
+            $style = ((($prefs->getValue('half')) ? $i : floor($i/2)) % 2) ? 'item1' : 'item0';
             
             for ($j = $this->startDay; $j <= $this->endDay; $j++) {
                 $hspan = 0;
@@ -134,10 +134,16 @@
                 }
             }
         
-            if ($i % 2) {
-                include $template_path . '/day/row_half.inc';
-            } else {
+            if ($prefs->getValue('half')) {
+                $rowspan = false;
                 include $template_path . '/day/row.inc';
+            } else {
+                $rowspan = true;
+                if ($i % 2) {
+                    include $template_path . '/day/row_half.inc';
+                } else {
+                    include $template_path . '/day/row.inc';
+                }
             }
         }
         include $template_path . '/day/foot.inc';
Index: templates/day/row.inc
===================================================================
RCS file: /cvs/horde/kronolith/templates/day/row.inc,v
retrieving revision 1.3
diff -u -r1.3 row.inc
--- templates/day/row.inc	2001/06/18 21:59:19	1.3
+++ templates/day/row.inc	2001/06/25 12:25:29
@@ -1,5 +1,5 @@
   <tr class="<?= $style ?>">
-    <td width="1%" class="<?= $style ?>" rowspan="2" align="right">
+    <td width="1%" class="<?= $style ?>" <? if ($rowspan) echo 'rowspan="2" '; ?>align="right">
       <a href="<?= Horde::applicationUrl("addevent.php?timestamp=" . $hours[$i]['timestamp']) ?>"><?= $time ?></a>
     </td>
     <td width="1%" class="<?= $style ?>"><img src="graphics/clear.gif" width="5" height="10" border="0"></td>
Index: templates/day/head.inc
===================================================================
RCS file: /cvs/horde/kronolith/templates/day/head.inc,v
retrieving revision 1.4
diff -u -r1.4 head.inc
--- templates/day/head.inc	2001/06/18 21:59:19	1.4
+++ templates/day/head.inc	2001/06/25 12:25:29
@@ -1,11 +1,11 @@
 	<table border="0" cellspacing="0" cellpadding="1" width="100%">
 	  <tr class="header">
 	    <td width="1%" align="left">
-	      <?= Horde::link($this->link(-1), _("Previous day"), 'menu') .  Horde::img('prev.gif', 'hspace="2" border="0" alt="&lt;"') ?></a>
+	      <?= Horde::link($this->link(-1), _("Previous day"), 'menu') .  Horde::img('prev.gif', 'hspace="2" alt="&lt;"') ?></a>
 	    </td>
 	    <td class="header" colspan="<?= ($this->columns + 1) ?>" align="right">
 	      <b><?= $this->Day->getTime('l F j, Y') ?></b>
-	      <?= Horde::link($this->link(1), _("Next day"), 'menu') . Horde::img('next.gif', 'hspace="2" border="0" alt="&gt;"') ?></a>
+	      <?= Horde::link($this->link(1), _("Next day"), 'menu') . Horde::img('next.gif', 'hspace="2" alt="&gt;"') ?></a>
 	    </td>
 	  </tr>
 	  
Index: config/prefs.php.dist
===================================================================
RCS file: /cvs/horde/kronolith/config/prefs.php.dist,v
retrieving revision 1.2
diff -u -r1.2 prefs.php.dist
--- config/prefs.php.dist	2001/05/29 21:31:26	1.2
+++ config/prefs.php.dist	2001/06/25 12:25:29
@@ -13,7 +13,13 @@
     'desc' => _("Change the way dates and times are formatted."),
     'members' => array('24hr'));
 
+$prefGroups['view'] = array(
+    'column' => _("Display Options"),
+    'label' => _("Display Option"),
+    'desc' => _("Select how to display the different views."),
+    'members' => array('half'));
 
+
 // user language
 $_prefs['language'] = array(
     'value' => 'en',
@@ -29,5 +35,13 @@
     'shared' => false,
     'type' => 'checkbox',
     'desc' => _("Display 24-hour times?"));
+
+// half hour slots
+$_prefs['half'] = array(
+    'value' => 0,
+    'locked' => false,
+    'shared' => false,
+    'type' => 'checkbox',
+    'desc' => _("Show half hour slots in day and week views?"));
 
 ?>

---------------------- multipart/mixed attachment--