gunnar: server/patches/horde-webmail/1.2.0/tg t_dimp_HK_GW_ItipHandling.diff, 1.3, 1.4

cvs at kolab.org cvs at kolab.org
Fri Feb 20 15:54:51 CET 2009


Author: gunnar

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

Modified Files:
	t_dimp_HK_GW_ItipHandling.diff 
Log Message:
Fixed accept import and moved script initialization from onmouseover event.

Index: t_dimp_HK_GW_ItipHandling.diff
===================================================================
RCS file: /kolabrepository/server/patches/horde-webmail/1.2.0/tg/t_dimp_HK_GW_ItipHandling.diff,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- t_dimp_HK_GW_ItipHandling.diff	20 Feb 2009 10:30:25 -0000	1.3
+++ t_dimp_HK_GW_ItipHandling.diff	20 Feb 2009 14:54:49 -0000	1.4
@@ -8,8 +8,8 @@
 ---
  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(-)
+ horde-webmail/imp/lib/MIME/Viewer/itip.php |   98 ++++++++++++++++++++--------
+ 3 files changed, 108 insertions(+), 27 deletions(-)
 
 diff --git a/horde-webmail/dimp/imp.php b/horde-webmail/dimp/imp.php
 index f8b9b5c..70264fe 100644
@@ -71,9 +71,42 @@
      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..a900d27 100644
+index 1f8fe1e..e030413 100644
 --- a/horde-webmail/imp/lib/MIME/Viewer/itip.php
 +++ b/horde-webmail/imp/lib/MIME/Viewer/itip.php
+@@ -122,7 +122,7 @@ class IMP_MIME_Viewer_itip extends MIME_Viewer {
+                 break;
+ 
+             case 'import':
+-            case 'accept-import':
++            case 'acceptimport':
+                 // vFreebusy reply.
+                 // vFreebusy publish.
+                 // vEvent request.
+@@ -202,12 +202,12 @@ class IMP_MIME_Viewer_itip extends MIME_Viewer {
+                     $this->_msgs[$key][] = array('warning', _("This action is not yet implemented."));
+                 }
+ 
+-                if ($action != 'accept-import') {
++                if ($action != 'acceptimport') {
+                     break;
+                 }
+ 
+             case 'accept':
+-            case 'accept-import':
++            case 'acceptimport':
+             case 'deny':
+             case 'tentative':
+                 // vEvent request.
+@@ -279,7 +279,7 @@ class IMP_MIME_Viewer_itip extends MIME_Viewer {
+ 
+                     switch ($action) {
+                     case 'accept':
+-                    case 'accept-import':
++                    case 'acceptimport':
+                         $message = sprintf(_("%s has accepted."), $name);
+                         $subject = _("Accepted: ") . $vEvent->getAttribute('SUMMARY');
+                         $params['PARTSTAT'] = 'ACCEPTED';
 @@ -622,7 +622,7 @@ class IMP_MIME_Viewer_itip extends MIME_Viewer {
          case 'PUBLISH':
              $desc = _("%s wishes to make you aware of \"%s\".");
@@ -89,12 +122,12 @@
              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['acceptimport'] = _("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['acceptimport'] = _("Accept and add to my calendar");
 +                $options['import'] = _("Add to my calendar");
              }
 -            $options[] = '<option value="accept">' . _("Accept request") . '</option>';
@@ -167,9 +200,9 @@
 +            }
 +
 +            $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) })}})';
++	    $script .= '[ \'acceptimport\', \'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><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/>';
++            $html .= '<div><span id="button_invitation_cont">' . _createMEntry(_("Invitation"), 'kronolith.png', 'button_invitation', 'hasmenu', true, 'kronolith') . Horde::img('popdown.png', '', array(), $GLOBALS['registry']->getImageDir('dimp')) . '</span></div><p/><script type="text/javascript">' . $script . '</script>';
 +
 +            if ($this->_msgs) {
 +                global $notification;





More information about the commits mailing list