]> err.no Git - scalable-opengroupware.org/commitdiff
implemented OGo bug #1209 (IMAP4 subject/sender searching)
authorhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Sat, 12 Feb 2005 17:36:03 +0000 (17:36 +0000)
committerhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Sat, 12 Feb 2005 17:36:03 +0000 (17:36 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@547 d1b88da0-ebda-0310-925b-ed51d893ca5b

SOGo/SoObjects/Mailer/SOGoMailManager.m
SOGo/UI/Mailer/ChangeLog
SOGo/UI/Mailer/UIxMailListView.m
SOGo/UI/Mailer/UIxMailListView.wox
SOGo/UI/Mailer/Version
SOGo/UI/Mailer/mailer.js
SOGo/UI/Mailer/product.plist

index eb27b40260d4b3e8c94356db83519ca1009dacaa..fd6ba0624a9b185f0d0a6ae903fb2fd1d1ddd345 100644 (file)
@@ -29,6 +29,9 @@
     self->isReadOnly = 
       [[dict objectForKey:@"access"] isEqualToString:@"READ-WRITE"]
       ? NoNumber : YesNumber;
+  
+  TODO: to implement copy, use "uid copy" instead of "copy" as used by
+        NGImap4Client.
 */
 
 @implementation SOGoMailManager
index da3892aca35e71de08fe0a7a971785027e938f39..b90470792756f97da9a9c5f7970e03375a0b9845 100644 (file)
@@ -1,3 +1,12 @@
+2005-02-12  Helge Hess  <helge.hess@opengroupware.org>
+
+       * v0.9.99
+
+       * product.plist: also map index method of mail folder to
+         UIxMailListView
+
+       * UIxMailListView.m: added subject/sender searching (bug OGo #1209)
+
 2005-02-10  Helge Hess  <helge.hess@opengroupware.org>
 
        * UIxMailPartLinkViewer.wox, UIxMailPartMessageViewer.wox: added
index eac0fdc9fe7ba2e92d31e6631dbb3203236293e1..c7109a7cd43468f81e2a2fea923035c4c34a75fb 100644 (file)
@@ -34,6 +34,7 @@
   NSArray  *messages;
   unsigned firstMessageNumber;
   id       message;
+  NSString *searchText;
 }
 
 - (NSString *)defaultSortKey;
@@ -53,6 +54,7 @@
 static int attachmentFlagSize = 8096;
 
 - (void)dealloc {
+  [self->searchText release];
   [self->sortedUIDs release];
   [self->messages   release];
   [self->message    release];
@@ -77,6 +79,18 @@ static int attachmentFlagSize = 8096;
   return self->message;
 }
 
+- (void)setSearchText:(NSString *)_txt {
+  ASSIGNCOPY(self->searchText, _txt);
+}
+- (NSString *)searchText {
+  if (self->searchText == nil) {
+    // TODO: kinda hack
+    self->searchText = 
+      [[[[self context] request] formValueForKey:@"searchtext"] copy];
+  }
+  return self->searchText;
+}
+
 - (BOOL)showToAddress {
   NSString *ftype;
   
@@ -148,8 +162,22 @@ static int attachmentFlagSize = 8096;
   return keys;
 }
 
-- (id)qualifier {
-  return nil;
+- (EOQualifier *)searchTextQualifier {
+  EOQualifier *q;
+  NSString *s;
+  
+  s = [self searchText];
+  if ([s length] == 0)
+    return nil;
+  
+  q = [EOQualifier qualifierWithQualifierFormat:
+                    @"(subject doesContain: %@) OR "
+                    @"(from doesContain: %@)",
+                    s, s];
+  return q;
+}
+- (EOQualifier *)qualifier {
+  return [self searchTextQualifier];
 }
 
 - (NSString *)defaultSortKey {
@@ -408,9 +436,6 @@ static int attachmentFlagSize = 8096;
 /* actions */
 
 - (id)defaultAction {
-#if 0
-  [self logWithFormat:@"default action ..."];
-#endif
   self->firstMessageNumber = 
     [[[[self context] request] formValueForKey:@"idx"] intValue];
   return self;
index 2255b4f9f416e805f91744ec1adb131a51ec87a0..14bf9dccece64f2c51d65f7ef612aeb5735feadc 100644 (file)
       <option value="all"   ><var:string label:value="All" /></option>
       <option value="unread"><var:string label:value="Unread" /></option>
     </select>
+-->
 
-    Subject or Sender contains:
-    <input name="searchtext" type="text" />
-    <input name="clear" type="submit" value="Clear" />
+    <var:string label:value="Subject or Sender contains" />:
+    <input name="searchtext" type="text" var:value="searchText" />
+<!--
+    <input type="button" onclick="clearSearch(this)" label:value="Clear" />
 -->
   </div>
 
index d1a68c8c5ec898ad70ec3e99cded527b1ba513a7..67953ae1d28c121bde68af32e57c7fe7f3a33c02 100644 (file)
@@ -1,7 +1,8 @@
 # version file
 
-SUBMINOR_VERSION:=98
+SUBMINOR_VERSION:=99
 
+# v0.9.99 requires libNGMime        v4.5.212
 # v0.9.97 requires SoObjects/Mailer v0.9.71
 # v0.9.97 requires libNGExtensions  v4.5.142
 # v0.9.94 requires SoObjects/Mailer v0.9.69
index a6e154bf2b389dc1ba382527358325a8fbd86eab..2163872fbc145230d37e460379064e78e69acdb1 100644 (file)
@@ -6,15 +6,15 @@
     div_$msgid
     readdiv_$msgid
     unreaddiv_$msgid
-*/
 
-/*
   Window Properties:
     width, height
     bool: resizable, scrollbars, toolbar, location, directories, status,
           menubar, copyhistory
 */
 
+/* mail list */
+
 function clickedUid(sender, msguid) {
   var urlstr;
   
@@ -41,6 +41,14 @@ function lowlightUid(sender, msguid) {
   return true;
 }
 
+function clearSearch(sender) {
+  var searchField = window.document.getElementById("searchtext");
+  if (searchField) searchField.value="";
+  return true;
+}
+
+/* compose support */
+
 function clickedCompose(sender) {
   var urlstr;
   
index 277a0607fe5e9a83a93ecead6b8043781a1711ff..e2c6c826a595f6889adb6811de850456946140dc 100644 (file)
           protectedBy = "View";
           pageName    = "UIxMailListView"; 
         };
+        index = {
+          protectedBy = "View";
+          pageName    = "UIxMailListView"; 
+        };
         GET = { /* hack to make it work as the default method */
           protectedBy = "View";
           pageName    = "UIxMailListView";