]> err.no Git - scalable-opengroupware.org/commitdiff
mailer work
authorhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Tue, 28 Sep 2004 12:17:08 +0000 (12:17 +0000)
committerhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Tue, 28 Sep 2004 12:17:08 +0000 (12:17 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@324 d1b88da0-ebda-0310-925b-ed51d893ca5b

12 files changed:
SOGo/SoObjects/Mailer/ChangeLog
SOGo/SoObjects/Mailer/SOGoMailAccount.m
SOGo/SoObjects/Mailer/SOGoMailBaseObject.h
SOGo/SoObjects/Mailer/SOGoMailBaseObject.m
SOGo/SoObjects/Mailer/Version
SOGo/UI/Mailer/ChangeLog
SOGo/UI/Mailer/GNUmakefile
SOGo/UI/Mailer/UIxMailTree.m
SOGo/UI/Mailer/UIxMailTree.wox
SOGo/UI/Mailer/Version
SOGo/UI/Mailer/mailer.css
SOGo/UI/Mailer/product.plist

index 24571823ef663cda75c7c576d45ef5425dc48a3a..ee2ccf2dec2e915b8559293081a1412d1a2d8151 100644 (file)
@@ -1,5 +1,8 @@
 2004-09-28  Helge Hess  <helge.hess@opengroupware.org>
 
+       * SOGoMailBaseObject.m, SOGoMailAccount.m: added -mailAccountFolder
+         method to find the active root folder along the SOPE chain (v0.9.8)
+
        * SOGoMailAccount.m: be graceful if the IMAP4 login failed (v0.9.7)
 
 2004-09-27  Helge Hess  <helge.hess@opengroupware.org>
index d0ca36a9b9b448134fdfe2607f6ba26027a145e6..a2442d8b17857d8b9076c720285409ae4f522322 100644 (file)
   return [NSArray arrayWithObjects:@"INBOX", nil];
 }
 
+/* hierarchy */
+
+- (SOGoMailAccount *)mailAccountFolder {
+  return self;
+}
+
 /* IMAP4 */
 
 - (BOOL)useSSL {
index 4a8221ee30944630ab7dab53c0e24ae41075a8e6..e5d5007001a2f862da1778ed8666e7ab875a0900 100644 (file)
@@ -33,6 +33,7 @@
 
 @class NSURL;
 @class NGImap4Client;
+@class SOGoMailAccount;
 
 @interface SOGoMailBaseObject : SOGoObject
 {
 
 - (id)initWithImap4URL:(NSURL *)_url inContainer:(id)_container;
 
+/* hierarchy */
+
+- (SOGoMailAccount *)mailAccountFolder;
+
 /* IMAP4 */
 
 - (NSURL *)imap4URL;
index baffb482d535794cd1a099b606c08160706c5643..589d063b64e9d7dad0248e346363f9a1e6e521a0 100644 (file)
   [super dealloc];
 }
 
+/* hierarchy */
+
+- (SOGoMailAccount *)mailAccountFolder {
+  if (![[self container] respondsToSelector:_cmd]) {
+    [self logWithFormat:@"WARNING: weird container of mailfolder: %@",
+           [self container]];
+    return nil;
+  }
+  
+  return [[self container] mailAccountFolder];
+}
+
 /* IMAP4 */
 
 - (NSString *)relativeImap4Name {
index cab297dce179f93daddb8c8e20c17af86c0b5d3b..28292b549059af8a6800e33ac74ed5ab727067ed 100644 (file)
@@ -1,3 +1,3 @@
 # $Id$
 
-SUBMINOR_VERSION:=7
+SUBMINOR_VERSION:=8
index 3141e13b5278efc448fef166a4eea0b253ef97d6..e62deea4673a9270e69d3d05e5aefedcb4594655 100644 (file)
@@ -1,3 +1,7 @@
+2004-09-28  Helge Hess  <helge.hess@opengroupware.org>
+
+       * more work on mailer UI, added tree based on WETreeView (v0.9.4)
+
 2004-09-25  Helge Hess  <helge.hess@opengroupware.org>
 
        * added rsrc namespace declaration to templates (v0.9.3)
index f4699a823e575358c50b0b9f8774354707f31eb2..3f5e08abc5fa1ae93eb159567b6aff5704d53500 100644 (file)
@@ -39,7 +39,8 @@ MailerUI_RESOURCE_FILES += \
        mailer.css              \
 
 MailerUI_RESOURCE_FILES += \
-       screenshots/*.png
+       screenshots/*.png       \
+       Images/*.gif
 
 MailerUI_LOCALIZED_RESOURCE_FILES += \
        default.strings
index 656e938f8431848ff3c7fcef6306c07140dcb4bd..601acf478b08ea9d5536cfbc88c9f05114dffdff 100644 (file)
   return self->item;
 }
 
+/* tree */
+
+- (NSArray *)rootNodes {
+  // TODO: maybe we want to add this in WETreeView for convenience?
+  return [NSArray arrayWithObject:[[self clientObject] mailAccountFolder]];
+}
+- (NSArray *)itemChildNodes {
+  NSMutableArray *folders;
+  NSArray  *names;
+  unsigned i, count;
+  
+  names   = [[self item] toManyRelationshipKeys];
+  count   = [names count];
+  folders = [NSMutableArray arrayWithCapacity:count];
+
+  for (i = 0; i < count; i++) {
+    id folder;
+
+    folder = [[self item] lookupName:[names objectAtIndex:i]
+                         inContext:[self context]
+                         acquire:NO];
+    if (folder)
+      [folders addObject:folder];
+  }
+  
+  return folders;
+}
+
+- (BOOL)isItemExpanded {
+  return YES;
+}
+
 /* notifications */
 
 - (void)sleep {
index 14163fe5b470b2d4bcf634eb2971ec91ad3d839a..bd6400e3ac401a143f9065718f92278877e3fed1 100644 (file)
@@ -5,7 +5,30 @@
       xmlns:rsrc="OGo:url"
       xmlns:label="OGo:label"
 >
+<!--
   <var:foreach list="clientObject.toManyRelationshipKeys" item="item">
     <li><a var:href="item"><var:string value="item"/></a></li>
   </var:foreach>
+  <hr />
+-->
+  <var:treeview
+    list="rootNodes" item="item" sublist="itemChildNodes"
+    currentPath="currentPath" zoom="isItemExpanded"
+    const:iconWidth       = "13"
+    const:plusIcon        = "treeview_plus.gif"
+    const:minusIcon       = "treeview_minus.gif"
+    const:lineIcon        = "treeview_line.gif"
+    const:cornerIcon      = "treeview_corner.gif"
+    const:junctionIcon    = "treeview_junction.gif"
+    const:leafIcon        = "treeview_leaf.gif"
+    const:leafCornerIcon  = "treeview_leaf_corner.gif"
+    const:cornerPlusIcon  = "treeview_corner_plus.gif"
+    const:cornerMinusIcon = "treeview_corner_minus.gif"
+    const:spaceIcon       = "treeview_space.gif"
+  >
+    <var:tree-data const:isTreeElement="YES" const:treeLink="">
+      <a href="#" class="treecell"
+         ><var:string value="item.davDisplayName" /></a>
+    </var:tree-data>
+  </var:treeview>
 </span>
index fc795f55c1387b14d99ba68f17adc4f527276f1f..749d66dc7109fb3f49932aae8e0c044ad7d4e6c0 100644 (file)
@@ -1,3 +1,3 @@
 # $Id$
 
-SUBMINOR_VERSION:=3
+SUBMINOR_VERSION:=4
index ad2fcdcf7d0fb118e894c9c923344e1389ee9132..4557eeaa14ca2f634ea9423e77ce84889eabb8c9 100644 (file)
@@ -794,3 +794,8 @@ td.monthprintview_content_dimmed {
   background-color: #D4D0C8;
   padding:          4px;
 }
+
+.treecell {
+  font-family:  Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif;
+  font-size:    10pt;
+}
index 9e30f2312bbb06287c8f8d2eac5e5e81a537dfbc..858516bfc6ebe77f9ee9220202aed529d1e4dcb6 100644 (file)
@@ -4,6 +4,18 @@
   publicResources = (
     "uix.css",
     "mailer.css",
+
+    "treeview_corner.gif",
+    "treeview_corner_minus.gif",
+    "treeview_corner_plus.gif",
+    "treeview_junction.gif",
+    "treeview_leaf.gif",
+    "treeview_leaf_corner.gif",
+    "treeview_line.gif",
+    "treeview_minus.gif",
+    "treeview_plus.gif",
+    "treeview_space.gif",
+
     "tbird_073_accountview.png",
     "tbird_073_compose.png",
     "tbird_073_mailwelcome.png",