See ChangeLog

Monotone-Parent: 25a398b968eb4c84157efcd698facc74c5738e07
Monotone-Revision: a9d5ad1c7b8fa6de9db2b7b205864f5cd9d96b3b

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2009-10-09T21:54:07
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Ludovic Marcotte
2009-10-09 21:54:07 +00:00
parent 2eb62a573e
commit b81ed3b2fe
20 changed files with 4 additions and 873 deletions
-2
View File
@@ -36,8 +36,6 @@ MailerUI_OBJC_FILES += \
# UIxMailReplyAction.m \
# UIxMailForwardAction.m \
# UIxFilterList.m \
# \
# UIxSieveEditor.m
MailerUI_RESOURCE_FILES += \
Version \
-1
View File
@@ -40,7 +40,6 @@ Class Hierarchy
UIxMailToolbar
UIxMailTree
UIxMailView
UIxSieveEditor
UIxMailSortableTableHeader
UIxMailEditorAttach.m
UIxMailFilterPanel
-115
View File
@@ -1,115 +0,0 @@
/*
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 <SOGoUI/UIxComponent.h>
/*
UIxSieveEditor
An editor component which works on SOGoSieveScriptObject's.
*/
@class NSArray, NSString;
@interface UIxSieveEditor : UIxComponent
{
NSString *scriptName;
NSString *scriptText;
}
@end
#include <SoObjects/Sieve/SOGoSieveScriptObject.h>
#include "common.h"
@implementation UIxSieveEditor
- (void)dealloc {
[self->scriptText release];
[self->scriptName release];
[super dealloc];
}
/* accessors */
- (void)setScriptName:(NSString *)_value {
ASSIGNCOPY(self->scriptName, _value);
}
- (NSString *)scriptName {
return self->scriptName ? self->scriptName : @"";
}
- (void)setScriptText:(NSString *)_value {
ASSIGNCOPY(self->scriptText, _value);
}
- (NSString *)scriptText {
return [self->scriptText isNotNull] ? self->scriptText : @"";
}
- (NSString *)panelTitle {
return [self labelForKey:@"Edit Mail Filter"];
}
/* requests */
- (BOOL)shouldTakeValuesFromRequest:(WORequest *)_rq inContext:(WOContext*)_c {
return YES;
}
/* actions */
- (id)defaultAction {
return [self redirectToLocation:@"edit"];
}
- (id)editAction {
#if 0
[self logWithFormat:@"edit action, load content from: %@",
[self clientObject]];
#endif
[self setScriptName:[[self clientObject] nameInContainer]];
[self setScriptText:[[self clientObject] contentAsString]];
return self;
}
- (id)saveAction {
NSException *error;
NSString *text;
text = [self scriptText];
if ((error = [[self clientObject] writeContent:text]) != nil)
return error;
return self;
}
- (id)deleteAction {
NSException *error;
if ((error = [[self clientObject] delete]) != nil)
return error;
return nil;
}
@end /* UIxSieveEditor */
+1 -76
View File
@@ -1,5 +1,5 @@
{ /* -*-java-*- */
requires = ( MAIN, MainUI, CommonUI, Mailer, MailPartViewers ); /* , Sieve */
requires = ( MAIN, MainUI, CommonUI, Mailer, MailPartViewers );
publicResources = ("generic.js",
"UIxAppointmentEditor.js",
@@ -446,81 +446,6 @@
};
};
};
/* Sieve */
// SOGoSieveScriptsFolder = {
// slots = {
// toolbar = {
// protectedBy = "View";
// value = (
// (
// {
// link = "getMail";
// image = "tb-mail-getmail-flat-24x24.png";
// cssClass = "tbicon_getmail"; label = "Get Mail";
// },
// {
// link = "#"; // "compose"; // target = "_blank";
// onclick = "clickedNewFilter(this); return false";
// image = "tb-mail-write-flat-24x24.png";
// cssClass = "tbicon_compose"; label = "New Filter";
// },
// ),
// (
// { link = "#";
// cssClass = "tbicon_delete"; label = "Delete"; },
// ),
// );
// };
// };
// methods = {
// view = {
// protectedBy = "View";
// pageName = "UIxFilterList";
// };
// create = {
// protectedBy = "View";
// pageName = "UIxFilterList";
// actionName = "create";
// };
// };
// };
// SOGoSieveScriptObject = {
// slots = {
// toolbar = {
// protectedBy = "View";
// value = (
// ( { link = "#";
// onclick = "clickedEditorSave(this);return false;";
// image = "tb-mail-file-flat-24x24.png";
// cssClass = "tbicon_save"; label = "Save"; },
// { link = "#";
// onclick = "clickedEditorDelete(this);return false;";
// image = "tb-mail-delete-flat-24x24.png";
// cssClass = "tbicon_delete"; label = "Delete"; },
// )
// );
// };
// };
// methods = {
// edit = {
// protectedBy = "View";
// pageName = "UIxSieveEditor";
// actionName = "edit";
// };
// save = {
// protectedBy = "View";
// pageName = "UIxSieveEditor";
// actionName = "save";
// };
// delete = {
// protectedBy = "View";
// pageName = "UIxSieveEditor";
// actionName = "delete";
// };
// }
};
}
-33
View File
@@ -1,33 +0,0 @@
<?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="UIxPageFrame"
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 -->
<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>
</var:component>