From 7f5653c865195b9011c2e547d64555adeecb4430 Mon Sep 17 00:00:00 2001 From: helge Date: Sat, 27 Nov 2004 23:22:56 +0000 Subject: [PATCH] work on filters git-svn-id: http://svn.opengroupware.org/SOGo/trunk@456 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/UI/Mailer/ChangeLog | 6 ++ SOGo/UI/Mailer/GNUmakefile | 4 ++ SOGo/UI/Mailer/UIxFilterList.m | 83 ++++++++++++++++++++++++++++ SOGo/UI/Mailer/UIxFilterList.wox | 50 +++++++++++++++++ SOGo/UI/Mailer/UIxMailEditorAttach.m | 2 +- SOGo/UI/Mailer/UIxMailListView.m | 3 +- SOGo/UI/Mailer/Version | 10 ++-- SOGo/UI/Mailer/product.plist | 37 ++++++++++++- 8 files changed, 186 insertions(+), 9 deletions(-) create mode 100644 SOGo/UI/Mailer/UIxFilterList.m create mode 100644 SOGo/UI/Mailer/UIxFilterList.wox diff --git a/SOGo/UI/Mailer/ChangeLog b/SOGo/UI/Mailer/ChangeLog index 56e999c3..8a14bd97 100644 --- a/SOGo/UI/Mailer/ChangeLog +++ b/SOGo/UI/Mailer/ChangeLog @@ -1,5 +1,11 @@ 2004-11-27 Helge Hess + * v0.9.65 + + * added first (empty) version of filter list page + + * UIxMailEditorAttach.m: fixed a warning + * UIxMailAccountView.wox, product.plist: cleaned up account page (links work now), added a compose button (v0.9.64) diff --git a/SOGo/UI/Mailer/GNUmakefile b/SOGo/UI/Mailer/GNUmakefile index 09cd5ec0..cbeac454 100644 --- a/SOGo/UI/Mailer/GNUmakefile +++ b/SOGo/UI/Mailer/GNUmakefile @@ -40,6 +40,8 @@ MailerUI_OBJC_FILES += \ UIxMailPartImageViewer.m \ UIxMailPartMixedViewer.m \ UIxMailPartAlternativeViewer.m \ + \ + UIxFilterList.m \ MailerUI_RESOURCE_FILES += \ Version \ @@ -66,6 +68,8 @@ MailerUI_RESOURCE_FILES += \ UIxMailPartMixedViewer.wox \ UIxMailPartImageViewer.wox \ UIxMailPartAlternativeViewer.wox\ + \ + UIxFilterList.wox \ MailerUI_RESOURCE_FILES += \ uix.css \ diff --git a/SOGo/UI/Mailer/UIxFilterList.m b/SOGo/UI/Mailer/UIxFilterList.m new file mode 100644 index 00000000..ffea50ab --- /dev/null +++ b/SOGo/UI/Mailer/UIxFilterList.m @@ -0,0 +1,83 @@ +/* + Copyright (C) 2004 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 + +/* + UIxFilterList + + This component shows a list of filter scripts and is (usually) attached to + a SOGoSieveScriptsFolder object. +*/ + +@interface UIxFilterList : UIxComponent +{ + NSArray *filters; + id filter; +} + +@end + +#include "common.h" +#include +#include + +@implementation UIxFilterList + +- (void)dealloc { + [self->filter release]; + [self->filters release]; + [super dealloc]; +} + +/* notifications */ + +- (void)sleep { + [self->filter release]; self->filter = nil; + [self->filters release]; self->filters = nil; + [super sleep]; +} + +/* accessors */ + +- (void)setFilter:(id)_msg { + ASSIGN(self->filter, _msg); +} +- (id)filter { + return self->filter; +} + +- (NSArray *)filters { + return self->filters; +} + +/* actions */ + +- (id)defaultAction { + // TODO: remove log + [self logWithFormat:@"default action ..."]; + + [self logWithFormat:@"should fetch scripts in: %@", [self clientObject]]; + + return self; +} + +@end /* UIxFilterList */ diff --git a/SOGo/UI/Mailer/UIxFilterList.wox b/SOGo/UI/Mailer/UIxFilterList.wox new file mode 100644 index 00000000..9f2deb81 --- /dev/null +++ b/SOGo/UI/Mailer/UIxFilterList.wox @@ -0,0 +1,50 @@ + + + +
+ Server Side Filter Scripts +
+ +
+
+ + + + + + + + + + + + + + + +
+ + + Filters +
+ + +
+ + + +
+ +
+
+ +
diff --git a/SOGo/UI/Mailer/UIxMailEditorAttach.m b/SOGo/UI/Mailer/UIxMailEditorAttach.m index d20c2719..88c33e76 100644 --- a/SOGo/UI/Mailer/UIxMailEditorAttach.m +++ b/SOGo/UI/Mailer/UIxMailEditorAttach.m @@ -198,7 +198,7 @@ } if ((_name = [self fixupAttachmentName:_name]) == nil) - return nil; + return NO; // TODO: add size limit? return [[self clientObject] saveAttachment:_data withName:_name]; diff --git a/SOGo/UI/Mailer/UIxMailListView.m b/SOGo/UI/Mailer/UIxMailListView.m index 8c62a189..4b58be58 100644 --- a/SOGo/UI/Mailer/UIxMailListView.m +++ b/SOGo/UI/Mailer/UIxMailListView.m @@ -18,7 +18,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ #include @@ -46,7 +45,6 @@ @end #include "common.h" -#include #include #include @@ -363,6 +361,7 @@ static int attachmentFlagSize = 8096; /* actions */ - (id)defaultAction { + // TODO: remove log [self logWithFormat:@"default action ..."]; self->firstMessageNumber = [[[[self context] request] formValueForKey:@"idx"] intValue]; diff --git a/SOGo/UI/Mailer/Version b/SOGo/UI/Mailer/Version index 152ef4e0..d67abc49 100644 --- a/SOGo/UI/Mailer/Version +++ b/SOGo/UI/Mailer/Version @@ -1,7 +1,7 @@ -# $Id$ +# version file -SUBMINOR_VERSION:=64 +SUBMINOR_VERSION:=65 -# v0.9.50 requires NGMime v4.3.190 -# v0.9.43 requires NGObjWeb v4.3.73 -# v0.9.42 requires NGObjWeb v4.3.72 +# v0.9.50 requires libNGMime v4.3.190 +# v0.9.43 requires libNGObjWeb v4.3.73 +# v0.9.42 requires libNGObjWeb v4.3.72 diff --git a/SOGo/UI/Mailer/product.plist b/SOGo/UI/Mailer/product.plist index 9ae27d8c..cc97dcbb 100644 --- a/SOGo/UI/Mailer/product.plist +++ b/SOGo/UI/Mailer/product.plist @@ -1,5 +1,5 @@ { - requires = ( MAIN, CommonUI, Mailer ); + requires = ( MAIN, CommonUI, Mailer, Sieve ); publicResources = ( "uix.css", @@ -402,5 +402,40 @@ }; }; }; + + /* Sieve */ + + SOGoSieveScriptsFolder = { + slots = { + toolbar = { + protectedBy = "View"; + value = ( /* the toolbar groups */ + ( /* first group */ + { + link = "getMail"; + cssClass = "tbicon_getmail"; label = "Get Mail"; + }, + { + link = "#"; // "compose"; // target = "_blank"; + onclick = "clickedNewFilter(this);return false;"; + cssClass = "tbicon_compose"; label = "New Filter"; + }, + ), + ( /* second group + { link = "#"; + cssClass = "tbicon_delete"; label = "Delete"; },*/ + ), + ); + }; + }; + methods = { + view = { + protectedBy = "View"; + pageName = "UIxFilterList"; + }; + }; + }; + SOGoSieveScriptObject = { + }; }; } -- 2.39.5