]> err.no Git - scalable-opengroupware.org/commitdiff
Anais/Addressbook integration
authorznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 13 Oct 2004 01:33:00 +0000 (01:33 +0000)
committerznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 13 Oct 2004 01:33:00 +0000 (01:33 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@391 d1b88da0-ebda-0310-925b-ed51d893ca5b

SOGo/UI/Mailer/ChangeLog
SOGo/UI/Mailer/English.lproj/default.strings
SOGo/UI/Mailer/GNUmakefile
SOGo/UI/Mailer/UIxMailAddressbook.m [new file with mode: 0644]
SOGo/UI/Mailer/UIxMailAddressbook.wox [new file with mode: 0644]
SOGo/UI/Mailer/UIxMailToSelection.m
SOGo/UI/Mailer/mailer.js
SOGo/UI/Mailer/product.plist

index c0ef4db5c2fbe37066d329be2b2ff90cb3a42914..6cba983ac203e531e30fca89423e76dcd151ab2e 100644 (file)
@@ -1,3 +1,15 @@
+2004-10-13  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+        * v0.9.38
+
+        * UIxMailToSelection.[wox|m]: removed superfluous debug messages
+
+        * UIxMailAdressbook.[wox|m]: redirect cover for Addressbook and Anais
+
+        * mailer.js: new JavaScript to open Addressbook and Anais windows
+
+        * product.plist: added Addressbook/Anais entries
+
 2004-10-12  Marcus Mueller  <znek@mulle-kybernetik.com>
 
         * v0.9.37
index 953dd592a8331c5c087205d1b5e40ed890316f5c..d3ed4dc3263dd7c57885f82d07dfa03c78548c89 100644 (file)
@@ -7,3 +7,6 @@
 "to"            = "To";
 "cc"            = "Cc";
 "bcc"           = "Bcc";
+
+"Addressbook"   = "Addressbook";
+"Anais"         = "Anais";
index bc230ba31573e66da5e93504f6d3863e5a2ef7bf..e41a60daba934567d72dd8f0a58814bfc6cb09f8 100644 (file)
@@ -29,6 +29,7 @@ MailerUI_OBJC_FILES += \
        UIxMailEditor.m         \
        UIxMailEditorAction.m   \
        UIxMailToSelection.m    \
+       UIxMailAddressbook.m    \
        \
        UIxMailPartViewer.m             \
        UIxMailPartTextViewer.m         \
@@ -52,6 +53,7 @@ MailerUI_RESOURCE_FILES += \
        \
        UIxMailEditor.wox       \
        UIxMailToSelection.wox  \
+       UIxMailAddressbook.wox  \
        \
        UIxMailPartTextViewer.wox       \
        UIxMailPartMixedViewer.wox      \
diff --git a/SOGo/UI/Mailer/UIxMailAddressbook.m b/SOGo/UI/Mailer/UIxMailAddressbook.m
new file mode 100644 (file)
index 0000000..0783e32
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+  Copyright (C) 2000-2004 SKYRIX Software AG
+
+  This file is part of OGo
+
+  OGo is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the
+  Free Software Foundation; either version 2, or (at your option) any
+  later version.
+
+  OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with OGo; see the file COPYING.  If not, write to the
+  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+  02111-1307, USA.
+*/
+// $Id$
+
+
+#include <SOGoUI/UIxComponent.h>
+
+
+@interface UIxMailAddressbook : UIxComponent
+{
+
+}
+
+- (NSString *)contactsPath;
+- (NSString *)anaisPath;
+
+@end
+
+#include "common.h"
+
+@implementation UIxMailAddressbook
+
+- (NSString *)contactsPath {
+    return [[self userFolderPath]
+                  stringByAppendingPathComponent:@"Contacts/select"];
+}
+
+- (NSString *)anaisPath {
+    return @"/anais/aideAnais.php";
+}
+
+- (id)defaultAction {
+    NSString *path = [self contactsPath];
+    path = [path stringByAppendingString:@"?callback=addAddress"];
+    return [self redirectToLocation:path];
+}
+
+- (id)anaisAction {
+    NSString *path, *param;
+    
+    param = @"?m_fonc=addAddress&m_champ=mail,uid,sn#mon_etiquette";
+    path  = [[self anaisPath] stringByAppendingString:param];
+    return [self redirectToLocation:path];
+}
+
+@end
diff --git a/SOGo/UI/Mailer/UIxMailAddressbook.wox b/SOGo/UI/Mailer/UIxMailAddressbook.wox
new file mode 100644 (file)
index 0000000..48ca008
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version='1.0' standalone='yes'?>
+
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:var="http://www.skyrix.com/od/binding"
+      xmlns:const="http://www.skyrix.com/od/constant"
+      xmlns:rsrc="OGo:url"
+>
+  <head>
+    <title><var:string value="name"/></title>
+  </head>
+
+  <body>
+  The template of Web Component <em><var:string value="name"/></em> has not been edited, yet.
+  </body>
+</html>
\ No newline at end of file
index 41df6cd83e177bff4e4f5e28bb50a266af906758..046887c08d32b21ec46cb6c6c857273764ac4012 100644 (file)
@@ -103,17 +103,6 @@ static NSArray *headers = nil;
   [super dealloc];
 }
 
-/* notifications */
-
-- (void)awake {
-  [super awake];
-  NSLog(@"%s", __PRETTY_FUNCTION__);
-}
-
-- (void)sleep {
-  [super sleep];
-}
-
 /* accessors */
 
 - (void)setTo:(NSArray *)_to {
index 52a5807c29c0fe04fdc2d622727119b52c7d2446..4b2fc1d17ff5f50516d4f5a2876d12f4aa1e6326 100644 (file)
@@ -79,3 +79,27 @@ function clickedEditorSave(sender) {
   document.pageform.submit();
   return true;
 }
+
+/* addressbook helpers */
+
+function openAnais(sender) {
+  var urlstr;
+
+  urlstr = "anais";
+  var w = window.open(urlstr, "Anais",
+                      "width=350,height=600,left=10,top=10,toolbar=no," +
+                      "dependent=yes,menubar=no,location=no,resizable=yes," +
+                      "scrollbars=yes,directories=no,status=no");
+  w.focus();
+}
+
+function openAddressbook(sender) {
+  var urlstr;
+  
+  urlstr = "addressbook";
+  var w = window.open(urlstr, "Addressbook",
+                      "width=600,height=400,left=10,top=10,toolbar=no," +
+                      "dependent=yes,menubar=no,location=no,resizable=yes," +
+                      "scrollbars=yes,directories=no,status=no");
+  w.focus();
+}
index 3bba8b1ecdc100d3843a623e2940f99b81c4ce99..69950b488dd34984817996ecc754253d86fb2110 100644 (file)
                 onclick  = "clickedCompose(this);return false;";
                 cssClass = "tbicon_compose"; label = "Write";
               },
-              {
-                link  = "addressbook"; target = "addressbook";
-                cssClass = "tbicon_addressbook"; label = "Addressbook";
-              }
             ),
             ( /* second group */
               { link = "#"; 
         compose = {
           protectedBy = "View";
           actionClass = "UIxMailEditorAction"; 
-         actionName  = "compose";
+          actionName  = "compose";
         };
       };
     };
                 cssClass = "tbicon_getmail"; label = "Get Mail"; },
               { link  = "compose"; target = "_blank";
                 cssClass = "tbicon_compose"; label = "Write"; },
-              { link  = "addressbook"; target = "addressbook";
-                cssClass = "tbicon_addressbook"; label = "Addressbook"; }
             ),
             ( /* second group */
               { link = "reply"; 
           protectedBy = "View";
           pageName    = "UIxMailEditor"; 
         };
-
         compose = {
           protectedBy = "View";
           actionClass = "UIxMailEditorAction"; 
-         actionName  = "compose";
+          actionName  = "compose";
         };
         reply = {
           protectedBy = "View";
           actionClass = "UIxMailEditorAction"; 
-         actionName  = "reply";
+          actionName  = "reply";
         };
         replyall = {
           protectedBy = "View";
           actionClass = "UIxMailEditorAction"; 
-         actionName  = "replyall";
+          actionName  = "replyall";
         };
         forward = {
           protectedBy = "View";
           actionClass = "UIxMailEditorAction"; 
-         actionName  = "forward";
+          actionName  = "forward";
         };
       };
     };
             ( /* first group */
               { link  = "getMail";
                 cssClass = "tbicon_getmail"; label = "Get Mail"; },
-              { link  = "addressbook"; target = "addressbook";
-                cssClass = "tbicon_addressbook"; label = "Addressbook"; }
             )
           );
         };
             ( /* first group */
               { link  = "getMail";
                 cssClass = "tbicon_getmail"; label = "Get Mail"; },
-              { link  = "addressbook"; target = "addressbook";
-                cssClass = "tbicon_addressbook"; label = "Addressbook"; }
             )
           );
         };
           protectedBy = "View";
           pageName    = "UIxMailAccountView"; 
         };
+        addressbook = {
+          protectedBy = "View";
+          pageName    = "UIxMailAddressbook"; 
+        };
+        anais = {
+          protectedBy = "View";
+          pageName    = "UIxMailAddressbook";
+          actionName  = "anais";
+        };
       };
     };
 
               {
                 link     = "#"; // "compose"; // target = "_blank";
                 onclick  = "clickedCompose(this);return false;";
-                cssClass = "tbicon_compose"; label = "Write";
-              },
-              { link  = "addressbook"; target = "addressbook";
-                cssClass = "tbicon_addressbook"; label = "Addressbook"; },
+                cssClass = "tbicon_compose"; label = "Write"; },
             )
           );
         };
         compose = {
           protectedBy = "View";
           actionClass = "UIxMailEditorAction"; 
-         actionName  = "compose";
+          actionName  = "compose";
         };
       };
     };
               { link  = "#";
                 onclick  = "clickedEditorSend(this);return false;";
                 cssClass = "tbicon_send"; label = "Send"; },
-              { link  = "contacts"; target = "addressbook";
-                cssClass = "tbicon_addressbook"; label = "Contacts"; },
+              { link  = "#"; target = "addressbook";
+                onclick  = "openAddressbook(this);return false;";
+                cssClass = "tbicon_addressbook"; label = "Addressbook"; },
+              { link  = "#"; target = "anais";
+                onclick  = "openAnais(this);return false;";
+                cssClass = "tbicon_addressbook"; label = "Anais"; },
               { link  = "#"; 
                 onclick  = "clickedEditorAttach(this);return false;";
                 cssClass = "tbicon_attach"; label = "Attach"; },
           protectedBy = "View";
           pageName    = "UIxMailEditor"; 
         };
+        addressbook = {
+          protectedBy = "View";
+          pageName    = "UIxMailAddressbook";
+        };
+        anais = {
+          protectedBy = "View";
+          pageName    = "UIxMailAddressbook";
+          actionName  = "anais";
+        };
       };
     };
   };