gunnar: server/patches/horde-webmail/1.2.0 horde-webmail-1.2.0_kolab_openpkg.patch, 1.29, 1.30

cvs at kolab.org cvs at kolab.org
Fri Feb 20 11:30:27 CET 2009


Author: gunnar

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

Modified Files:
	horde-webmail-1.2.0_kolab_openpkg.patch 
Log Message:
Correct iTip option handling for dimp.

Index: horde-webmail-1.2.0_kolab_openpkg.patch
===================================================================
RCS file: /kolabrepository/server/patches/horde-webmail/1.2.0/horde-webmail-1.2.0_kolab_openpkg.patch,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- horde-webmail-1.2.0_kolab_openpkg.patch	18 Feb 2009 17:56:41 -0000	1.29
+++ horde-webmail-1.2.0_kolab_openpkg.patch	20 Feb 2009 10:30:25 -0000	1.30
@@ -16074,7 +16074,7 @@
  $conf['alarms']['params']['ttl'] = 300;
  $conf['alarms']['driver'] = 'sql';
 -- 
-tg: (9b36b88..) t/GLOBAL/HK/GW/ConfigOpenPKG (depends on: t/GLOBAL/HK/GW/Config)
+tg: (5c96f93..) t/GLOBAL/HK/GW/ConfigOpenPKG (depends on: t/GLOBAL/HK/GW/Config)
 From: Gunnar Wrobel <p at rdus.de>
 Subject: [PATCH] t/kronolith/HK/GW/SyncMLrefresh
 
@@ -18727,30 +18727,11 @@
 Signed-off-by: Gunnar Wrobel <p at rdus.de>
 
 ---
- horde-webmail/config/kolab.local.php       |   12 +++++++++
- horde-webmail/dimp/imp.php                 |   23 +++++++++++++++++
- horde-webmail/dimp/js/DimpBase.js          |   14 ++++++++++
- horde-webmail/imp/lib/MIME/Viewer/itip.php |   37 ++++++++++++++++++++++++++++
- 4 files changed, 86 insertions(+), 0 deletions(-)
+ horde-webmail/dimp/imp.php                 |   23 +++++++
+ horde-webmail/dimp/js/DimpBase.js          |   14 ++++
+ horde-webmail/imp/lib/MIME/Viewer/itip.php |   90 +++++++++++++++++++++-------
+ 3 files changed, 104 insertions(+), 23 deletions(-)
 
-diff --git a/horde-webmail/config/kolab.local.php b/horde-webmail/config/kolab.local.php
-new file mode 100644
-index 0000000..9652733
---- /dev/null
-+++ b/horde-webmail/config/kolab.local.php
-@@ -0,0 +1,12 @@
-+<?php
-+$conf['cookie']['domain'] = 'ec2-67-202-20-255.compute-1.amazonaws.com';
-+$conf['cookie']['path'] = '/horde-release/horde-webmail';
-+$conf['problems']['email'] = 'postmaster at ec2-67-202-20-255.compute-1.amazonaws.com';
-+$conf['problems']['maildomain'] = 'ec2-67-202-20-255.compute-1.amazonaws.com';
-+$conf['kolab']['ldap']['server'] = 'ec2-67-202-20-255.compute-1.amazonaws.com';
-+$conf['kolab']['ldap']['basedn'] = 'dc=ec2-67-202-20-255,dc=compute-1,dc=amazonaws,dc=com';
-+$conf['kolab']['ldap']['phpdn'] = 'cn=nobody,cn=internal,dc=ec2-67-202-20-255,dc=compute-1,dc=amazonaws,dc=com';
-+$conf['kolab']['ldap']['phppw'] = 'J7STTChPDQhcq+9n83/mBAtV7siu2CqrEoU5OHGC';
-+$conf['kolab']['imap']['server'] = 'ec2-67-202-20-255.compute-1.amazonaws.com';
-+$conf['kolab']['imap']['maildomain'] = 'ec2-67-202-20-255.compute-1.amazonaws.com';
-+?>
 diff --git a/horde-webmail/dimp/imp.php b/horde-webmail/dimp/imp.php
 index f8b9b5c..70264fe 100644
 --- a/horde-webmail/dimp/imp.php
@@ -18811,10 +18792,81 @@
      flag: function(action, index, folder)
      {
 diff --git a/horde-webmail/imp/lib/MIME/Viewer/itip.php b/horde-webmail/imp/lib/MIME/Viewer/itip.php
-index 1f8fe1e..8cc63c3 100644
+index 1f8fe1e..a900d27 100644
 --- a/horde-webmail/imp/lib/MIME/Viewer/itip.php
 +++ b/horde-webmail/imp/lib/MIME/Viewer/itip.php
-@@ -709,6 +709,43 @@ class IMP_MIME_Viewer_itip extends MIME_Viewer {
+@@ -622,7 +622,7 @@ class IMP_MIME_Viewer_itip extends MIME_Viewer {
+         case 'PUBLISH':
+             $desc = _("%s wishes to make you aware of \"%s\".");
+             if ($registry->hasMethod('calendar/import')) {
+-                $options[] = '<option value="import">' .   _("Add this to my calendar") . '</option>';
++                $options['import'] = _("Add this to my calendar");
+             }
+             break;
+ 
+@@ -655,35 +655,35 @@ class IMP_MIME_Viewer_itip extends MIME_Viewer {
+                     : _("%s wishes to make you aware of \"%s\".");
+             }
+             if ($is_update && $registry->hasMethod('calendar/replace')) {
+-                $options[] = '<option value="accept-import">' . _("Accept and update in my calendar") . '</option>';
+-                $options[] = '<option value="import">' . _("Update in my calendar") . '</option>';
++                $options['accept-import'] = _("Accept and update in my calendar");
++                $options['import'] = _("Update in my calendar");
+             } elseif ($registry->hasMethod('calendar/import')) {
+-                $options[] = '<option value="accept-import">' . _("Accept and add to my calendar") . '</option>';
+-                $options[] = '<option value="import">' . _("Add to my calendar") . '</option>';
++                $options['accept-import'] = _("Accept and add to my calendar");
++                $options['import'] = _("Add to my calendar");
+             }
+-            $options[] = '<option value="accept">' . _("Accept request") . '</option>';
+-            $options[] = '<option value="tentative">' . _("Tentatively Accept request") . '</option>';
+-            $options[] = '<option value="deny">' . _("Deny request") . '</option>';
+-            // $options[] = '<option value="delegate">' . _("Delegate position") . '</option>';
++            $options['accept'] = _("Accept request");
++            $options['tentative'] = _("Tentatively Accept request");
++            $options['deny'] = _("Deny request");
++            // $options['delegate'] = _("Delegate position");
+             break;
+ 
+         case 'ADD':
+             $desc = _("%s wishes to ammend \"%s\".");
+             if ($registry->hasMethod('calendar/import')) {
+-                $options[] = '<option value="import">' .   _("Update this event on my calendar") . '</option>';
++                $options['import'] = _("Update this event on my calendar");
+             }
+             break;
+ 
+         case 'REFRESH':
+             $desc = _("%s wishes to receive the latest information about \"%s\".");
+-            $options[] = '<option value="send">' . _("Send Latest Information") . '</option>';
++            $options['send'] = _("Send Latest Information");
+             break;
+ 
+         case 'REPLY':
+             $desc = _("%s has replied to the invitation to \"%s\".");
+             $sender = $this->_headers->getValue('From');
+             if ($registry->hasMethod('calendar/updateAttendee')) {
+-                $options[] = '<option value="update">' . _("Update respondent status") . '</option>';
++                $options['update'] = _("Update respondent status");
+             }
+             break;
+ 
+@@ -691,12 +691,12 @@ class IMP_MIME_Viewer_itip extends MIME_Viewer {
+             if (is_a($instance = $vevent->getAttribute('RECURRENCE-ID'), 'PEAR_Error')) {
+                 $desc = _("%s has cancelled \"%s\".");
+                 if ($registry->hasMethod('calendar/delete')) {
+-                    $options[] = '<option value="delete">' . _("Delete from my calendar") . '</option>';
++                    $options['delete'] = _("Delete from my calendar");
+                 }
+             } else {
+                 $desc = _("%s has cancelled an instance of the recurring \"%s\".");
+                 if ($registry->hasMethod('calendar/replace')) {
+-                    $options[] = '<option value="import">' . _("Update in my calendar") . '</option>';
++                    $options['import'] = _("Update in my calendar");
+                 }
+             }
+             break;
+@@ -709,6 +709,36 @@ class IMP_MIME_Viewer_itip extends MIME_Viewer {
              $desc = sprintf($desc, htmlspecialchars($sender), htmlspecialchars($summary));
          }
  
@@ -18835,17 +18887,10 @@
 +                return DIMP::actionButton($params);
 +            }
 +
-+            $script = 'if (DIMP.baseWindow) {var B = DIMP.baseWindow.DimpBase;} else {B = DimpBase;};var x=document.getElementById(\'button_invitation_img\');if (!x) {DimpCore.addPopdown(\'button_invitation\', \'itippopdown\');[ \'accept_import\', \'import\', \'accept\', \'tentative\', \'deny\' ].each(function(a) {var d = $(\'ctx_itippopdown_\' + a); if (d) { DimpCore.clickObserveHandler({ d: d, f: function(a) { B.itip(a, DIMP.conf.msg_index, DIMP.conf.msg_folder, ' . $id . '); window.close(); }.curry(a) });}});}';
-+
-+            $html .= '<span id="button_invitation_cont" onmouseover="' . $script . '">' . _createMEntry(_("Invitation"), 'kronolith.png', 'button_invitation', 'hasmenu', true, 'kronolith') . '</span>';
++            $script = 'if (DIMP.baseWindow) {var B = DIMP.baseWindow.DimpBase;} else {B = DimpBase;};DimpCore.addMouseEvents({ id: \'button_invitation_cont\', type: \'itippopdown\', offset: \'button_invitation_cont\', left: true});';
++	    $script .= '[ \'accept_import\', \'import\', \'accept\', \'tentative\', \'deny\', \'update\', \'send\' ].each(function(a) {var d = $(\'ctx_itippopdown_\' + a); if (d) { DimpCore.clickObserveHandler({ d: d, f: function(a) { B.itip(a, DIMP.conf.msg_index, DIMP.conf.msg_folder, ' . $id . '); window.close(); }.curry(a) })}})';
 +
-+            $html .= '<div class="context" id="ctx_itippopdown">';
-+            $html .= '<div>' . _createMEntry(_("Accept and update in my calendar"), 'kronolith.png', 'ctx_itippopdown_accept_import', '', true, 'kronolith') . '</div>';
-+            $html .= '<div>' . _createMEntry(_("Update in my calendar"), 'kronolith.png', 'ctx_itippopdown_import', '', true, 'kronolith') . '</div>';
-+            $html .= '<div>' . _createMEntry(_("Accept request"), 'kronolith.png', 'ctx_itippopdown_accept', '', true, 'kronolith') . '</div>';
-+            $html .= '<div>' . _createMEntry(_("Tentatively Accept request"), 'kronolith.png', 'ctx_itippopdown_tentative', '', true, 'kronolith') . '</div>';
-+            $html .= '<div>' . _createMEntry(_("Deny request"), 'kronolith.png', 'ctx_itippopdown_deny', '', true, 'kronolith') . '</div>';
-+            $html .= '</div>';
++            $html .= '<div><span id="button_invitation_cont" onmouseover="' . $script . '">' . _createMEntry(_("Invitation"), 'kronolith.png', 'button_invitation', 'hasmenu', true, 'kronolith') . Horde::img('popdown.png', '', array(), $GLOBALS['registry']->getImageDir('dimp')) . '</span></div><p/>';
 +
 +            if ($this->_msgs) {
 +                global $notification;
@@ -18858,6 +18903,46 @@
          $html .= '<h2 class="header">' . $desc . '</h2>';
  
          if ($this->_msgs) {
+@@ -796,16 +826,30 @@ class IMP_MIME_Viewer_itip extends MIME_Viewer {
+             $html .= '</tbody></table>';
+         }
+ 
+-        if ($_SESSION['imp']['viewmode'] != 'imp') {
+-            return $html;
+-        }
+-
+         if ($options) {
+-            $html .= '<h2 class="smallheader">' . _("Actions") . '</h2>' .
+-                '<label for="action_' . $id . '" class="hidden">' . _("Actions") . '</label>' .
+-                '<select id="action_' . $id . '" name="action[' . $id . ']">' .
+-                implode("\n", $options) .
+-                '</select> <input type="submit" class="button" value="' . _("Go") . '" />';
++
++            if ($_SESSION['imp']['viewmode'] == 'imp') {
++
++                $html .= '<h2 class="smallheader">' . _("Actions") . '</h2>' .
++                    '<label for="action_' . $id . '" class="hidden">' . _("Actions") . '</label>' .
++                    '<select id="action_' . $id . '" name="action[' . $id . ']">';
++
++                foreach ($options as $key => $description) {
++                    $html .= '<option value="' . $key .'">' . $description . "</option>\n";
++                }
++
++                $html .= '</select> <input type="submit" class="button" value="' . _("Go") . '" />';
++
++            } else if ($_SESSION['imp']['viewmode'] == 'dimp') {
++
++                $html .= '<div class="context" id="ctx_itippopdown">';
++
++                foreach ($options as $key => $description) {
++                    $html .= '<div>' . _createMEntry($description, 'kronolith.png', 'ctx_itippopdown_' . $key, '', true, 'kronolith') . '</div>';
++                }
++
++                $html .= '</div>';
++            }
+         }
+ 
+         return $html;
 -- 
 tg: (667dce6..) t/dimp/HK/GW/ItipHandling (depends on: master t/dimp/H/MS/FixBrokenFolderImages)
 diff -c 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