]> err.no Git - scalable-opengroupware.org/commitdiff
work on mail contacts editor
authorhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 14 Feb 2005 22:41:47 +0000 (22:41 +0000)
committerhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 14 Feb 2005 22:41:47 +0000 (22:41 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@562 d1b88da0-ebda-0310-925b-ed51d893ca5b

17 files changed:
SOGo/UI/Contacts/ChangeLog
SOGo/UI/Contacts/UIxContactEditor.h [new file with mode: 0644]
SOGo/UI/Contacts/UIxContactEditor.m
SOGo/UI/Contacts/Version
SOGo/UI/Mailer/ChangeLog
SOGo/UI/Mailer/UIxSieveEditor.wox
SOGo/UI/Mailer/Version
SOGo/UI/Mailer/mailer.js
SOGo/UI/MailerContacts/ChangeLog
SOGo/UI/MailerContacts/GNUmakefile
SOGo/UI/MailerContacts/UIxMailContactEditor.m [new file with mode: 0644]
SOGo/UI/MailerContacts/UIxMailContactEditor.wox [new file with mode: 0644]
SOGo/UI/MailerContacts/UIxMailContactList.m
SOGo/UI/MailerContacts/UIxMailContactList.wox
SOGo/UI/MailerContacts/Version
SOGo/UI/MailerContacts/mailercontacts.js [new file with mode: 0644]
SOGo/UI/MailerContacts/product.plist

index 0ca1d3110697f20ed438f62aab0b3c3bc23fc6aa..27a4beb2d21137a6c8454bc1699a0e63be064fb9 100644 (file)
@@ -1,5 +1,7 @@
 2005-02-14  Helge Hess  <helge.hess@opengroupware.org>
 
+       * UIxContactEditor.m: moved header file to own file (v0.9.21)
+
        * UIxContactsListView.m: added ability in code to sort descending if
          the desc=1 query parameter is set (v0.9.20)
 
diff --git a/SOGo/UI/Contacts/UIxContactEditor.h b/SOGo/UI/Contacts/UIxContactEditor.h
new file mode 100644 (file)
index 0000000..535b297
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+  Copyright (C) 2004-2005 SKYRIX Software AG
+
+  This file is part of OpenGroupware.org.
+
+  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.
+*/
+
+#include <SOGoUI/UIxComponent.h>
+
+@class NSMutableDictionary;
+
+@interface UIxContactEditor : UIxComponent
+{
+  NSString *contentString;
+  NSString *errorText;
+  NSMutableDictionary *snapshot; /* contains the values for editing */
+}
+
+@end
index 9127ad2bafe0baf090938289e9faef1120b61063..674141f67f2007edcf7b02c3d115f2a51c4322cb 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2004 SKYRIX Software AG
+  Copyright (C) 2004-2005 SKYRIX Software AG
 
   This file is part of OpenGroupware.org.
 
   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.
 */
-// $Id$
-
-
-#include <SOGoUI/UIxComponent.h>
-
-@class NSMutableDictionary;
-
-@interface UIxContactEditor : UIxComponent
-{
-  NSString *contentString;
-  NSString *errorText;
-  NSMutableDictionary *snapshot; /* contains the values for editing */
-}
-
-@end
 
+#include "UIxContactEditor.h"
 #include <Contacts/SOGoContactObject.h>
 #include <Contacts/SOGoContactFolder.h>
 #include "common.h"
index da289815c44447b4496b934afb629d8b0baea9f2..7bdce601e433dd1986a889b09f1660dacbc489d3 100644 (file)
@@ -1,6 +1,6 @@
 # GNUstep makefile
 
-SUBMINOR_VERSION:=20
+SUBMINOR_VERSION:=21
 
 # v0.9.18 requires NGExtensions v4.5.136
 # v0.9.16 requires libSOGoUI    v0.9.16
index 0119aa6f7b7a0c9ad661cf0c77ef486d87c22d01..9bcebc5916afd7d76fcd4cd0edb483ae80cfd7b0 100644 (file)
@@ -1,9 +1,11 @@
 2005-02-14  Helge Hess  <helge.hess@opengroupware.org>
 
-       * UIxMailTree.m: always stop tree on user folder (v0.9.108)
+       * mailer.js: use 'tb.view' instead of 'view' to show a page (v0.9.109)
 
+       * UIxMailTree.m: always stop tree on user folder (v0.9.108)
+       
        * v0.9.107
-
+       
        * product.plist: mapped 'namespaced' "tb.view" SOPE method to the same
          methods like "view". This allows us to use "tb.view" inside the
          mailer without clashing with other UIs on top of the same SoObjects
index d3d7fcfad04e366dcd0ab601391db86654d4cfd0..56f4f5028ca622b06a974a414585400578d5c61b 100644 (file)
   title="panelTitle"
   const:hideFolderTree="1"
 >
- <div id="compose_panel">
-  <div id="compose_subject">
-    <table border="0" width="100%">
-      <tr>
-        <td class="compose_label" width="15%">
-          <!-- TODO: localize -->
-          Scriptname:
-        </td>
-        <td width="85%"><input name="scriptName" 
-                               id="compose_subject_input" type="text" 
-                              var:value="scriptName" /></td>
-      </tr>
-    </table>
+  <div id="compose_panel">
+    <div id="compose_subject">
+      <table border="0" width="100%">
+        <tr>
+          <td class="compose_label" width="15%">
+            <!-- TODO: localize -->
+            <var:string label:value="Scriptname"/>:
+          </td>
+          <td width="85%"><input name="scriptName" 
+                                 id="compose_subject_input" type="text" 
+                              var:value="scriptName" /></td>
+        </tr>
+      </table>
+    </div>
+  
+    <!-- separator line -->
+    <div id="compose_text">
+      <textarea name="scriptContent" var:value="scriptText" />
+    </div>
   </div>
-
-  <!-- separator line -->
-  <div id="compose_text">
-    <textarea name="scriptContent" var:value="scriptText" />
-  </div>
- </div>
 </var:component>
index d70070fe78a524d7fd5f16fcd94b6245a5f2c478..86b9dc0351f63b372b5b3b3be9f41e5b75931bf4 100644 (file)
@@ -1,6 +1,6 @@
 # version file
 
-SUBMINOR_VERSION:=108
+SUBMINOR_VERSION:=109
 
 # v0.9.100 requires libNGMime        v4.5.213
 # v0.9.99  requires libNGMime        v4.5.212
index 0a4f06ccfa7b5237c702d16e5c098075790e9c81..c7b2711e6b7677fbf8908d011763a6fc8c41e80c 100644 (file)
@@ -23,7 +23,7 @@ function openMessageWindow(sender, msguid, url) {
 
 function clickedUid(sender, msguid) {
   resetSelection(window);
-  openMessageWindow(sender, msguid, msguid + "/view");
+  openMessageWindow(sender, msguid, msguid + "/tb.view");
   return true;
 }
 function doubleClickedUid(sender, msguid) {
index 083d2403a01ebed0afa037a39b0eb11d2f4a6c7f..e16ebd0ccdd3594f92caaac9bd0af5390ed756c8 100644 (file)
@@ -1,5 +1,7 @@
 2005-02-14  Helge Hess  <helge.hess@opengroupware.org>
 
+       * work on contact editor (v0.9.2)
+
        * UIxMailContactList.wox: use sortable mail header component from 
          MailerUI (need to copy some images until the resource lookup in SOPE
          is improved to properly span multiple products)
index c9645e7e46dc87787ad2d60e0f950e5770a0bf1f..705ded19eddb57d8452ad6a2366491b4d7fd9116 100644 (file)
@@ -11,7 +11,8 @@ MailerContactsUI_LANGUAGES = English French
 MailerContactsUI_OBJC_FILES += \
        MailerContactsUIProduct.m       \
        \
-       UIxMailContactList.m
+       UIxMailContactList.m    \
+       UIxMailContactEditor.m  \
 
 MailerContactsUI_RESOURCE_FILES += \
        Version                 \
@@ -19,7 +20,10 @@ MailerContactsUI_RESOURCE_FILES += \
 
 MailerContactsUI_RESOURCE_FILES += \
        UIxMailContactList.wox  \
-       \
+       UIxMailContactEditor.wox\
+
+MailerContactsUI_RESOURCE_FILES += \
+       mailercontacts.js       \
        Images/title_*
 
 MailerContactsUI_LOCALIZED_RESOURCE_FILES +=
diff --git a/SOGo/UI/MailerContacts/UIxMailContactEditor.m b/SOGo/UI/MailerContacts/UIxMailContactEditor.m
new file mode 100644 (file)
index 0000000..30f3f11
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+  Copyright (C) 2005 SKYRIX Software AG
+
+  This file is part of OpenGroupware.org.
+
+  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.
+*/
+
+#include <UI/Contacts/UIxContactEditor.h>
+
+@interface UIxMailContactEditor : UIxContactEditor
+{
+}
+
+@end
+
+#include "common.h"
+
+@implementation UIxMailContactEditor
+
+- (NSString *)panelTitle {
+  return [self labelForKey:@"Edit Contact"];
+}
+
+@end /* UIxMailContactEditor */
diff --git a/SOGo/UI/MailerContacts/UIxMailContactEditor.wox b/SOGo/UI/MailerContacts/UIxMailContactEditor.wox
new file mode 100644 (file)
index 0000000..f0f0773
--- /dev/null
@@ -0,0 +1,181 @@
+<?xml version='1.0' standalone='yes'?>
+<var:component
+  xmlns="http://www.w3.org/1999/xhtml"
+  xmlns:var="http://www.skyrix.com/od/binding"
+  xmlns:const="http://www.skyrix.com/od/constant"
+  xmlns:uix="OGo:uix"
+  xmlns:rsrc="OGo:url"
+  xmlns:label="OGo:label"
+  className="UIxMailMainFrame"
+  title="panelTitle"
+  const:hideFolderTree="1"
+>
+  <style>
+td.ce_label {
+  font-size:      11px;
+  text-align:     left;
+  vertical-align: top;
+  width:          60pt;
+}
+td.ce_field {
+  vertical-align: top;
+}
+td.ce_field input {
+  font-size: 10px;
+  width:     100%;
+}
+td.ce_field textarea {
+  font-size: 10px;
+  width:     100%;
+}
+
+div.ce_group {
+/*
+  border-top-color:    white;
+  border-top-width:    1;
+  border-top-style:    solid;
+  border-bottom-color: #808080;
+  border-bottom-width: 1;
+  border-bottom-style: solid;
+*/
+}
+
+div.ce_group table {
+  border-width: 0px;
+  width:        100%;
+}
+
+table.ce_vertgroup {
+  border-width: 0px;
+  width:        100%;
+}
+table.ce_vertgroup td.ce_twocolcell {
+  width:          50%;
+  vertical-align: top;
+}
+  </style>
+
+  <div id="compose_panel">
+<table class="ce_vertgroup" cellpadding="0" cellspacing="0">
+ <tr>
+  <td class="ce_twocolcell">
+
+    <div id="contacteditor_common" class="ce_group">
+      <table>
+        <tr>
+          <td class="ce_label"><var:string label:value="Lastname"/>:</td>
+          <td class="ce_field">
+            <input type="text" name="sn" id="sn"
+                   var:value="snapshot.sn" />
+         </td>
+        </tr>
+        <tr>
+          <td class="ce_label"><var:string label:value="Firstname"/>:</td>
+          <td class="ce_field">
+            <input type="text" name="givenName" id="givenName"
+                   var:value="snapshot.givenName" />
+         </td>
+        </tr>
+      </table>
+    </div>
+
+    <div id="contacteditor_phone" class="ce_group">
+      <table>
+        <tr>
+          <td class="ce_label"><var:string label:value="OfficePhone" />:</td>
+          <td class="ce_field">
+            <input type="text" name="telephoneNumber" id="telephoneNumber"
+                   var:value="snapshot.telephoneNumber" />
+          </td>
+        </tr>
+        <tr>
+          <td class="ce_label"><var:string label:value="HomePhone" />:</td>
+          <td class="ce_field">
+            <input type="text"
+                   name="homeTelephoneNumber" id="homeTelephoneNumber"
+                   var:value="snapshot.homeTelephoneNumber" />
+          </td>
+        </tr>
+        <tr>
+          <td class="ce_label"><var:string label:value="MobilePhone" />:</td>
+          <td class="ce_field">
+                  <!-- pamela.schema defines this as 'mobile',
+                       NOT 'mobileTelephoneNumber'
+                  -->
+                  <input type="text"
+                         name="mobile"
+                         id="mobile"
+                         var:value="snapshot.mobile"
+                  />
+          </td>
+        </tr>
+        <tr>
+          <td class="ce_label"><var:string label:value="Fax" />:</td>
+          <td class="ce_field">
+            <input type="text"
+                   name="facsimileTelephoneNumber"
+                   id="facsimileTelephoneNumber"
+                   var:value="snapshot.facsimileTelephoneNumber" />
+          </td>
+        </tr>
+      </table>
+    </div>
+  </td>
+  <td class="ce_twocolcell">
+    <div id="contacteditor_address" class="ce_group">
+          <table border="0" cellpadding="2" cellspacing="0" class="editsec">
+        <tr>
+          <td class="ce_label"><var:string label:value="Postal" />:</td>
+          <td class="ce_field">
+            <textarea name="postalAddress" id="postalAddress"
+                      rows="3" cols="60" wrap="physical"
+                      var:value="snapshot.postalAddress" />
+          </td>
+        </tr>
+        <tr>
+          <td class="ce_label"><var:string label:value="Home" />:</td>
+          <td class="ce_field">
+            <textarea name="homePostalAddress" id="homePostalAddress"
+                      rows="3" cols="60" wrap="physical"
+                      var:value="snapshot.homePostalAddress" />
+          </td>
+        </tr>
+      </table>
+    </div>
+  </td>
+ </tr>
+</table>
+
+    <div id="contacteditor_extended" class="ce_group">
+          <table border="0" cellpadding="2" cellspacing="0" class="editsec">
+        <tr>
+          <td class="ce_label"><var:string label:value="EMail" />:</td>
+          <td class="ce_field">
+            <input type="text" name="mail" id="email" 
+                   var:value="snapshot.mail" />
+          </td>
+        </tr>
+        <tr>
+          <td class="ce_label"><var:string label:value="Unit" />:</td>
+          <td class="ce_field">
+            <input type="text" name="departmentNumber" id="departmentNumber"
+                   var:value="snapshot.departmentNumber" />
+          </td>
+        </tr>
+        <tr>
+          <td class="ce_label"><var:string label:value="Location" />:</td>
+          <td class="ce_field">
+            <input type="text" name="l" id="l" var:value="snapshot.l" />
+          </td>
+        </tr>
+        <tr>
+          <td class="ce_label"><var:string label:value="URL" />:</td>
+          <td class="ce_field">
+            <input type="text" name="labeledURI" 
+                   var:value="snapshot.labeledURI" />
+          </td>
+        </tr>
+      </table>
+    </div>
+  </div>
+</var:component>
index b0799e86f78cf5bb9b7474441906ad97e4524c9d..16e65637c58fe5f900c0b30b5caa93c86ffb6bf2 100644 (file)
 
 @implementation UIxMailContactList
 
+/* title */
+
+- (NSString *)objectTitle {
+  return [[self clientObject] nameInContainer];
+}
+- (NSString *)panelTitle {
+  NSString *s;
+  
+  s = [self labelForKey:@"View Contacts Folder"];
+  s = [s stringByAppendingString:@": "];
+  s = [s stringByAppendingString:[self objectTitle]];
+  return s;
+}
+
 @end /* UIxMailContactList */
index b360b20e3f39fb08566b44c87df1af1242b885db..b86f46057fb662211f827c7e969f99287397af5c 100644 (file)
@@ -21,6 +21,9 @@
                                var:queryDictionary="queryParameters"
 -->
 
+  <script language="JavaScript" rsrc:src="mailercontacts.js">
+  </script>
+
   <table class="titletable" cellspacing="0" cellpadding="0">
     <tr>
       <td class="titlecell">
 
         <!-- actual table contents -->
         <var:foreach list="contactInfos" item="contact">
-          <tr class="tableview">
+          <tr class="tableview" var:id="contact.cName">
             <td class="mailer_listcell_regular">
+<!--
               <a var:href="contact.cName"><var:string value="contact.sn" /></a>
+-->
+              <a var:href="#" 
+                 onclick="openContact(this, this.parentNode.parentNode.id); return false"
+                 ><var:string value="contact.sn" /></a>
             </td>
             <td><var:string value="contact.givenname"       /></td>
             <td><var:string value="contact.mail"            /></td>
index 93f90d160d934db19ec53d743f5928d2ae1f646f..ed045adfeab4736fa025a4a2ef062f6515fc7a9c 100644 (file)
@@ -1,3 +1,3 @@
 # version file
 
-SUBMINOR_VERSION:=1
+SUBMINOR_VERSION:=2
diff --git a/SOGo/UI/MailerContacts/mailercontacts.js b/SOGo/UI/MailerContacts/mailercontacts.js
new file mode 100644 (file)
index 0000000..6377858
--- /dev/null
@@ -0,0 +1,8 @@
+//
+
+function openContact(sender, addruid) {
+  window.open(addruid + "/tb.edit", 'SOGo_addr_' + addruid,
+          'width=640,height=480,resizable=1,scrollbars=1,toolbar=0,' +
+          'location=0,directories=0,status=0,menubar=0,copyhistory=0')
+  return false;
+}
index 66de93cfa77d376fcb405a16265cdf8477a8f854..bf5803875d67eb520b17631677f23123abdcbdca 100644 (file)
@@ -4,6 +4,7 @@
   publicResources = (
     "title_sortdown_12x12.png",
     "title_sortup_12x12.png",
+    "mailercontacts.js"
   );
 
   factories = {
@@ -17,7 +18,7 @@
           value = ( /* the toolbar groups */
             ( /* first group */
               {
-                link  = "getMail";
+                link  = "#"; // no-op
                 cssClass = "tbicon_getmail"; label = "Get Mail";
               },
               {
                 // onclick  = "clickedCompose(this);return false;";
                 cssClass = "tbicon_compose"; label = "New Contact";
               },
+/* enable if we actually can do that
+              { link  = "tb.compose"; target = "_blank";
+                cssClass = "tbicon_compose"; label = "Write"; },
+*/
             ),
           );
         };
           protectedBy = "View";
           pageName    = "UIxMailContactList"; 
         };
+        "tb.compose" = {
+          protectedBy = "View";
+          actionClass = "UIxMailEditorAction"; 
+          actionName  = "compose";
+        };
+      };
+    };
+
+    SOGoContactObject = {
+      slots = {
+        toolbar = {
+          protectedBy = "View";
+          value = ( /* the toolbar groups */
+            ( /* first group */
+              { link  = "#"; 
+                onclick  = "clickedEditorSave(this);return false;";
+                cssClass = "tbicon_save"; label = "Save"; },
+              { link = "#"; 
+                onclick  = "clickedEditorDelete(this);return false;";
+                cssClass = "tbicon_delete"; label = "Delete"; },
+            )
+          );
+        };
+      };
+      methods = {
+        "tb.edit" = { 
+          protectedBy = "View";
+          pageName    = "UIxMailContactEditor"; 
+        };
       };
     };
   };