see ChangeLog
Monotone-Revision: 9054022ef1ca8aeba6e34842d27d9b94ce002b89 Monotone-Author: dev-unix.inverse.qc.ca Monotone-Date: 2006-06-15T19:34:10 Monotone-Branch: ca.inverse.sogo
@@ -0,0 +1,245 @@
|
||||
2005-03-03 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxCalWeekOverview.wox: some pretty printing
|
||||
|
||||
2005-02-17 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* common.make: removed dependency to removed libSOGoLogic
|
||||
|
||||
2004-10-15 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* common.make: updates for inline compilation, removed compatibility
|
||||
for gstep-make < 1.10
|
||||
|
||||
2004-09-07 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* README: Update with information regarding localization
|
||||
|
||||
2004-08-26 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* Added "Mailer" product.
|
||||
|
||||
2004-08-25 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* Added "Contacts" product.
|
||||
|
||||
2004-08-10 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* Added "Anais" product.
|
||||
|
||||
2004-07-07 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* Replaced all occurrences of zidestoreui.css with uix.css
|
||||
|
||||
2004-06-30 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* SOGoUI: moved over from Common to ease build dependencies.
|
||||
|
||||
2004-06-30 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* Scheduler/UIxAppointmentEditor.m: improved -saveAction. Does
|
||||
everything in a complete manner now - except for saving which isn't
|
||||
done at all.
|
||||
|
||||
2004-06-30 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* Scheduler/UIxAppointmentEditor.m: made the hack more hackish to work
|
||||
on MacOSX
|
||||
|
||||
2004-06-28 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* Common/UIxComponent.[hm]: moved -ownMethodName here.
|
||||
|
||||
* Scheduler/UIxCalView.[hm]: removed -ownMethodName, moved to
|
||||
UIxComponent (reuse).
|
||||
|
||||
* Scheduler/UIxAppointmentView.[hm]: first "draft" of view component.
|
||||
The look of OGo is resembled closely, but most features are still
|
||||
missing.
|
||||
|
||||
2004-06-28 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* Scheduler/GNUmakefile.preamble: links against libSOGoLogic now.
|
||||
|
||||
* Scheduler/UIxAppointmentView.m, Scheduler/UIxAppointmentView.wox:
|
||||
test of iCal object.
|
||||
|
||||
2004-06-23 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxCalMonthOverview.[m,wox]: completed month view. Turned out to
|
||||
be much more difficult to improve with style sheets than expected.
|
||||
Requires version 4.2.45 of WEExtensions.
|
||||
|
||||
2004-06-22 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* Refactoring: Renamed everything from OGo to UIx in order to avoid
|
||||
nameclashes (happens on OSX related to NGBundleManager)
|
||||
|
||||
* Refactoring 2: Moved methods from UIxWeekOverview to UIxCalView.
|
||||
|
||||
* Highlighting in UIxWeekOverview works now.
|
||||
|
||||
2004-06-22 Helge Hess <helge.hess@skyrix.com>
|
||||
|
||||
* Common/GNUmakefile.preamble: fixed linking for OGo gstep-make
|
||||
|
||||
2004-06-21 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* Scheduler/OGoCalWeekOverview.m: fixed syntax errors
|
||||
|
||||
2004-06-18 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* Implemented proper calendar in week overview. Highlighting isn't
|
||||
enabled, yet.
|
||||
|
||||
2004-06-18 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* Common/OGoComponent.[hm]: new component which serves as a base
|
||||
component for calendar components now. Knows how to deal with
|
||||
queryParameters and offers url construction method(s).
|
||||
|
||||
* All existing components have been rewritten to use queryParameters
|
||||
instead of hardcoded strings where this is feasible. This provides
|
||||
future extensibility and flexibility.
|
||||
|
||||
* Handling of dates has been fixed to center around the use of a
|
||||
'day' parameter. startDate/endDate are coupled to this, but
|
||||
don't override it as it's the duty of the individual view to set
|
||||
its (feasible) ranges accordingly. The new behaviour is noticable
|
||||
in the calendar selection tabview instantly, as it now replicates
|
||||
what OGo does.
|
||||
|
||||
2004-06-16 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* Common/OGoAppNavView.m: construct URL correctly.
|
||||
|
||||
* Common/OGoPageFrame.m: display login correctly.
|
||||
|
||||
* Common/calendar.css: cosmetic changes.
|
||||
|
||||
* Scheduler/OGoCalSelectTab.m: always display mondayOfWeek.
|
||||
|
||||
* Scheduler/OGoCalBackForthNavView.m: created.
|
||||
|
||||
2004-06-16 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* Common/zidestoreui.css: new style for button_auto.
|
||||
|
||||
* Scheduler/OGoCalView.[hm]: API for completing hrefs with necessary
|
||||
query parts.
|
||||
|
||||
* Scheduler/OGoCalWeekView.m: bugfix for startDate.
|
||||
|
||||
* Scheduler/product.plist: added still missing views -> point to
|
||||
weekoverview for the time being.
|
||||
|
||||
2004-06-15 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* Common/UIxTabView.m: removed class from <a> tag, removed rendering
|
||||
of headerFooter (what's that good for anyways?)
|
||||
|
||||
* Several resources which resolved to wrong products added statically
|
||||
in templates.
|
||||
|
||||
* Cosmetic changes in templates.
|
||||
|
||||
2004-06-14 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* Scheduler/OGoCalMonthOverview.wox: added missing rsrc namespace
|
||||
|
||||
2004-06-14 Helge Hess <helge.hess@skyrix.com>
|
||||
|
||||
* Common/common.h: fixed a gcc 3.4 warning
|
||||
|
||||
2004-06-14 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* added aggregate project for UI-X
|
||||
|
||||
2004-06-14 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* Common/calendar.css: new date_label (unused)
|
||||
|
||||
* Scheduler/OGoCalSelectTab.m: finished all labels
|
||||
|
||||
* Scheduler/OGoCalDateLabel.m, Scheduler/OGoCalDateLabel.wox: new
|
||||
component for rendering the correct date label based on startDate,
|
||||
endDate and selection
|
||||
|
||||
* Scheduler/OGoCalMonthView.m: prev/next month corrected
|
||||
|
||||
* Scheduler/OGoCalMonthOverview.wox: uses date label and tabs now
|
||||
|
||||
* Scheduler/OGoCalWeekOverview.wox: completed layout
|
||||
|
||||
* Scheduler/GNUmakefile: new component added
|
||||
|
||||
2004-06-14 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* Common/UIxTabView.[hm]: more stylesheet support via headerStyle
|
||||
and bodyStyle bindings.
|
||||
|
||||
* Common/zidestoreui.css: styles for tabs, resembling OGo look.
|
||||
|
||||
* Scheduler/OGoCalSelectTab.m: implemented dateLabel (for testing).
|
||||
|
||||
* Scheduler/OGoCalSelectTab.wox: corrected selection binding namespace.
|
||||
|
||||
2004-06-08 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* Scheduler/NOTES: added class hierarchy
|
||||
|
||||
* */common.h, GNUmakefile.preamble.: fixed for OSX compile
|
||||
|
||||
2004-06-08 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* Common/images: added a bunch of images from OGo
|
||||
|
||||
2004-06-07 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* Custom/GNUmakefile: changed ZIDESTORE to include installed version
|
||||
(ZideStore12). Removed post install hooks.
|
||||
|
||||
* Custom/GNUmakefile.postamble: new file, post install hooks and
|
||||
xmllint for .wox.
|
||||
|
||||
2004-06-07 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* Scheduler/GNUmakefile: changed ZIDESTORE to include installed version
|
||||
(ZideStore12). Removed post install hooks.
|
||||
|
||||
* Scheduler/GNUmakefile.postamble: post install hooks updated for
|
||||
GNUSTEP_BUILD_DIR.
|
||||
|
||||
2004-06-03 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* Scheduler/OGoCalWeekOverview.m: moved navigation URL generation to
|
||||
superclass (now generic because we use the 'ownMethodName'). Could
|
||||
even be moved to OGoCalView?
|
||||
|
||||
* Scheduler/OGoCalMonthView.m: added next/prev month URL generation
|
||||
methods, calculate startdate from form value
|
||||
|
||||
* Scheduler/OGoCalView.m: added -ownMethodName method to return the
|
||||
last path component of the request URL (the SOPE method), eg
|
||||
'weekoverview' for OGoCalWeekView, added
|
||||
-dateNavigationURLWithNewStartDate: method to calculate 'startDate'
|
||||
URLs (should be improved to include existing query parameters!)
|
||||
|
||||
* Scheduler/OGoCalWeekOverview.m: minor tweaks ;-)
|
||||
|
||||
2004-06-03 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* Scheduler/OGoCalWeekView.m: construct startDate from formValue,
|
||||
otherwise use current week's monday as startDate.
|
||||
|
||||
* Scheduler/OGoCalWeekOverview.wox: switch back/forth
|
||||
|
||||
* Scheduler/OGoCalWeekOverview.m: provide URLs for switching back/forth
|
||||
weekoverview.
|
||||
|
||||
* Scheduler/OGoCalView.[hm]: methods for converting dates into strings
|
||||
and vice versa.
|
||||
|
||||
* Scheduler/OGoAppointmentView.m, Scheduler/OGoCalView.m: fixed include
|
||||
|
||||
* ChangeLog: created
|
||||
@@ -0,0 +1,252 @@
|
||||
2005-07-19 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxPageFrame.m: workaround for an issue with [page name] (page name
|
||||
gets reset, so we use the page class instead) (v0.9.46)
|
||||
|
||||
* UIxPageFrame.m: added ability to auto-load per-page JavaScript files
|
||||
if appropriate resources are available (v0.9.45)
|
||||
|
||||
2005-07-18 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* moved all images and CSS to WebServerResources (v0.9.44)
|
||||
|
||||
* v0.9.43
|
||||
|
||||
* various minor code cleanups
|
||||
|
||||
* removed deprecated uix.css (lives in WebServerResources!)
|
||||
|
||||
2005-07-14 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* calendar.css: further refined new css (v0.9.42)
|
||||
|
||||
* calendar.css, uix.css: added homepagefont and added 'title' class
|
||||
to use in the scheduler overview (v0.9.41)
|
||||
|
||||
2005-07-13 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* English.lproj/Localizable.strings: removed label "You are here" and
|
||||
provided new label "User" (v0.9.40)
|
||||
|
||||
2005-07-07 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* v0.9.39
|
||||
|
||||
* UIxPageFrame.m: added new -
|
||||
|
||||
* English.lproj/Localizable.strings: added new 'Home' and
|
||||
'Administration' labels
|
||||
|
||||
* English.lproj/Localizable.strings: added new 'Help' label (v0.9.38)
|
||||
|
||||
2005-07-05 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* calendar.css: added appointment priority styles (v0.9.37)
|
||||
|
||||
2005-03-23 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* renamed "default.strings" to "Localizable.strings" (v0.9.36)
|
||||
|
||||
2005-02-10 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* GNUmakefile: include ../common.make (v0.9.35)
|
||||
|
||||
2005-01-24 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxPageFrame.wox: additional debug output (v0.9.34)
|
||||
|
||||
2005-01-21 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxTabView.m: fixed an include of WEExtensions (v0.9.33)
|
||||
|
||||
2004-01-07 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* {English/French}.lproj/default.strings: changed encoding from
|
||||
ISO-Latin-1 to UTF-8, which is now the default (v0.9.32)
|
||||
|
||||
2004-12-16 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* calendar.css: added CSS for "Schedule" (v0.9.31)
|
||||
|
||||
2004-12-09 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxPageFrame.[wox,m]: added -ownerInContext debug info (v0.9.30)
|
||||
|
||||
2004-12-08 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* calendar.css: added styles for others' appointments in
|
||||
printviews, so they are easy to distinguish (v0.9.29)
|
||||
|
||||
* UIxTabItem.m: changed to use NGLogging (v0.9.28)
|
||||
|
||||
2004-10-18 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* v0.9.27
|
||||
|
||||
* UIxPageFrame.wox: added Mail, fixed relative URL composition
|
||||
|
||||
* UIxPageFrame.m: removed URL processing, instead uses methods from
|
||||
UIxComponent
|
||||
|
||||
* *.lproj/default.strings: added label "Mail"
|
||||
|
||||
2004-09-20 Helge Hess <helge.hess@skyrix.com>
|
||||
|
||||
* UIxPageFrame.m: added item ivar (v0.9.26)
|
||||
|
||||
* UIxPageFrame.wox: improved debugging section (v0.9.25)
|
||||
|
||||
2004-09-10 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* uix.css: new button_submit style for the Anais selector, looks
|
||||
similar to the mozilla submit button now (v0.9.24)
|
||||
|
||||
2004-09-09 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxPageFrame.wox: display clientObject and object traversal stack
|
||||
if isUIxDebugEnabled is set (v0.9.23)
|
||||
|
||||
2004-09-01 Helge Hess <helge.hess@skyrix.com>
|
||||
|
||||
* GNUmakefile.preamble: removed dependency on libNGScripting (v0.9.22)
|
||||
|
||||
2004-08-27 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* v0.9.21
|
||||
|
||||
* English.lproj/default.strings, French.lproj/default.strings:
|
||||
dictionaries for labels
|
||||
|
||||
* UIxPageFrame.wox, UIxAppNavView.wox: replaced constant strings with
|
||||
labels
|
||||
|
||||
2004-08-27 Helge Hess <helge.hess@skyrix.com>
|
||||
|
||||
* started UIxSortButton (v0.9.20)
|
||||
|
||||
* v0.9.19
|
||||
|
||||
* UIxPageFrame.wox: navigation below the line, app selection above
|
||||
|
||||
* uix.css: make 'defaultfont' a generic class
|
||||
|
||||
* UIxPageFrame.wox: added top-level menu with links for Calendar and
|
||||
Contacts (v0.9.18)
|
||||
|
||||
* removed old components (UIxAppFrame, Header and Navigation) (v0.9.17)
|
||||
|
||||
2004-08-24 Maxime Wacker <mwacker@linagora.com>
|
||||
|
||||
* GNUmakefile.preamble: fixes for the build process (v0.9.16)
|
||||
|
||||
2004-08-16 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* calendar.css: additional css for Anais uids (v0.9.15)
|
||||
|
||||
* calendar.css: additional css for other appointments (v0.9.14)
|
||||
|
||||
2004-08-14 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxPageFrame.m: -title returns label for "OpenGroupware.org" when
|
||||
-isUIxDebugEnabled is NO. (v0.9.13)
|
||||
|
||||
2004-08-12 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxPageFrame.wox: removed left side navigation completely as it
|
||||
currently doesn't make too much sense and contrasts with the
|
||||
user interface layout which already has been agreed about (v0.9.12)
|
||||
|
||||
2004-08-12 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxWinClose.wox: removed rendering of (X) on Laurent's request
|
||||
(v0.9.11)
|
||||
|
||||
2004-08-11 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxPageFrame subclasses from UIxComponent now, removed -SoUser
|
||||
because it's now in UIxComponent. (v0.9.10)
|
||||
|
||||
2004-08-11 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxPageFrame.wox, UIxAppNavView.m: added labels (v0.9.9)
|
||||
|
||||
2004-08-11 <helge@agenor.opengroupware.org>
|
||||
|
||||
* UIxPageFrame: minor fixes to UI (v0.9.8)
|
||||
|
||||
2004-08-05 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* calendar.css: commented some styles out, because they don't really do
|
||||
what I think they should do. Someone with better knowledge of CSS
|
||||
should look into this. (v0.9.7)
|
||||
|
||||
2004-08-02 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* v0.9.6
|
||||
|
||||
* UIxPageFrame.wox: added javascript for onload action, some cosmetics
|
||||
|
||||
* calendar.css: added remaining CSS for printviews
|
||||
|
||||
2004-08-02 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxPageFrame.wox: removed some navigation items to avoid confusion.
|
||||
Also applied some pretty printing. (v0.9.5)
|
||||
|
||||
2004-07-30 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* v0.9.4
|
||||
|
||||
* calendar.css: added CSS for printviews
|
||||
|
||||
* UIxPrintPageFrame.[wox|m]: new wrapper component for all views that
|
||||
require printing.
|
||||
|
||||
2004-07-28 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* calendar.css: added CSS for weekcolumnsview (v0.9.3)
|
||||
|
||||
2004-07-27 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* v0.9.2
|
||||
|
||||
* UIxPageFrame.m: added convenience methods to access specific parts
|
||||
of the URL.
|
||||
|
||||
* UIxPageFrame.wox: fixed navigation URLs. Inserted references to
|
||||
rootURL where no content is currently available.
|
||||
|
||||
* UIxAppNavView.m: enhanced construction of navigation url path.
|
||||
|
||||
2004-07-26 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* calendar.css: added styles for dayoverview's content.
|
||||
|
||||
2004-07-23 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* calendar.css: added styles for dayoverview's calendar.
|
||||
|
||||
2004-07-22 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* calendar.css: complete style for 'yearoverview' and fixed style in
|
||||
'monthoverview'.
|
||||
|
||||
2004-07-16 Helge Hess <helge.hess@skyrix.com>
|
||||
|
||||
* UIxAppNavView.m: some fixes to navigation URLs
|
||||
|
||||
* UIxAppNavView.wox: fixed indention
|
||||
|
||||
* product.plist: properly export uix.css as a public resource
|
||||
|
||||
2004-07-01 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxTabView.m: removed JavaScript and the involved access of -session
|
||||
|
||||
2004-06-30 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* product.plist: make categories on SOGoObject instead of SxFolder
|
||||
|
||||
* GNUmakefile: patches for different build/runtime environment
|
||||
|
||||
* created ChangeLog
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
@interface CommonUIProduct : NSObject
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation CommonUIProduct
|
||||
@end /* CommonUIProduct */
|
||||
@@ -0,0 +1,11 @@
|
||||
/* this file is in UTF-8 format! */
|
||||
|
||||
"Home" = "Home";
|
||||
"Calendar" = "Calendar";
|
||||
"Addressbook" = "Addressbook";
|
||||
"Mail" = "Mail";
|
||||
"Administration" = "Right Administration";
|
||||
|
||||
"User" = "User";
|
||||
|
||||
"Help" = "Help";
|
||||
@@ -0,0 +1,10 @@
|
||||
/* this file is in UTF-8 format! */
|
||||
|
||||
"Home" = "Accueil";
|
||||
"Calendar" = "Agenda";
|
||||
"Addressbook" = "Carnet d'adresses";
|
||||
"Mail" = "Mail";
|
||||
|
||||
"User" = "Utilisateur";
|
||||
|
||||
"Help" = "Aide";
|
||||
@@ -0,0 +1,36 @@
|
||||
# GNUstep makefile
|
||||
|
||||
include ../common.make
|
||||
|
||||
BUNDLE_NAME = CommonUI
|
||||
|
||||
CommonUI_PRINCIPAL_CLASS = CommonUIProduct
|
||||
|
||||
CommonUI_LANGUAGES = English French
|
||||
|
||||
CommonUI_OBJC_FILES += \
|
||||
CommonUIProduct.m \
|
||||
UIxPageFrame.m \
|
||||
UIxPrintPageFrame.m \
|
||||
UIxWinClose.m \
|
||||
UIxSortButton.m \
|
||||
UIxAppNavView.m \
|
||||
\
|
||||
UIxElemBuilder.m \
|
||||
UIxTabView.m \
|
||||
UIxTabItem.m \
|
||||
|
||||
|
||||
CommonUI_RESOURCE_FILES += \
|
||||
Version \
|
||||
product.plist \
|
||||
|
||||
CommonUI_LOCALIZED_RESOURCE_FILES += \
|
||||
Localizable.strings \
|
||||
|
||||
# make
|
||||
|
||||
-include GNUmakefile.preamble
|
||||
include $(GNUSTEP_MAKEFILES)/bundle.make
|
||||
-include GNUmakefile.postamble
|
||||
include ../../fhsbundle.make
|
||||
@@ -0,0 +1,17 @@
|
||||
# postprocessing
|
||||
|
||||
validate-wox:
|
||||
# xmllint --noout *.wox
|
||||
|
||||
before-all :: validate-wox
|
||||
|
||||
|
||||
ifneq ($(GNUSTEP_BUILD_DIR),)
|
||||
after-all ::
|
||||
@(cp bundle-info.plist \
|
||||
$(GNUSTEP_BUILD_DIR)/$(BUNDLE_NAME)$(BUNDLE_EXTENSION))
|
||||
else
|
||||
after-all ::
|
||||
@(cd $(BUNDLE_NAME)$(BUNDLE_EXTENSION);\
|
||||
cp ../bundle-info.plist .)
|
||||
endif
|
||||
@@ -0,0 +1,21 @@
|
||||
# $Id$
|
||||
|
||||
CommonUI_INCLUDE_DIRS += -I..
|
||||
|
||||
ifneq ($(GNUSTEP_BUILD_DIR),)
|
||||
RELBUILD_DIR_libSOGoUI = \
|
||||
$(GNUSTEP_BUILD_DIR)/../SOGoUI/$(GNUSTEP_OBJ_DIR_NAME)
|
||||
else
|
||||
RELBUILD_DIR_libSOGoUI = ../SOGoUI/$(GNUSTEP_OBJ_DIR)
|
||||
endif
|
||||
|
||||
CommonUI_LIB_DIRS += -L$(RELBUILD_DIR_libSOGoUI)
|
||||
|
||||
ADDITIONAL_LIB_DIRS += -L/usr/local/lib -L/usr/lib
|
||||
|
||||
CommonUI_BUNDLE_LIBS += \
|
||||
-lSOGoUI \
|
||||
-lNGObjWeb \
|
||||
-lNGMime \
|
||||
-lNGStreams -lNGExtensions -lEOControl \
|
||||
-lXmlRpc -lDOM -lSaxObjC
|
||||
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
// $Id: UIxAppNavView.m 281 2004-08-27 03:51:08Z helge $
|
||||
|
||||
#include <SOGoUI/UIxComponent.h>
|
||||
|
||||
@interface UIxAppNavView : UIxComponent
|
||||
{
|
||||
id element;
|
||||
id lastElement;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#include <NGObjWeb/NGObjWeb.h>
|
||||
#include <NGObjWeb/SoObject+SoDAV.h>
|
||||
#include <NGObjWeb/WOContext+SoObjects.h>
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxAppNavView
|
||||
|
||||
- (void)dealloc {
|
||||
[self->element release];
|
||||
[self->lastElement release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (void)setElement:(id)_element {
|
||||
ASSIGN(self->element, _element);
|
||||
}
|
||||
- (id)element {
|
||||
return self->element;
|
||||
}
|
||||
|
||||
- (void)setLastElement:(id)_element {
|
||||
ASSIGN(self->lastElement, _element);
|
||||
}
|
||||
- (id)lastElement {
|
||||
return self->lastElement;
|
||||
}
|
||||
|
||||
/* navigation */
|
||||
|
||||
- (NSArray *)navPathElements {
|
||||
NSArray *traversalObjects;
|
||||
NSMutableArray *navPathComponents;
|
||||
unsigned int i, count;
|
||||
|
||||
traversalObjects = [[self context] objectTraversalStack];
|
||||
count = ([traversalObjects count] - 1); /* remove SoPageInvocation */
|
||||
|
||||
navPathComponents = [[NSMutableArray alloc] initWithCapacity:count];
|
||||
for (i = 0; i < count; i++) {
|
||||
NSString *name;
|
||||
id obj;
|
||||
|
||||
obj = [traversalObjects objectAtIndex:i];
|
||||
|
||||
name = [obj davDisplayName];
|
||||
if ([name length] == 0)
|
||||
name = NSStringFromClass([obj class]);
|
||||
name = [self labelForKey:name];
|
||||
|
||||
if (![name hasPrefix:@"sogod"]) {
|
||||
NSMutableDictionary *c;
|
||||
NSString *url;
|
||||
|
||||
url = [obj baseURLInContext:[self context]];
|
||||
if (![url hasSuffix:@"/"])
|
||||
url = [url stringByAppendingString:@"/"];
|
||||
|
||||
c = [[NSMutableDictionary alloc] initWithCapacity:2];
|
||||
[c setObject:name forKey:@"name"];
|
||||
[c setObject:url forKey:@"url"];
|
||||
[navPathComponents addObject:c];
|
||||
[c release];
|
||||
}
|
||||
}
|
||||
|
||||
[self setLastElement:[navPathComponents lastObject]];
|
||||
return [navPathComponents autorelease];
|
||||
}
|
||||
|
||||
@end /* UIxAppNavView */
|
||||
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
Copyright (C) 2000-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.
|
||||
*/
|
||||
// $Id: UIxElemBuilder.m 30 2004-06-11 12:07:09Z znek $
|
||||
|
||||
#include <NGObjWeb/WOxElemBuilder.h>
|
||||
|
||||
/*
|
||||
This builder builds various elements from the UI-X product.
|
||||
|
||||
All tags are mapped into the <uix:> namespace (XMLNS_OD_BIND).
|
||||
|
||||
<var:tabview .../> maps to UIxTabView
|
||||
<var:tab .../> maps to UIxTabItem
|
||||
*/
|
||||
|
||||
@interface UIxElemBuilder : WOxTagClassElemBuilder
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#include <SaxObjC/XMLNamespaces.h>
|
||||
#include "common.h"
|
||||
|
||||
#define XMLNS_UIX @"OGo:uix"
|
||||
|
||||
|
||||
@implementation UIxElemBuilder
|
||||
|
||||
- (Class)classForElement:(id<DOMElement>)_element {
|
||||
NSString *tagName;
|
||||
unsigned tl;
|
||||
unichar c1;
|
||||
|
||||
if (![[_element namespaceURI] isEqualToString:XMLNS_UIX])
|
||||
return Nil;
|
||||
|
||||
tagName = [_element tagName];
|
||||
if ((tl = [tagName length]) < 2)
|
||||
return Nil;
|
||||
|
||||
c1 = [tagName characterAtIndex:0];
|
||||
|
||||
switch (c1) {
|
||||
case 't': { /* starting with 't' */
|
||||
unichar c2;
|
||||
|
||||
c2 = [tagName characterAtIndex:1];
|
||||
|
||||
if (tl == 3 && c2 == 'a') {
|
||||
if ([tagName characterAtIndex:2] == 'b')
|
||||
return NSClassFromString(@"UIxTabItem");
|
||||
}
|
||||
|
||||
if (tl > 5) {
|
||||
if (c2 == 'a') {
|
||||
if ([tagName isEqualToString:@"tabview"])
|
||||
return NSClassFromString(@"UIxTabView");
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return Nil;
|
||||
}
|
||||
|
||||
@end /* UIxElemBuilder */
|
||||
@@ -0,0 +1,147 @@
|
||||
/*
|
||||
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>
|
||||
|
||||
@interface UIxPageFrame : UIxComponent
|
||||
{
|
||||
NSString *title;
|
||||
id item;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#include "common.h"
|
||||
#include <NGObjWeb/SoComponent.h>
|
||||
|
||||
@implementation UIxPageFrame
|
||||
|
||||
- (void)dealloc {
|
||||
[self->item release];
|
||||
[self->title release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (void)setTitle:(NSString *)_value {
|
||||
ASSIGNCOPY(self->title, _value);
|
||||
}
|
||||
- (NSString *)title {
|
||||
if ([self isUIxDebugEnabled])
|
||||
return self->title;
|
||||
|
||||
return [self labelForKey:@"OpenGroupware.org"];
|
||||
}
|
||||
|
||||
- (void)setItem:(id)_item {
|
||||
ASSIGN(self->item, _item);
|
||||
}
|
||||
- (id)item {
|
||||
return self->item;
|
||||
}
|
||||
|
||||
- (NSString *)ownerInContext {
|
||||
return [[self clientObject] ownerInContext:[self context]];
|
||||
}
|
||||
|
||||
/* Help URL/target */
|
||||
|
||||
- (NSString *)helpURL {
|
||||
return [NSString stringWithFormat:@"help/%@.html", self->title];
|
||||
}
|
||||
- (NSString *)helpWindowTarget {
|
||||
return [NSString stringWithFormat:@"Help_%@", self->title];
|
||||
}
|
||||
|
||||
|
||||
/* notifications */
|
||||
|
||||
- (void)sleep {
|
||||
[self->item release]; self->item = nil;
|
||||
[super sleep];
|
||||
}
|
||||
|
||||
/* URL generation */
|
||||
// TODO: I think all this should be done by the clientObject?!
|
||||
|
||||
- (NSString *)relativeHomePath {
|
||||
return [self relativePathToUserFolderSubPath:@""];
|
||||
}
|
||||
|
||||
- (NSString *)relativeCalendarPath {
|
||||
return [self relativePathToUserFolderSubPath:@"Calendar/"];
|
||||
}
|
||||
|
||||
- (NSString *)relativeContactsPath {
|
||||
return [self relativePathToUserFolderSubPath:@"Contacts/"];
|
||||
}
|
||||
|
||||
- (NSString *)relativeMailPath {
|
||||
return [self relativePathToUserFolderSubPath:@"Mail/"];
|
||||
}
|
||||
|
||||
/* page based JavaScript */
|
||||
|
||||
- (WOResourceManager *)pageResourceManager {
|
||||
WOResourceManager *rm;
|
||||
|
||||
if ((rm = [[[self context] page] resourceManager]) == nil)
|
||||
rm = [[WOApplication application] resourceManager];
|
||||
return rm;
|
||||
}
|
||||
|
||||
- (NSString *)pageJavaScriptURL {
|
||||
static NSMutableDictionary *pageToURL = nil;
|
||||
WOResourceManager *rm;
|
||||
WOComponent *page;
|
||||
NSString *jsname, *pageName;
|
||||
NSString *url;
|
||||
|
||||
page = [[self context] page];
|
||||
pageName = NSStringFromClass([page class]);
|
||||
// TODO: does not seem to work! (gets reset): pageName = [page name];
|
||||
|
||||
if ((url = [pageToURL objectForKey:pageName]) != nil)
|
||||
return [url isNotNull] ? url : nil;
|
||||
|
||||
if (pageToURL == nil)
|
||||
pageToURL = [[NSMutableDictionary alloc] initWithCapacity:32];
|
||||
|
||||
rm = [self pageResourceManager];
|
||||
jsname = [pageName stringByAppendingString:@".js"];
|
||||
|
||||
url = [rm urlForResourceNamed:jsname
|
||||
inFramework:
|
||||
[[NSBundle bundleForClass:[page class]] bundlePath]
|
||||
languages:nil
|
||||
request:[[self context] request]];
|
||||
|
||||
/* cache */
|
||||
[pageToURL setObject:(url ? url : (id)[NSNull null]) forKey:pageName];
|
||||
return url;
|
||||
}
|
||||
|
||||
- (BOOL)hasPageSpecificJavaScript {
|
||||
return [[self pageJavaScriptURL] length] > 0 ? YES : NO;
|
||||
}
|
||||
|
||||
@end /* UIxPageFrame */
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
Copyright (C) 2000-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 <NGObjWeb/SoComponent.h>
|
||||
|
||||
@interface UIxPrintPageFrame : SoComponent
|
||||
{
|
||||
NSString *title;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxPrintPageFrame
|
||||
|
||||
- (void)dealloc {
|
||||
[self->title release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (void)setTitle:(NSString *)_value {
|
||||
ASSIGNCOPY(self->title, _value);
|
||||
}
|
||||
- (NSString *)title {
|
||||
return self->title;
|
||||
}
|
||||
|
||||
@end /* UIxPrintPageFrame */
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
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 <NGObjWeb/WOComponent.h>
|
||||
|
||||
@interface UIxSortButton : WOComponent
|
||||
@end
|
||||
|
||||
@implementation UIxSortButton
|
||||
@end /* UIxSortButton */
|
||||
|
||||
@@ -0,0 +1,475 @@
|
||||
/*
|
||||
Copyright (C) 2000-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 "UIxTabView.h"
|
||||
#include "common.h"
|
||||
|
||||
#if DEBUG
|
||||
# define DEBUG_JS 1
|
||||
#endif
|
||||
|
||||
/* context keys */
|
||||
extern NSString *UIxTabView_HEAD;
|
||||
extern NSString *UIxTabView_BODY;
|
||||
extern NSString *UIxTabView_KEYS;
|
||||
extern NSString *UIxTabView_SCRIPT;
|
||||
extern NSString *UIxTabView_ACTIVEKEY;
|
||||
extern NSString *UIxTabView_COLLECT;
|
||||
|
||||
@implementation UIxTabItem
|
||||
|
||||
static Class StrClass = Nil;
|
||||
|
||||
+ (int)version {
|
||||
return [super version] + 0;
|
||||
}
|
||||
+ (void)initialize {
|
||||
StrClass = [NSString class];
|
||||
}
|
||||
|
||||
static NSString *retStrForInt(int i) {
|
||||
switch(i) {
|
||||
case 0: return @"0";
|
||||
case 1: return @"1";
|
||||
case 2: return @"2";
|
||||
case 3: return @"3";
|
||||
case 4: return @"4";
|
||||
case 5: return @"5";
|
||||
case 6: return @"6";
|
||||
case 7: return @"7";
|
||||
case 8: return @"8";
|
||||
case 9: return @"9";
|
||||
case 10: return @"10";
|
||||
// TODO: find useful count!
|
||||
default:
|
||||
return [[StrClass alloc] initWithFormat:@"%i", i];
|
||||
}
|
||||
}
|
||||
|
||||
- (id)initWithName:(NSString *)_name
|
||||
associations:(NSDictionary *)_config
|
||||
template:(WOElement *)_subs
|
||||
{
|
||||
if ((self = [super initWithName:_name associations:_config template:_subs])) {
|
||||
self->key = WOExtGetProperty(_config, @"key");
|
||||
self->label = WOExtGetProperty(_config, @"label");
|
||||
|
||||
self->isScript = WOExtGetProperty(_config, @"isScript");
|
||||
self->href = WOExtGetProperty(_config, @"href");
|
||||
|
||||
self->icon = WOExtGetProperty(_config, @"icon");
|
||||
self->action = WOExtGetProperty(_config, @"action");
|
||||
|
||||
self->tabStyle = WOExtGetProperty(_config, @"tabStyle");
|
||||
self->selectedTabStyle = WOExtGetProperty(_config, @"selectedTabStyle");
|
||||
|
||||
self->tabIcon = WOExtGetProperty(_config, @"tabIcon");
|
||||
self->leftTabIcon = WOExtGetProperty(_config, @"leftTabIcon");
|
||||
self->selectedTabIcon = WOExtGetProperty(_config, @"selectedTabIcon");
|
||||
|
||||
self->asBackground = WOExtGetProperty(_config, @"asBackground");
|
||||
self->width = WOExtGetProperty(_config, @"width");
|
||||
self->height = WOExtGetProperty(_config, @"height");
|
||||
self->activeBgColor = WOExtGetProperty(_config, @"activeBgColor");
|
||||
self->inactiveBgColor = WOExtGetProperty(_config, @"inactiveBgColor");
|
||||
|
||||
self->template = [_subs retain];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[self->key release];
|
||||
[self->label release];
|
||||
|
||||
[self->href release];
|
||||
|
||||
[self->action release];
|
||||
|
||||
[self->isScript release];
|
||||
[self->template release];
|
||||
|
||||
[self->tabStyle release];
|
||||
[self->selectedTabStyle release];
|
||||
|
||||
[self->icon release];
|
||||
[self->leftTabIcon release];
|
||||
[self->selectedTabIcon release];
|
||||
[self->tabIcon release];
|
||||
|
||||
[self->asBackground release];
|
||||
[self->width release];
|
||||
[self->height release];
|
||||
|
||||
[self->activeBgColor release];
|
||||
[self->inactiveBgColor release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* responder */
|
||||
|
||||
- (void)takeValuesFromRequest:(WORequest *)_rq inContext:(WOContext *)_ctx {
|
||||
NSString *activeTabKey;
|
||||
NSString *myTabKey;
|
||||
BOOL doCheck;
|
||||
|
||||
if ([_ctx objectForKey:UIxTabView_HEAD]) {
|
||||
/* head clicks */
|
||||
[[_ctx component] debugWithFormat:
|
||||
@"UIxTabItem: head takes (no) values, eid='%@'",
|
||||
[_ctx elementID]];
|
||||
return;
|
||||
}
|
||||
|
||||
if ((activeTabKey = [_ctx objectForKey:UIxTabView_BODY]) == nil) {
|
||||
[[_ctx component] debugWithFormat:@"UIxTabItem: invalid state"];
|
||||
[self->template takeValuesFromRequest:_rq inContext:_ctx];
|
||||
return;
|
||||
}
|
||||
|
||||
myTabKey = [self->key stringValueInComponent:[_ctx component]];
|
||||
doCheck = [self->isScript boolValueInComponent:[_ctx component]];
|
||||
|
||||
if ([activeTabKey isEqualToString:myTabKey] || doCheck) {
|
||||
#if ADD_OWN_ELEMENTIDS
|
||||
[_ctx appendElementIDComponent:activeTabKey];
|
||||
#endif
|
||||
|
||||
#if DEBUG_TAKEVALUES
|
||||
[[_ctx component] debugWithFormat:
|
||||
@"UIxTabItem: body takes values, eid='%@'",
|
||||
[_ctx elementID]];
|
||||
#endif
|
||||
|
||||
[self->template takeValuesFromRequest:_rq inContext:_ctx];
|
||||
#if ADD_OWN_ELEMENTIDS
|
||||
[_ctx deleteLastElementIDComponent];
|
||||
#endif
|
||||
}
|
||||
#if DEBUG_TAKEVALUES
|
||||
else {
|
||||
[[_ctx component] debugWithFormat:
|
||||
@"UIxTabItem: body takes no values, eid='%@'",
|
||||
[_ctx elementID]];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
- (id)invokeActionForRequest:(WORequest *)_req inContext:(WOContext *)_ctx {
|
||||
id result;
|
||||
WOAssociation *tmp;
|
||||
NSString *activeTabKey;
|
||||
|
||||
if ((tmp = [_ctx objectForKey:UIxTabView_HEAD])) {
|
||||
/* click on tab icon */
|
||||
NSString *tabkey;
|
||||
|
||||
tabkey = [_ctx currentElementID];
|
||||
[_ctx consumeElementID];
|
||||
[_ctx appendElementIDComponent:tabkey];
|
||||
|
||||
if ([tmp isValueSettable])
|
||||
[tmp setValue:tabkey inComponent:[_ctx component]];
|
||||
|
||||
#if 0
|
||||
result = [self->action valueInComponent:[_ctx component]];
|
||||
#endif
|
||||
|
||||
[_ctx deleteLastElementIDComponent];
|
||||
}
|
||||
else if ((activeTabKey = [_ctx objectForKey:UIxTabView_BODY])) {
|
||||
/* clicked somewhere in the (active) body */
|
||||
result = [self->template invokeActionForRequest:_req inContext:_ctx];
|
||||
}
|
||||
else {
|
||||
[[_ctx component] logWithFormat:@"UIxTabItem: invalid invoke state"];
|
||||
result = [self->template invokeActionForRequest:_req inContext:_ctx];
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/* info collection */
|
||||
|
||||
- (void)_collectInContext:(WOContext *)_ctx key:(NSString *)k {
|
||||
BOOL isLeft = NO;
|
||||
NSMutableArray *keys;
|
||||
UIxTabItemInfo *info;
|
||||
WOComponent *cmp;
|
||||
|
||||
cmp = [_ctx component];
|
||||
keys = [_ctx objectForKey:UIxTabView_KEYS];
|
||||
if (keys == nil) {
|
||||
keys = [[[NSMutableArray alloc] init] autorelease];
|
||||
[_ctx setObject:keys forKey:UIxTabView_KEYS];
|
||||
isLeft = YES;
|
||||
}
|
||||
|
||||
if (k == nil) {
|
||||
/* auto-assign a key */
|
||||
k = retStrForInt([keys count]);
|
||||
}
|
||||
else
|
||||
k = [k retain];
|
||||
[_ctx appendElementIDComponent:k];
|
||||
|
||||
info = [[UIxTabItemInfo alloc] init];
|
||||
info->key = [k copy];
|
||||
info->label = [[self->label stringValueInComponent:cmp] copy];
|
||||
info->icon = [[self->icon stringValueInComponent:cmp] copy];
|
||||
#if 0
|
||||
info->uri = [[_ctx componentActionURL] copy];
|
||||
#else
|
||||
info->uri = [[self->href stringValueInComponent:cmp] copy];
|
||||
#endif
|
||||
info->isScript = [self->isScript boolValueInComponent:cmp];
|
||||
info->tabIcon = [[self->tabIcon stringValueInComponent:cmp] copy];
|
||||
info->leftIcon = [[self->leftTabIcon stringValueInComponent:cmp] copy];
|
||||
info->selIcon = [[self->selectedTabIcon stringValueInComponent:cmp]
|
||||
copy];
|
||||
info->tabStyle = [[self->tabStyle stringValueInComponent:cmp] copy];
|
||||
info->selectedTabStyle = [[self->selectedTabStyle stringValueInComponent:cmp]
|
||||
copy];
|
||||
|
||||
if (self->asBackground == nil)
|
||||
info->asBackground = 0;
|
||||
else {
|
||||
info->asBackground
|
||||
= ([self->asBackground boolValueInComponent:cmp]) ? 1 : -1;
|
||||
}
|
||||
info->width = [[self->width stringValueInComponent:cmp] copy];
|
||||
info->height = [[self->height stringValueInComponent:cmp] copy];
|
||||
info->activeBg = [[self->activeBgColor stringValueInComponent:cmp]
|
||||
copy];
|
||||
info->inactiveBg = [[self->inactiveBgColor stringValueInComponent:cmp]
|
||||
copy];
|
||||
|
||||
if (info->leftIcon == nil) info->leftIcon = [info->tabIcon copy];
|
||||
|
||||
[keys addObject:info];
|
||||
[info release];
|
||||
[k release];
|
||||
|
||||
[_ctx deleteLastElementIDComponent];
|
||||
}
|
||||
|
||||
/* header generation */
|
||||
|
||||
- (void)_appendHeadToResponse:(WOResponse *)_response
|
||||
inContext:(WOContext *)_ctx
|
||||
activeKey:(NSString *)activeKey
|
||||
key:(NSString *)k
|
||||
{
|
||||
/* head is currently generated in UIxTabView */
|
||||
#if 0
|
||||
// note: some associations can be inherited by UIxTabView !
|
||||
BOOL doImages;
|
||||
WOComponent *comp;
|
||||
BOOL doBgIcon;
|
||||
NSString *label;
|
||||
NSString *w, *h;
|
||||
|
||||
doImages = ![[[_ctx request] clientCapabilities] isTextModeBrowser];
|
||||
comp = [_ctx component];
|
||||
|
||||
doBgIcon = self->asBackground && doImages
|
||||
? [self->asBackground boolValueInComponent:comp] ? YES : NO
|
||||
: NO;
|
||||
|
||||
if ((label = [self->label stringValueInComponent:comp]) == nil)
|
||||
label = k;
|
||||
|
||||
if (doImages) {
|
||||
/* lookup image */
|
||||
NSString *imgName = nil;
|
||||
// ...
|
||||
|
||||
imgUri = WEUriOfResource(imgName, _ctx);
|
||||
if ([imgUri length] < 1)
|
||||
doImages = NO;
|
||||
}
|
||||
|
||||
// .... _isActive
|
||||
#endif
|
||||
}
|
||||
|
||||
/* body generation */
|
||||
|
||||
- (void)_appendBodyToResponse:(WOResponse *)_response
|
||||
inContext:(WOContext *)_ctx
|
||||
activeKey:(NSString *)tmp
|
||||
key:(NSString *)k
|
||||
{
|
||||
BOOL doScript;
|
||||
BOOL isScript_;
|
||||
BOOL isActive;
|
||||
|
||||
doScript = [[_ctx objectForKey:UIxTabView_SCRIPT] boolValue];
|
||||
isScript_ = [self->isScript boolValueInComponent:[_ctx component]];
|
||||
isActive = [tmp isEqualToString:k];
|
||||
|
||||
if (doScript && (isActive || isScript_)) {
|
||||
[_response appendContentString:@"<div id=\""];
|
||||
[_response appendContentString:k];
|
||||
[_response appendContentString:@"TabLayer\" style=\"display: none;\">\n"];
|
||||
}
|
||||
|
||||
if (isActive || (doScript && isScript_)) {
|
||||
/* content is active or used as layer*/
|
||||
#if ADD_OWN_ELEMENTIDS
|
||||
[_ctx appendElementIDComponent:k];
|
||||
#endif
|
||||
#if DEBUG && 0
|
||||
NSLog(@"TAB: %@", k);
|
||||
#endif
|
||||
|
||||
[self->template appendToResponse:_response inContext:_ctx];
|
||||
|
||||
#if ADD_OWN_ELEMENTIDS
|
||||
[_ctx deleteLastElementIDComponent];
|
||||
#endif
|
||||
}
|
||||
|
||||
if (doScript && (isActive || isScript_)) {
|
||||
NSString *jsout;
|
||||
[_response appendContentString:@"</div>"];
|
||||
|
||||
jsout = [NSString alloc];
|
||||
jsout = [jsout initWithFormat:
|
||||
@"<script language=\"JavaScript\">\n<!--\n"
|
||||
@"%@Tab[\"Div\"] = %@TabLayer;\n",
|
||||
k, k];
|
||||
|
||||
[_response appendContentString:jsout];
|
||||
[jsout release];
|
||||
|
||||
#if DEBUG_JS
|
||||
jsout = [NSString alloc];
|
||||
jsout = [jsout initWithFormat:
|
||||
@"if (%@Tab[\"Div\"].style==null) {"
|
||||
@"alert('missing style in div for tab %@');}",
|
||||
k, k];
|
||||
|
||||
[_response appendContentString:jsout];
|
||||
[jsout release];
|
||||
#endif
|
||||
|
||||
if (isActive) {
|
||||
[_response appendContentString:@"showTab("];
|
||||
[_response appendContentString:k];
|
||||
[_response appendContentString:@"Tab);\n"];
|
||||
}
|
||||
[_response appendContentString:@"//-->\n</script>"];
|
||||
}
|
||||
}
|
||||
|
||||
/* master generation method */
|
||||
|
||||
- (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
|
||||
NSString *k;
|
||||
BOOL doForm;
|
||||
id tmp;
|
||||
|
||||
doForm = [_ctx isInForm];
|
||||
k = [self->key stringValueInComponent:[_ctx component]];
|
||||
|
||||
if ((tmp = [_ctx objectForKey:UIxTabView_HEAD])) {
|
||||
if ([tmp isEqual:UIxTabView_COLLECT]) {
|
||||
[self _collectInContext:_ctx key:k];
|
||||
}
|
||||
else {
|
||||
[self _appendHeadToResponse:_response inContext:_ctx
|
||||
activeKey:tmp key:k];
|
||||
}
|
||||
}
|
||||
else if ((tmp = [_ctx objectForKey:UIxTabView_BODY])) {
|
||||
[self _appendBodyToResponse:_response inContext:_ctx
|
||||
activeKey:tmp key:k];
|
||||
}
|
||||
else {
|
||||
[self warnWithFormat:@"(%s): invalid UIxTabItem state !!!",
|
||||
__PRETTY_FUNCTION__];
|
||||
[_response appendContentString:@"[invalid state]"];
|
||||
}
|
||||
}
|
||||
|
||||
@end /* UIxTabItem */
|
||||
|
||||
@implementation UIxTabItemInfo
|
||||
|
||||
- (void)dealloc {
|
||||
[self->uri release];
|
||||
[self->icon release];
|
||||
[self->label release];
|
||||
[self->key release];
|
||||
[self->tabStyle release];
|
||||
[self->selectedTabStyle release];
|
||||
[self->tabIcon release];
|
||||
[self->selIcon release];
|
||||
[self->leftIcon release];
|
||||
[self->width release];
|
||||
[self->height release];
|
||||
[self->activeBg release];
|
||||
[self->inactiveBg release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (NSString *)key {
|
||||
return self->key;
|
||||
}
|
||||
- (NSString *)label {
|
||||
return self->label;
|
||||
}
|
||||
- (NSString *)icon {
|
||||
return self->icon;
|
||||
}
|
||||
- (NSString *)uri {
|
||||
return self->uri;
|
||||
}
|
||||
- (BOOL)isScript {
|
||||
return self->isScript;
|
||||
}
|
||||
|
||||
- (int)asBackground {
|
||||
return self->asBackground;
|
||||
}
|
||||
|
||||
- (NSString *)width {
|
||||
return self->width;
|
||||
}
|
||||
|
||||
- (NSString *)height {
|
||||
return self->height;
|
||||
}
|
||||
|
||||
- (NSString *)activeBg {
|
||||
return self->activeBg;
|
||||
}
|
||||
|
||||
- (NSString *)inactiveBg {
|
||||
return self->inactiveBg;
|
||||
}
|
||||
|
||||
@end /* UIxTabItemInfo */
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
Copyright (C) 2000-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.
|
||||
*/
|
||||
|
||||
#ifndef __UIxTabView_H__
|
||||
#define __UIxTabView_H__
|
||||
|
||||
/*
|
||||
This is a library private header !
|
||||
*/
|
||||
|
||||
#include <NGObjWeb/WODynamicElement.h>
|
||||
|
||||
/*
|
||||
Does not support tab-head-creation from nested components !!!
|
||||
|
||||
hh: Why not ??? -> Because selection is manipulated in sub-elements
|
||||
|
||||
UIxTabView creates element-IDs like
|
||||
|
||||
.h.*.$key. for the tab-items (head-mode)
|
||||
.b.$key... for the tab-content (content-mode) (new, hh)
|
||||
|
||||
!!! UIxTabView JavaScript can't handle duplicate tab-keys !!!
|
||||
*/
|
||||
|
||||
@interface UIxTabView : WODynamicElement
|
||||
{
|
||||
WOAssociation *selection;
|
||||
|
||||
/* config: */
|
||||
WOAssociation *headerStyle;
|
||||
WOAssociation *bodyStyle;
|
||||
WOAssociation *tabStyle;
|
||||
WOAssociation *selectedTabStyle;
|
||||
|
||||
/* old config: */
|
||||
WOAssociation *bgColor;
|
||||
WOAssociation *nonSelectedBgColor;
|
||||
WOAssociation *leftCornerIcon;
|
||||
WOAssociation *rightCornerIcon;
|
||||
|
||||
WOAssociation *tabIcon;
|
||||
WOAssociation *leftTabIcon;
|
||||
WOAssociation *selectedTabIcon;
|
||||
|
||||
WOAssociation *asBackground;
|
||||
WOAssociation *width;
|
||||
WOAssociation *height;
|
||||
WOAssociation *activeBgColor;
|
||||
WOAssociation *inactiveBgColor;
|
||||
|
||||
WOAssociation *fontColor;
|
||||
WOAssociation *fontSize;
|
||||
WOAssociation *fontFace;
|
||||
|
||||
id template;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface UIxTabItem : WODynamicElement
|
||||
{
|
||||
WOAssociation *key;
|
||||
WOAssociation *label;
|
||||
|
||||
WOAssociation *href;
|
||||
WOAssociation *isScript;
|
||||
|
||||
WOAssociation *action;
|
||||
WOAssociation *icon;
|
||||
|
||||
/* config: */
|
||||
WOAssociation *tabStyle;
|
||||
WOAssociation *selectedTabStyle;
|
||||
|
||||
/* old config */
|
||||
WOAssociation *tabIcon;
|
||||
WOAssociation *leftTabIcon;
|
||||
WOAssociation *selectedTabIcon;
|
||||
|
||||
WOAssociation *asBackground;
|
||||
WOAssociation *width;
|
||||
WOAssociation *height;
|
||||
WOAssociation *activeBgColor;
|
||||
WOAssociation *inactiveBgColor;
|
||||
|
||||
id template;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface UIxTabItemInfo : NSObject
|
||||
{
|
||||
@public
|
||||
NSString *label;
|
||||
NSString *icon;
|
||||
NSString *key;
|
||||
NSString *uri;
|
||||
NSString *tabIcon;
|
||||
NSString *leftIcon;
|
||||
NSString *selIcon;
|
||||
NSString *tabStyle;
|
||||
NSString *selectedTabStyle;
|
||||
|
||||
int asBackground; // 0 -> not set, 1 -> YES, else -> NO
|
||||
NSString *width;
|
||||
NSString *height;
|
||||
NSString *activeBg;
|
||||
NSString *inactiveBg;
|
||||
|
||||
BOOL isScript;
|
||||
}
|
||||
@end
|
||||
|
||||
#endif /* __UIxTabView_H__ */
|
||||
@@ -0,0 +1,684 @@
|
||||
/*
|
||||
Copyright (C) 2000-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 "UIxTabView.h"
|
||||
#include "common.h"
|
||||
#include <NGObjWeb/NGObjWeb.h>
|
||||
#include <NGExtensions/NGExtensions.h>
|
||||
#include <EOControl/EOControl.h>
|
||||
#include <NGObjWeb/WEClientCapabilities.h>
|
||||
|
||||
#if DEBUG
|
||||
// # define DEBUG_TAKEVALUES 1
|
||||
# define DEBUG_JS 1
|
||||
#endif
|
||||
|
||||
/* context keys */
|
||||
NSString *UIxTabView_HEAD = @"UIxTabView_head";
|
||||
NSString *UIxTabView_BODY = @"UIxTabView_body";
|
||||
NSString *UIxTabView_KEYS = @"UIxTabView_keys";
|
||||
NSString *UIxTabView_SCRIPT = @"UIxTabView_script";
|
||||
NSString *UIxTabView_ACTIVEKEY = @"UIxTabView_activekey";
|
||||
NSString *UIxTabView_COLLECT = @"~tv~";
|
||||
|
||||
@implementation UIxTabView
|
||||
|
||||
static NSNumber *YesNumber;
|
||||
|
||||
+ (void)initialize {
|
||||
if (YesNumber == nil)
|
||||
YesNumber = [[NSNumber numberWithBool:YES] retain];
|
||||
}
|
||||
|
||||
+ (int)version {
|
||||
return [super version] + 0;
|
||||
}
|
||||
|
||||
- (id)initWithName:(NSString *)_name
|
||||
associations:(NSDictionary *)_config
|
||||
template:(WOElement *)_subs
|
||||
{
|
||||
if ((self = [super initWithName:_name associations:_config template:_subs])) {
|
||||
self->selection = WOExtGetProperty(_config, @"selection");
|
||||
|
||||
self->headerStyle = WOExtGetProperty(_config, @"headerStyle");
|
||||
self->bodyStyle = WOExtGetProperty(_config, @"bodyStyle");
|
||||
self->tabStyle = WOExtGetProperty(_config, @"tabStyle");
|
||||
self->selectedTabStyle = WOExtGetProperty(_config, @"selectedTabStyle");
|
||||
|
||||
self->bgColor = WOExtGetProperty(_config, @"bgColor");
|
||||
self->nonSelectedBgColor = WOExtGetProperty(_config, @"nonSelectedBgColor");
|
||||
self->leftCornerIcon = WOExtGetProperty(_config, @"leftCornerIcon");
|
||||
self->rightCornerIcon = WOExtGetProperty(_config, @"rightCornerIcon");
|
||||
|
||||
self->tabIcon = WOExtGetProperty(_config, @"tabIcon");
|
||||
self->leftTabIcon = WOExtGetProperty(_config, @"leftTabIcon");
|
||||
self->selectedTabIcon = WOExtGetProperty(_config, @"selectedTabIcon");
|
||||
|
||||
self->asBackground = WOExtGetProperty(_config, @"asBackground");
|
||||
self->width = WOExtGetProperty(_config, @"width");
|
||||
self->height = WOExtGetProperty(_config, @"height");
|
||||
self->activeBgColor = WOExtGetProperty(_config, @"activeBgColor");
|
||||
self->inactiveBgColor = WOExtGetProperty(_config, @"inactiveBgColor");
|
||||
|
||||
self->fontColor = WOExtGetProperty(_config, @"fontColor");
|
||||
self->fontSize = WOExtGetProperty(_config, @"fontSize");
|
||||
self->fontFace = WOExtGetProperty(_config, @"fontFace");
|
||||
|
||||
self->template = RETAIN(_subs);
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[self->selection release];
|
||||
|
||||
[self->headerStyle release];
|
||||
[self->bodyStyle release];
|
||||
[self->tabStyle release];
|
||||
[self->selectedTabStyle release];
|
||||
|
||||
RELEASE(self->bgColor);
|
||||
RELEASE(self->nonSelectedBgColor);
|
||||
RELEASE(self->leftCornerIcon);
|
||||
RELEASE(self->rightCornerIcon);
|
||||
|
||||
RELEASE(self->leftTabIcon);
|
||||
RELEASE(self->selectedTabIcon);
|
||||
RELEASE(self->tabIcon);
|
||||
|
||||
RELEASE(self->width);
|
||||
RELEASE(self->height);
|
||||
|
||||
RELEASE(self->activeBgColor);
|
||||
RELEASE(self->inactiveBgColor);
|
||||
|
||||
RELEASE(self->fontColor);
|
||||
RELEASE(self->fontSize);
|
||||
RELEASE(self->fontFace);
|
||||
|
||||
RELEASE(self->template);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* nesting */
|
||||
|
||||
- (id)saveNestedStateInContext:(WOContext *)_ctx {
|
||||
return nil;
|
||||
}
|
||||
- (void)restoreNestedState:(id)_state inContext:(WOContext *)_ctx {
|
||||
if (_state == nil) return;
|
||||
}
|
||||
|
||||
- (NSArray *)collectKeysInContext:(WOContext *)_ctx {
|
||||
/* collect mode, collects all keys */
|
||||
[_ctx setObject:UIxTabView_COLLECT forKey:UIxTabView_HEAD];
|
||||
|
||||
[self->template appendToResponse:nil inContext:_ctx];
|
||||
|
||||
[_ctx removeObjectForKey:UIxTabView_HEAD];
|
||||
return [_ctx objectForKey:UIxTabView_KEYS];
|
||||
}
|
||||
|
||||
/* responder */
|
||||
|
||||
- (void)takeValuesFromRequest:(WORequest *)_req inContext:(WOContext *)_ctx {
|
||||
id nestedState;
|
||||
NSString *activeTabKey;
|
||||
|
||||
activeTabKey = [self->selection stringValueInComponent:[_ctx component]];
|
||||
NSLog(@"%s activeTabKey:%@", __PRETTY_FUNCTION__, activeTabKey);
|
||||
nestedState = [self saveNestedStateInContext:_ctx];
|
||||
[_ctx appendElementIDComponent:@"b"];
|
||||
[_ctx appendElementIDComponent:activeTabKey];
|
||||
|
||||
[_ctx setObject:activeTabKey forKey:UIxTabView_BODY];
|
||||
|
||||
#if DEBUG_TAKEVALUES
|
||||
[[_ctx component] debugWithFormat:@"UIxTabView: body takes values, eid='%@'",
|
||||
[_ctx elementID]];
|
||||
#endif
|
||||
|
||||
[self->template takeValuesFromRequest:_req inContext:_ctx];
|
||||
|
||||
[_ctx removeObjectForKey:UIxTabView_BODY];
|
||||
[_ctx deleteLastElementIDComponent]; // activeKey
|
||||
[_ctx deleteLastElementIDComponent]; /* 'b' */
|
||||
[self restoreNestedState:nestedState inContext:_ctx];
|
||||
}
|
||||
|
||||
- (id)invokeActionForRequest:(WORequest *)_req inContext:(WOContext *)_ctx {
|
||||
NSString *key;
|
||||
id result;
|
||||
id nestedState;
|
||||
|
||||
if ((key = [_ctx currentElementID]) == nil)
|
||||
return nil;
|
||||
|
||||
result = nil;
|
||||
nestedState = [self saveNestedStateInContext:_ctx];
|
||||
|
||||
if ([key isEqualToString:@"h"]) {
|
||||
/* header action */
|
||||
//NSString *urlKey;
|
||||
|
||||
[_ctx consumeElementID];
|
||||
[_ctx appendElementIDComponent:@"h"];
|
||||
#if 0
|
||||
if ((urlKey = [_ctx currentElementID]) == nil) {
|
||||
[[_ctx application]
|
||||
debugWithFormat:@"missing active head tab key !"];
|
||||
}
|
||||
else {
|
||||
//NSLog(@"clicked: %@", urlKey);
|
||||
[_ctx consumeElementID];
|
||||
[_ctx appendElementIDComponent:urlKey];
|
||||
}
|
||||
#endif
|
||||
|
||||
[_ctx setObject:self->selection forKey:UIxTabView_HEAD];
|
||||
result = [self->template invokeActionForRequest:_req inContext:_ctx];
|
||||
[_ctx removeObjectForKey:UIxTabView_HEAD];
|
||||
|
||||
#if 0
|
||||
if (urlKey)
|
||||
[_ctx deleteLastElementIDComponent]; // active key
|
||||
#endif
|
||||
[_ctx deleteLastElementIDComponent]; // 'h'
|
||||
}
|
||||
else if ([key isEqualToString:@"b"]) {
|
||||
/* body action */
|
||||
NSString *activeTabKey, *urlKey;
|
||||
|
||||
[_ctx consumeElementID];
|
||||
[_ctx appendElementIDComponent:@"b"];
|
||||
|
||||
if ((urlKey = [_ctx currentElementID]) == nil) {
|
||||
[[_ctx application]
|
||||
debugWithFormat:@"missing active body tab key !"];
|
||||
}
|
||||
else {
|
||||
//NSLog(@"clicked: %@", urlKey);
|
||||
[_ctx consumeElementID];
|
||||
[_ctx appendElementIDComponent:urlKey];
|
||||
}
|
||||
|
||||
activeTabKey = [self->selection stringValueInComponent:[_ctx component]];
|
||||
[_ctx setObject:activeTabKey forKey:UIxTabView_BODY];
|
||||
|
||||
result = [self->template invokeActionForRequest:_req inContext:_ctx];
|
||||
|
||||
[_ctx removeObjectForKey:UIxTabView_BODY];
|
||||
|
||||
if (urlKey)
|
||||
[_ctx deleteLastElementIDComponent]; // active key
|
||||
[_ctx deleteLastElementIDComponent]; // 'b'
|
||||
}
|
||||
else {
|
||||
[[_ctx application]
|
||||
debugWithFormat:@"unknown tab container key '%@'", key];
|
||||
}
|
||||
|
||||
[self restoreNestedState:nestedState inContext:_ctx];
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSString *)_tabViewCountInContext:(WOContext *)_ctx {
|
||||
int count;
|
||||
count = [[_ctx valueForKey:@"UIxTabViewScriptDone"] intValue];
|
||||
return [NSString stringWithFormat:@"%d",count];
|
||||
}
|
||||
|
||||
- (NSString *)scriptHref:(UIxTabItemInfo *)_info
|
||||
inContext:(WOContext *)_ctx
|
||||
isLeft:(BOOL)_isLeft
|
||||
keys:(NSArray *)_keys
|
||||
{
|
||||
NSMutableString *result = [NSMutableString string];
|
||||
UIxTabItemInfo *tmp;
|
||||
NSString *activeKey;
|
||||
int i, cnt;
|
||||
NSString *elID;
|
||||
NSString *tstring;
|
||||
|
||||
activeKey = [self->selection stringValueInComponent:[_ctx component]];
|
||||
[result appendString:@"JavaScript:showTab("];
|
||||
[result appendString:_info->key];
|
||||
[result appendString:@"Tab);"];
|
||||
|
||||
[result appendString:@"swapCorners("];
|
||||
tstring = (!_isLeft)
|
||||
? @"tabCorner%@,tabCornerLeft%@);"
|
||||
: @"tabCornerLeft%@,tabCorner%@);";
|
||||
elID = [self _tabViewCountInContext:_ctx];
|
||||
[result appendString:[NSString stringWithFormat:tstring,elID,elID]];
|
||||
|
||||
for (i=0, cnt = [_keys count]; i < cnt; i++) {
|
||||
tmp = [_keys objectAtIndex:i];
|
||||
|
||||
if ((tmp->isScript || [tmp->key isEqualToString:activeKey])
|
||||
&& ![tmp->key isEqualToString:_info->key]) {
|
||||
[result appendString:@"hideTab("];
|
||||
[result appendString:tmp->key];
|
||||
[result appendString:@"Tab);"];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
- (void)appendLink:(UIxTabItemInfo *)_info
|
||||
toResponse:(WOResponse *)_response
|
||||
inContext:(WOContext *)_ctx
|
||||
isActive:(BOOL)_isActive isLeft:(BOOL)_isLeft
|
||||
doScript:(BOOL)_doScript keys:(NSArray *)_keys
|
||||
{
|
||||
NSString *headUri = nil;
|
||||
NSString *label = nil;
|
||||
NSString *styleName = nil;
|
||||
WEClientCapabilities *ccaps;
|
||||
WOComponent *comp;
|
||||
|
||||
ccaps = [[_ctx request] clientCapabilities];
|
||||
|
||||
comp = [_ctx component];
|
||||
headUri = _info->uri;
|
||||
|
||||
if ((label = _info->label) == nil)
|
||||
label = _info->key;
|
||||
|
||||
if (_isActive) {
|
||||
styleName = (_info->selectedTabStyle)
|
||||
? _info->selectedTabStyle
|
||||
: [self->selectedTabStyle stringValueInComponent:comp];
|
||||
}
|
||||
else {
|
||||
styleName = (_info->tabStyle)
|
||||
? _info->tabStyle
|
||||
: [self->tabStyle stringValueInComponent:comp];
|
||||
}
|
||||
|
||||
[_response appendContentString:@"<td align='center' valign='middle'"];
|
||||
|
||||
if (styleName) {
|
||||
[_response appendContentString:@" class='"];
|
||||
[_response appendContentHTMLAttributeValue:styleName];
|
||||
[_response appendContentCharacter:'\''];
|
||||
}
|
||||
|
||||
// click on td background
|
||||
if ([ccaps isInternetExplorer] && [ccaps isJavaScriptBrowser]) {
|
||||
[_response appendContentString:@" onclick=\"window.location.href='"];
|
||||
[_response appendContentHTMLAttributeValue:headUri];
|
||||
[_response appendContentString:@"'\""];
|
||||
}
|
||||
|
||||
[_response appendContentCharacter:'>'];
|
||||
|
||||
[_response appendContentString:@"<a href=\""];
|
||||
|
||||
[_response appendContentHTMLAttributeValue:headUri];
|
||||
|
||||
[_response appendContentString:@"\" "];
|
||||
[_response appendContentString:
|
||||
[NSString stringWithFormat:@"name='%@TabLink'", _info->key]];
|
||||
[_response appendContentString:@">"];
|
||||
|
||||
if ([label length] < 1)
|
||||
label = _info->key;
|
||||
[_response appendContentString:@"<nobr>"];
|
||||
[_response appendContentHTMLString:label];
|
||||
[_response appendContentString:@"</nobr>"];
|
||||
|
||||
[_response appendContentString:@"</a>"];
|
||||
|
||||
[_response appendContentString:@"</td>"];
|
||||
}
|
||||
|
||||
- (void)appendSubmitButton:(UIxTabItemInfo *)_info
|
||||
toResponse:(WOResponse *)_response
|
||||
inContext:(WOContext *)_ctx
|
||||
isActive:(BOOL)_isActive isLeft:(BOOL)_left
|
||||
doScript:(BOOL)_doScript keys:(NSArray *)_keys
|
||||
{
|
||||
[self appendLink:_info
|
||||
toResponse:_response
|
||||
inContext:_ctx
|
||||
isActive:_isActive isLeft:_left
|
||||
doScript:NO keys:_keys];
|
||||
}
|
||||
|
||||
- (void)_appendTabViewJSScriptToResponse:(WOResponse *)_response
|
||||
inContext:(WOContext *)_ctx
|
||||
{
|
||||
[_response appendContentString:
|
||||
@"<script language=\"JavaScript\">\n<!--\n\n"
|
||||
@"function showTab(obj) {\n"
|
||||
#if DEBUG_JS
|
||||
@" if (obj==null) { alert('missing tab obj ..'); return; }\n"
|
||||
@" if (obj['Div']==null) {"
|
||||
@" alert('missing div key in ' + obj); return; }\n"
|
||||
@" if (obj['Div'].style==null) {"
|
||||
@" alert('missing style key in div ' + obj['Div']);return; }\n"
|
||||
#endif
|
||||
@" obj['Div'].style.display = \"\";\n"
|
||||
@" obj['Img'].src = obj[\"Ar\"][1].src;\n"
|
||||
@" obj['link'].href = obj[\"href2\"];\n"
|
||||
@"}\n"
|
||||
@"function hideTab(obj) {\n"
|
||||
#if DEBUG_JS
|
||||
@" if (obj==null) { alert('missing tab obj ..'); return; }\n"
|
||||
@" if (obj['Div']==null) {"
|
||||
@" alert('missing div key in ' + obj); return; }\n"
|
||||
@" if (obj['Div'].style==null) {"
|
||||
@" alert('missing style key in div ' + obj['Div']);return; }\n"
|
||||
#endif
|
||||
@" obj['Div'].style.display = \"none\";\n"
|
||||
@" obj['Img'].src = obj[\"Ar\"][0].src;\n"
|
||||
@" obj['link'].href = obj[\"href1\"];\n"
|
||||
@"}\n"
|
||||
@"function swapCorners(obj1,obj2) {\n"
|
||||
@" if (obj1==null) { alert('missing corner 1'); return; }\n"
|
||||
@" if (obj2==null) { alert('missing corner 2'); return; }\n"
|
||||
@" obj1.style.display = \"none\";\n"
|
||||
@" obj2.style.display = \"\";\n"
|
||||
@"}\n"
|
||||
@"//-->\n</script>"];
|
||||
}
|
||||
|
||||
- (void)_appendHeaderRowToResponse:(WOResponse *)_response
|
||||
inContext:(WOContext *)_ctx
|
||||
keys:(NSArray *)keys activeKey:(NSString *)activeKey
|
||||
doScript:(BOOL)doScript
|
||||
{
|
||||
unsigned i, count;
|
||||
BOOL doForm;
|
||||
NSString *styleName;
|
||||
|
||||
doForm = NO; /* generate form controls ? */
|
||||
|
||||
[_response appendContentString:@"<tr><td colspan='2'>"];
|
||||
|
||||
styleName = [self->headerStyle stringValueInComponent:[_ctx component]];
|
||||
if(styleName) {
|
||||
[_response appendContentString:
|
||||
@"<table border='0' cellpadding='0' cellspacing='0' class='"];
|
||||
[_response appendContentHTMLAttributeValue:styleName];
|
||||
[_response appendContentString:@"'><tr>"];
|
||||
}
|
||||
else {
|
||||
[_response appendContentString:
|
||||
@"<table border='0' cellpadding='0' cellspacing='0'><tr>"];
|
||||
}
|
||||
|
||||
for (i = 0, count = [keys count]; i < count; i++) {
|
||||
UIxTabItemInfo *info;
|
||||
NSString *key;
|
||||
BOOL isActive;
|
||||
|
||||
info = [keys objectAtIndex:i];
|
||||
key = info->key;
|
||||
isActive = [key isEqualToString:activeKey];
|
||||
|
||||
[_ctx appendElementIDComponent:key];
|
||||
|
||||
if (doForm) {
|
||||
/* tab is inside of a FORM, so produce submit buttons */
|
||||
[self appendSubmitButton:info
|
||||
toResponse:_response
|
||||
inContext:_ctx
|
||||
isActive:isActive
|
||||
isLeft:(i == 0) ? YES : NO
|
||||
doScript:NO
|
||||
keys:keys];
|
||||
}
|
||||
else {
|
||||
/* tab is not in a FORM, generate hyperlinks for tab */
|
||||
[self appendLink:info
|
||||
toResponse:_response
|
||||
inContext:_ctx
|
||||
isActive:isActive
|
||||
isLeft:(i == 0) ? YES : NO
|
||||
doScript:NO
|
||||
keys:keys];
|
||||
}
|
||||
|
||||
[_ctx deleteLastElementIDComponent];
|
||||
}
|
||||
// [_response appendContentString:@"<td></td>"];
|
||||
[_response appendContentString:@"</tr></table>"];
|
||||
[_response appendContentString:@"</td></tr>"];
|
||||
}
|
||||
|
||||
- (void)_appendHeaderFootRowToResponse:(WOResponse *)_response
|
||||
inContext:(WOContext *)_ctx
|
||||
bgcolor:(NSString *)bgcolor
|
||||
doScript:(BOOL)doScript
|
||||
isLeftActive:(BOOL)isLeftActive
|
||||
{
|
||||
NSString *styleName;
|
||||
[_response appendContentString:@" <tr"];
|
||||
|
||||
styleName = [self->bodyStyle stringValueInComponent:[_ctx component]];
|
||||
if(styleName) {
|
||||
[_response appendContentString:@" class='"];
|
||||
[_response appendContentHTMLAttributeValue:styleName];
|
||||
[_response appendContentCharacter:'\''];
|
||||
}
|
||||
if (bgcolor) {
|
||||
[_response appendContentString:@" bgcolor=\""];
|
||||
[_response appendContentHTMLAttributeValue:bgcolor];
|
||||
[_response appendContentString:@"\""];
|
||||
}
|
||||
[_response appendContentString:@">\n"];
|
||||
|
||||
/* left corner */
|
||||
[_response appendContentString:@" <td align=\"left\" width=\"10\">"];
|
||||
|
||||
if (isLeftActive)
|
||||
[_response appendContentString:@" "];
|
||||
|
||||
if (!isLeftActive) {
|
||||
NSString *uri;
|
||||
|
||||
uri = [self->leftCornerIcon stringValueInComponent:[_ctx component]];
|
||||
if ((uri = WEUriOfResource(uri, _ctx))) {
|
||||
[_response appendContentString:@"<img border=\"0\" alt=\"\" src=\""];
|
||||
[_response appendContentString:uri];
|
||||
[_response appendContentString:@"\" />"];
|
||||
}
|
||||
else
|
||||
[_response appendContentString:@" "];
|
||||
}
|
||||
|
||||
[_response appendContentString:@"</td>"];
|
||||
|
||||
/* right corner */
|
||||
[_response appendContentString:@" <td align=\"right\">"];
|
||||
{
|
||||
NSString *uri;
|
||||
|
||||
uri = [self->rightCornerIcon stringValueInComponent:[_ctx component]];
|
||||
if ((uri = WEUriOfResource(uri, _ctx))) {
|
||||
[_response appendContentString:@"<img border=\"0\" alt=\"\" src=\""];
|
||||
[_response appendContentString:uri];
|
||||
[_response appendContentString:@"\" />"];
|
||||
}
|
||||
else
|
||||
[_response appendContentString:@" "];
|
||||
}
|
||||
[_response appendContentString:@"</td>\n"];
|
||||
|
||||
[_response appendContentString:@" </tr>\n"];
|
||||
}
|
||||
|
||||
- (void)_appendBodyRowToResponse:(WOResponse *)_response
|
||||
inContext:(WOContext *)_ctx
|
||||
bgcolor:(NSString *)bgcolor
|
||||
activeKey:(NSString *)activeKey
|
||||
{
|
||||
WEClientCapabilities *ccaps;
|
||||
BOOL indentContent;
|
||||
NSString *styleName;
|
||||
|
||||
styleName = [self->bodyStyle stringValueInComponent:[_ctx component]];
|
||||
ccaps = [[_ctx request] clientCapabilities];
|
||||
|
||||
/* put additional padding table into content ??? */
|
||||
indentContent = [ccaps isFastTableBrowser] && ![ccaps isTextModeBrowser];
|
||||
|
||||
[_response appendContentString:@"<tr"];
|
||||
if(styleName) {
|
||||
[_response appendContentString:@" class='"];
|
||||
[_response appendContentHTMLAttributeValue:styleName];
|
||||
[_response appendContentCharacter:'\''];
|
||||
}
|
||||
[_response appendContentString:@"><td colspan='2'"];
|
||||
if (bgcolor) {
|
||||
[_response appendContentString:@" bgcolor=\""];
|
||||
[_response appendContentHTMLAttributeValue:bgcolor];
|
||||
[_response appendContentCharacter:'\"'];
|
||||
}
|
||||
[_response appendContentCharacter:'>'];
|
||||
|
||||
if (indentContent) {
|
||||
/* start padding table */
|
||||
[_response appendContentString:
|
||||
@"<table border='0' width='100%'"
|
||||
@" cellpadding='10' cellspacing='0'>"];
|
||||
[_response appendContentString:@"<tr><td>"];
|
||||
}
|
||||
|
||||
[_ctx appendElementIDComponent:@"b"];
|
||||
[_ctx appendElementIDComponent:activeKey];
|
||||
|
||||
/* generate currently active body */
|
||||
{
|
||||
[_ctx setObject:activeKey forKey:UIxTabView_BODY];
|
||||
[self->template appendToResponse:_response inContext:_ctx];
|
||||
[_ctx removeObjectForKey:UIxTabView_BODY];
|
||||
}
|
||||
|
||||
[_ctx deleteLastElementIDComponent]; // activeKey
|
||||
[_ctx deleteLastElementIDComponent]; // 'b'
|
||||
|
||||
if (indentContent)
|
||||
/* close padding table */
|
||||
[_response appendContentString:@"</td></tr></table>"];
|
||||
|
||||
[_response appendContentString:@"</td></tr>"];
|
||||
}
|
||||
|
||||
- (BOOL)isLeftActiveInKeys:(NSArray *)keys activeKey:(NSString *)activeKey{
|
||||
unsigned i, count;
|
||||
BOOL isLeftActive;
|
||||
|
||||
isLeftActive = NO;
|
||||
|
||||
for (i = 0, count = [keys count]; i < count; i++) {
|
||||
UIxTabItemInfo *info;
|
||||
|
||||
info = [keys objectAtIndex:i];
|
||||
|
||||
if ((i == 0) && [info->key isEqualToString:activeKey])
|
||||
isLeftActive = YES;
|
||||
}
|
||||
|
||||
return isLeftActive;
|
||||
}
|
||||
|
||||
- (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx {
|
||||
WOComponent *cmp;
|
||||
NSString *bgcolor;
|
||||
BOOL isLeftActive;
|
||||
id nestedState;
|
||||
NSString *activeKey;
|
||||
NSArray *keys;
|
||||
int tabViewCount; /* used for image id's and writing script once */
|
||||
|
||||
tabViewCount = [[_ctx valueForKey:@"UIxTabViewScriptDone"] intValue];
|
||||
cmp = [_ctx component];
|
||||
|
||||
/* save state */
|
||||
|
||||
nestedState = [self saveNestedStateInContext:_ctx];
|
||||
|
||||
/* configure */
|
||||
|
||||
activeKey = [self->selection stringValueInComponent:cmp];
|
||||
|
||||
bgcolor = [self->bgColor stringValueInComponent:cmp];
|
||||
bgcolor = [bgcolor stringValue];
|
||||
|
||||
[_ctx appendElementIDComponent:@"h"];
|
||||
|
||||
/* collect & process keys (= available tabs) */
|
||||
|
||||
keys = [self collectKeysInContext:_ctx];
|
||||
|
||||
if (![[keys valueForKey:@"key"] containsObject:activeKey])
|
||||
/* selection is not available in keys */
|
||||
activeKey = nil;
|
||||
|
||||
if ((activeKey == nil) && ([keys count] > 0)) {
|
||||
/* no or invalid selection, use first key */
|
||||
activeKey = [[keys objectAtIndex:0] key];
|
||||
if ([self->selection isValueSettable])
|
||||
[self->selection setValue:activeKey inComponent:[_ctx component]];
|
||||
}
|
||||
|
||||
/* start appending */
|
||||
|
||||
/* count up for unique tabCorner/tabCornerLeft images */
|
||||
[_ctx takeValue:[NSNumber numberWithInt:(tabViewCount + 1)]
|
||||
forKey:@"UIxTabViewScriptDone"];
|
||||
|
||||
[_response appendContentString:
|
||||
@"<table border='0' width='100%'"
|
||||
@" cellpadding='0' cellspacing='0'>"];
|
||||
|
||||
/* find out whether left is active */
|
||||
|
||||
isLeftActive = [self isLeftActiveInKeys:keys activeKey:activeKey];
|
||||
|
||||
/* generate header row */
|
||||
|
||||
[self _appendHeaderRowToResponse:_response inContext:_ctx
|
||||
keys:keys activeKey:activeKey
|
||||
doScript:NO];
|
||||
|
||||
[_ctx deleteLastElementIDComponent]; // 'h' for head
|
||||
[_ctx removeObjectForKey:UIxTabView_HEAD];
|
||||
|
||||
/* body row */
|
||||
|
||||
[self _appendBodyRowToResponse:_response inContext:_ctx
|
||||
bgcolor:bgcolor
|
||||
activeKey:activeKey];
|
||||
|
||||
/* close table */
|
||||
|
||||
[_response appendContentString:@"</table>"];
|
||||
[_ctx removeObjectForKey:UIxTabView_ACTIVEKEY];
|
||||
[_ctx removeObjectForKey:UIxTabView_KEYS];
|
||||
[self restoreNestedState:nestedState inContext:_ctx];
|
||||
}
|
||||
|
||||
@end /* UIxTabView */
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
Copyright (C) 2000-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 <NGObjWeb/WOComponent.h>
|
||||
|
||||
@interface UIxWinClose : WOComponent
|
||||
@end
|
||||
|
||||
@implementation UIxWinClose
|
||||
@end /* UIxWinClose */
|
||||
@@ -0,0 +1,5 @@
|
||||
# Version file
|
||||
|
||||
SUBMINOR_VERSION:=46
|
||||
|
||||
# v0.9.28 requires NGExtensions v4.5.136
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"__cvs__" = "$Id: bundle-info.plist,v 1.1 2003/11/24 01:24:40 helge Exp $";
|
||||
|
||||
requires = {
|
||||
bundleManagerVersion = 1;
|
||||
classes = (
|
||||
{ name = NSObject; }
|
||||
);
|
||||
};
|
||||
|
||||
provides = {
|
||||
classes = (
|
||||
{ name = CommonUIProduct; },
|
||||
{ name = UIxComponent; },
|
||||
{ name = UIxPageFrame; },
|
||||
{ name = UIxWinClose; },
|
||||
{ name = UIxAppNavView; },
|
||||
{ name = "UIxElemBuilder"; },
|
||||
{ name = "UIxTabView"; },
|
||||
{ name = "UIxTabItem"; },
|
||||
);
|
||||
|
||||
WOComponents = (
|
||||
{ name = UIxPageFrame; },
|
||||
{ name = UIxWinClose; },
|
||||
{ name = UIxAppNavView; },
|
||||
);
|
||||
|
||||
WOxElemBuilder = (
|
||||
{ name = "UIxElemBuilder"; },
|
||||
);
|
||||
|
||||
WODynamicElements = (
|
||||
{ name = "UIxTabView"; },
|
||||
{ name = "UIxTabItem"; },
|
||||
);
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
// $Id: common.h,v 1.1 2003/11/24 01:24:40 helge Exp $
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if LIB_FOUNDATION_LIBRARY
|
||||
# include <Foundation/exceptions/GeneralExceptions.h>
|
||||
#elif NeXT_Foundation_LIBRARY || COCOA_Foundation_LIBRARY
|
||||
# include <NGExtensions/NGObjectMacros.h>
|
||||
# include <NGExtensions/NSString+Ext.h>
|
||||
#endif
|
||||
|
||||
#include <NGExtensions/NGExtensions.h>
|
||||
#include <NGObjWeb/NGObjWeb.h>
|
||||
#include <NGObjWeb/SoObjects.h>
|
||||
|
||||
@interface WOContext(WOExtensionsPrivate)
|
||||
- (void)addActiveFormElement:(WOElement *)_element;
|
||||
@end
|
||||
|
||||
static inline id WOExtGetProperty(NSDictionary *_set, NSString *_name) {
|
||||
id propValue = [_set objectForKey:_name];
|
||||
|
||||
if (propValue) {
|
||||
propValue = [propValue retain];
|
||||
[(NSMutableDictionary *)_set removeObjectForKey:_name];
|
||||
}
|
||||
return propValue;
|
||||
}
|
||||
|
||||
static inline NSString *WEUriOfResource(NSString *_name, WOContext *_ctx) {
|
||||
NSArray *languages;
|
||||
WOResourceManager *resourceManager;
|
||||
NSString *uri;
|
||||
|
||||
if (_name == nil)
|
||||
return nil;
|
||||
|
||||
languages = [_ctx hasSession]
|
||||
? [[_ctx session] languages]
|
||||
: [[_ctx request] browserLanguages];
|
||||
|
||||
resourceManager = [[_ctx application] resourceManager];
|
||||
|
||||
uri = [resourceManager urlForResourceNamed:_name
|
||||
inFramework:nil
|
||||
languages:languages
|
||||
request:[_ctx request]];
|
||||
if ([uri rangeOfString:@"/missingresource?"].length > 0)
|
||||
uri = nil;
|
||||
|
||||
return uri;
|
||||
}
|
||||
|
||||
static inline void WEAppendFont(WOResponse *_resp,
|
||||
NSString *_color,
|
||||
NSString *_face,
|
||||
NSString *_size)
|
||||
{
|
||||
[_resp appendContentString:@"<font"];
|
||||
if (_color) {
|
||||
[_resp appendContentString:@" color=\""];
|
||||
[_resp appendContentHTMLAttributeValue:_color];
|
||||
[_resp appendContentCharacter:'"'];
|
||||
}
|
||||
if (_face) {
|
||||
[_resp appendContentString:@" face=\""];
|
||||
[_resp appendContentHTMLAttributeValue:_face];
|
||||
[_resp appendContentCharacter:'"'];
|
||||
}
|
||||
if (_size) {
|
||||
[_resp appendContentString:@" size=\""];
|
||||
[_resp appendContentHTMLAttributeValue:_size];
|
||||
[_resp appendContentCharacter:'"'];
|
||||
}
|
||||
[_resp appendContentCharacter:'>'];
|
||||
}
|
||||
|
||||
static inline void WEAppendTD(WOResponse *_resp,
|
||||
NSString *_align,
|
||||
NSString *_valign,
|
||||
NSString *_bgColor)
|
||||
{
|
||||
[_resp appendContentString:@"<td"];
|
||||
if (_bgColor) {
|
||||
[_resp appendContentString:@" bgcolor=\""];
|
||||
[_resp appendContentHTMLAttributeValue:_bgColor];
|
||||
[_resp appendContentCharacter:'"'];
|
||||
}
|
||||
if (_align) {
|
||||
[_resp appendContentString:@" align=\""];
|
||||
[_resp appendContentHTMLAttributeValue:_align];
|
||||
[_resp appendContentCharacter:'"'];
|
||||
}
|
||||
if (_valign) {
|
||||
[_resp appendContentString:@" valign=\""];
|
||||
[_resp appendContentHTMLAttributeValue:_valign];
|
||||
[_resp appendContentCharacter:'"'];
|
||||
}
|
||||
[_resp appendContentCharacter:'>'];
|
||||
}
|
||||
|
||||
static inline WOElement *WECreateElement(NSString *_className,
|
||||
NSString *_name,
|
||||
NSDictionary *_config,
|
||||
WOElement *_template)
|
||||
{
|
||||
Class c;
|
||||
WOElement *result = nil;
|
||||
NSMutableDictionary *config = nil;
|
||||
|
||||
if ((c = NSClassFromString(_className)) == Nil) {
|
||||
NSLog(@"%s: missing '%@' class", __PRETTY_FUNCTION__, _className);
|
||||
return nil;
|
||||
}
|
||||
config = [NSMutableDictionary dictionaryWithCapacity:4];
|
||||
{
|
||||
NSEnumerator *keyEnum;
|
||||
id key;
|
||||
|
||||
keyEnum = [_config keyEnumerator];
|
||||
|
||||
while ((key = [keyEnum nextObject])) {
|
||||
WOAssociation *a;
|
||||
|
||||
a = [WOAssociation associationWithValue:[_config objectForKey:key]];
|
||||
[config setObject:a forKey:key];
|
||||
}
|
||||
}
|
||||
result = [[c alloc] initWithName:_name
|
||||
associations:config
|
||||
template:_template];
|
||||
return [result autorelease];
|
||||
}
|
||||
|
||||
#define OWGetProperty WOExtGetProperty
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
requires = ( MAIN );
|
||||
|
||||
publicResources = (
|
||||
calendar.css,
|
||||
uix.css,
|
||||
menu_logo_top.gif,
|
||||
line_left.gif,
|
||||
line_stretch.gif,
|
||||
line_right.gif,
|
||||
box_topleft.gif,
|
||||
box_top.gif,
|
||||
box_topright.gif,
|
||||
box_left.gif,
|
||||
box_right.gif,
|
||||
box_botleft.gif,
|
||||
box_bottom.gif,
|
||||
box_botright.gif,
|
||||
tab_selected.gif,
|
||||
tab_.gif,
|
||||
corner_right.gif,
|
||||
closewindow.gif,
|
||||
OGoLogo.gif,
|
||||
upward_sorted.gif,
|
||||
downward_sorted.gif,
|
||||
non_sorted.gif
|
||||
);
|
||||
|
||||
factories = {
|
||||
};
|
||||
|
||||
categories = {
|
||||
SOGoObject = {
|
||||
methods = {
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,482 @@
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Library General Public License, applies to some
|
||||
specially designated Free Software Foundation software, and to any
|
||||
other libraries whose authors decide to use it. You can use it for
|
||||
your libraries, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if
|
||||
you distribute copies of the library, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link a program with the library, you must provide
|
||||
complete object files to the recipients so that they can relink them
|
||||
with the library, after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
Our method of protecting your rights has two steps: (1) copyright
|
||||
the library, and (2) offer you this license which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
Also, for each distributor's protection, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
library. If the library is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original
|
||||
version, so that any problems introduced by others will not reflect on
|
||||
the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that companies distributing free
|
||||
software will individually obtain patent licenses, thus in effect
|
||||
transforming the program into proprietary software. To prevent this,
|
||||
we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License, which was designed for utility programs. This
|
||||
license, the GNU Library General Public License, applies to certain
|
||||
designated libraries. This license is quite different from the ordinary
|
||||
one; be sure to read it in full, and don't assume that anything in it is
|
||||
the same as in the ordinary license.
|
||||
|
||||
The reason we have a separate public license for some libraries is that
|
||||
they blur the distinction we usually make between modifying or adding to a
|
||||
program and simply using it. Linking a program with a library, without
|
||||
changing the library, is in some sense simply using the library, and is
|
||||
analogous to running a utility program or application program. However, in
|
||||
a textual and legal sense, the linked executable is a combined work, a
|
||||
derivative of the original library, and the ordinary General Public License
|
||||
treats it as such.
|
||||
|
||||
Because of this blurred distinction, using the ordinary General
|
||||
Public License for libraries did not effectively promote software
|
||||
sharing, because most developers did not use the libraries. We
|
||||
concluded that weaker conditions might promote sharing better.
|
||||
|
||||
However, unrestricted linking of non-free programs would deprive the
|
||||
users of those programs of all benefit from the free status of the
|
||||
libraries themselves. This Library General Public License is intended to
|
||||
permit developers of non-free programs to use free libraries, while
|
||||
preserving your freedom as a user of such programs to change the free
|
||||
libraries that are incorporated in them. (We have not seen how to achieve
|
||||
this as regards changes in header files, but we have achieved it as regards
|
||||
changes in the actual functions of the Library.) The hope is that this
|
||||
will lead to faster development of free libraries.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, while the latter only
|
||||
works together with the library.
|
||||
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library which
|
||||
contains a notice placed by the copyright holder or other authorized
|
||||
party saying it may be distributed under the terms of this Library
|
||||
General Public License (also called "this License"). Each licensee is
|
||||
addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also compile or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
c) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
d) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the source code distributed need not include anything that is normally
|
||||
distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Library General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
@@ -0,0 +1,4 @@
|
||||
Copyright (C) 2004 SKYRIX Software AG
|
||||
|
||||
|
||||
Contact: info@skyrix.com
|
||||
@@ -0,0 +1,164 @@
|
||||
2005-08-01 Helge Hess <helge.hess@skyrix.com>
|
||||
|
||||
* v0.9.28
|
||||
|
||||
* moved classes from shared library back to bundle
|
||||
|
||||
* UIxContactEditorBase.m, UIxContactView.m: fixed some gcc 4.0 warning
|
||||
|
||||
2005-07-26 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* English.lproj/Localizable.strings: added a missing semicolon
|
||||
(v0.9.27)
|
||||
|
||||
2005-07-19 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxContactEditorBase.m: moved copyContact JS code to
|
||||
UIxContactEditor.js file (v0.9.26)
|
||||
|
||||
2005-07-18 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* English.lproj/Localizable.strings: added text for invalid emails
|
||||
(v0.9.25)
|
||||
|
||||
2005-07-13 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxContactEditorBase.m: added a safeguard for vCard contacts
|
||||
(v0.9.24)
|
||||
|
||||
2005-06-26 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* created a library containing shared base classes (for
|
||||
MailerContactsUI) (v0.9.23)
|
||||
|
||||
2005-03-23 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* renamed "default.strings" to "Localizable.strings" (v0.9.22)
|
||||
|
||||
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)
|
||||
|
||||
* UIxContactsListView.h: properly protected header file (v0.9.19)
|
||||
|
||||
2004-12-08 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxContactEditor.m: changed to use NGLogging (v0.9.18)
|
||||
|
||||
2004-10-27 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* v0.9.17
|
||||
|
||||
* UIxContactEditor.[wox|m]: new parameters "mobile", "departmentNumber"
|
||||
and "l" passed to callback. Provide proper unescaping to the
|
||||
callback's parameters. (#985, #987)
|
||||
|
||||
* UIxContactView.wox: properly display new properties, suppress
|
||||
rendering of "Organization". (#985)
|
||||
|
||||
* {English.lproj|French.lproj}/default.strings: needed to change some
|
||||
labels according to new requirements.
|
||||
|
||||
2004-10-20 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxContactsSelectionView.m: several properties provided to the
|
||||
callback need to be unescaped properly before being passed back.
|
||||
This is achieved by using the new SOGoJSStringFormatter in SOGoUI.
|
||||
(v0.9.16)
|
||||
|
||||
2004-10-14 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxContactSelector.m: fixed wrong method name (v0.9.15)
|
||||
|
||||
2004-10-12 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxContactSelector.m: moved helpers to UIxComponent (v0.9.14)
|
||||
|
||||
2004-10-08 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* v0.9.13
|
||||
|
||||
* UIxContactsSelectionView.m: pass more (previous empty) parameters
|
||||
to the JavaScript callback.
|
||||
|
||||
* UIxContactSelector.m: correctly compute the relative path to the
|
||||
"Contacts" URL.
|
||||
|
||||
2004-09-14 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* v0.9.12
|
||||
|
||||
* UIxContactEditor.[wox|m]: Copy from Anais functionality
|
||||
|
||||
* UIxContactsSelectionView.m: minor cleanup
|
||||
|
||||
* {English.lproj,French.lproj}/defaults.plist: new localizable string
|
||||
|
||||
* v0.9.11
|
||||
|
||||
* UIxContactSelector.m: changed width of satellite window to 800px
|
||||
|
||||
* UIxContactsSelectionView.m: hardcoded paths to stylesheets due to
|
||||
resource lookup problems.
|
||||
|
||||
* French.lproj/defaults.plist: copied the English strings here
|
||||
|
||||
2004-09-13 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* v0.9.10
|
||||
|
||||
* UIxContactsListView.h: new header for subclassers
|
||||
|
||||
* UIxContactsSelectionView.[m|wox]: new subclass of UIxContactsListView
|
||||
which is basically the same only in its own window frame to mimic
|
||||
the appearance of Anais.
|
||||
|
||||
* UIxContactSelector.[m|wox]: component for opening
|
||||
UIxContactsSelectionView in a separate window
|
||||
|
||||
* product.plist: new method "select"
|
||||
|
||||
2004-09-03 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxContactView.wox: added some more properties for display (v0.9.9)
|
||||
|
||||
2004-09-01 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* GNUmakefile.preamble: fixed for gsmake 1.9.2 build (v0.9.8)
|
||||
|
||||
2004-08-27 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* v0.9.7
|
||||
|
||||
* English.lproj/default.strings: provided labels
|
||||
|
||||
* UIxContactsListView.wox, UIxContactView.wox, UIxContactEditor.wox:
|
||||
converted static strings into labels
|
||||
|
||||
2004-08-27 Helge Hess <helge.hess@skyrix.com>
|
||||
|
||||
* UIxContactsListView: added simple filtering (v0.9.6)
|
||||
|
||||
* UIxContactsListView: added simple sorting (v0.9.5)
|
||||
|
||||
* first working version of contacts UI (v0.9.4)
|
||||
|
||||
* removed GET from product.plist, the SoObject directly implements GET
|
||||
now and redirects to the view method (v0.9.3)
|
||||
|
||||
2004-08-26 Helge Hess <helge.hess@skyrix.com>
|
||||
|
||||
* product.plist: more fixes to product.plist (v0.9.2)
|
||||
|
||||
* product.plist: fixed package dependency, fixed category name (v0.9.1)
|
||||
|
||||
2004-08-25 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* common.h: new file
|
||||
|
||||
* UIxContact*: added template views
|
||||
|
||||
* ChangeLog: created
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
Copyright (C) 2000-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.
|
||||
*/
|
||||
// $Id: ContactsUIProduct.m 268 2004-08-25 15:40:21Z znek $
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
@interface ContactsUIProduct : NSObject
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#include "common.h"
|
||||
|
||||
@implementation ContactsUIProduct
|
||||
@end /* ContactsUIProduct */
|
||||
@@ -0,0 +1,31 @@
|
||||
/* this file is in UTF-8 format! */
|
||||
|
||||
"Addressbook" = "Addressbook";
|
||||
"Addresses" = "Addresses";
|
||||
"Cancel" = "Cancel";
|
||||
"Common" = "Common";
|
||||
"Contact editor" = "Contact Editor";
|
||||
"Contact viewer" = "Contact Viewer";
|
||||
"Copy from Anais" = "Copy from Anaïs";
|
||||
"EMail" = "Email";
|
||||
"Extended" = "Extended";
|
||||
"Fax" = "Fax";
|
||||
"Firstname" = "Firstname";
|
||||
"Home" = "Home";
|
||||
"HomePhone" = "Home";
|
||||
"Lastname" = "Lastname";
|
||||
"Location" = "Location";
|
||||
"MobilePhone" = "Mobile";
|
||||
"Name" = "Name";
|
||||
"OfficePhone" = "Office";
|
||||
"Organisation" = "Organisation";
|
||||
"Phone" = "Phone";
|
||||
"Phones" = "Phone numbers";
|
||||
"Postal" = "Postal";
|
||||
"Save" = "Save";
|
||||
"URL" = "URL";
|
||||
"Unit" = "Unit";
|
||||
"delete" = "delete";
|
||||
"edit" = "edit";
|
||||
"invalidemailwarn" = "Invalid email field, continue?";
|
||||
"new" = "new";
|
||||
@@ -0,0 +1,31 @@
|
||||
/* this file is in UTF-8 format! */
|
||||
|
||||
"Addressbook" = "Carnet d'adresse";
|
||||
"Addresses" = "Adresses";
|
||||
"Cancel" = "Annuler";
|
||||
"Common" = "Identité";
|
||||
"Contact editor" = "Editer le contact";
|
||||
"Contact viewer" = "Visualiser le contact";
|
||||
"Copy from Anais" = "Ajouter depuis Anaïs";
|
||||
"EMail" = "Courriel";
|
||||
"Extended" = "Informations complémentaires";
|
||||
"Fax" = "Fax";
|
||||
"Firstname" = "Prénom";
|
||||
"Home" = "Personnelle";
|
||||
"HomePhone" = "Domicile";
|
||||
"Lastname" = "Nom";
|
||||
"Location" = "Lieux";
|
||||
"MobilePhone" = "Mobile";
|
||||
"Name" = "Nom";
|
||||
"OfficePhone" = "Bureau";
|
||||
"Organisation" = "Société";
|
||||
"Phone" = "Téléphone"
|
||||
"Phones" = "Téléphones";
|
||||
"Postal" = "Professionnelle";
|
||||
"Save" = "Sauvegarder";
|
||||
"URL" = "URL";
|
||||
"Unit" = "Département";
|
||||
"delete" = "Effacer";
|
||||
"edit" = "Editer";
|
||||
"invalidemailwarn" = "Champ de l'email invalide, continuer quand même ?";
|
||||
"new" = "Nouveau";
|
||||
@@ -0,0 +1,34 @@
|
||||
# GNUstep makefile
|
||||
|
||||
include ../common.make
|
||||
|
||||
BUNDLE_NAME = ContactsUI
|
||||
|
||||
ContactsUI_PRINCIPAL_CLASS = ContactsUIProduct
|
||||
|
||||
ContactsUI_LANGUAGES = English French
|
||||
|
||||
ContactsUI_OBJC_FILES = \
|
||||
UIxContactsListViewBase.m \
|
||||
UIxContactEditorBase.m \
|
||||
\
|
||||
ContactsUIProduct.m \
|
||||
UIxContactsSelectionView.m \
|
||||
UIxContactView.m \
|
||||
UIxContactSelector.m \
|
||||
UIxContactEditor.m \
|
||||
UIxContactsListView.m \
|
||||
|
||||
ContactsUI_RESOURCE_FILES += \
|
||||
Version \
|
||||
product.plist \
|
||||
|
||||
ContactsUI_LOCALIZED_RESOURCE_FILES += \
|
||||
Localizable.strings \
|
||||
|
||||
# make
|
||||
|
||||
-include GNUmakefile.preamble
|
||||
include $(GNUSTEP_MAKEFILES)/bundle.make
|
||||
-include GNUmakefile.postamble
|
||||
include ../../fhsbundle.make
|
||||
@@ -0,0 +1,17 @@
|
||||
# postprocessing
|
||||
|
||||
validate-wox:
|
||||
# xmllint --noout *.wox
|
||||
|
||||
before-all :: validate-wox
|
||||
|
||||
|
||||
ifneq ($(GNUSTEP_BUILD_DIR),)
|
||||
after-all ::
|
||||
@(cp bundle-info.plist \
|
||||
$(GNUSTEP_BUILD_DIR)/$(BUNDLE_NAME)$(BUNDLE_EXTENSION))
|
||||
else
|
||||
after-all ::
|
||||
@(cd $(BUNDLE_NAME)$(BUNDLE_EXTENSION);\
|
||||
cp ../bundle-info.plist .)
|
||||
endif
|
||||
@@ -0,0 +1,7 @@
|
||||
# compile flags
|
||||
|
||||
ADDITIONAL_INCLUDE_DIRS += \
|
||||
-I.. -I../.. -I../../..
|
||||
|
||||
ADDITIONAL_LIB_DIRS += \
|
||||
-L./$(GNUSTEP_OBJ_DIR)
|
||||
@@ -0,0 +1,12 @@
|
||||
// $Id: NOTES 268 2004-08-25 15:40:21Z znek $
|
||||
|
||||
Contacts
|
||||
========
|
||||
|
||||
SOPE based interface for scheduler.
|
||||
|
||||
Class Hierarchy
|
||||
===============
|
||||
|
||||
[WOComponent]
|
||||
[SoComponent]
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
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 "UIxContactEditorBase.h"
|
||||
|
||||
@interface UIxContactEditor : UIxContactEditorBase
|
||||
@end
|
||||
|
||||
@implementation UIxContactEditor
|
||||
@end /* UIxContactEditor */
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __UIxContactEditorBase_H__
|
||||
#define __UIxContactEditorBase_H__
|
||||
|
||||
#include <SOGoUI/UIxComponent.h>
|
||||
|
||||
@class NSString, NSMutableDictionary;
|
||||
|
||||
@interface UIxContactEditorBase : UIxComponent
|
||||
{
|
||||
NSString *contentString;
|
||||
NSString *errorText;
|
||||
NSString *anaisCN;
|
||||
NSMutableDictionary *snapshot; /* contains the values for editing */
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif /* __UIxContactEditorBase_H__ */
|
||||
@@ -0,0 +1,273 @@
|
||||
/*
|
||||
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 "UIxContactEditorBase.h"
|
||||
#include <Contacts/SOGoContactObject.h>
|
||||
#include <Contacts/SOGoContactFolder.h>
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxContactEditorBase
|
||||
|
||||
- (id)init {
|
||||
if ((self = [super init])) {
|
||||
self->snapshot = [[NSMutableDictionary alloc] initWithCapacity:16];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[self->snapshot release];
|
||||
[self->anaisCN release];
|
||||
[self->errorText release];
|
||||
[self->contentString release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (void)setContentString:(NSString *)_cstr {
|
||||
ASSIGNCOPY(self->contentString, _cstr);
|
||||
}
|
||||
- (NSString *)contentString {
|
||||
return self->contentString;
|
||||
}
|
||||
|
||||
- (NSString *)contentStringTemplate {
|
||||
return @"{}"; /* empty property list */
|
||||
}
|
||||
|
||||
- (NSMutableDictionary *)snapshot {
|
||||
return self->snapshot;
|
||||
}
|
||||
|
||||
- (void)setErrorText:(NSString *)_txt {
|
||||
ASSIGNCOPY(self->errorText, _txt);
|
||||
}
|
||||
- (NSString *)errorText {
|
||||
return self->errorText;
|
||||
}
|
||||
|
||||
- (BOOL)hasErrorText {
|
||||
return [self->errorText length] > 0 ? YES : NO;
|
||||
}
|
||||
|
||||
|
||||
- (void)setAnaisCN:(NSString *)_txt {
|
||||
ASSIGNCOPY(self->anaisCN, _txt);
|
||||
}
|
||||
- (NSString *)anaisCN {
|
||||
return self->anaisCN;
|
||||
}
|
||||
|
||||
|
||||
/* load/store content format */
|
||||
|
||||
- (void)loadValuesFromContentString:(NSString *)_s {
|
||||
NSDictionary *plist;
|
||||
|
||||
if ([_s hasPrefix:@"BEGIN:VCARD"]) {
|
||||
// TODO: load vCard values
|
||||
[self errorWithFormat:@"Editing of vCard's is not yet supported!"];
|
||||
return;
|
||||
}
|
||||
|
||||
if ((plist = [_s propertyList]) == nil) {
|
||||
[self errorWithFormat:@"could not parse content string!"];
|
||||
return;
|
||||
}
|
||||
|
||||
[self->snapshot removeAllObjects];
|
||||
[self->snapshot addEntriesFromDictionary:plist];
|
||||
}
|
||||
|
||||
- (void)_fixupSnapshot {
|
||||
// TODO: perform sanity checking, eg build CN on demand
|
||||
NSString *cn, *gn, *sn;
|
||||
|
||||
cn = [self->snapshot objectForKey:@"cn"];
|
||||
gn = [self->snapshot objectForKey:@"givenName"];
|
||||
sn = [self->snapshot objectForKey:@"sn"];
|
||||
|
||||
if (![sn isNotNull] || [sn length] == 0)
|
||||
sn = nil;
|
||||
if (![cn isNotNull] || [cn length] == 0)
|
||||
cn = nil;
|
||||
|
||||
if (sn == nil) {
|
||||
if (cn == nil)
|
||||
sn = @"[noname]";
|
||||
else {
|
||||
// TODO: need a better name parser here
|
||||
NSRange r;
|
||||
|
||||
r = [cn rangeOfString:@" "];
|
||||
sn = (r.length > 0)
|
||||
? [cn substringFromIndex:(r.location + r.length)]
|
||||
: cn;
|
||||
}
|
||||
[self->snapshot setObject:sn forKey:@"sn"];
|
||||
}
|
||||
if ([self->anaisCN length] > 0 )
|
||||
cn = self->anaisCN;
|
||||
else if (sn == nil && gn == nil)
|
||||
cn = @"[noname]";
|
||||
else if (sn == nil)
|
||||
cn = gn;
|
||||
else if (gn == nil)
|
||||
cn = sn;
|
||||
else
|
||||
cn = [[gn stringByAppendingString:@" "] stringByAppendingString:sn];
|
||||
[self->snapshot setObject:cn forKey:@"cn"];
|
||||
}
|
||||
|
||||
- (void)saveValuesIntoRecord:(NSMutableDictionary *)_record {
|
||||
[self _fixupSnapshot];
|
||||
[_record addEntriesFromDictionary:[self snapshot]];
|
||||
}
|
||||
|
||||
/* helper */
|
||||
|
||||
- (NSString *)_completeURIForMethod:(NSString *)_method {
|
||||
// TODO: this is a DUP of UIxAppointmentEditor
|
||||
NSString *uri;
|
||||
NSRange r;
|
||||
|
||||
uri = [[[self context] request] uri];
|
||||
|
||||
/* first: identify query parameters */
|
||||
r = [uri rangeOfString:@"?" options:NSBackwardsSearch];
|
||||
if (r.length > 0)
|
||||
uri = [uri substringToIndex:r.location];
|
||||
|
||||
/* next: append trailing slash */
|
||||
if (![uri hasSuffix:@"/"])
|
||||
uri = [uri stringByAppendingString:@"/"];
|
||||
|
||||
/* next: append method */
|
||||
uri = [uri stringByAppendingString:_method];
|
||||
|
||||
/* next: append query parameters */
|
||||
return [self completeHrefForMethod:uri];
|
||||
}
|
||||
|
||||
/* actions */
|
||||
|
||||
- (BOOL)shouldTakeValuesFromRequest:(WORequest *)_rq inContext:(WOContext*)_c{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (id<WOActionResults>)defaultAction {
|
||||
// TODO: very similiar to apt-editor (apt editor would need to use std names
|
||||
NSString *c;
|
||||
|
||||
/* load iCalendar file */
|
||||
|
||||
c = [[self clientObject] contentAsString];
|
||||
if ([c length] == 0) /* a new contact */
|
||||
c = [self contentStringTemplate];
|
||||
|
||||
[self setContentString:c];
|
||||
[self loadValuesFromContentString:c];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (BOOL)isWriteableClientObject {
|
||||
return [[self clientObject]
|
||||
respondsToSelector:@selector(saveContentString:)];
|
||||
}
|
||||
|
||||
- (NSString *)viewActionName {
|
||||
/* this is overridden in the mail based contacts UI to redirect to tb.edit */
|
||||
return @"";
|
||||
}
|
||||
- (NSString *)editActionName {
|
||||
/* this is overridden in the mail based contacts UI to redirect to tb.edit */
|
||||
return @"edit";
|
||||
}
|
||||
|
||||
- (id)saveAction {
|
||||
NSException *ex;
|
||||
NSString *recstr, *uri;
|
||||
id record;
|
||||
|
||||
if (![self isWriteableClientObject]) {
|
||||
return [NSException exceptionWithHTTPStatus:400 /* Bad Request */
|
||||
reason:@"method cannot be invoked on "
|
||||
@"the specified object"];
|
||||
}
|
||||
|
||||
if ((record = [self contentString]) == nil) {
|
||||
[self setErrorText:@"Missing object content!"]; // localize
|
||||
return self;
|
||||
}
|
||||
record = [[[record propertyList] mutableCopy] autorelease];
|
||||
if (record == nil) {
|
||||
[self setErrorText:@"Invalid property list data ..."]; // localize
|
||||
return self;
|
||||
}
|
||||
|
||||
[self saveValuesIntoRecord:record];
|
||||
|
||||
// TODO: directly hacking the content, hm, not so nice or reasonable?
|
||||
recstr = [record description]; // make plist
|
||||
ex = [[self clientObject] saveContentString:recstr];
|
||||
if (ex != nil) {
|
||||
[self setErrorText:[ex reason]];
|
||||
return self;
|
||||
}
|
||||
|
||||
uri = ([(uri = [self viewActionName]) length] > 0)
|
||||
? [self viewActionName] : @"..";
|
||||
uri = [self _completeURIForMethod:uri];
|
||||
return [self redirectToLocation:uri];
|
||||
}
|
||||
|
||||
- (id)testAction {
|
||||
[self logWithFormat:@"test ..."];
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)newAction {
|
||||
// TODO: this is almost a DUP of UIxAppointmentEditor
|
||||
/*
|
||||
This method creates a unique ID and redirects to the "edit" method on the
|
||||
new ID.
|
||||
It is actually a folder method and should be defined on the folder.
|
||||
|
||||
Note: 'clientObject' is the SOGoAppointmentFolder!
|
||||
Update: remember that there are group folders as well.
|
||||
*/
|
||||
NSString *uri, *objectId, *nextMethod;
|
||||
|
||||
objectId = [NSClassFromString(@"SOGoContactFolder") globallyUniqueObjectId];
|
||||
if ([objectId length] == 0) {
|
||||
return [NSException exceptionWithHTTPStatus:500 /* Internal Error */
|
||||
reason:@"could not create a unique ID"];
|
||||
}
|
||||
|
||||
nextMethod = [NSString stringWithFormat:@"../%@/%@",
|
||||
objectId, [self editActionName]];
|
||||
uri = [self _completeURIForMethod:nextMethod];
|
||||
return [self redirectToLocation:uri];
|
||||
}
|
||||
|
||||
@end /* UIxContactEditorBase */
|
||||
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
Copyright (C) 2000-2004 SKYRIX Software AG
|
||||
|
||||
This file is part of OGo
|
||||
|
||||
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.
|
||||
*/
|
||||
// $Id: UIxContactSelector.m 394 2004-10-14 08:47:35Z znek $
|
||||
|
||||
|
||||
#include <SOGoUI/UIxComponent.h>
|
||||
|
||||
@interface UIxContactSelector : UIxComponent
|
||||
{
|
||||
NSString *title;
|
||||
NSString *windowId;
|
||||
NSString *callback;
|
||||
}
|
||||
|
||||
- (void)setTitle:(NSString *)_title;
|
||||
- (NSString *)title;
|
||||
- (void)setWindowId:(NSString *)_winId;
|
||||
- (NSString *)windowId;
|
||||
- (void)setCallback:(NSString *)_callback;
|
||||
- (NSString *)callback;
|
||||
|
||||
- (NSString *)relativeContactsPath;
|
||||
|
||||
- (NSString *)jsFunctionName;
|
||||
- (NSString *)jsFunctionHref;
|
||||
- (NSString *)jsCode;
|
||||
@end
|
||||
|
||||
#include "common.h"
|
||||
#include <NGExtensions/NGExtensions.h>
|
||||
|
||||
@implementation UIxContactSelector
|
||||
|
||||
- (id)init {
|
||||
if ((self = [super init])) {
|
||||
[self setTitle:@"UIxContacts"];
|
||||
[self setWindowId:@"UIxContacts"];
|
||||
[self setCallback:@"undefined"];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[self->title release];
|
||||
[self->windowId release];
|
||||
[self->callback release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (void)setTitle:(NSString *)_title {
|
||||
ASSIGNCOPY(self->title, _title);
|
||||
}
|
||||
- (NSString *)title {
|
||||
return self->title;
|
||||
}
|
||||
|
||||
- (void)setWindowId:(NSString *)_winId {
|
||||
ASSIGNCOPY(self->windowId, _winId);
|
||||
}
|
||||
- (NSString *)windowId {
|
||||
return self->windowId;
|
||||
}
|
||||
|
||||
- (void)setCallback:(NSString *)_callback {
|
||||
ASSIGNCOPY(self->callback, _callback);
|
||||
}
|
||||
- (NSString *)callback {
|
||||
return self->callback;
|
||||
}
|
||||
|
||||
/* Helper */
|
||||
|
||||
- (NSString *)relativeContactsPath {
|
||||
return [self relativePathToUserFolderSubPath:@"Contacts/select"];
|
||||
}
|
||||
|
||||
/* JavaScript */
|
||||
|
||||
- (NSString *)jsFunctionName {
|
||||
return [NSString stringWithFormat:@"openUIxContactsListViewWindowWithId%@",
|
||||
[self windowId]];
|
||||
}
|
||||
|
||||
- (NSString *)jsFunctionHref {
|
||||
return [NSString stringWithFormat:@"javascript:%@()",
|
||||
[self jsFunctionName]];
|
||||
}
|
||||
|
||||
- (NSString *)jsCode {
|
||||
static NSString *codeFmt = \
|
||||
@"function %@() {\n"
|
||||
@" var url = '%@?callback=%@';\n"
|
||||
@" var contactsWindow = window.open(url, '%@', 'width=600, height=400, left=10, top=10, toolbar=no, dependent=yes, menubar=no, location=no, resizable=yes, scrollbars=yes, directories=no, status=no');\n"
|
||||
@" contactsWindow.focus();\n"
|
||||
@"}";
|
||||
return [NSString stringWithFormat:codeFmt,
|
||||
[self jsFunctionName],
|
||||
[self relativeContactsPath],
|
||||
[self callback],
|
||||
[self windowId]];
|
||||
}
|
||||
|
||||
@end /* UIxContactSelector */
|
||||
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
// $Id: UIxContactView.m 932 2005-08-01 13:17:55Z helge $
|
||||
|
||||
|
||||
#include <SOGoUI/UIxComponent.h>
|
||||
|
||||
@interface UIxContactView : UIxComponent
|
||||
{
|
||||
}
|
||||
|
||||
- (BOOL)isDeletableClientObject;
|
||||
|
||||
@end
|
||||
|
||||
#include <Contacts/SOGoContactObject.h>
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxContactView
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (NSString *)tabSelection {
|
||||
NSString *selection;
|
||||
|
||||
selection = [self queryParameterForKey:@"tab"];
|
||||
if (selection == nil)
|
||||
selection = @"attributes";
|
||||
return selection;
|
||||
}
|
||||
|
||||
/* hrefs */
|
||||
|
||||
- (NSString *)completeHrefForMethod:(NSString *)_method
|
||||
withParameter:(NSString *)_param
|
||||
forKey:(NSString *)_key
|
||||
{
|
||||
NSString *href;
|
||||
|
||||
[self setQueryParameter:_param forKey:_key];
|
||||
href = [self completeHrefForMethod:[self ownMethodName]];
|
||||
[self setQueryParameter:nil forKey:_key];
|
||||
return href;
|
||||
}
|
||||
|
||||
- (NSString *)attributesTabLink {
|
||||
return [self completeHrefForMethod:[self ownMethodName]
|
||||
withParameter:@"attributes"
|
||||
forKey:@"tab"];
|
||||
}
|
||||
- (NSString *)debugTabLink {
|
||||
return [self completeHrefForMethod:[self ownMethodName]
|
||||
withParameter:@"debug"
|
||||
forKey:@"tab"];
|
||||
}
|
||||
|
||||
/* action */
|
||||
|
||||
- (id<WOActionResults>)defaultAction {
|
||||
if ([[self clientObject] record] == nil) {
|
||||
return [NSException exceptionWithHTTPStatus:404 /* Not Found */
|
||||
reason:@"could not locate contact"];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (BOOL)isDeletableClientObject {
|
||||
return [[self clientObject] respondsToSelector:@selector(delete)];
|
||||
}
|
||||
|
||||
- (id)deleteAction {
|
||||
NSException *ex;
|
||||
id url;
|
||||
|
||||
if (![self isDeletableClientObject]) {
|
||||
/* return 400 == Bad Request */
|
||||
return [NSException exceptionWithHTTPStatus:400
|
||||
reason:@"method cannot be invoked on "
|
||||
@"the specified object"];
|
||||
}
|
||||
|
||||
if ((ex = [[self clientObject] delete]) != nil) {
|
||||
// TODO: improve error handling
|
||||
[self debugWithFormat:@"failed to delete: %@", ex];
|
||||
return ex;
|
||||
}
|
||||
|
||||
url = [[[self clientObject] container] baseURLInContext:[self context]];
|
||||
return [self redirectToLocation:url];
|
||||
}
|
||||
|
||||
@end /* UIxContactView */
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
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 "UIxContactsListViewBase.h"
|
||||
|
||||
@interface UIxContactsListView : UIxContactsListViewBase
|
||||
@end
|
||||
|
||||
@implementation UIxContactsListView
|
||||
@end /* UIxContactsListView */
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __UIxContactsListViewBase_H__
|
||||
#define __UIxContactsListViewBase_H__
|
||||
|
||||
#include <SOGoUI/UIxComponent.h>
|
||||
|
||||
@class NSString, NSArray;
|
||||
|
||||
@interface UIxContactsListViewBase : UIxComponent
|
||||
{
|
||||
NSArray *allRecords;
|
||||
NSArray *filteredRecords;
|
||||
NSString *searchText;
|
||||
id contact;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif /* __UIxContactsListViewBase_H__ */
|
||||
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
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 "UIxContactsListViewBase.h"
|
||||
#include <Contacts/SOGoContactFolder.h>
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxContactsListViewBase
|
||||
|
||||
- (void)dealloc {
|
||||
[self->allRecords release];
|
||||
[self->filteredRecords release];
|
||||
[self->searchText release];
|
||||
[self->contact release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (void)setContact:(id)_contact {
|
||||
ASSIGN(self->contact, _contact);
|
||||
}
|
||||
- (id)contact {
|
||||
return self->contact;
|
||||
}
|
||||
|
||||
- (void)setSearchText:(NSString *)_txt {
|
||||
ASSIGNCOPY(self->searchText, _txt);
|
||||
}
|
||||
- (id)searchText {
|
||||
if (self->searchText == nil)
|
||||
[self setSearchText:[[[self context] request] formValueForKey:@"search"]];
|
||||
return self->searchText;
|
||||
}
|
||||
|
||||
- (EOQualifier *)qualifier {
|
||||
NSString *qs, *s;
|
||||
|
||||
s = [self searchText];
|
||||
if ([s length] == 0)
|
||||
return nil;
|
||||
|
||||
// TODO: just use qualifier vars
|
||||
qs = [NSString stringWithFormat:
|
||||
@"(sn isCaseInsensitiveLike: '%@*') OR "
|
||||
@"(givenname isCaseInsensitiveLike: '%@*') OR "
|
||||
@"(mail isCaseInsensitiveLike: '*%@*') OR "
|
||||
@"(telephonenumber isCaseInsensitiveLike: '*%@*')",
|
||||
s, s, s, s];
|
||||
return [EOQualifier qualifierWithQualifierFormat:qs];
|
||||
}
|
||||
|
||||
- (NSString *)defaultSortKey {
|
||||
return @"sn";
|
||||
}
|
||||
- (NSString *)sortKey {
|
||||
NSString *s;
|
||||
|
||||
s = [[[self context] request] formValueForKey:@"sort"];
|
||||
return [s length] > 0 ? s : [self defaultSortKey];
|
||||
}
|
||||
- (EOSortOrdering *)sortOrdering {
|
||||
SEL sel;
|
||||
|
||||
sel = [[[[self context] request] formValueForKey:@"desc"] boolValue]
|
||||
? EOCompareCaseInsensitiveDescending
|
||||
: EOCompareCaseInsensitiveAscending;
|
||||
|
||||
return [EOSortOrdering sortOrderingWithKey:[self sortKey] selector:sel];
|
||||
}
|
||||
- (NSArray *)sortOrderings {
|
||||
return [NSArray arrayWithObjects:[self sortOrdering], nil];
|
||||
}
|
||||
|
||||
- (NSArray *)contactInfos {
|
||||
// TODO: should be done in the backend, but for Agenor AB its OK here
|
||||
NSArray *records;
|
||||
EOQualifier *q;
|
||||
|
||||
if (self->filteredRecords != nil)
|
||||
return self->filteredRecords;
|
||||
|
||||
records = [[self clientObject] fetchCoreInfos];
|
||||
self->allRecords =
|
||||
[[records sortedArrayUsingKeyOrderArray:[self sortOrderings]] retain];
|
||||
|
||||
if ((q = [self qualifier]) != nil) {
|
||||
[self debugWithFormat:@"qs: %@", q];
|
||||
self->filteredRecords =
|
||||
[[self->allRecords filteredArrayUsingQualifier:q] retain];
|
||||
}
|
||||
else
|
||||
self->filteredRecords = [self->allRecords retain];
|
||||
|
||||
return self->filteredRecords;
|
||||
}
|
||||
|
||||
/* notifications */
|
||||
|
||||
- (void)sleep {
|
||||
[self->contact release]; self->contact = nil;
|
||||
[self->allRecords release]; self->allRecords = nil;
|
||||
[self->filteredRecords release]; self->filteredRecords = nil;
|
||||
[super sleep];
|
||||
}
|
||||
|
||||
/* actions */
|
||||
|
||||
- (BOOL)shouldTakeValuesFromRequest:(WORequest *)_rq inContext:(WOContext*)_c{
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end /* UIxContactsListViewBase */
|
||||
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
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 "UIxContactsListViewBase.h"
|
||||
#include <SOGoUI/SOGoJSStringFormatter.h>
|
||||
|
||||
@interface UIxContactsSelectionView : UIxContactsListViewBase
|
||||
{
|
||||
NSString *callback;
|
||||
}
|
||||
|
||||
- (NSString *)_getCN;
|
||||
- (NSString *)getCN;
|
||||
- (NSString *)getSN;
|
||||
- (NSString *)getMail;
|
||||
- (NSString *)getUID;
|
||||
|
||||
@end
|
||||
|
||||
#include "common.h"
|
||||
#include <SOGo/AgenorUserManager.h>
|
||||
|
||||
@implementation UIxContactsSelectionView
|
||||
|
||||
static SOGoJSStringFormatter *jsFormatter = nil;
|
||||
|
||||
+ (void)initialize {
|
||||
static BOOL didInit = NO;
|
||||
|
||||
if(didInit)
|
||||
return;
|
||||
|
||||
didInit = YES;
|
||||
jsFormatter = [SOGoJSStringFormatter sharedFormatter];
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[self->callback release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSString *)callback {
|
||||
if(!self->callback) {
|
||||
WORequest *r = [[self context] request];
|
||||
self->callback = [[r formValueForKey:@"callback"] retain];
|
||||
}
|
||||
return self->callback;
|
||||
}
|
||||
|
||||
- (NSString *)_getCN {
|
||||
return [self->contact valueForKey:@"cn"];
|
||||
}
|
||||
|
||||
- (NSString *)getCN {
|
||||
return [jsFormatter stringByEscapingQuotesInString:[self _getCN]];
|
||||
}
|
||||
|
||||
- (NSString *)getSN {
|
||||
NSString *sn = [self->contact valueForKey:@"sn"];
|
||||
return [jsFormatter stringByEscapingQuotesInString:sn];
|
||||
}
|
||||
|
||||
- (NSString *)getMail {
|
||||
return [self->contact valueForKey:@"mail"];
|
||||
}
|
||||
|
||||
- (NSString *)getUID {
|
||||
return [[AgenorUserManager sharedUserManager] getUIDForEmail:[self getMail]];
|
||||
}
|
||||
|
||||
- (NSString *)jsOnClickCode {
|
||||
/* callback parameters: (type, cn, dn, email, uid, sn) */
|
||||
|
||||
|
||||
|
||||
/* changed to : type, email, uid, sn, cn, dn */
|
||||
static NSString *jsCode = \
|
||||
@"javascript:opener.window.%@('', '%@', '%@', '%@', '%@', '');";
|
||||
|
||||
return [NSString stringWithFormat:jsCode,
|
||||
[self callback],
|
||||
[self getMail],
|
||||
[self getUID],
|
||||
[self getSN],
|
||||
[self getCN]];
|
||||
|
||||
|
||||
|
||||
// return [NSString stringWithFormat:jsCode,
|
||||
// [self callback],
|
||||
// [self getCN],
|
||||
// [self getMail],
|
||||
// [self getUID],
|
||||
// [self getSN]];
|
||||
}
|
||||
|
||||
@end /* UIxContactsInlineListView */
|
||||
@@ -0,0 +1,6 @@
|
||||
# GNUstep makefile
|
||||
|
||||
SUBMINOR_VERSION:=28
|
||||
|
||||
# v0.9.18 requires NGExtensions v4.5.136
|
||||
# v0.9.16 requires libSOGoUI v0.9.16
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
requires = {
|
||||
bundleManagerVersion = 1;
|
||||
classes = (
|
||||
{ name = NSObject; }
|
||||
);
|
||||
};
|
||||
|
||||
provides = {
|
||||
classes = (
|
||||
{ name = UIxContactEditor; }
|
||||
);
|
||||
WOComponents = (
|
||||
{ name = UIxContactEditor; }
|
||||
);
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
// $Id: common.h 269 2004-08-25 16:06:10Z znek $
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if LIB_FOUNDATION_LIBRARY
|
||||
# include <Foundation/exceptions/GeneralExceptions.h>
|
||||
#elif NeXT_Foundation_LIBRARY || COCOA_Foundation_LIBRARY
|
||||
# include <NGExtensions/NGObjectMacros.h>
|
||||
# include <NGExtensions/NSString+Ext.h>
|
||||
#endif
|
||||
|
||||
#include <NGExtensions/NGExtensions.h>
|
||||
#include <NGObjWeb/NGObjWeb.h>
|
||||
#include <NGObjWeb/SoObjects.h>
|
||||
@@ -0,0 +1,57 @@
|
||||
{
|
||||
requires = ( MAIN, CommonUI, Contacts );
|
||||
|
||||
publicResources = (
|
||||
);
|
||||
|
||||
factories = {
|
||||
};
|
||||
|
||||
categories = {
|
||||
SOGoContactFolder = {
|
||||
methods = {
|
||||
view = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxContactsListView";
|
||||
};
|
||||
new = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxContactEditor";
|
||||
actionName = "new";
|
||||
};
|
||||
select = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxContactsSelectionView";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
SOGoContactObject = {
|
||||
methods = {
|
||||
view = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxContactView";
|
||||
};
|
||||
delete = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxContactView";
|
||||
actionName = "delete";
|
||||
};
|
||||
edit = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxContactEditor";
|
||||
};
|
||||
save = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxContactEditor";
|
||||
actionName = "save";
|
||||
};
|
||||
test = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxContactEditor";
|
||||
actionName = "test";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
# GNUstep makefile
|
||||
|
||||
-include ../config.make
|
||||
include $(GNUSTEP_MAKEFILES)/common.make
|
||||
|
||||
SUBPROJECTS += \
|
||||
SOGoUI \
|
||||
MainUI \
|
||||
Common \
|
||||
Scheduler \
|
||||
Contacts \
|
||||
MailerUI \
|
||||
MailPartViewers \
|
||||
|
||||
SUBPROJECTS += \
|
||||
Templates
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/aggregate.make
|
||||
@@ -0,0 +1,482 @@
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Library General Public License, applies to some
|
||||
specially designated Free Software Foundation software, and to any
|
||||
other libraries whose authors decide to use it. You can use it for
|
||||
your libraries, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if
|
||||
you distribute copies of the library, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link a program with the library, you must provide
|
||||
complete object files to the recipients so that they can relink them
|
||||
with the library, after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
Our method of protecting your rights has two steps: (1) copyright
|
||||
the library, and (2) offer you this license which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
Also, for each distributor's protection, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
library. If the library is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original
|
||||
version, so that any problems introduced by others will not reflect on
|
||||
the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that companies distributing free
|
||||
software will individually obtain patent licenses, thus in effect
|
||||
transforming the program into proprietary software. To prevent this,
|
||||
we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License, which was designed for utility programs. This
|
||||
license, the GNU Library General Public License, applies to certain
|
||||
designated libraries. This license is quite different from the ordinary
|
||||
one; be sure to read it in full, and don't assume that anything in it is
|
||||
the same as in the ordinary license.
|
||||
|
||||
The reason we have a separate public license for some libraries is that
|
||||
they blur the distinction we usually make between modifying or adding to a
|
||||
program and simply using it. Linking a program with a library, without
|
||||
changing the library, is in some sense simply using the library, and is
|
||||
analogous to running a utility program or application program. However, in
|
||||
a textual and legal sense, the linked executable is a combined work, a
|
||||
derivative of the original library, and the ordinary General Public License
|
||||
treats it as such.
|
||||
|
||||
Because of this blurred distinction, using the ordinary General
|
||||
Public License for libraries did not effectively promote software
|
||||
sharing, because most developers did not use the libraries. We
|
||||
concluded that weaker conditions might promote sharing better.
|
||||
|
||||
However, unrestricted linking of non-free programs would deprive the
|
||||
users of those programs of all benefit from the free status of the
|
||||
libraries themselves. This Library General Public License is intended to
|
||||
permit developers of non-free programs to use free libraries, while
|
||||
preserving your freedom as a user of such programs to change the free
|
||||
libraries that are incorporated in them. (We have not seen how to achieve
|
||||
this as regards changes in header files, but we have achieved it as regards
|
||||
changes in the actual functions of the Library.) The hope is that this
|
||||
will lead to faster development of free libraries.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, while the latter only
|
||||
works together with the library.
|
||||
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library which
|
||||
contains a notice placed by the copyright holder or other authorized
|
||||
party saying it may be distributed under the terms of this Library
|
||||
General Public License (also called "this License"). Each licensee is
|
||||
addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also compile or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
c) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
d) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the source code distributed need not include anything that is normally
|
||||
distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Library General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
@@ -0,0 +1,4 @@
|
||||
Copyright (C) 2004 SKYRIX Software AG
|
||||
|
||||
|
||||
Contact: info@skyrix.com
|
||||
@@ -0,0 +1,119 @@
|
||||
2005-07-30 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* v0.9.22
|
||||
|
||||
* UIxKolabPartContactViewer.m: added accessors for multi-value fields
|
||||
|
||||
* UIxKolabPartViewer.m: added item
|
||||
|
||||
* UIxKolabPartViewer.m: cache parsed DOM document (v0.9.21)
|
||||
|
||||
* v0.9.20
|
||||
|
||||
* UIxMailPartViewer.m: added ability to use a fallback string encoding
|
||||
in case the default one or the one specified in the content-type did
|
||||
fail (this can happen with Outlook iCal mails ...).
|
||||
|
||||
* UIxMailPartICalViewer.m: hardened against missing content data, use
|
||||
Latin-1 as a fallback encoding in case the part encoding didn't work
|
||||
out.
|
||||
|
||||
* prepared MIME part viewers for Kolab XML types
|
||||
|
||||
* UIxMailRenderingContext.m: prepared some support for Kolab types in
|
||||
IMAP4 (v0.9.19)
|
||||
|
||||
2005-07-27 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* English.lproj/Localizable.strings: added a missing semicolon
|
||||
(v0.9.18)
|
||||
|
||||
2005-07-23 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailPartICalViewer.m: fixed include path for new hierarchy
|
||||
(v0.9.17)
|
||||
|
||||
2005-07-18 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailRenderingContext.m: show text/plain and text/html attachments
|
||||
which have "filename" set in the content-disposition using the link
|
||||
viewer (#1468) (v0.9.16)
|
||||
|
||||
2005-07-18 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailRenderingContext.m: map multipart/report mimetype to use the
|
||||
multipart/mixed viewer, map message/delivery-status mimetype to use
|
||||
the link viewer (v0.9.15)
|
||||
|
||||
* v0.9.14
|
||||
|
||||
* UIxMailPartICalViewer.m: replaced some methods with label bindings
|
||||
|
||||
* English.lproj/Localizable.strings: added more strings
|
||||
|
||||
* UIxMailPartICalViewer.m: added -attendeeStatusLabel to produce a
|
||||
readable and localized part-stat (v0.9.13)
|
||||
|
||||
2005-07-18 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailPartICalViewer.m: added code to support iMIP REPLY messages
|
||||
(v0.9.12)
|
||||
|
||||
2005-07-15 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* v0.9.11
|
||||
|
||||
* added UIxMailPartICalAction for calendar part related link actions
|
||||
(no actions implemented yet)
|
||||
|
||||
* UIxMailPartViewer.m: added preferred extensions for iCalendar and
|
||||
vCard mime types, moved in -pathToAttachment from
|
||||
UIxMailPartLinkViewer (returns a nice download-link), added
|
||||
-pathToAttachmentObject method (returns a plain link to the part
|
||||
SoObject)
|
||||
|
||||
* UIxMailPartLinkViewer.m: moved -pathToAttachment method to baseclass
|
||||
|
||||
* UIxMailPartICalViewer.m: added method to retrieve the authorative
|
||||
event (DB before mail), added a method to return an organizer display
|
||||
name (with appropriate fallbacks) (v0.9.10)
|
||||
|
||||
* UIxMailPartICalViewer.m: rewrote not to use SOGoAppointment and to
|
||||
use iCalCalendar instead (v0.9.9)
|
||||
|
||||
* UIxMailSizeFormatter.m, UIxMailPartMixedViewer.m,
|
||||
UIxMailPartICalViewer.m, UIxMailPartAlternativeViewer.m,
|
||||
UIxMailPartViewer.m: fixed gcc 4.0 warnings (v0.9.8)
|
||||
|
||||
2005-07-14 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailPartICalViewer.m: properly reset part caches when the
|
||||
part-path changes, added methods to check whether the event is
|
||||
already stored in the calendar of the login-user, added methods to
|
||||
check whether the login-user is the organizer (v0.9.7)
|
||||
|
||||
2005-07-08 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailPartViewer.m: added '8bit' as a known MIME encoding (v0.9.6)
|
||||
|
||||
2005-07-06 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailRenderingContext.m: fixed a bug when rendering nested
|
||||
multiparts (cannot be cached) (v0.9.5)
|
||||
|
||||
2005-06-24 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailPartLinkViewer.m: fixed an exception on Cocoa when a mail is
|
||||
composed from just the HTML body (v0.9.4)
|
||||
|
||||
2005-02-21 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* prepared HTML and iCal mail part viewers (0.9.3)
|
||||
|
||||
2005-02-20 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* moved in UIxMailSizeFormatter (v0.9.2)
|
||||
|
||||
2005-02-18 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* created ChangeLog
|
||||
@@ -0,0 +1,23 @@
|
||||
ACCEPTED = "accepted";
|
||||
COMPLETED = "completed";
|
||||
DECLINED = "declined";
|
||||
DELEGATED = "delegated";
|
||||
IN-PROCESS = "in process";
|
||||
NEEDS-ACTION = "needs action";
|
||||
TENTATIVE = "tentative";
|
||||
organized_by_you = "organized by you";
|
||||
you_are_an_attendee = "you are an attendee";
|
||||
add_info_text = "iMIP 'ADD' requests are not yet supported by SOGo.";
|
||||
publish_info_text = "The sender informs you of the attached event.";
|
||||
cancel_info_text = "Your invitation or the whole event was canceled.";
|
||||
request_info_no_attendee = "is proposing a meeting to the attendees. You receive this mail as a notification, you are not scheduled as a participant.";
|
||||
Organizer = "Organizer";
|
||||
request_info = "invites you to participate in a meeting.";
|
||||
do_add_to_cal = "add to calendar";
|
||||
do_del_from_cal = "delete from calendar";
|
||||
do_accept = "accept";
|
||||
do_decline = "decline";
|
||||
do_tentative = "tentative";
|
||||
do_update_status = "update status in calendar";
|
||||
reply_info_no_attendee = "You received a reply to a scheduling event but the sender of the reply is not a participant.";
|
||||
reply_info = "This is a reply to an event invitation done by you.";
|
||||
@@ -0,0 +1,7 @@
|
||||
ACCEPTED = "Accépté"
|
||||
COMPLETED = "Terminé"
|
||||
DECLINED = "Refusé"
|
||||
DELEGATED = "Délégué"
|
||||
IN-PROCESS = "En cours de traitement"
|
||||
NEEDS-ACTION = "Prise de décision nécessaire"
|
||||
TENTATIVE = "Proposition"
|
||||
@@ -0,0 +1,48 @@
|
||||
# GNUstep makefile
|
||||
|
||||
include ../common.make
|
||||
|
||||
BUNDLE_NAME = MailPartViewers
|
||||
|
||||
MailPartViewers_PRINCIPAL_CLASS = MailPartViewersProduct
|
||||
|
||||
MailPartViewers_LANGUAGES = English French
|
||||
|
||||
MailPartViewers_LANGUAGES = English French
|
||||
|
||||
MailPartViewers_OBJC_FILES += \
|
||||
MailPartViewersProduct.m \
|
||||
\
|
||||
UIxMailRenderingContext.m \
|
||||
UIxMailSizeFormatter.m \
|
||||
\
|
||||
UIxMailPartViewer.m \
|
||||
UIxMailPartTextViewer.m \
|
||||
UIxMailPartImageViewer.m \
|
||||
UIxMailPartLinkViewer.m \
|
||||
UIxMailPartMixedViewer.m \
|
||||
UIxMailPartAlternativeViewer.m \
|
||||
UIxMailPartMessageViewer.m \
|
||||
UIxMailPartICalViewer.m \
|
||||
UIxMailPartHTMLViewer.m \
|
||||
\
|
||||
UIxMailPartICalAction.m \
|
||||
\
|
||||
UIxKolabPartViewer.m \
|
||||
UIxKolabPartContactViewer.m \
|
||||
UIxKolabPartEventViewer.m \
|
||||
UIxKolabPartTaskViewer.m \
|
||||
|
||||
MailPartViewers_RESOURCE_FILES += \
|
||||
Version \
|
||||
product.plist \
|
||||
|
||||
MailPartViewers_LOCALIZED_RESOURCE_FILES += \
|
||||
Localizable.strings
|
||||
|
||||
# make
|
||||
|
||||
-include GNUmakefile.preamble
|
||||
include $(GNUSTEP_MAKEFILES)/bundle.make
|
||||
-include GNUmakefile.postamble
|
||||
include ../../fhsbundle.make
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
@interface MailPartViewersProduct : NSObject
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#include "common.h"
|
||||
|
||||
@implementation MailPartViewersProduct
|
||||
@end /* MailPartViewersProduct */
|
||||
@@ -0,0 +1,17 @@
|
||||
SOGo MailPartViewers
|
||||
====================
|
||||
|
||||
TODO
|
||||
|
||||
This product bundle contains components for displaying certain parts of an
|
||||
email, like the text content, attachments or embedded images.
|
||||
|
||||
All the contained classes inherit from UIxMailPartViewer which provides the
|
||||
majority of the functionality. Subclasses usually only add methods for the
|
||||
presentation of the content (which in turn is usually done in the templates).
|
||||
|
||||
The "master object" which selects appropriate classes and coordinates the
|
||||
rendering is the UIxMailRenderingContext. The context also maintains a cache
|
||||
of components for rendering which can then be reused for similiar parts in the
|
||||
mail. Note that this only works for leaf-content (eg not for recursive ones
|
||||
like multipart/* viewers).
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
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 "UIxKolabPartViewer.h"
|
||||
|
||||
/*
|
||||
UIxKolabPartContactViewer
|
||||
|
||||
Show application/x-vnd.kolab.contact types. (Kolab XML content)
|
||||
*/
|
||||
|
||||
@interface UIxKolabPartContactViewer : UIxKolabPartViewer
|
||||
@end
|
||||
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxKolabPartContactViewer
|
||||
|
||||
- (id<NSObject,DOMNodeList>)addressElements {
|
||||
return [[[self domDocument] documentElement]
|
||||
getElementsByTagName:@"address"];
|
||||
}
|
||||
|
||||
- (id<NSObject,DOMNodeList>)phoneElements {
|
||||
return [[[self domDocument] documentElement]
|
||||
getElementsByTagName:@"phone"];
|
||||
}
|
||||
|
||||
- (id<NSObject,DOMNodeList>)emailElements {
|
||||
return [[[self domDocument] documentElement]
|
||||
getElementsByTagName:@"email"];
|
||||
}
|
||||
|
||||
- (id<NSObject,DOMNodeList>)customElements {
|
||||
return [[[self domDocument] documentElement]
|
||||
getElementsByTagName:@"x-custom"];
|
||||
}
|
||||
|
||||
@end /* UIxKolabPartContactViewer */
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
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 "UIxKolabPartViewer.h"
|
||||
|
||||
/*
|
||||
UIxKolabPartEventViewer
|
||||
|
||||
Show application/x-vnd.kolab.event types. (Kolab XML content)
|
||||
*/
|
||||
|
||||
@interface UIxKolabPartEventViewer : UIxKolabPartViewer
|
||||
@end
|
||||
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxKolabPartEventViewer
|
||||
@end /* UIxKolabPartEventViewer */
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
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 "UIxKolabPartViewer.h"
|
||||
|
||||
/*
|
||||
UIxKolabPartTaskViewer
|
||||
|
||||
Show application/x-vnd.kolab.task types. (Kolab XML content)
|
||||
*/
|
||||
|
||||
@interface UIxKolabPartTaskViewer : UIxKolabPartViewer
|
||||
@end
|
||||
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxKolabPartTaskViewer
|
||||
@end /* UIxKolabPartTaskViewer */
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __Mailer_UIxKolabPartViewer_H__
|
||||
#define __Mailer_UIxKolabPartViewer_H__
|
||||
|
||||
#include "UIxMailPartViewer.h"
|
||||
|
||||
/*
|
||||
UIxKolabPartContactViewer
|
||||
|
||||
Superclass for viewers which show the application/x-vnd.* XML documents.
|
||||
*/
|
||||
|
||||
#include <DOM/DOMProtocols.h>
|
||||
|
||||
@interface UIxKolabPartViewer : UIxMailPartViewer
|
||||
{
|
||||
id<NSObject,DOMDocument> domDocument;
|
||||
id item;
|
||||
}
|
||||
|
||||
/* getting a DOM representation */
|
||||
|
||||
- (id<DOMDocument>)domDocument;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* __Mailer_UIxKolabPartViewer_H__ */
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
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 "UIxKolabPartViewer.h"
|
||||
#include "common.h"
|
||||
#include <DOM/DOMBuilderFactory.h>
|
||||
|
||||
@implementation UIxKolabPartViewer
|
||||
|
||||
static id<DOMBuilder> domBuilder = nil;
|
||||
|
||||
+ (void)initialize {
|
||||
DOMBuilderFactory *factory
|
||||
= [DOMBuilderFactory standardDOMBuilderFactory];
|
||||
|
||||
domBuilder = [[factory createDOMBuilderForMimeType:@"text/xml"] retain];
|
||||
NSLog(@"Note(%@): using DOM builder: %@",
|
||||
NSStringFromClass(self), domBuilder);
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[(id)self->domDocument release];
|
||||
[self->item release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* maintain caches */
|
||||
|
||||
- (void)resetPathCaches {
|
||||
[super resetPathCaches];
|
||||
[(id)self->domDocument release]; self->domDocument = nil;
|
||||
[self->item release]; self->item = nil;
|
||||
}
|
||||
|
||||
/* getting a DOM representation */
|
||||
|
||||
- (id<DOMDocument>)domDocument {
|
||||
/*
|
||||
Note: this ignores the charset MIME header and will rely on proper
|
||||
encoding header in the XML.
|
||||
*/
|
||||
|
||||
if (self->domDocument != nil)
|
||||
return [(id)self->domDocument isNotNull] ? self->domDocument : nil;
|
||||
|
||||
self->domDocument =
|
||||
[[domBuilder buildFromSource:[self decodedFlatContent]
|
||||
systemId:@"Kolab Mail Object"] retain];
|
||||
return self->domDocument;
|
||||
}
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (void)setItem:(id)_item {
|
||||
ASSIGN(self->item, _item);
|
||||
}
|
||||
- (id)item {
|
||||
return self->item;
|
||||
}
|
||||
|
||||
@end /* UIxKolabPartViewer */
|
||||
@@ -0,0 +1,164 @@
|
||||
/*
|
||||
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 "UIxMailPartViewer.h"
|
||||
|
||||
/*
|
||||
UIxMailPartAlternativeViewer
|
||||
|
||||
Display multipart/alternative parts. Most common application is for messages
|
||||
which contain text/html and text/plain, but it is also used in other
|
||||
contexts, eg in OGo appointment mails.
|
||||
|
||||
TODO: We might want to give the user the possibility to access all parts
|
||||
of the alternative set.
|
||||
*/
|
||||
|
||||
@interface UIxMailPartAlternativeViewer : UIxMailPartViewer
|
||||
{
|
||||
id childInfo;
|
||||
unsigned int childIndex;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#include "UIxMailRenderingContext.h"
|
||||
#include <UI/MailerUI/WOContext+UIxMailer.h>
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxMailPartAlternativeViewer
|
||||
|
||||
- (void)dealloc {
|
||||
[self->childInfo release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* caches */
|
||||
|
||||
- (void)resetBodyInfoCaches {
|
||||
[self->childInfo release]; self->childInfo = nil;
|
||||
self->childIndex = 0;
|
||||
[super resetBodyInfoCaches];
|
||||
}
|
||||
|
||||
/* part selection */
|
||||
|
||||
- (NSArray *)childPartTypes {
|
||||
NSMutableArray *types;
|
||||
unsigned i, count;
|
||||
NSArray *childParts;
|
||||
|
||||
childParts = [[self bodyInfo] valueForKey:@"parts"];
|
||||
count = [childParts count];
|
||||
types = [NSMutableArray arrayWithCapacity:count];
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
NSString *mt, *st;
|
||||
|
||||
mt = [[[childParts objectAtIndex:i] valueForKey:@"type"] lowercaseString];
|
||||
st = [[[childParts objectAtIndex:i] valueForKey:@"subtype"]
|
||||
lowercaseString];
|
||||
mt = [[mt stringByAppendingString:@"/"] stringByAppendingString:st];
|
||||
[types addObject:mt ? mt : (id)[NSNull null]];
|
||||
}
|
||||
return types;
|
||||
}
|
||||
|
||||
- (int)selectPartIndexFromTypes:(NSArray *)_types {
|
||||
/* returns the index of the selected part or NSNotFound */
|
||||
unsigned i, count;
|
||||
|
||||
if ((count = [_types count]) == 0)
|
||||
return NSNotFound;
|
||||
|
||||
/* we always choose text/plain if available */
|
||||
if ((i = [_types indexOfObject:@"text/plain"]) != NSNotFound)
|
||||
return i;
|
||||
|
||||
/* then we scan for other text types and choose the first one found */
|
||||
for (i = 0; i < count; i++) {
|
||||
if ([(NSString *)[_types objectAtIndex:i] hasPrefix:@"text/"])
|
||||
return i;
|
||||
}
|
||||
|
||||
/* as a fallback, we select the first available part */
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (void)selectChildInfo {
|
||||
unsigned idx;
|
||||
|
||||
[self->childInfo release]; self->childInfo = nil;
|
||||
self->childIndex = 0;
|
||||
|
||||
idx = [self selectPartIndexFromTypes:[self childPartTypes]];
|
||||
if (idx == NSNotFound) {
|
||||
[self errorWithFormat:@"could not select a part of types: %@",
|
||||
[self childPartTypes]];
|
||||
return;
|
||||
}
|
||||
|
||||
self->childIndex = idx + 1;
|
||||
self->childInfo =
|
||||
[[[[self bodyInfo] valueForKey:@"parts"] objectAtIndex:idx] retain];
|
||||
}
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (id)childInfo {
|
||||
if (self->childInfo == nil)
|
||||
[self selectChildInfo];
|
||||
|
||||
return self->childInfo;
|
||||
}
|
||||
|
||||
- (unsigned int)childIndex {
|
||||
if (self->childIndex == 0)
|
||||
[self selectChildInfo];
|
||||
|
||||
return self->childIndex - 1;
|
||||
}
|
||||
|
||||
- (NSString *)childPartName {
|
||||
char buf[8];
|
||||
sprintf(buf, "%d", [self childIndex] + 1);
|
||||
return [NSString stringWithCString:buf];
|
||||
}
|
||||
|
||||
- (id)childPartPath {
|
||||
NSArray *pp;
|
||||
|
||||
pp = [self partPath];
|
||||
return [pp count] > 0
|
||||
? [pp arrayByAddingObject:[self childPartName]]
|
||||
: [NSArray arrayWithObject:[self childPartName]];
|
||||
}
|
||||
|
||||
/* nested viewers */
|
||||
|
||||
- (id)contentViewerComponent {
|
||||
id info;
|
||||
|
||||
info = [self childInfo];
|
||||
return [[[self context] mailRenderingContext] viewerForBodyInfo:info];
|
||||
}
|
||||
|
||||
@end /* UIxMailPartAlternativeViewer */
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
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 "UIxMailPartLinkViewer.h"
|
||||
|
||||
@interface UIxMailPartHTMLViewer : UIxMailPartLinkViewer
|
||||
@end
|
||||
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxMailPartHTMLViewer
|
||||
@end /* UIxMailPartHTMLViewer */
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
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 <NGObjWeb/WODirectAction.h>
|
||||
|
||||
@interface UIxMailPartICalAction : WODirectAction
|
||||
@end
|
||||
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxMailPartICalAction
|
||||
|
||||
- (id)redirectToViewerWithError:(NSString *)_error {
|
||||
WOResponse *r;
|
||||
NSString *viewURL;
|
||||
id mail;
|
||||
|
||||
mail = [[self clientObject] valueForKey:@"mailObject"];
|
||||
[self logWithFormat:@"MAIL: %@", mail];
|
||||
|
||||
viewURL = [mail baseURLInContext:[self context]];
|
||||
[self logWithFormat:@" url: %@", viewURL];
|
||||
|
||||
viewURL = [viewURL stringByAppendingString:
|
||||
[viewURL hasSuffix:@"/"] ? @"view" : @"/view"];
|
||||
|
||||
if ([_error isNotNull] && [_error length] > 0) {
|
||||
viewURL = [viewURL stringByAppendingString:@"?error="];
|
||||
viewURL = [viewURL stringByAppendingString:
|
||||
[_error stringByEscapingURL]];
|
||||
}
|
||||
|
||||
r = [[self context] response];
|
||||
[r setStatus:302 /* moved */];
|
||||
[r setHeader:viewURL forKey:@"location"];
|
||||
return r;
|
||||
}
|
||||
|
||||
- (id)changePartStatusAction:(NSString *)_newStatus {
|
||||
[self logWithFormat:@"TODO: should %@: %@", _newStatus, [self clientObject]];
|
||||
return [self redirectToViewerWithError:
|
||||
[_newStatus stringByAppendingString:@" not implemented!"]];
|
||||
}
|
||||
|
||||
- (id)markAcceptedAction {
|
||||
return [self changePartStatusAction:@"ACCEPTED"];
|
||||
}
|
||||
- (id)markDeclinedAction {
|
||||
return [self changePartStatusAction:@"DECLINED"];
|
||||
}
|
||||
- (id)markTentativeAction {
|
||||
return [self changePartStatusAction:@"TENTATIVE"];
|
||||
}
|
||||
|
||||
@end /* UIxMailPartICalAction */
|
||||
@@ -0,0 +1,370 @@
|
||||
/*
|
||||
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 "UIxMailPartViewer.h"
|
||||
|
||||
/*
|
||||
UIxMailPartICalViewer
|
||||
|
||||
Show plain/calendar mail parts.
|
||||
*/
|
||||
|
||||
@class SOGoDateFormatter;
|
||||
@class iCalEvent, iCalCalendar;
|
||||
|
||||
@interface UIxMailPartICalViewer : UIxMailPartViewer
|
||||
{
|
||||
iCalCalendar *inCalendar;
|
||||
iCalEvent *inEvent;
|
||||
id attendee;
|
||||
SOGoDateFormatter *dateFormatter;
|
||||
id item;
|
||||
id storedEventObject;
|
||||
iCalEvent *storedEvent;
|
||||
}
|
||||
|
||||
- (iCalEvent *)authorativeEvent;
|
||||
|
||||
@end
|
||||
|
||||
#include <SOGoUI/SOGoDateFormatter.h>
|
||||
#include <SOGo/SOGoAppointment.h>
|
||||
#include <SOGo/SOGoUser.h>
|
||||
#include <SoObjects/Appointments/SOGoAppointmentFolder.h>
|
||||
#include <SoObjects/Appointments/SOGoAppointmentObject.h>
|
||||
#include <SoObjects/Mailer/SOGoMailObject.h>
|
||||
#include <NGiCal/NGiCal.h>
|
||||
#include <NGImap4/NGImap4EnvelopeAddress.h>
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxMailPartICalViewer
|
||||
|
||||
- (void)dealloc {
|
||||
[self->storedEventObject release];
|
||||
[self->storedEvent release];
|
||||
[self->attendee release];
|
||||
[self->item release];
|
||||
[self->inCalendar release];
|
||||
[self->inEvent release];
|
||||
[self->dateFormatter release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* maintain caches */
|
||||
|
||||
- (void)resetPathCaches {
|
||||
[super resetPathCaches];
|
||||
[self->inEvent release]; self->inEvent = nil;
|
||||
[self->inCalendar release]; self->inCalendar = nil;
|
||||
[self->storedEventObject release]; self->storedEventObject = nil;
|
||||
[self->storedEvent release]; self->storedEvent = nil;
|
||||
|
||||
/* not strictly path-related, but useless without it anyway: */
|
||||
[self->attendee release]; self->attendee = nil;
|
||||
[self->item release]; self->item = nil;
|
||||
}
|
||||
|
||||
/* raw content handling */
|
||||
|
||||
- (NSStringEncoding)fallbackStringEncoding {
|
||||
/*
|
||||
iCalendar invitations sent by Outlook 2002 have the annoying bug that the
|
||||
mail states an UTF-8 content encoding but the actual iCalendar content is
|
||||
encoding in Latin-1 (or Windows Western?).
|
||||
|
||||
As a result the content decoding will fail (TODO: always?). In this case we
|
||||
try to decode with Latin-1.
|
||||
|
||||
Note: we could check for the Outlook x-mailer, but it was considered better
|
||||
to try Latin-1 as a fallback in any case (be tolerant).
|
||||
*/
|
||||
return NSISOLatin1StringEncoding;
|
||||
}
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (iCalCalendar *)inCalendar {
|
||||
NSString *iCalString;
|
||||
|
||||
if (self->inCalendar != nil)
|
||||
return [self->inCalendar isNotNull] ? self->inCalendar : nil;
|
||||
|
||||
if ((iCalString = [self flatContentAsString]) == nil) {
|
||||
[self errorWithFormat:@"Could not retrieve content string for part!"];
|
||||
self->inCalendar = [[NSNull null] retain];
|
||||
return nil;
|
||||
}
|
||||
|
||||
self->inCalendar =
|
||||
[[iCalCalendar parseCalendarFromSource:iCalString] retain];
|
||||
if (self->inCalendar == nil) {
|
||||
[self warnWithFormat:@"Could not parse a vcalendar string."];
|
||||
self->inCalendar = [[NSNull null] retain];
|
||||
return nil;
|
||||
}
|
||||
else
|
||||
return self->inCalendar;
|
||||
}
|
||||
- (BOOL)couldParseCalendar {
|
||||
return [[self inCalendar] isNotNull];
|
||||
}
|
||||
|
||||
- (iCalEvent *)inEvent {
|
||||
NSArray *events;
|
||||
|
||||
if (self->inEvent != nil)
|
||||
return [self->inEvent isNotNull] ? self->inEvent : nil;
|
||||
|
||||
events = [[self inCalendar] events];
|
||||
if ([events count] > 0) {
|
||||
self->inEvent = [[events objectAtIndex:0] retain];
|
||||
return self->inEvent;
|
||||
}
|
||||
else {
|
||||
self->inEvent = [[NSNull null] retain];
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
/* formatters */
|
||||
|
||||
- (SOGoDateFormatter *)dateFormatter {
|
||||
if (self->dateFormatter == nil) {
|
||||
self->dateFormatter =
|
||||
[[SOGoDateFormatter alloc] initWithLocale:[self locale]];
|
||||
[self->dateFormatter setFullWeekdayNameAndDetails];
|
||||
}
|
||||
return self->dateFormatter;
|
||||
}
|
||||
|
||||
/* below is copied from UIxAppointmentView, can we avoid that? */
|
||||
|
||||
- (void)setAttendee:(id)_attendee {
|
||||
ASSIGN(self->attendee, _attendee);
|
||||
}
|
||||
- (id)attendee {
|
||||
return self->attendee;
|
||||
}
|
||||
|
||||
- (void)setItem:(id)_item {
|
||||
ASSIGN(self->item, _item);
|
||||
}
|
||||
- (id)item {
|
||||
return self->item;
|
||||
}
|
||||
|
||||
- (NSCalendarDate *)startTime {
|
||||
NSCalendarDate *date;
|
||||
|
||||
date = [[self authorativeEvent] startDate];
|
||||
[date setTimeZone:[self viewTimeZone]];
|
||||
return date;
|
||||
}
|
||||
|
||||
- (NSCalendarDate *)endTime {
|
||||
NSCalendarDate *date;
|
||||
|
||||
date = [[self authorativeEvent] endDate];
|
||||
[date setTimeZone:[self viewTimeZone]];
|
||||
return date;
|
||||
}
|
||||
|
||||
- (BOOL)isEndDateOnSameDay {
|
||||
return [[self startTime] isDateOnSameDay:[self endTime]];
|
||||
}
|
||||
- (NSTimeInterval)duration {
|
||||
return [[self endTime] timeIntervalSinceDate:[self startTime]];
|
||||
}
|
||||
|
||||
/* calendar folder support */
|
||||
|
||||
- (id)calendarFolder {
|
||||
/* return scheduling calendar of currently logged-in user */
|
||||
return [[[self context] activeUser] schedulingCalendarInContext:
|
||||
[self context]];
|
||||
}
|
||||
|
||||
- (id)storedEventObject {
|
||||
/* lookup object in the users Calendar */
|
||||
id calendar;
|
||||
|
||||
if (self->storedEventObject != nil)
|
||||
return [self->storedEventObject isNotNull] ? self->storedEventObject : nil;
|
||||
|
||||
calendar = [self calendarFolder];
|
||||
if ([calendar isKindOfClass:[NSException class]]) {
|
||||
[self errorWithFormat:@"Did not find Calendar folder: %@", calendar];
|
||||
}
|
||||
else {
|
||||
NSString *filename;
|
||||
|
||||
filename = [calendar resourceNameForEventUID:[[self inEvent] uid]];
|
||||
if (filename != nil) {
|
||||
// TODO: When we get an exception, this might be an auth issue meaning
|
||||
// that the UID indeed exists but that the user has no access to
|
||||
// the object.
|
||||
// Of course this is quite unusual for the private calendar though.
|
||||
id tmp;
|
||||
|
||||
tmp = [calendar lookupName:filename inContext:[self context] acquire:NO];
|
||||
if ([tmp isNotNull] && ![tmp isKindOfClass:[NSException class]])
|
||||
self->storedEventObject = [tmp retain];
|
||||
}
|
||||
}
|
||||
|
||||
if (self->storedEventObject == nil)
|
||||
self->storedEventObject = [[NSNull null] retain];
|
||||
|
||||
return self->storedEventObject;
|
||||
}
|
||||
|
||||
- (BOOL)isEventStoredInCalendar {
|
||||
return [[self storedEventObject] isNotNull];
|
||||
}
|
||||
|
||||
- (iCalEvent *)storedEvent {
|
||||
return [(SOGoAppointmentObject *)[self storedEventObject] event];
|
||||
}
|
||||
|
||||
/* organizer tracking */
|
||||
|
||||
- (NSString *)loggedInUserEMail {
|
||||
return [[[self context] activeUser] email];
|
||||
}
|
||||
|
||||
- (iCalEvent *)authorativeEvent {
|
||||
/* DB is considered master, when in DB, ignore mail organizer */
|
||||
return [self isEventStoredInCalendar]
|
||||
? [self storedEvent]
|
||||
: [self inEvent];
|
||||
}
|
||||
|
||||
- (BOOL)isLoggedInUserTheOrganizer {
|
||||
NSString *loginEMail;
|
||||
|
||||
if ((loginEMail = [self loggedInUserEMail]) == nil) {
|
||||
[self warnWithFormat:@"Could not determine email of logged in user?"];
|
||||
return NO;
|
||||
}
|
||||
|
||||
return [[self authorativeEvent] isOrganizer:loginEMail];
|
||||
}
|
||||
|
||||
- (BOOL)isLoggedInUserAnAttendee {
|
||||
NSString *loginEMail;
|
||||
|
||||
if ((loginEMail = [self loggedInUserEMail]) == nil) {
|
||||
[self warnWithFormat:@"Could not determine email of logged in user?"];
|
||||
return NO;
|
||||
}
|
||||
|
||||
return [[self authorativeEvent] isParticipant:loginEMail];
|
||||
}
|
||||
|
||||
/* derived fields */
|
||||
|
||||
- (NSString *)organizerDisplayName {
|
||||
iCalPerson *organizer;
|
||||
NSString *cn;
|
||||
|
||||
if ((organizer = [[self authorativeEvent] organizer]) != nil) {
|
||||
cn = [organizer valueForKey:@"cnForDisplay"];
|
||||
if ([cn isNotNull] && [cn length] > 0)
|
||||
return cn;
|
||||
|
||||
cn = [organizer valueForKey:@"rfc822Email"];
|
||||
if ([cn isNotNull] && [cn length] > 0)
|
||||
return cn;
|
||||
|
||||
return @"[error: unable to derive organizer name]";
|
||||
}
|
||||
|
||||
return @"[todo: no organizer set, use 'from']";
|
||||
}
|
||||
|
||||
/* replies */
|
||||
|
||||
- (NGImap4EnvelopeAddress *)replySenderAddress {
|
||||
/*
|
||||
The iMIP reply is the sender of the mail, the 'attendees' are NOT set to
|
||||
the actual attendees. BUT the attendee field contains the reply-status!
|
||||
*/
|
||||
id tmp;
|
||||
|
||||
tmp = [[self clientObject] fromEnvelopeAddresses];
|
||||
if ([tmp count] == 0) return nil;
|
||||
return [tmp objectAtIndex:0];
|
||||
}
|
||||
|
||||
- (NSString *)replySenderEMail {
|
||||
return [[self replySenderAddress] email];
|
||||
}
|
||||
- (NSString *)replySenderBaseEMail {
|
||||
return [[self replySenderAddress] baseEMail];
|
||||
}
|
||||
|
||||
- (iCalPerson *)inReplyAttendee {
|
||||
NSArray *attendees;
|
||||
|
||||
attendees = [[self inEvent] attendees];
|
||||
if ([attendees count] == 0)
|
||||
return nil;
|
||||
if ([attendees count] > 1)
|
||||
[self warnWithFormat:@"More than one attendee in REPLY: %@", attendees];
|
||||
|
||||
return [attendees objectAtIndex:0];
|
||||
}
|
||||
- (iCalPerson *)storedReplyAttendee {
|
||||
/*
|
||||
TODO: since an attendee can have multiple email addresses, maybe we
|
||||
should translate the email to an internal uid and then retrieve
|
||||
all emails addresses for matching the participant.
|
||||
|
||||
Note: -findParticipantWithEmail: does not parse the email!
|
||||
*/
|
||||
iCalEvent *e;
|
||||
iCalPerson *p;
|
||||
|
||||
if ((e = [self storedEvent]) == nil)
|
||||
return nil;
|
||||
if ((p = [e findParticipantWithEmail:[self replySenderBaseEMail]]))
|
||||
return p;
|
||||
if ((p = [e findParticipantWithEmail:[self replySenderEMail]]))
|
||||
return p;
|
||||
return nil;
|
||||
}
|
||||
- (BOOL)isReplySenderAnAttendee {
|
||||
return [[self storedReplyAttendee] isNotNull];
|
||||
}
|
||||
|
||||
/* action URLs */
|
||||
|
||||
- (id)acceptLink {
|
||||
return [[self pathToAttachmentObject] stringByAppendingString:@"/accept"];
|
||||
}
|
||||
- (id)declineLink {
|
||||
return [[self pathToAttachmentObject] stringByAppendingString:@"/decline"];
|
||||
}
|
||||
- (id)tentativeLink {
|
||||
return [[self pathToAttachmentObject] stringByAppendingString:@"/tentative"];
|
||||
}
|
||||
|
||||
@end /* UIxMailPartICalViewer */
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
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 "UIxMailPartViewer.h"
|
||||
|
||||
@interface UIxMailPartImageViewer : UIxMailPartViewer
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxMailPartImageViewer
|
||||
|
||||
/* URLs */
|
||||
|
||||
- (NSString *)pathToImage {
|
||||
NSString *url;
|
||||
NSString *s;
|
||||
|
||||
url = [[self clientObject] baseURLInContext:[self context]];
|
||||
if (![url hasSuffix:@"/"]) url = [url stringByAppendingString:@"/"];
|
||||
|
||||
s = [[self partPath] componentsJoinedByString:@"/"];
|
||||
url = [url stringByAppendingString:s];
|
||||
|
||||
if ((s = [self preferredPathExtension]) != nil) {
|
||||
url = [url stringByAppendingString:@"."];
|
||||
url = [url stringByAppendingString:s];
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
@end /* UIxMailPartImageViewer */
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __Mailer_UIxMailPartLinkViewer_H__
|
||||
#define __Mailer_UIxMailPartLinkViewer_H__
|
||||
|
||||
#include "UIxMailPartViewer.h"
|
||||
|
||||
/*
|
||||
UIxMailPartLinkViewer
|
||||
|
||||
The generic viewer for all kinds of attachments. Renders a link to download
|
||||
the attachment.
|
||||
|
||||
TODO: show info based on the 'bodyInfo' dictionary:
|
||||
{
|
||||
bodyId = "";
|
||||
description = "";
|
||||
encoding = BASE64;
|
||||
parameterList = {
|
||||
"x-unix-mode" = 0666;
|
||||
name = "IncoWEBOpenGroupwarepresentation.pdf";
|
||||
};
|
||||
size = 1314916;
|
||||
subtype = PDF; type = application;
|
||||
}
|
||||
*/
|
||||
|
||||
@interface UIxMailPartLinkViewer : UIxMailPartViewer
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif /* __Mailer_UIxMailPartLinkViewer_H__ */
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
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 "UIxMailPartLinkViewer.h"
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxMailPartLinkViewer
|
||||
|
||||
|
||||
@end /* UIxMailPartLinkViewer */
|
||||
@@ -0,0 +1,153 @@
|
||||
/*
|
||||
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 "UIxMailPartViewer.h"
|
||||
|
||||
/*
|
||||
UIxMailPartMessageViewer
|
||||
|
||||
Show message/rfc822 mail parts. Note that the IMAP4 server already returns a
|
||||
proper body structure of the message.
|
||||
|
||||
Relevant body-info keys:
|
||||
to/sender/from/cc/bcc/in-reply-to/reply-to - array of addr-dicts
|
||||
type/subtype - message/RFC822
|
||||
size
|
||||
subject
|
||||
parameterList - dict (eg 'name')
|
||||
messageId
|
||||
date
|
||||
encoding - 7BIT
|
||||
bodyLines - 83
|
||||
bodyId - (empty string?)
|
||||
description - (empty string?, content-description?)
|
||||
|
||||
body - a body structure?
|
||||
|
||||
Addr-Dict:
|
||||
hostName / mailboxName / personalName / sourceRoute
|
||||
*/
|
||||
|
||||
@class NGImap4Envelope;
|
||||
|
||||
@interface UIxMailPartMessageViewer : UIxMailPartViewer
|
||||
{
|
||||
NGImap4Envelope *envelope;
|
||||
id currentAddress;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#include <UI/MailerUI/WOContext+UIxMailer.h>
|
||||
#include "UIxMailRenderingContext.h"
|
||||
#include <NGImap4/NGImap4Envelope.h>
|
||||
#include <NGImap4/NGImap4EnvelopeAddress.h>
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxMailPartMessageViewer
|
||||
|
||||
- (void)dealloc {
|
||||
[self->currentAddress release];
|
||||
[self->envelope release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* cache maintenance */
|
||||
|
||||
- (void)resetBodyInfoCaches {
|
||||
[super resetBodyInfoCaches];
|
||||
[self->envelope release]; self->envelope = nil;
|
||||
[self->currentAddress release]; self->currentAddress = nil;
|
||||
}
|
||||
|
||||
/* notifications */
|
||||
|
||||
- (void)sleep {
|
||||
[self->currentAddress release]; self->currentAddress = nil;
|
||||
[super sleep];
|
||||
}
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (void)setCurrentAddress:(id)_addr {
|
||||
ASSIGN(self->currentAddress, _addr);
|
||||
}
|
||||
- (id)currentAddress {
|
||||
return self->currentAddress;
|
||||
}
|
||||
|
||||
/* nested body structure */
|
||||
|
||||
- (id)contentInfo {
|
||||
return [[self bodyInfo] valueForKey:@"body"];
|
||||
}
|
||||
|
||||
- (id)contentPartPath {
|
||||
/*
|
||||
Path processing is a bit weird in the context of message/rfc822. If we have
|
||||
a multipart, the multipart itself has no own identifier! Instead the
|
||||
children of the multipart are directly mapped into the message namespace.
|
||||
|
||||
If the message has just a plain content, ids seems to be as expected (that
|
||||
is, its just a "1").
|
||||
*/
|
||||
NSArray *pp;
|
||||
NSString *mt;
|
||||
|
||||
mt = [[[self contentInfo] valueForKey:@"type"] lowercaseString];
|
||||
if ([mt isEqualToString:@"multipart"])
|
||||
return [self partPath];
|
||||
|
||||
pp = [self partPath];
|
||||
return [pp count] > 0
|
||||
? [pp arrayByAddingObject:@"1"]
|
||||
: [NSArray arrayWithObject:@"1"];
|
||||
}
|
||||
|
||||
- (id)contentViewerComponent {
|
||||
id info;
|
||||
|
||||
info = [self contentInfo];
|
||||
return [[[self context] mailRenderingContext] viewerForBodyInfo:info];
|
||||
}
|
||||
|
||||
/* generating envelope */
|
||||
|
||||
- (NGImap4Envelope *)envelope {
|
||||
if (self->envelope == nil) {
|
||||
self->envelope = [[NGImap4Envelope alloc] initWithBodyStructureInfo:
|
||||
[self bodyInfo]];
|
||||
}
|
||||
return self->envelope;
|
||||
}
|
||||
|
||||
/* links to recipients */
|
||||
|
||||
- (NSString *)linkToEnvelopeAddress:(NGImap4EnvelopeAddress *)_address {
|
||||
// TODO: make some web-link, eg open a new compose panel?
|
||||
return [@"mailto:" stringByAppendingString:[_address baseEMail]];
|
||||
}
|
||||
|
||||
- (NSString *)currentAddressLink {
|
||||
return [self linkToEnvelopeAddress:[self currentAddress]];
|
||||
}
|
||||
|
||||
@end /* UIxMailPartMessageViewer */
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
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 "UIxMailPartViewer.h"
|
||||
|
||||
@interface UIxMailPartMixedViewer : UIxMailPartViewer
|
||||
{
|
||||
id childInfo;
|
||||
unsigned int childIndex;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#include "UIxMailRenderingContext.h"
|
||||
#include <UI/MailerUI/WOContext+UIxMailer.h>
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxMailPartMixedViewer
|
||||
|
||||
- (void)dealloc {
|
||||
[self->childInfo release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* caches */
|
||||
|
||||
- (void)resetBodyInfoCaches {
|
||||
[self->childInfo release]; self->childInfo = nil;
|
||||
[super resetBodyInfoCaches];
|
||||
}
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (void)setChildInfo:(id)_info {
|
||||
ASSIGN(self->childInfo, _info);
|
||||
}
|
||||
- (id)childInfo {
|
||||
return self->childInfo;
|
||||
}
|
||||
|
||||
- (void)setChildIndex:(unsigned int)_index {
|
||||
self->childIndex = _index;
|
||||
}
|
||||
- (unsigned int)childIndex {
|
||||
return self->childIndex;
|
||||
}
|
||||
|
||||
- (NSString *)childPartName {
|
||||
char buf[8];
|
||||
sprintf(buf, "%d", [self childIndex] + 1);
|
||||
return [NSString stringWithCString:buf];
|
||||
}
|
||||
|
||||
- (id)childPartPath {
|
||||
NSArray *pp;
|
||||
|
||||
pp = [self partPath];
|
||||
return [pp count] > 0
|
||||
? [pp arrayByAddingObject:[self childPartName]]
|
||||
: [NSArray arrayWithObject:[self childPartName]];
|
||||
}
|
||||
|
||||
/* nested viewers */
|
||||
|
||||
- (id)contentViewerComponent {
|
||||
id info;
|
||||
|
||||
info = [self childInfo];
|
||||
return [[[self context] mailRenderingContext] viewerForBodyInfo:info];
|
||||
}
|
||||
|
||||
@end /* UIxMailPartMixedViewer */
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
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 "UIxMailPartViewer.h"
|
||||
|
||||
/*
|
||||
UIxMailPartTextViewer
|
||||
|
||||
Show plain/text mail parts in a <pre> section.
|
||||
|
||||
TODO: add server side wrapping.
|
||||
TODO: add contained link detection.
|
||||
*/
|
||||
|
||||
@interface UIxMailPartTextViewer : UIxMailPartViewer
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxMailPartTextViewer
|
||||
|
||||
@end /* UIxMailPartTextViewer */
|
||||
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __Mailer_UIxMailPartViewer_H__
|
||||
#define __Mailer_UIxMailPartViewer_H__
|
||||
|
||||
#include <SOGoUI/UIxComponent.h>
|
||||
|
||||
/*
|
||||
UIxMailPartViewer
|
||||
|
||||
This class is the superclass for MIME content viewers.
|
||||
|
||||
Since part-viewers can be reused for multiple parts, you need to be careful
|
||||
in subclass to properly reset your specific state by overriding
|
||||
- resetPathCaches
|
||||
|
||||
The part viewers have access to the rendering state using the
|
||||
|
||||
[[self context] mailRenderingContext]
|
||||
|
||||
object. This class provides several convenience methods to access mailpart
|
||||
content.
|
||||
*/
|
||||
|
||||
@class NSData, NSArray, NSFormatter;
|
||||
|
||||
@interface UIxMailPartViewer : UIxComponent
|
||||
{
|
||||
NSArray *partPath;
|
||||
id bodyInfo;
|
||||
NSData *flatContent;
|
||||
}
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (void)setPartPath:(NSArray *)_path;
|
||||
- (NSArray *)partPath;
|
||||
|
||||
- (void)setBodyInfo:(id)_info;
|
||||
- (id)bodyInfo;
|
||||
|
||||
- (NSData *)flatContent;
|
||||
- (NSData *)decodedFlatContent;
|
||||
- (NSString *)flatContentAsString;
|
||||
|
||||
- (NSString *)preferredPathExtension;
|
||||
- (NSString *)filename;
|
||||
- (NSString *)filenameForDisplay;
|
||||
- (NSFormatter *)sizeFormatter;
|
||||
|
||||
/* caches */
|
||||
|
||||
- (void)resetPathCaches;
|
||||
- (void)resetBodyInfoCaches;
|
||||
|
||||
/* part URLs */
|
||||
|
||||
- (NSString *)pathToAttachmentObject; /* link to SoObject */
|
||||
- (NSString *)pathToAttachment; /* download link */
|
||||
|
||||
@end
|
||||
|
||||
#endif /* __Mailer_UIxMailPartViewer_H__ */
|
||||
@@ -0,0 +1,294 @@
|
||||
/*
|
||||
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 "UIxMailPartViewer.h"
|
||||
#include "UIxMailRenderingContext.h"
|
||||
#include "UIxMailSizeFormatter.h"
|
||||
#include "../MailerUI/WOContext+UIxMailer.h"
|
||||
#include <NGExtensions/NSString+Encoding.h>
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxMailPartViewer
|
||||
|
||||
- (void)dealloc {
|
||||
[self->flatContent release];
|
||||
[self->bodyInfo release];
|
||||
[self->partPath release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* caches */
|
||||
|
||||
- (void)resetPathCaches {
|
||||
/* this is called when -setPartPath: is called */
|
||||
[self->flatContent release]; self->flatContent = nil;
|
||||
}
|
||||
- (void)resetBodyInfoCaches {
|
||||
}
|
||||
|
||||
/* notifications */
|
||||
|
||||
- (void)sleep {
|
||||
[self resetPathCaches];
|
||||
[self resetBodyInfoCaches];
|
||||
[self->partPath release]; self->partPath = nil;
|
||||
[self->bodyInfo release]; self->bodyInfo = nil;
|
||||
[super sleep];
|
||||
}
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (void)setPartPath:(NSArray *)_path {
|
||||
if ([_path isEqual:self->partPath])
|
||||
return;
|
||||
|
||||
ASSIGN(self->partPath, _path);
|
||||
[self resetPathCaches];
|
||||
}
|
||||
- (NSArray *)partPath {
|
||||
return self->partPath;
|
||||
}
|
||||
|
||||
- (void)setBodyInfo:(id)_info {
|
||||
ASSIGN(self->bodyInfo, _info);
|
||||
}
|
||||
- (id)bodyInfo {
|
||||
return self->bodyInfo;
|
||||
}
|
||||
|
||||
- (NSData *)flatContent {
|
||||
if (self->flatContent != nil)
|
||||
return [self->flatContent isNotNull] ? self->flatContent : nil;
|
||||
|
||||
self->flatContent =
|
||||
[[[[self context] mailRenderingContext] flatContentForPartPath:
|
||||
[self partPath]] retain];
|
||||
return self->flatContent;
|
||||
}
|
||||
|
||||
- (NSData *)decodedFlatContent {
|
||||
NSString *enc;
|
||||
|
||||
enc = [[(NSDictionary *)[self bodyInfo]
|
||||
objectForKey:@"encoding"] lowercaseString];
|
||||
|
||||
if ([enc isEqualToString:@"7bit"])
|
||||
return [self flatContent];
|
||||
|
||||
if ([enc isEqualToString:@"8bit"]) // TODO: correct?
|
||||
return [self flatContent];
|
||||
|
||||
if ([enc isEqualToString:@"base64"])
|
||||
return [[self flatContent] dataByDecodingBase64];
|
||||
|
||||
if ([enc isEqualToString:@"quoted-printable"])
|
||||
return [[self flatContent] dataByDecodingQuotedPrintable];
|
||||
|
||||
[self errorWithFormat:@"unsupported MIME encoding: %@", enc];
|
||||
return [self flatContent];
|
||||
}
|
||||
|
||||
- (NSStringEncoding)fallbackStringEncoding {
|
||||
return 0;
|
||||
}
|
||||
- (NSString *)flatContentAsString {
|
||||
/* Note: we even have the line count in the body-info! */
|
||||
NSString *charset;
|
||||
NSString *s;
|
||||
NSData *content;
|
||||
|
||||
if ((content = [self decodedFlatContent]) == nil) {
|
||||
[self errorWithFormat:@"got no text content: %@",
|
||||
[[self partPath] componentsJoinedByString:@"."]];
|
||||
return nil;
|
||||
}
|
||||
|
||||
charset = [(NSDictionary *)
|
||||
[(NSDictionary *)[self bodyInfo] objectForKey:@"parameterList"]
|
||||
objectForKey:@"charset"];
|
||||
charset = [charset lowercaseString];
|
||||
|
||||
// TODO: properly decode charset, might need to handle encoding?
|
||||
|
||||
if ([charset length] > 0) {
|
||||
s = [NSString stringWithData:content usingEncodingNamed:charset];
|
||||
}
|
||||
else {
|
||||
s = [[NSString alloc] initWithData:content encoding:NSUTF8StringEncoding];
|
||||
s = [s autorelease];
|
||||
}
|
||||
|
||||
if (s == nil) {
|
||||
/*
|
||||
Note: this can happend with iCalendar invitations sent by Outlook 2002.
|
||||
It will mark the content as UTF-8 but actually deliver it as
|
||||
Latin-1 (or Windows encoding?).
|
||||
*/
|
||||
[self errorWithFormat:@"could not convert content to text, charset: '%@'",
|
||||
charset];
|
||||
if ([self fallbackStringEncoding] > 0) {
|
||||
s = [[NSString alloc] initWithData:content
|
||||
encoding:[self fallbackStringEncoding]];
|
||||
s = [s autorelease];
|
||||
|
||||
if (s == nil) {
|
||||
[self errorWithFormat:
|
||||
@" an attempt to use fallback encoding failed to."];
|
||||
}
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
/* path extension */
|
||||
|
||||
- (NSString *)pathExtensionForType:(NSString *)_mt subtype:(NSString *)_st {
|
||||
// TODO: support /etc/mime.types
|
||||
|
||||
if (![_mt isNotNull] || ![_st isNotNull])
|
||||
return nil;
|
||||
if ([_mt length] == 0) return nil;
|
||||
if ([_st length] == 0) return nil;
|
||||
_mt = [_mt lowercaseString];
|
||||
_st = [_st lowercaseString];
|
||||
|
||||
if ([_mt isEqualToString:@"image"]) {
|
||||
if ([_st isEqualToString:@"gif"]) return @"gif";
|
||||
if ([_st isEqualToString:@"jpeg"]) return @"jpg";
|
||||
if ([_st isEqualToString:@"png"]) return @"png";
|
||||
}
|
||||
else if ([_mt isEqualToString:@"text"]) {
|
||||
if ([_st isEqualToString:@"plain"]) return @"txt";
|
||||
if ([_st isEqualToString:@"xml"]) return @"xml";
|
||||
if ([_st isEqualToString:@"calendar"]) return @"ics";
|
||||
if ([_st isEqualToString:@"x-vcard"]) return @"vcf";
|
||||
}
|
||||
else if ([_mt isEqualToString:@"message"]) {
|
||||
if ([_st isEqualToString:@"rfc822"]) return @"mail";
|
||||
}
|
||||
else if ([_mt isEqualToString:@"application"]) {
|
||||
if ([_st isEqualToString:@"pdf"]) return @"pdf";
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSString *)preferredPathExtension {
|
||||
return [self pathExtensionForType:[[self bodyInfo] valueForKey:@"type"]
|
||||
subtype:[[self bodyInfo] valueForKey:@"subtype"]];
|
||||
}
|
||||
|
||||
- (NSString *)filename {
|
||||
id tmp;
|
||||
|
||||
tmp = [[self bodyInfo] valueForKey:@"parameterList"];
|
||||
if (![tmp isNotNull])
|
||||
return nil;
|
||||
|
||||
tmp = [tmp valueForKey:@"name"];
|
||||
if (![tmp isNotNull])
|
||||
return nil;
|
||||
if ([tmp length] == 0)
|
||||
return nil;
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
||||
- (NSString *)filenameForDisplay {
|
||||
NSString *s;
|
||||
|
||||
if ((s = [self filename]) != nil)
|
||||
return s;
|
||||
|
||||
s = [[self partPath] componentsJoinedByString:@"-"];
|
||||
return ([s length] > 0)
|
||||
? [@"untitled-" stringByAppendingString:s]
|
||||
: @"untitled";
|
||||
}
|
||||
|
||||
- (NSFormatter *)sizeFormatter {
|
||||
return [UIxMailSizeFormatter sharedMailSizeFormatter];
|
||||
}
|
||||
|
||||
/* URL generation */
|
||||
|
||||
- (NSString *)pathToAttachmentObject {
|
||||
/* this points to the SoObject representing the part, no modifications */
|
||||
NSString *url, *n, *pext;
|
||||
|
||||
/* path to mail controller object */
|
||||
|
||||
url = [[self clientObject] baseURLInContext:[self context]];
|
||||
if (![url hasSuffix:@"/"]) url = [url stringByAppendingString:@"/"];
|
||||
|
||||
/* mail relative path to body-part */
|
||||
|
||||
if ([(n = [[self partPath] componentsJoinedByString:@"/"]) isNotNull]) {
|
||||
/* eg this was nil for a draft containing an HTML message */
|
||||
url = [url stringByAppendingString:n];
|
||||
}
|
||||
|
||||
/* we currently NEED the extension for SoObject lookup (should be fixed) */
|
||||
|
||||
pext = [self preferredPathExtension];
|
||||
if ([pext isNotNull] && [pext length] > 0) {
|
||||
/* attach extension */
|
||||
if ([url hasSuffix:@"/"]) {
|
||||
/* this happens if the part is the root-content of the mail */
|
||||
url = [url substringToIndex:([url length] - 1)];
|
||||
}
|
||||
url = [url stringByAppendingString:@"."];
|
||||
url = [url stringByAppendingString:pext];
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
- (NSString *)pathToAttachment {
|
||||
/* this generates a more beautiful 'download' URL for a part */
|
||||
NSString *url, *fn;
|
||||
|
||||
fn = [self filename];
|
||||
|
||||
if (![fn isNotNull] || ([fn length] == 0))
|
||||
fn = nil;
|
||||
|
||||
/* get basic URL */
|
||||
|
||||
url = [self pathToAttachmentObject];
|
||||
|
||||
/*
|
||||
If we have an attachment name, we attach it, this is properly handled by
|
||||
SOGoMailBodyPart.
|
||||
*/
|
||||
|
||||
if (fn != nil) {
|
||||
if (![url hasSuffix:@"/"]) url = [url stringByAppendingString:@"/"];
|
||||
if (isdigit([fn characterAtIndex:0]))
|
||||
url = [url stringByAppendingString:@"fn-"];
|
||||
url = [url stringByAppendingString:[fn stringByEscapingURL]];
|
||||
|
||||
// TODO: should we check for a proper extension?
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
@end /* UIxMailPartViewer */
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __Mailer_UIxMailRenderingContext_H__
|
||||
#define __Mailer_UIxMailRenderingContext_H__
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
/*
|
||||
UIxMailRenderingContext
|
||||
|
||||
The rendering context is used to track nesting of mail part viewers.
|
||||
*/
|
||||
|
||||
@class NSData, NSArray, NSDictionary;
|
||||
@class WOContext, WOComponent;
|
||||
|
||||
@interface UIxMailRenderingContext : NSObject
|
||||
{
|
||||
WOComponent *viewer; /* non-retained! */
|
||||
WOContext *context; /* non-retained! */
|
||||
NSDictionary *flatContents; /* IMAP4 name to NSData */
|
||||
|
||||
WOComponent *textViewer;
|
||||
WOComponent *imageViewer;
|
||||
WOComponent *linkViewer;
|
||||
WOComponent *messageViewer;
|
||||
WOComponent *iCalViewer;
|
||||
WOComponent *htmlViewer;
|
||||
}
|
||||
|
||||
- (id)initWithViewer:(WOComponent *)_viewer context:(WOContext *)_ctx;
|
||||
|
||||
/* state */
|
||||
|
||||
- (void)reset;
|
||||
|
||||
/* fetching */
|
||||
|
||||
- (NSDictionary *)flatContents;
|
||||
- (NSData *)flatContentForPartPath:(NSArray *)_partPath;
|
||||
|
||||
/* viewer components */
|
||||
|
||||
- (WOComponent *)viewerForBodyInfo:(id)_info;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
#include <NGObjWeb/WOContext.h>
|
||||
|
||||
@interface WOContext(UIxMailPart)
|
||||
|
||||
- (void)pushMailRenderingContext:(UIxMailRenderingContext *)_mctx;
|
||||
- (UIxMailRenderingContext *)popMailRenderingContext;
|
||||
- (UIxMailRenderingContext *)mailRenderingContext;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* __Mailer_UIxMailRenderingContext_H__ */
|
||||
@@ -0,0 +1,303 @@
|
||||
/*
|
||||
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 "UIxMailRenderingContext.h"
|
||||
#include <SoObjects/Mailer/SOGoMailObject.h>
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxMailRenderingContext
|
||||
|
||||
static BOOL showNamedTextAttachmentsInline = NO;
|
||||
|
||||
- (id)initWithViewer:(WOComponent *)_viewer context:(WOContext *)_ctx {
|
||||
if ((self = [super init])) {
|
||||
self->viewer = _viewer;
|
||||
self->context = _ctx;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
- (id)init {
|
||||
return [self initWithViewer:nil context:nil];
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[self->iCalViewer release];
|
||||
[self->htmlViewer release];
|
||||
[self->textViewer release];
|
||||
[self->imageViewer release];
|
||||
[self->linkViewer release];
|
||||
[self->messageViewer release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* resetting state */
|
||||
|
||||
- (void)reset {
|
||||
[self->flatContents release]; self->flatContents = nil;
|
||||
[self->textViewer release]; self->textViewer = nil;
|
||||
[self->htmlViewer release]; self->htmlViewer = nil;
|
||||
[self->imageViewer release]; self->imageViewer = nil;
|
||||
[self->linkViewer release]; self->linkViewer = nil;
|
||||
[self->messageViewer release]; self->messageViewer = nil;
|
||||
[self->iCalViewer release]; self->iCalViewer = nil;
|
||||
}
|
||||
|
||||
/* fetching */
|
||||
|
||||
- (NSDictionary *)flatContents {
|
||||
if (self->flatContents != nil)
|
||||
return [self->flatContents isNotNull] ? self->flatContents : nil;
|
||||
|
||||
self->flatContents =
|
||||
[[[self->viewer clientObject] fetchPlainTextParts] retain];
|
||||
[self debugWithFormat:@"CON: %@", self->flatContents];
|
||||
return self->flatContents;
|
||||
}
|
||||
|
||||
- (NSData *)flatContentForPartPath:(NSArray *)_partPath {
|
||||
NSString *pid;
|
||||
|
||||
pid = _partPath ? [_partPath componentsJoinedByString:@"."] : @"";
|
||||
return [[self flatContents] objectForKey:pid];
|
||||
}
|
||||
|
||||
/* viewer components */
|
||||
|
||||
- (WOComponent *)mixedViewer {
|
||||
/* Note: we cannot cache the multipart viewers, because it can be nested */
|
||||
return [self->viewer pageWithName:@"UIxMailPartMixedViewer"];
|
||||
}
|
||||
|
||||
- (WOComponent *)signedViewer {
|
||||
/* Note: we cannot cache the multipart viewers, because it can be nested */
|
||||
// TODO: temporary workaround (treat it like a plain mixed part)
|
||||
return [self mixedViewer];
|
||||
}
|
||||
|
||||
- (WOComponent *)alternativeViewer {
|
||||
/* Note: we cannot cache the multipart viewers, because it can be nested */
|
||||
return [self->viewer pageWithName:@"UIxMailPartAlternativeViewer"];
|
||||
}
|
||||
|
||||
- (WOComponent *)textViewer {
|
||||
if (self->textViewer == nil) {
|
||||
self->textViewer =
|
||||
[[self->viewer pageWithName:@"UIxMailPartTextViewer"] retain];
|
||||
}
|
||||
return self->textViewer;
|
||||
}
|
||||
|
||||
- (WOComponent *)imageViewer {
|
||||
if (self->imageViewer == nil) {
|
||||
self->imageViewer =
|
||||
[[self->viewer pageWithName:@"UIxMailPartImageViewer"] retain];
|
||||
}
|
||||
return self->imageViewer;
|
||||
}
|
||||
|
||||
- (WOComponent *)linkViewer {
|
||||
if (self->linkViewer == nil) {
|
||||
self->linkViewer =
|
||||
[[self->viewer pageWithName:@"UIxMailPartLinkViewer"] retain];
|
||||
}
|
||||
return self->linkViewer;
|
||||
}
|
||||
|
||||
- (WOComponent *)htmlViewer {
|
||||
if (self->htmlViewer == nil) {
|
||||
self->htmlViewer =
|
||||
[[self->viewer pageWithName:@"UIxMailPartHTMLViewer"] retain];
|
||||
}
|
||||
return self->htmlViewer;
|
||||
}
|
||||
|
||||
- (WOComponent *)messageViewer {
|
||||
if (self->messageViewer == nil) {
|
||||
self->messageViewer =
|
||||
[[self->viewer pageWithName:@"UIxMailPartMessageViewer"] retain];
|
||||
}
|
||||
return self->messageViewer;
|
||||
}
|
||||
|
||||
- (WOComponent *)iCalViewer {
|
||||
if (self->iCalViewer == nil) {
|
||||
self->iCalViewer =
|
||||
[[self->viewer pageWithName:@"UIxMailPartICalViewer"] retain];
|
||||
}
|
||||
return self->iCalViewer;
|
||||
}
|
||||
|
||||
/* Kolab viewers */
|
||||
|
||||
- (WOComponent *)kolabContactViewer {
|
||||
return [self->viewer pageWithName:@"UIxKolabPartContactViewer"];
|
||||
}
|
||||
- (WOComponent *)kolabEventViewer {
|
||||
return [self->viewer pageWithName:@"UIxKolabPartEventViewer"];
|
||||
}
|
||||
- (WOComponent *)kolabTodoViewer {
|
||||
return [self->viewer pageWithName:@"UIxKolabPartTodoViewer"];
|
||||
}
|
||||
|
||||
- (WOComponent *)kolabNoteViewer {
|
||||
return [self textViewer]; // TODO
|
||||
}
|
||||
- (WOComponent *)kolabJournalViewer {
|
||||
return [self textViewer]; // TODO
|
||||
}
|
||||
- (WOComponent *)kolabDistributionListViewer {
|
||||
return [self textViewer]; // TODO
|
||||
}
|
||||
|
||||
/* main viewer selection */
|
||||
|
||||
- (WOComponent *)viewerForBodyInfo:(id)_info {
|
||||
NSString *mt, *st;
|
||||
|
||||
mt = [[_info valueForKey:@"type"] lowercaseString];
|
||||
st = [[_info valueForKey:@"subtype"] lowercaseString];
|
||||
|
||||
if ([mt isEqualToString:@"multipart"]) {
|
||||
if ([st isEqualToString:@"mixed"])
|
||||
return [self mixedViewer];
|
||||
if ([st isEqualToString:@"signed"])
|
||||
return [self signedViewer];
|
||||
if ([st isEqualToString:@"alternative"])
|
||||
return [self alternativeViewer];
|
||||
|
||||
if ([st isEqualToString:@"report"])
|
||||
/* this is used by mail-delivery reports */
|
||||
return [self mixedViewer];
|
||||
}
|
||||
else if ([mt isEqualToString:@"text"]) {
|
||||
/*
|
||||
Note: in the _info dictionary we do not get the content-disposition
|
||||
information (inline vs attachment). Our hack is to check for the
|
||||
'name' parameter.
|
||||
*/
|
||||
if ([st isEqualToString:@"plain"] || [st isEqualToString:@"html"]) {
|
||||
if (!showNamedTextAttachmentsInline) {
|
||||
NSString *n;
|
||||
|
||||
n = [[_info objectForKey:@"parameterList"] objectForKey:@"name"];
|
||||
if ([n isNotNull] && [n length] > 0)
|
||||
return [self linkViewer];
|
||||
}
|
||||
|
||||
return [st isEqualToString:@"html"]
|
||||
? [self htmlViewer] : [self textViewer];
|
||||
}
|
||||
|
||||
if ([st isEqualToString:@"calendar"])
|
||||
return [self iCalViewer];
|
||||
}
|
||||
|
||||
if ([mt isEqualToString:@"image"])
|
||||
return [self imageViewer];
|
||||
|
||||
if ([mt isEqualToString:@"message"] && [st isEqualToString:@"rfc822"])
|
||||
return [self messageViewer];
|
||||
|
||||
if ([mt isEqualToString:@"message"] &&
|
||||
[st isEqualToString:@"delivery-status"]) {
|
||||
/*
|
||||
Content-Description: Delivery error report
|
||||
Content-Type: message/delivery-status
|
||||
|
||||
Reporting-MTA: dns; mail.opengroupware.org
|
||||
Arrival-Date: Mon, 18 Jul 2005 12:08:43 +0200 (CEST)
|
||||
|
||||
Final-Recipient: rfc822; ioioi@plop.com
|
||||
Action: failed
|
||||
Status: 5.0.0
|
||||
Diagnostic-Code: X-Postfix; host plop.com[64.39.31.55] said: 550 5.7.1
|
||||
<ioioi@plop.com>... Relaying denied
|
||||
*/
|
||||
// Note: we cannot use the text viewer because the body is not pre-fetched
|
||||
return [self linkViewer];
|
||||
}
|
||||
|
||||
if ([mt isEqualToString:@"application"]) {
|
||||
// octet-stream (generate download link?, autodetect type?)
|
||||
|
||||
if ([st hasPrefix:@"x-vnd.kolab."]) {
|
||||
if ([st isEqualToString:@"x-vnd.kolab.contact"])
|
||||
return [self kolabContactViewer];
|
||||
if ([st isEqualToString:@"x-vnd.kolab.event"])
|
||||
return [self kolabEventViewer];
|
||||
if ([st isEqualToString:@"x-vnd.kolab.task"])
|
||||
return [self kolabTodoViewer];
|
||||
if ([st isEqualToString:@"x-vnd.kolab.note"])
|
||||
return [self kolabNoteViewer];
|
||||
if ([st isEqualToString:@"x-vnd.kolab.journal"])
|
||||
return [self kolabJournalViewer];
|
||||
if ([st isEqualToString:@"x-vnd.kolab.contact.distlist"])
|
||||
return [self kolabDistributionListViewer];
|
||||
|
||||
[self errorWithFormat:@"found no viewer for Kolab type: %@/%@", mt, st];
|
||||
return [self linkViewer];
|
||||
}
|
||||
|
||||
#if 0 /* the link viewer looks better than plain text ;-) */
|
||||
if ([st isEqualToString:@"pgp-signature"]) // TODO: real PGP viewer
|
||||
return [self textViewer];
|
||||
#endif
|
||||
}
|
||||
|
||||
// TODO: always fallback to octet viewer?!
|
||||
#if 1
|
||||
[self errorWithFormat:@"found no viewer for MIME type: %@/%@", mt, st];
|
||||
#endif
|
||||
return [self linkViewer];
|
||||
}
|
||||
|
||||
/* debugging */
|
||||
|
||||
- (BOOL)isDebuggingEnabled {
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end /* UIxMailRenderingContext */
|
||||
|
||||
|
||||
@implementation WOContext(UIxMailPart)
|
||||
|
||||
static NSString *MRK = @"UIxMailRenderingContext";
|
||||
|
||||
- (void)pushMailRenderingContext:(UIxMailRenderingContext *)_mctx {
|
||||
[self setObject:_mctx forKey:MRK];
|
||||
}
|
||||
- (UIxMailRenderingContext *)popMailRenderingContext {
|
||||
UIxMailRenderingContext *mctx;
|
||||
|
||||
if ((mctx = [self objectForKey:MRK]) == nil)
|
||||
return nil;
|
||||
|
||||
mctx = [[mctx retain] autorelease];
|
||||
[self removeObjectForKey:MRK];
|
||||
return mctx;
|
||||
}
|
||||
- (UIxMailRenderingContext *)mailRenderingContext {
|
||||
return [self objectForKey:MRK];
|
||||
}
|
||||
|
||||
@end /* WOContext(UIxMailPart) */
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __Mailer_UIxMailSizeFormatter_H__
|
||||
#define __Mailer_UIxMailSizeFormatter_H__
|
||||
|
||||
#include <Foundation/NSFormatter.h>
|
||||
|
||||
/*
|
||||
UIxMailSizeFormatter
|
||||
|
||||
This class formats the size values for display.
|
||||
*/
|
||||
|
||||
@interface UIxMailSizeFormatter : NSFormatter
|
||||
{
|
||||
}
|
||||
|
||||
+ (id)sharedMailSizeFormatter;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* __Mailer_UIxMailSizeFormatter_H__ */
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
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 "UIxMailSizeFormatter.h"
|
||||
#include "common.h"
|
||||
|
||||
@implementation UIxMailSizeFormatter
|
||||
|
||||
+ (id)sharedMailSizeFormatter {
|
||||
static UIxMailSizeFormatter *fmt = nil; // THREAD
|
||||
if (fmt == nil) fmt = [[self alloc] init];
|
||||
return fmt;
|
||||
}
|
||||
|
||||
/* formatting */
|
||||
|
||||
- (NSString *)stringForSize:(unsigned int)size {
|
||||
char buf[128];
|
||||
|
||||
if (size < 1024)
|
||||
sprintf(buf, "%d", size);
|
||||
else if (size < 1024 * 1024)
|
||||
sprintf(buf, "%.1fK", ((double)size / 1024));
|
||||
else
|
||||
sprintf(buf, "%.1fM", ((double)size / 1024 / 1024));
|
||||
|
||||
return [NSString stringWithCString:buf];
|
||||
}
|
||||
|
||||
- (NSString *)stringForObjectValue:(id)_object {
|
||||
return [self stringForSize:[_object unsignedIntValue]];
|
||||
}
|
||||
|
||||
@end /* UIxMailSizeFormatter */
|
||||
@@ -0,0 +1,6 @@
|
||||
# version file
|
||||
|
||||
SUBMINOR_VERSION:=22
|
||||
|
||||
# v0.9.0 requires libNGiCal v4.5.53
|
||||
# v0.9.1 requires libNGMime v4.5.213
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if LIB_FOUNDATION_LIBRARY
|
||||
# include <Foundation/exceptions/GeneralExceptions.h>
|
||||
#elif NeXT_Foundation_LIBRARY || COCOA_Foundation_LIBRARY
|
||||
# include <NGExtensions/NGObjectMacros.h>
|
||||
# include <NGExtensions/NSString+Ext.h>
|
||||
#endif
|
||||
|
||||
#include <NGExtensions/NGExtensions.h>
|
||||
#include <NGObjWeb/NGObjWeb.h>
|
||||
#include <NGObjWeb/SoObjects.h>
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
requires = ( MAIN, MailerUI );
|
||||
|
||||
publicResources = (
|
||||
);
|
||||
|
||||
factories = {
|
||||
};
|
||||
|
||||
categories = {
|
||||
SOGoCalendarMailBodyPart = {
|
||||
methods = {
|
||||
accept = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailPartICalAction";
|
||||
actionName = "markAccepted";
|
||||
};
|
||||
decline = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailPartICalAction";
|
||||
actionName = "markDeclined";
|
||||
};
|
||||
tentative = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailPartICalAction";
|
||||
actionName = "markTentative";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,482 @@
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Library General Public License, applies to some
|
||||
specially designated Free Software Foundation software, and to any
|
||||
other libraries whose authors decide to use it. You can use it for
|
||||
your libraries, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if
|
||||
you distribute copies of the library, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link a program with the library, you must provide
|
||||
complete object files to the recipients so that they can relink them
|
||||
with the library, after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
Our method of protecting your rights has two steps: (1) copyright
|
||||
the library, and (2) offer you this license which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
Also, for each distributor's protection, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
library. If the library is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original
|
||||
version, so that any problems introduced by others will not reflect on
|
||||
the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that companies distributing free
|
||||
software will individually obtain patent licenses, thus in effect
|
||||
transforming the program into proprietary software. To prevent this,
|
||||
we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License, which was designed for utility programs. This
|
||||
license, the GNU Library General Public License, applies to certain
|
||||
designated libraries. This license is quite different from the ordinary
|
||||
one; be sure to read it in full, and don't assume that anything in it is
|
||||
the same as in the ordinary license.
|
||||
|
||||
The reason we have a separate public license for some libraries is that
|
||||
they blur the distinction we usually make between modifying or adding to a
|
||||
program and simply using it. Linking a program with a library, without
|
||||
changing the library, is in some sense simply using the library, and is
|
||||
analogous to running a utility program or application program. However, in
|
||||
a textual and legal sense, the linked executable is a combined work, a
|
||||
derivative of the original library, and the ordinary General Public License
|
||||
treats it as such.
|
||||
|
||||
Because of this blurred distinction, using the ordinary General
|
||||
Public License for libraries did not effectively promote software
|
||||
sharing, because most developers did not use the libraries. We
|
||||
concluded that weaker conditions might promote sharing better.
|
||||
|
||||
However, unrestricted linking of non-free programs would deprive the
|
||||
users of those programs of all benefit from the free status of the
|
||||
libraries themselves. This Library General Public License is intended to
|
||||
permit developers of non-free programs to use free libraries, while
|
||||
preserving your freedom as a user of such programs to change the free
|
||||
libraries that are incorporated in them. (We have not seen how to achieve
|
||||
this as regards changes in header files, but we have achieved it as regards
|
||||
changes in the actual functions of the Library.) The hope is that this
|
||||
will lead to faster development of free libraries.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, while the latter only
|
||||
works together with the library.
|
||||
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library which
|
||||
contains a notice placed by the copyright holder or other authorized
|
||||
party saying it may be distributed under the terms of this Library
|
||||
General Public License (also called "this License"). Each licensee is
|
||||
addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also compile or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
c) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
d) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the source code distributed need not include anything that is normally
|
||||
distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Library General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
@@ -0,0 +1,4 @@
|
||||
Copyright (C) 2004 SKYRIX Software AG
|
||||
|
||||
|
||||
Contact: info@skyrix.com
|
||||
@@ -0,0 +1,984 @@
|
||||
2005-07-30 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* v0.9.173
|
||||
|
||||
* product.plist: removed tb.view methods (just use 'view' instead)
|
||||
|
||||
2005-07-26 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailTree.m: improved block debugging (v0.9.172)
|
||||
|
||||
2005-07-23 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* v0.9.171
|
||||
|
||||
* UIxMailMainFrame.m: disabled Agenor app banner
|
||||
|
||||
* UIxMailToSelection.m, UIxMailFormatter.m: fixed gcc 4.0 warnings
|
||||
|
||||
2005-07-22 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* v0.9.170
|
||||
|
||||
* UIxMailEditor.m: the mail editor now presets the proper 'from' based
|
||||
on the 'account' query parameter
|
||||
|
||||
* UIxMailEditorAction.m: the compose action now adds the current
|
||||
account as a query parameter when calling the compose panel
|
||||
|
||||
2005-07-22 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* English.lproj/Localizable.strings: added error labels for JavaScript
|
||||
(v0.9.169)
|
||||
|
||||
2005-07-22 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailEditor.m: implemented identity based Sent folders (tied to
|
||||
'from' email address). The old url-attached Sent folder can be
|
||||
enabled using 'SOGoUseLocationBasedSentFolder') (v0.9.168)
|
||||
|
||||
2005-07-21 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailMainFrame.m: fixed banner positioning for 24x24 (v0.9.167)
|
||||
|
||||
* UIxMailMainFrame.m: fixed positioning for 24x24 icons (v0.9.166)
|
||||
|
||||
2005-07-21 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* Toolbars/SOGoDraftObject.toolbar: new Anais css (v0.9.165)
|
||||
|
||||
* UIxMailEditor.m: fetch attachment names and provide initial style
|
||||
information to left/right side of editor component (v0.9.164)
|
||||
|
||||
2005-07-21 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailListView.m: load JavaScript from a file (UIxMailListView.js)
|
||||
instead of embedding it into the page (v0.9.163)
|
||||
|
||||
* UIxMailView.m: do not fetch full message info for 304 existance
|
||||
checks but rather call -doesMailExist (v0.9.162)
|
||||
|
||||
2005-07-20 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* removed 'stop' buttons from toolbars (v0.9.161)
|
||||
|
||||
* v0.9.160
|
||||
|
||||
* Toolbars/SOGoMailFolder.toolbar: added bulk-delete button, removed
|
||||
expunge button
|
||||
|
||||
* UIxMailView.m: added fragile base class check, send a constant etag
|
||||
for the mail viewer, do not deliver content in the defaultAction in
|
||||
case the etag didn't change, added jsonly support to trashAction
|
||||
|
||||
* UIxMailToolbar.m: use -resourceLookupLanguages, use
|
||||
pageResourceManager instead of the toolbar component resourcemanager
|
||||
for evaluating labels
|
||||
|
||||
* product.plist: map getMail on the accounts folder to a noop action
|
||||
(#1491) (v0.9.159)
|
||||
|
||||
* UIxMailMainFrame.m: added UIxMailPanelFrame class for panels opened
|
||||
by the main frame (v0.9.158)
|
||||
|
||||
* UIxMailView.m: show delete button if delete is allowed but trashing
|
||||
isn't (#1444) (v0.9.157)
|
||||
|
||||
* v0.9.156
|
||||
|
||||
* product.plist: moved more complex toolbar configs to own resource
|
||||
files
|
||||
|
||||
* UIxMailToolbar.m: added ability to place toolbars in separate plist
|
||||
files
|
||||
|
||||
2005-07-19 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* v0.9.155
|
||||
|
||||
* UIxMailToSelection.m: externalized JavaScript
|
||||
|
||||
* product.plist: added new JavaScript files as public resources
|
||||
|
||||
2005-07-19 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailEditor.m: do not complain on drafts not being found when the
|
||||
delete action is triggered (#1489) (v0.9.154)
|
||||
|
||||
* UIxMailAccountView.m: directly check the ACL of the Inbox to check
|
||||
permissions (the Inbox will return NO on isCreateAllowed when being
|
||||
used by altnamespace ...) (#1472) (v0.9.153)
|
||||
|
||||
2005-07-19 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxMailAddressbook.m: don't restrict the Anais 'nature' flag anymore
|
||||
(v0.9.152)
|
||||
|
||||
2005-07-19 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* v0.9.151
|
||||
|
||||
* UIxMailAccountView.m: fixed a warning
|
||||
|
||||
* UIxMailEditor.m: removed SOGoInternetDetectQualifier code (reuse
|
||||
shared Internet-detect functionality)
|
||||
|
||||
2005-07-18 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailMainFrame.m: create a proper form action URL which preserves
|
||||
query parameters (sort field) but removes search/filter values
|
||||
(v0.9.150)
|
||||
|
||||
* UIxMailSortableTableHeader.m: improved handling of multivalue form
|
||||
keys (v0.9.149)
|
||||
|
||||
* UIxMailAccountView.m: added method to check whether folder-create
|
||||
button should be visible on the account folder view (checks INBOX for
|
||||
the ACL, does check the alt-namespace default),
|
||||
added method for folder-creation in root (v0.9.148)
|
||||
|
||||
2005-07-18 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* v0.9.147
|
||||
|
||||
* UIxMailToSelection.m: fixed ordering of parameters for the current
|
||||
Anais version
|
||||
|
||||
* UIxMailAddressbook.m: fixed parameters being passed on to Anais for
|
||||
the current Anais version
|
||||
|
||||
2005-07-18 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailListView.m: improved error handling (display a JavaScript
|
||||
alert panel showing the issue instead of SOPE exception rendering)
|
||||
(v0.9.146)
|
||||
|
||||
2005-07-18 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxMailToSelection.m: changed behavior for adding/removing text
|
||||
fields and changing focus (v0.9.145)
|
||||
|
||||
2005-07-18 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* product.plist: properly bind a 'getMail' method to the account
|
||||
folder (fixes #1470) (v0.9.144)
|
||||
|
||||
* UIxSubjectFormatter.m: fixed a stupid bug in subject handling leading
|
||||
to an infinite loop in the QP processing, hardened against QP loops
|
||||
(v0.9.143)
|
||||
|
||||
2005-07-18 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxMailEditor.m: removed -emailForUser usage and replaced with
|
||||
'official' activeUser API (v0.9.142)
|
||||
|
||||
2005-07-15 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* product.plist: only enable folder add/remove buttons when the user
|
||||
has the 'c' permission on the IMAP folder (#1456) (v0.9.141)
|
||||
|
||||
2005-07-14 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailAccountView.m: removed methods to detect whether the
|
||||
clientObject is a shared account (done by the clientObject itself)
|
||||
(v0.9.140)
|
||||
|
||||
2005-07-12 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailEditor.m: perform some validation plus error handling prior
|
||||
trying to send a mail (check whether we have recipients, check
|
||||
whether the subject is set) (#1451) (v0.9.139)
|
||||
|
||||
* UIxMailEditor.m: properly determine from-email addresses (v0.9.138)
|
||||
|
||||
* UIxMailEditor.m: use new SoUser API instead of AgenorUserManager
|
||||
(v0.9.137)
|
||||
|
||||
2005-07-11 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailMainFrame.m: generate proper URLs for jumping to Calendar,
|
||||
HomePage etc (#1448) (v0.9.136)
|
||||
|
||||
2005-07-08 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailEditor.m: added from-selection popup, list discovery via
|
||||
AgenorUserManager (aka LDAP) (v0.9.135)
|
||||
|
||||
2005-07-08 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailEditor.m: use WOContext method from libSOGo to detect
|
||||
Internet access (v0.9.134)
|
||||
|
||||
2005-07-08 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailMainFrame.m: added help button and extra space for that in the
|
||||
toolbar (v0.9.133)
|
||||
|
||||
2005-07-08 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailMainFrame.m: added "link" banner to jump to the other SOGo
|
||||
tools, disable the banner in case the tree is disabled (since that
|
||||
hints that a new window without the frame is being used, eg the
|
||||
compose panel), added some more CSS classes instead of inline style
|
||||
declarations (v0.9.132)
|
||||
|
||||
2005-07-08 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* prepared ACL editors (v0.9.131)
|
||||
|
||||
2005-07-07 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* v0.9.130
|
||||
|
||||
* UIxMailListView.m: implemented empty-trash action
|
||||
|
||||
* product.plist: added a reduced toolbar when being on the trash folder
|
||||
(no reply/fwd etc, but added an empty trash button)
|
||||
|
||||
2005-07-07 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* v0.9.129
|
||||
|
||||
* UIxMailAccountView.m: added code to better display shared accounts
|
||||
|
||||
* UIxMailTree.m: moved IMAP4 connection string => label code to a
|
||||
NSString category
|
||||
|
||||
2005-07-07 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailTree.m: properly display share names in account list (show
|
||||
name of share instead of the cut-off account login). Added some
|
||||
improved heuristics to determine a viably short name (v0.9.128)
|
||||
|
||||
2005-07-07 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailView.m, product.plist: added -trash button and action
|
||||
(v0.9.127)
|
||||
|
||||
2005-07-06 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* product.plist: hide expunge button on mail folder when deleting is
|
||||
disallowed (v0.9.126)
|
||||
|
||||
2005-07-06 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* v0.9.125
|
||||
|
||||
* UIxMailToolbar.m: added ability to disable toolbar buttons in case an
|
||||
operation is not allowed (eg an object got deleted)
|
||||
|
||||
* product.plist: added 'isSafe=NO' markers to unsafe HTTP methods in
|
||||
toolbar, added 'enabled' binding for 'delete' button
|
||||
|
||||
* v0.9.124
|
||||
|
||||
* UIxMailView.m: improved error handling in case the delete flag could
|
||||
not be set
|
||||
|
||||
* UIxMailMainFrame.m: added -hasErrorText / -errorText /
|
||||
-errorAlertJavaScript methods to deal with errors encoded in the
|
||||
'error' form parameter
|
||||
|
||||
2005-03-24 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* v0.9.123
|
||||
|
||||
* UIxMailListView.m: added create/delete folder operations
|
||||
|
||||
* product.plist: added folder-add/delete buttons in toolbar
|
||||
|
||||
2005-03-23 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* renamed "default.strings" to "Localizable.strings" (v0.9.122)
|
||||
|
||||
2005-02-23 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* mailer.js: split into multiple files (v0.9.121)
|
||||
|
||||
2005-02-22 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailMainFrame.m: added ability not to generate the HTML frame
|
||||
(v0.9.120)
|
||||
|
||||
2005-02-20 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* moved UIxMailSizeFormatter to MailPartViewers (v0.9.119)
|
||||
|
||||
2005-02-18 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* mailer.js: added HTML escape/unescape functions (v0.9.118)
|
||||
|
||||
* moved mail part viewers to own product (MailPartViewers) (v0.9.117)
|
||||
|
||||
2005-02-17 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailSortableTableHeader.m: properly inherit from SoComponent, so
|
||||
that resource lookup works (v0.9.116)
|
||||
|
||||
2005-02-16 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* added automatic search field posting (v0.9.115)
|
||||
|
||||
* mailer.js: fixed a row highlighting bug (v0.9.114)
|
||||
|
||||
* product.plist: fixed compose button in mail viewer (v0.9.113)
|
||||
|
||||
2005-02-15 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailListView.wox: added a pointer cursor for rows and enabled an
|
||||
on-click message opener on some cells (v0.9.112)
|
||||
|
||||
* UIxMailListView.wox: added message row highlighting (v0.9.111)
|
||||
|
||||
* UIxMailAccountView.wox, UIxMailAccountsView.wox: added a title-div
|
||||
to fix layout (v0.9.110)
|
||||
|
||||
2005-02-14 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* 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
|
||||
|
||||
* UIxMailTree.m: use Inbox icon for SOGoMailAccount and
|
||||
SOGoMailAccounts folders, added ability to specify a
|
||||
'treeFolderAction' (relative URL to be triggered by clicks)
|
||||
|
||||
* v0.9.106
|
||||
|
||||
* UIxMailFilterPanel.wox: improved CSS styling of the search field
|
||||
|
||||
* UIxMailTree.wox: fixed display of special mail icons if a folder
|
||||
has subfolders and is open (in short: the 'cornerIcon' binding is
|
||||
properly set)
|
||||
|
||||
* v0.9.105
|
||||
|
||||
* UIxMailTree.m: fixed handling of root nodes (properly display all
|
||||
children of the root node)
|
||||
|
||||
* UIxMailTreeBlock.m: generate a description
|
||||
|
||||
* UIxMailMainFrame.m, UIxMailTree.m: made root class of tree
|
||||
configurable using 'SOGoMailTreeRootClass' default
|
||||
|
||||
2005-02-13 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* mailer.css: added left-padding to treecell to make it look better
|
||||
(v0.9.104)
|
||||
|
||||
* UIxMailListView.wox: added mark read/unread without page refresh
|
||||
using XMLHttpRequest (v0.9.103)
|
||||
|
||||
* product.plist, UIxMailListView.wox, mailer.js: added bulk
|
||||
reply/replyall/forward (v0.9.102)
|
||||
|
||||
2005-02-12 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailMainFrame.m: fixed page form processing if the active URL
|
||||
does not specify a method name (ends with /) (v0.9.101)
|
||||
|
||||
* v0.9.100
|
||||
|
||||
* added support for filter popup (OGo bug #1210)
|
||||
|
||||
* UIxMailListView: moved filter selection to an own component
|
||||
|
||||
* v0.9.99
|
||||
|
||||
* product.plist: also map index method of mail folder to
|
||||
UIxMailListView
|
||||
|
||||
* UIxMailListView.m: added subject/sender searching (OGo bug #1209)
|
||||
|
||||
2005-02-10 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailPartLinkViewer.wox, UIxMailPartMessageViewer.wox: added
|
||||
missing 'label' namespace declaration (v0.9.98)
|
||||
|
||||
2005-02-09 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailReplyAction.m: implemented a content-reply (v0.9.97)
|
||||
|
||||
2005-02-08 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* v0.9.96
|
||||
|
||||
* UIxMailPartMessageViewer.m: fixed for multivalue from fields
|
||||
|
||||
* UIxMailEditorAction.m, product.plist: split editor action in multiple
|
||||
classes
|
||||
|
||||
* v0.9.95
|
||||
|
||||
* product.plist: do not use clickedEditorDelete() JS function for
|
||||
draft delete but just call the link
|
||||
|
||||
* UIxMailEditor.m: a successful draft delete now returns the window
|
||||
closer and refreshes the opener
|
||||
|
||||
* mailer.js now reloads the opener for editor-save and editor-delete
|
||||
functions (does not properly work since the form load is async)
|
||||
|
||||
* UIxMailEditorAction.m, product.plist: implemented simple
|
||||
reply/reply-all processing (subject and recipient handling is in
|
||||
place, content quoting is pending)
|
||||
|
||||
* v0.9.94
|
||||
|
||||
* UIxMailListView.m: properly show "to" address in tableview for
|
||||
Sent folder
|
||||
|
||||
* UIxMailView.m: fixed for new 'from' API
|
||||
|
||||
* v0.9.93
|
||||
|
||||
* mailer.js: work on the read-mail marking code, properly change the
|
||||
icon div
|
||||
|
||||
* UIxMailListView.m: changed handling of unread mail flags
|
||||
|
||||
* UIxMailView.wox: use the new markMailReadInWindow function to mark
|
||||
a mail read in the mail list
|
||||
|
||||
2005-02-07 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* v0.9.92
|
||||
|
||||
* UIxMailView.m: properly refresh mail list after a mail got deleted
|
||||
|
||||
* UIxMailWindowCloser.m: added ability to refresh the opener window
|
||||
prior closing the panel
|
||||
|
||||
* UIxMailView.wox: triggers opener callback to mark a mail as read
|
||||
|
||||
* mailer.js: added refreshOpener() function which refreshes the
|
||||
panel that opened the current window, added triggerOpenerCallback()
|
||||
function which triggers a URL given in the "openerurl" query
|
||||
parameter on the opener window
|
||||
|
||||
* UIxMailEditor.m: disabled Internet warning in the mail editor per
|
||||
default, can be enabled using the 'SOGoShowInternetMarker' default,
|
||||
made Internet header detection qualifier configurable, see README
|
||||
(SOGoInternetDetectQualifier string default), when the request is
|
||||
from the Internet, add headers as specified in the
|
||||
'SOGoInternetMailHeaders' dictionary default (v0.9.91)
|
||||
|
||||
* UIxMailTree.m: added support for special folder icons (v0.9.90)
|
||||
|
||||
* v0.9.89
|
||||
|
||||
* UIxMailTree.m: made special folder names localizable
|
||||
|
||||
* English.lproj/default.strings: added some folder translations
|
||||
|
||||
2005-02-06 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* v0.9.88
|
||||
|
||||
* UIxMailTree.m: some code cleanups, does not use -fetchSubfolders of
|
||||
SOGoObject anymore (to be useful for any object)
|
||||
|
||||
* UIxMailMainFrame.wox: made "Folders" title localizable
|
||||
|
||||
* UIxMailListView.wox: removed some superflous section
|
||||
|
||||
2005-01-31 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailView.m: implemented 'expunge' action (delete button in the
|
||||
toolbar) (v0.9.87)
|
||||
|
||||
* UIxMailView.m, UIxMailRenderingContext.m: moved more bulk fetching
|
||||
to SoObject (v0.9.86)
|
||||
|
||||
* UIxMailView.m: moved plain/text bulkfetch method to SoObjects/Mailer,
|
||||
since its general purpose (v0.9.85)
|
||||
|
||||
* v0.9.84
|
||||
|
||||
* UIxMailView.m: properly recurse into message/rfc822 bodies for flat
|
||||
content fetches
|
||||
|
||||
* UIxMailView.m, UIxMailPartMessageViewer.m: added links for email
|
||||
addresses (currently mailto://)
|
||||
|
||||
2005-01-30 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* v0.9.83
|
||||
|
||||
* UIxMailRenderingContext.m: activate UIxMailPartMessageViewer for
|
||||
message/rfc822 contents
|
||||
|
||||
* added a UIxMailPartMessageViewer for displaying embedded (eg
|
||||
forwarded) MIME messages
|
||||
|
||||
* v0.9.82
|
||||
|
||||
* UIxMailPartLinkViewer.m: prefix filenames which start with a digit,
|
||||
properly escape attachment names
|
||||
|
||||
* UIxMailPartImageViewer.m (UIxMailPartViewer): append image extension
|
||||
to attachments
|
||||
|
||||
* v0.9.81
|
||||
|
||||
* UIxSieveEditor.m: call proper save method in Sieve SoObject
|
||||
|
||||
* UIxMailEditor.m: added 'SOGoMailEditorKeepTmpFile' default to debug
|
||||
MIME generation
|
||||
|
||||
* v0.9.80
|
||||
|
||||
* UIxMailEditorAction.m: work on forwarding and reply
|
||||
|
||||
* UIxFilterList.wox, UIxMailAccountView.wox, UIxMailAccountsView.wox,
|
||||
UIxSieveEditor.wox: fixed title (needs localization)
|
||||
|
||||
* UIxMailMainFrame.m: always generate title as given by the parent
|
||||
component (titles need to get fixed!), was fixed to OpenGroupware.org
|
||||
before unless in debug mode
|
||||
|
||||
* UIxMailEditor.m: use new storeInfo API, generate a proper panelTitle
|
||||
(needs localization)
|
||||
|
||||
* UIxMailEditorAttach.m: use new attachment API
|
||||
|
||||
* UIxMailView.wox: remoted link to screenshot, use mail subject as
|
||||
title
|
||||
|
||||
* UIxMailListView.m: disabled a log
|
||||
|
||||
2005-01-28 Helge Hess <helge.hess@skyrix.com>
|
||||
|
||||
* v0.9.79
|
||||
|
||||
* UIxMailEditor.wox: localized 'Subject' label, shows 'non-intranet'
|
||||
marker if 'MinequProvenance' HTTP header is not set to 'intranet'
|
||||
|
||||
* mailer.css: added marker for internet-mails (#1153)
|
||||
|
||||
* v0.9.78
|
||||
|
||||
* UIxMailListView.m: properly mark deleted mails using line-through
|
||||
|
||||
* UIxMailView.m: close mail viewer if mail delete was successful
|
||||
|
||||
* mailer.css: added style classes for deleted cells
|
||||
|
||||
* UIxMailEditor.m: moved some Sent folder lookup to SOGoMailAccount
|
||||
|
||||
* v0.9.77
|
||||
|
||||
* added UIxMailSizeFormatter to render big file size numbers with some
|
||||
M or K suffix
|
||||
|
||||
* UIxMailPartViewer.m: added methods to retrieve filename, file
|
||||
extension and file size formatter
|
||||
|
||||
* UIxMailSortableTableHeader.m: minor code cleanups
|
||||
|
||||
2005-01-27 Helge Hess <helge.hess@skyrix.com>
|
||||
|
||||
* started attachment (download) viewer (#1074) (v0.9.76)
|
||||
|
||||
2005-01-26 Helge Hess <helge.hess@skyrix.com>
|
||||
|
||||
* v0.9.75
|
||||
|
||||
* UIxMailEditor.m: copy sent mails to INBOX/Sent folder, fixes issue
|
||||
#1054
|
||||
|
||||
* product.plist: disabled unsupported delete button in mailviewer
|
||||
|
||||
* UIxMailListView.wox: removed unused mail checkboxes and folder-tree
|
||||
popup (#1211) (v0.9.74)
|
||||
|
||||
* disabled some unsupported buttons and template elements (#1209,
|
||||
#1210, #1207, #1208) (v0.9.73)
|
||||
|
||||
2005-01-26 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* v0.9.72
|
||||
|
||||
* UIxMailWindowCloser.{m,wox}: new component which closes the window
|
||||
in its "onLoad".
|
||||
|
||||
* UIxMailEditor.m: close window after successful send by opening
|
||||
UIxMailWindowCloser. This fixes SOGo Bug #1053.
|
||||
|
||||
2005-01-07 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* {English/French}.lproj/default.strings: changed encoding from
|
||||
ISO-Latin-1 to UTF-8, which is now the default (v0.9.71)
|
||||
|
||||
2004-12-08 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxMailTree.m, UIxMailEditor.m, UIxMailPartViewer.m,
|
||||
UIxEnvelopeAddressFormatter.m, UIxMailToolbar.m,
|
||||
UIxMailRenderingContext.m, UIxMailEditorAttach.m,
|
||||
UIxSubjectFormatter.m, UIxMailPartAlternativeViewer.m:
|
||||
changed to use NGLogging (v0.9.70)
|
||||
|
||||
2004-12-03 Helge Hess <helge.hess@skyrix.com>
|
||||
|
||||
* v0.9.69
|
||||
|
||||
* UIxFilterList.m: added support for script creation
|
||||
|
||||
* v0.9.68
|
||||
|
||||
* UIxFilterList.m: added ability to trigger new editor
|
||||
|
||||
* started UIxSieveEditor
|
||||
|
||||
* UIxFilterList.wox: minor fix to table layout (v0.9.67)
|
||||
|
||||
2004-11-28 Helge Hess <helge.hess@skyrix.com>
|
||||
|
||||
* UIxFilterList.m: use toOneRelationshipKeys to retrieve the filters
|
||||
being displayed (v0.9.66)
|
||||
|
||||
2004-11-27 Helge Hess <helge.hess@skyrix.com>
|
||||
|
||||
* 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)
|
||||
|
||||
2004-11-15 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxMailEditor.m: properly set "From" header (v0.9.63)
|
||||
|
||||
2004-11-11 Helge Hess <helge.hess@skyrix.com>
|
||||
|
||||
* UIxMailListView.wox: added sample move popup (v0.9.62)
|
||||
|
||||
2004-11-09 Helge Hess <helge.hess@skyrix.com>
|
||||
|
||||
* UIxMailListView.m: added support for toggling read/unread flags
|
||||
(v0.9.61)
|
||||
|
||||
* UIxMailTree.m: added tree navigation code from SoObjects (v0.9.60)
|
||||
|
||||
* UIxMailTree.m: removed unused code (v0.9.59)
|
||||
|
||||
* UIxMailListView.m: flush mail caches in the getMail action (v0.9.58)
|
||||
|
||||
2004-10-29 Helge Hess <helge.hess@skyrix.com>
|
||||
|
||||
* UIxMailEditor.m: reenabled deletion of temporary mail files (v0.9.57)
|
||||
|
||||
2004-10-28 Helge Hess <helge.hess@skyrix.com>
|
||||
|
||||
* product.plist: fixed getMail for drafts folder (v0.9.56)
|
||||
|
||||
* UIxMailListView.wox: fixed viewer activation for unread mails
|
||||
(v0.9.55)
|
||||
|
||||
2004-10-28 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailMoveToPopUp.m: fixed header (v0.9.54)
|
||||
|
||||
2004-10-27 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* disabled popup until it uses the proper tree (v0.9.53)
|
||||
|
||||
2004-10-27 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxMailMoveToPopUp.[m|wox]: component which renders a popup
|
||||
containing possible destinations for a mail move operation (v0.9.52)
|
||||
|
||||
2004-10-27 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailEditor.m: default method returns a redirect to 'edit', added
|
||||
'delete' action and button (v0.9.51)
|
||||
|
||||
* v0.9.50
|
||||
|
||||
* UIxMailEditor.m: send mail using draft object
|
||||
|
||||
* UIxMailListView.wox: do not wrap title line
|
||||
|
||||
* UIxMailEditor.m: added send related code (v0.9.49)
|
||||
|
||||
2004-10-26 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailEditorAttach.m: added attachment delete (v0.9.48)
|
||||
|
||||
* UIxMailEditorAttach.wox, mailer.css: work on layout, added delete
|
||||
action (v0.9.47)
|
||||
|
||||
* added new UIxMailEditorAttach component to manage draft attachments
|
||||
(v0.9.46)
|
||||
|
||||
2004-10-25 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* v0.9.45
|
||||
|
||||
* uix.css: replaced invalid "text-color" with "color"
|
||||
|
||||
* UIxMailEditor.wox: bind subject/text, can load/save info object in
|
||||
draft
|
||||
|
||||
2004-10-22 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* v0.9.44
|
||||
|
||||
* UIxMailSortableTableHeader.[wox|m]: new component for doing sorting
|
||||
|
||||
* UIxMailListView.wox: uses UIxMailSortableTableHeader for sorting
|
||||
|
||||
* UIxMailListView.wox: bugfixes (v0.9.43)
|
||||
|
||||
* v0.9.42
|
||||
|
||||
* UIxMailListView.wox: sorting, proper handling of sort keys.
|
||||
NOTE: there's still an unidentified bug of sort keys failing to be
|
||||
retained on successive paging.
|
||||
|
||||
* UIxMailListView.m: sorting
|
||||
|
||||
* Images/title_*: corrected alpha values
|
||||
|
||||
2004-10-20 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* v0.9.41
|
||||
|
||||
* UIxMailListView.wox: localized labels and added some JavaScript
|
||||
templates for doing nifty row selection
|
||||
|
||||
* UIxMailListView.m: added JavaScript method (stub only)
|
||||
|
||||
* English.lproj/default.strings: new localized strings
|
||||
|
||||
2004-10-13 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* v0.9.40
|
||||
|
||||
* product.plist: exported some missing icons
|
||||
|
||||
* UIxMailToSelection.m: some code cleanup
|
||||
|
||||
* UIxMailEditor.m (UIxComponent): added ivars for values
|
||||
|
||||
2004-10-13 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxMailToSelection.m: sanitize CN's a bit before using them (v0.9.39)
|
||||
|
||||
* v0.9.38
|
||||
|
||||
* UIxMailToSelection.[wox|m]: removed superfluous debug messages
|
||||
|
||||
* UIxMailAdressbook.[wox|m]: redirect cover for Addressbook and Anais
|
||||
|
||||
* mailer.js: new JavaScript to open Addressbook and Anais windows
|
||||
|
||||
* product.plist: added Addressbook/Anais entries
|
||||
|
||||
2004-10-12 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* v0.9.37
|
||||
|
||||
* UIxMailToSelection.[wox|m]: stable version with heavily improved
|
||||
JavaScript code.
|
||||
|
||||
* English.lproj/default.strings: new localizable strings
|
||||
|
||||
2004-10-12 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailEditor.m: enabled -takeValuesFromRequest: (v0.9.36)
|
||||
|
||||
2004-10-12 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* UIxMailToSelection.[m|wox]: parse given arguments and conditionally
|
||||
split lists. Dynamically create tables and JavaScript. (v0.9.35)
|
||||
|
||||
* UIxMailToSelection.wox: minor update (v0.9.34)
|
||||
|
||||
* v0.9.33
|
||||
|
||||
* UIxMailToSelection.[wox|m]: updated
|
||||
|
||||
* English.lproj/default.strings: new localizable strings
|
||||
|
||||
* v0.9.32
|
||||
|
||||
* UIxMailEditor.wox: changed API for UIxMailToSelection
|
||||
|
||||
* UIxMailToSelection.[wox|m]: new component template
|
||||
|
||||
* English.lproj/default.strings: new localizable strings
|
||||
|
||||
* README: updated
|
||||
|
||||
2004-10-12 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* v0.9.31
|
||||
|
||||
* mailer.js: prepared JavaScript functions for editor
|
||||
|
||||
* UIxMailMainFrame.wox: embed all content in a form called 'pageform'
|
||||
|
||||
2004-10-11 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* v0.9.30
|
||||
|
||||
* UIxMailEditor.wox: moved recipient selection to an own component
|
||||
(UIxMailToSelection)
|
||||
|
||||
* UIxMailMainFrame.wox: fixed script link
|
||||
|
||||
* v0.9.29
|
||||
|
||||
* product.plist: trigger UIxMailEditorAction for compose instead of
|
||||
returning the mail editor page, mapped missing toolbar actions
|
||||
|
||||
* UIxMailEditorAction.m: implemented -compose as a redirect to a new
|
||||
object in the account draft folder
|
||||
|
||||
* UIxMailListView.wox: reduced subject width to 50%
|
||||
|
||||
* mailer.css: added send icon class, icon itself still missing
|
||||
|
||||
* started UIxMailEditorAction object which will contain all the
|
||||
redirects from the buttons to the mail editor (working on draft
|
||||
objects in the drafts folder) (v0.9.28)
|
||||
|
||||
2004-10-10 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* product.plist: added some configuration for the drafts folder
|
||||
(v0.9.27)
|
||||
|
||||
2004-10-06 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* UIxMailListView.m: added support for paper clip icon when messages
|
||||
are bigger than a certain size (v0.9.26)
|
||||
|
||||
2004-10-05 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* v0.9.25
|
||||
|
||||
* UIxMailListView.m: added sort icons
|
||||
|
||||
* UIxMailEditor.m: more work on editor
|
||||
|
||||
* mailer.css: added compose div classes
|
||||
|
||||
* UIxMailListView: removed href for JavaScript onclick links (v0.9.24)
|
||||
|
||||
* v0.9.23
|
||||
|
||||
* product.plist: fixed addressbook label
|
||||
|
||||
* UIxMailToolbar: added support for 'onclick' event handlers
|
||||
|
||||
* UIxMailEditor: started editor
|
||||
|
||||
* UIxMailListView.m: added sorting to table view
|
||||
|
||||
* v0.9.22
|
||||
|
||||
* UIxMailToolbar.wox: added support for 'target' links
|
||||
|
||||
* UIxMailEditor.wox: use standard mail frame
|
||||
|
||||
* v0.9.21
|
||||
|
||||
* UIxMailTree: made toolbar configurable using 'toolbar' slot on the
|
||||
clientObject
|
||||
|
||||
* product.plist: added toolbar configurations
|
||||
|
||||
* UIxMailMainFrame.wox: moved toolbar to own component
|
||||
|
||||
* UIxMailListView: added simple navigation (v0.9.20)
|
||||
|
||||
* v0.9.19
|
||||
|
||||
* UIxMailPartViewer.m: added content decoding for QP, base64 and 7bit,
|
||||
added proper charset decoding
|
||||
|
||||
* UIxMailPartTextViewer.m: moved content => NSString conversion to
|
||||
UIxMailPartViewer.m
|
||||
|
||||
* v0.9.18
|
||||
|
||||
* UIxMailPartViewer.m: added support methods for caches, added -sleep
|
||||
method
|
||||
|
||||
* added multipart/alternative viewer
|
||||
|
||||
* added Thunderbird message read/unread icons
|
||||
|
||||
2004-10-04 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* fixed fetching of mails with only text content (v0.9.17)
|
||||
|
||||
* added flat body fetches, used in text viewer (v0.9.16)
|
||||
|
||||
* added MIME content viewer infrastructure (v0.9.15)
|
||||
|
||||
* UIxMailView.m: added 'currentAddress' accessors (v0.9.14)
|
||||
|
||||
* UIxMailView.m: use core infos stored in message SoObject for display
|
||||
(v0.9.13)
|
||||
|
||||
2004-10-03 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* v0.9.12
|
||||
|
||||
* UIxMailListView.m: fetch size for list
|
||||
|
||||
* UIxMailView.m: cache fetched message for transaction, fetch body
|
||||
structure
|
||||
|
||||
* work on viewer (v0.9.11)
|
||||
|
||||
* UIxMailMainFrame.wox: made toolbar floating (v0.9.10)
|
||||
|
||||
2004-10-02 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* more work on UI (v0.9.9)
|
||||
|
||||
* added formatters for mail list (v0.9.8)
|
||||
|
||||
* v0.9.7
|
||||
|
||||
* show messages in an IMAP4 folder
|
||||
|
||||
* mailer.css: remote calendar CSS not required in mailer
|
||||
|
||||
2004-09-29 Helge Hess <helge.hess@opengroupware.org>
|
||||
|
||||
* added toolbar images (v0.9.6)
|
||||
|
||||
* UIxMailTree.m: use new tree navigation methods in SoObjects (v0.9.5)
|
||||
|
||||
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)
|
||||
|
||||
2004-09-20 Helge Hess <helge.hess@skyrix.com>
|
||||
|
||||
* work on mailer (v0.9.2)
|
||||
|
||||
2004-09-01 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* GNUmakefile.preamble: fixed for gsmake 1.9.2 build (v0.9.1)
|
||||
|
||||
2004-08-26 Marcus Mueller <znek@mulle-kybernetik.com>
|
||||
|
||||
* ChangeLog: created
|
||||
@@ -0,0 +1,95 @@
|
||||
/* this file is in UTF-8 format! */
|
||||
|
||||
/* Icon's label */
|
||||
"Create" = "Create";
|
||||
"Empty Trash" = "Empty Trash";
|
||||
"Delete" = "Delete";
|
||||
"Expunge" = "Expunge";
|
||||
"Forward" = "Forward";
|
||||
"Get Mail" = "Get Mail";
|
||||
"Junk" = "Junk";
|
||||
"Reply" = "Reply";
|
||||
"Reply All" = "Reply All";
|
||||
"Print" = "Print";
|
||||
"Stop" = "Stop";
|
||||
"Write" = "Write";
|
||||
|
||||
/* Main Frame */
|
||||
|
||||
"Home" = "Home";
|
||||
"Calendar" = "Calendar";
|
||||
"Addressbook" = "Addressbook";
|
||||
"Mail" = "Mail";
|
||||
"Right Administration" = "Right Administration";
|
||||
|
||||
"Help" = "Help";
|
||||
|
||||
/* Mail account main windows */
|
||||
|
||||
"Welcome to the SOGo Mailer. Use the folder tree on the left to browse your mail accounts!" = "Welcome to the SOGo Mailer. Use the folder tree on the left to browse your mail accounts!";
|
||||
|
||||
"Read messages" = "Read messages";
|
||||
"Write a new message" = "Write a new message";
|
||||
|
||||
"Share: " = "Share: ";
|
||||
"Account: " = "Account: ";
|
||||
"Shared Account: " = "Shared Account: ";
|
||||
|
||||
/* Mail edition */
|
||||
|
||||
"From" = "From";
|
||||
"Subject" = "Subject";
|
||||
"Add address" = "Add address";
|
||||
|
||||
"to" = "To";
|
||||
"cc" = "Cc";
|
||||
"bcc" = "Bcc";
|
||||
|
||||
"Addressbook" = "Addressbook";
|
||||
"Anais" = "Anais";
|
||||
|
||||
"This mail is being sent from an unsecure network!" = "This mail is being sent from an unsecure network!";
|
||||
|
||||
/* Popup "show" */
|
||||
|
||||
"all" = "all";
|
||||
"read" = "read";
|
||||
"unread" = "unread";
|
||||
"deleted" = "deleted";
|
||||
"flagged" = "flagged";
|
||||
|
||||
/* MailListView */
|
||||
|
||||
"Subject or Sender contains" = "Subject or Sender contains";
|
||||
"Date" = "Date";
|
||||
"View" = "View";
|
||||
"All" = "All";
|
||||
"Unread" = "Unread";
|
||||
"messages" = "messages";
|
||||
|
||||
"first" = "first";
|
||||
"previous" = "prev";
|
||||
"next" = "next";
|
||||
|
||||
"msgnumber_to" = "to";
|
||||
"msgnumber_of" = "of";
|
||||
|
||||
"Mark Unread" = "Mark Unread";
|
||||
"Mark Read" = "Mark Read";
|
||||
|
||||
/* Tree */
|
||||
|
||||
"SentFolderName" = "Sent";
|
||||
"TrashFolderName" = "Trash";
|
||||
"InboxFolderName" = "Inbox";
|
||||
"DraftsFolderName" = "Drafts";
|
||||
"SieveFolderName" = "Filters";
|
||||
"Folders" = "Folders"; /* title line */
|
||||
|
||||
/* MailMoveToPopUp */
|
||||
|
||||
"MoveTo" = "Move …";
|
||||
|
||||
"error_missingsubject" = "Missing Subject";
|
||||
"error_missingrecipients" = "Missing Recipients";
|
||||
"error_validationfailed" = "Validation failed";
|
||||
@@ -0,0 +1,90 @@
|
||||
/* this file is in UTF-8 format! */
|
||||
|
||||
/* Icon's label */
|
||||
|
||||
"Create" = "Créer";
|
||||
"Empty Trash" = "Vider la corbeille";
|
||||
"Delete" = "Supprimer";
|
||||
"Expunge" = "Purger";
|
||||
"Forward" = "Transférer";
|
||||
"Get Mail" = "Relever";
|
||||
"Junk" = "Indésirable";
|
||||
"Reply" = "Répondre";
|
||||
"Reply All" = "Répo. à tous";
|
||||
"Print" = "Imprimer";
|
||||
"Stop" = "Stop";
|
||||
"Write" = "Écrire";
|
||||
|
||||
/* Main Frame */
|
||||
|
||||
"Home" = "Accueil";
|
||||
"Calendar" = "Agenda";
|
||||
"Addressbook" = "Carnet d'adresses";
|
||||
"Mail" = "Mail";
|
||||
"Right Administration" = "Administration";
|
||||
"Help" = "Aide";
|
||||
|
||||
/* Mail account main windows */
|
||||
|
||||
"Welcome to the SOGo Mailer. Use the folder tree on the left to browse your mail accounts!" = "Bienvenue dans votre webmail. Utilisez l'arborescence sur votre gauche pour parcourir vos boites mails.";
|
||||
|
||||
"Read messages" = "Lire les messages";
|
||||
"Write a new message" = "Écrire un nouveau message";
|
||||
|
||||
"Share: " = "Partage : ";
|
||||
"Account: " = "Compte : ";
|
||||
"Shared Account: " = "Compte Partagé ";
|
||||
|
||||
/* Mail edition */
|
||||
|
||||
"From" = "De";
|
||||
"Subject" = "Sujet";
|
||||
"Add address" = "Ajouter Adresse";
|
||||
|
||||
"to" = "À";
|
||||
"cc" = "Cc";
|
||||
"bcc" = "Cci";
|
||||
|
||||
"Anais" = "Anaïs";
|
||||
|
||||
"This mail is being sent from an unsecure network!" = "Ce mail est envoyé depuis un réseau non sécurisé !";
|
||||
|
||||
/* Popup "show" */
|
||||
|
||||
"all" = "Tous";
|
||||
"read" = "Lus";
|
||||
"unread" = "Non Lus";
|
||||
"deleted" = "Éffacés";
|
||||
"flagged" = "Drapeau";
|
||||
|
||||
/* MailListView */
|
||||
|
||||
"Subject or Sender contains" = "Sujet ou Expéditeur contient ";
|
||||
"Date" = "Date";
|
||||
"View" = "Voir";
|
||||
"All" = "Tous";
|
||||
"Unread" = "Non lus";
|
||||
"messages" = "message(s)";
|
||||
|
||||
"first" = "Premier";
|
||||
"previous" = "précédent";
|
||||
"next" = "suivant";
|
||||
|
||||
"Mark Unread" = "Marqué comme non lu";
|
||||
"Mark Read" = "Marqué comme lu";
|
||||
|
||||
"msgnumber_to" = "à";
|
||||
"msgnumber_of" = "de";
|
||||
|
||||
/* Tree */
|
||||
|
||||
"SentFolderName" = "Éléments envoyés";
|
||||
"TrashFolderName" = "Corbeille";
|
||||
"InboxFolderName" = "Boite de Réception";
|
||||
"DraftsFolderName" = "Brouillons";
|
||||
"SieveFolderName" = "Filtres";
|
||||
"Folders" = "Répertoires";
|
||||
|
||||
/* MailMoveToPopUp */
|
||||
|
||||
"MoveTo" = "Déplacer vers";
|
||||
@@ -0,0 +1,59 @@
|
||||
# GNUstep makefile
|
||||
|
||||
include ../common.make
|
||||
|
||||
BUNDLE_NAME = MailerUI
|
||||
|
||||
MailerUI_PRINCIPAL_CLASS = MailerUIProduct
|
||||
|
||||
MailerUI_LANGUAGES = English French
|
||||
|
||||
MailerUI_OBJC_FILES += \
|
||||
MailerUIProduct.m \
|
||||
\
|
||||
UIxMailFormatter.m \
|
||||
UIxSubjectFormatter.m \
|
||||
UIxEnvelopeAddressFormatter.m \
|
||||
WOContext+UIxMailer.m \
|
||||
\
|
||||
UIxMailMainFrame.m \
|
||||
UIxMailTree.m \
|
||||
UIxMailTreeBlock.m \
|
||||
UIxMailToolbar.m \
|
||||
\
|
||||
UIxMailAccountsView.m \
|
||||
UIxMailAccountView.m \
|
||||
UIxMailListView.m \
|
||||
UIxMailView.m \
|
||||
UIxMailSortableTableHeader.m \
|
||||
UIxMailMoveToPopUp.m \
|
||||
UIxMailFilterPanel.m \
|
||||
\
|
||||
UIxMailEditor.m \
|
||||
UIxMailEditorAttach.m \
|
||||
UIxMailEditorAction.m \
|
||||
UIxMailReplyAction.m \
|
||||
UIxMailForwardAction.m \
|
||||
UIxMailToSelection.m \
|
||||
UIxMailAddressbook.m \
|
||||
UIxMailWindowCloser.m \
|
||||
\
|
||||
UIxFilterList.m \
|
||||
UIxSieveEditor.m \
|
||||
\
|
||||
UIxMailFolderACLEditor.m \
|
||||
|
||||
MailerUI_RESOURCE_FILES += \
|
||||
Version \
|
||||
product.plist \
|
||||
Toolbars/*.toolbar
|
||||
|
||||
MailerUI_LOCALIZED_RESOURCE_FILES += \
|
||||
Localizable.strings
|
||||
|
||||
# make
|
||||
|
||||
-include GNUmakefile.preamble
|
||||
include $(GNUSTEP_MAKEFILES)/bundle.make
|
||||
-include GNUmakefile.postamble
|
||||
include ../../fhsbundle.make
|
||||
@@ -0,0 +1,17 @@
|
||||
# post processing
|
||||
|
||||
validate-wox:
|
||||
# xmllint --noout *.wox
|
||||
|
||||
before-all :: validate-wox
|
||||
|
||||
|
||||
ifneq ($(GNUSTEP_BUILD_DIR),)
|
||||
after-all ::
|
||||
@(cp bundle-info.plist \
|
||||
$(GNUSTEP_BUILD_DIR)/$(BUNDLE_NAME)$(BUNDLE_EXTENSION))
|
||||
else
|
||||
after-all ::
|
||||
@(cd $(BUNDLE_NAME)$(BUNDLE_EXTENSION);\
|
||||
cp ../bundle-info.plist .)
|
||||
endif
|
||||
@@ -0,0 +1,7 @@
|
||||
# compiler flags
|
||||
|
||||
ADDITIONAL_CPPFLAGS += \
|
||||
-Wall -DCOMPILE_FOR_GSTEP_MAKE=1 \
|
||||
-DUIX_MAILER_MAJOR_VERSION=$(MAJOR_VERSION) \
|
||||
-DUIX_MAILER_MINOR_VERSION=$(MINOR_VERSION) \
|
||||
-DUIX_MAILER_SUBMINOR_VERSION=$(SUBMINOR_VERSION)
|
||||
@@ -0,0 +1,5 @@
|
||||
The default theme icons are derived from the icons provided as
|
||||
part of the Mozilla Thunderbird application.
|
||||
The licensing terms of Mozilla Thunderbird are available in the
|
||||
LICENSE-thunderbird.txt file.
|
||||
|
||||
@@ -0,0 +1,567 @@
|
||||
MOZILLA PUBLIC LICENSE
|
||||
Version 1.1
|
||||
|
||||
---------------
|
||||
|
||||
1. Definitions.
|
||||
|
||||
1.0.1. "Commercial Use" means distribution or otherwise making the
|
||||
Covered Code available to a third party.
|
||||
|
||||
1.1. "Contributor" means each entity that creates or contributes to
|
||||
the creation of Modifications.
|
||||
|
||||
1.2. "Contributor Version" means the combination of the Original
|
||||
Code, prior Modifications used by a Contributor, and the Modifications
|
||||
made by that particular Contributor.
|
||||
|
||||
1.3. "Covered Code" means the Original Code or Modifications or the
|
||||
combination of the Original Code and Modifications, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.4. "Electronic Distribution Mechanism" means a mechanism generally
|
||||
accepted in the software development community for the electronic
|
||||
transfer of data.
|
||||
|
||||
1.5. "Executable" means Covered Code in any form other than Source
|
||||
Code.
|
||||
|
||||
1.6. "Initial Developer" means the individual or entity identified
|
||||
as the Initial Developer in the Source Code notice required by Exhibit
|
||||
A.
|
||||
|
||||
1.7. "Larger Work" means a work which combines Covered Code or
|
||||
portions thereof with code not governed by the terms of this License.
|
||||
|
||||
1.8. "License" means this document.
|
||||
|
||||
1.8.1. "Licensable" means having the right to grant, to the maximum
|
||||
extent possible, whether at the time of the initial grant or
|
||||
subsequently acquired, any and all of the rights conveyed herein.
|
||||
|
||||
1.9. "Modifications" means any addition to or deletion from the
|
||||
substance or structure of either the Original Code or any previous
|
||||
Modifications. When Covered Code is released as a series of files, a
|
||||
Modification is:
|
||||
A. Any addition to or deletion from the contents of a file
|
||||
containing Original Code or previous Modifications.
|
||||
|
||||
B. Any new file that contains any part of the Original Code or
|
||||
previous Modifications.
|
||||
|
||||
1.10. "Original Code" means Source Code of computer software code
|
||||
which is described in the Source Code notice required by Exhibit A as
|
||||
Original Code, and which, at the time of its release under this
|
||||
License is not already Covered Code governed by this License.
|
||||
|
||||
1.10.1. "Patent Claims" means any patent claim(s), now owned or
|
||||
hereafter acquired, including without limitation, method, process,
|
||||
and apparatus claims, in any patent Licensable by grantor.
|
||||
|
||||
1.11. "Source Code" means the preferred form of the Covered Code for
|
||||
making modifications to it, including all modules it contains, plus
|
||||
any associated interface definition files, scripts used to control
|
||||
compilation and installation of an Executable, or source code
|
||||
differential comparisons against either the Original Code or another
|
||||
well known, available Covered Code of the Contributor's choice. The
|
||||
Source Code can be in a compressed or archival form, provided the
|
||||
appropriate decompression or de-archiving software is widely available
|
||||
for no charge.
|
||||
|
||||
1.12. "You" (or "Your") means an individual or a legal entity
|
||||
exercising rights under, and complying with all of the terms of, this
|
||||
License or a future version of this License issued under Section 6.1.
|
||||
For legal entities, "You" includes any entity which controls, is
|
||||
controlled by, or is under common control with You. For purposes of
|
||||
this definition, "control" means (a) the power, direct or indirect,
|
||||
to cause the direction or management of such entity, whether by
|
||||
contract or otherwise, or (b) ownership of more than fifty percent
|
||||
(50%) of the outstanding shares or beneficial ownership of such
|
||||
entity.
|
||||
|
||||
2. Source Code License.
|
||||
|
||||
2.1. The Initial Developer Grant.
|
||||
The Initial Developer hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license, subject to third party intellectual property
|
||||
claims:
|
||||
(a) under intellectual property rights (other than patent or
|
||||
trademark) Licensable by Initial Developer to use, reproduce,
|
||||
modify, display, perform, sublicense and distribute the Original
|
||||
Code (or portions thereof) with or without Modifications, and/or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patents Claims infringed by the making, using or
|
||||
selling of Original Code, to make, have made, use, practice,
|
||||
sell, and offer for sale, and/or otherwise dispose of the
|
||||
Original Code (or portions thereof).
|
||||
|
||||
(c) the licenses granted in this Section 2.1(a) and (b) are
|
||||
effective on the date Initial Developer first distributes
|
||||
Original Code under the terms of this License.
|
||||
|
||||
(d) Notwithstanding Section 2.1(b) above, no patent license is
|
||||
granted: 1) for code that You delete from the Original Code; 2)
|
||||
separate from the Original Code; or 3) for infringements caused
|
||||
by: i) the modification of the Original Code or ii) the
|
||||
combination of the Original Code with other software or devices.
|
||||
|
||||
2.2. Contributor Grant.
|
||||
Subject to third party intellectual property claims, each Contributor
|
||||
hereby grants You a world-wide, royalty-free, non-exclusive license
|
||||
|
||||
(a) under intellectual property rights (other than patent or
|
||||
trademark) Licensable by Contributor, to use, reproduce, modify,
|
||||
display, perform, sublicense and distribute the Modifications
|
||||
created by such Contributor (or portions thereof) either on an
|
||||
unmodified basis, with other Modifications, as Covered Code
|
||||
and/or as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims infringed by the making, using, or
|
||||
selling of Modifications made by that Contributor either alone
|
||||
and/or in combination with its Contributor Version (or portions
|
||||
of such combination), to make, use, sell, offer for sale, have
|
||||
made, and/or otherwise dispose of: 1) Modifications made by that
|
||||
Contributor (or portions thereof); and 2) the combination of
|
||||
Modifications made by that Contributor with its Contributor
|
||||
Version (or portions of such combination).
|
||||
|
||||
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are
|
||||
effective on the date Contributor first makes Commercial Use of
|
||||
the Covered Code.
|
||||
|
||||
(d) Notwithstanding Section 2.2(b) above, no patent license is
|
||||
granted: 1) for any code that Contributor has deleted from the
|
||||
Contributor Version; 2) separate from the Contributor Version;
|
||||
3) for infringements caused by: i) third party modifications of
|
||||
Contributor Version or ii) the combination of Modifications made
|
||||
by that Contributor with other software (except as part of the
|
||||
Contributor Version) or other devices; or 4) under Patent Claims
|
||||
infringed by Covered Code in the absence of Modifications made by
|
||||
that Contributor.
|
||||
|
||||
3. Distribution Obligations.
|
||||
|
||||
3.1. Application of License.
|
||||
The Modifications which You create or to which You contribute are
|
||||
governed by the terms of this License, including without limitation
|
||||
Section 2.2. The Source Code version of Covered Code may be
|
||||
distributed only under the terms of this License or a future version
|
||||
of this License released under Section 6.1, and You must include a
|
||||
copy of this License with every copy of the Source Code You
|
||||
distribute. You may not offer or impose any terms on any Source Code
|
||||
version that alters or restricts the applicable version of this
|
||||
License or the recipients' rights hereunder. However, You may include
|
||||
an additional document offering the additional rights described in
|
||||
Section 3.5.
|
||||
|
||||
3.2. Availability of Source Code.
|
||||
Any Modification which You create or to which You contribute must be
|
||||
made available in Source Code form under the terms of this License
|
||||
either on the same media as an Executable version or via an accepted
|
||||
Electronic Distribution Mechanism to anyone to whom you made an
|
||||
Executable version available; and if made available via Electronic
|
||||
Distribution Mechanism, must remain available for at least twelve (12)
|
||||
months after the date it initially became available, or at least six
|
||||
(6) months after a subsequent version of that particular Modification
|
||||
has been made available to such recipients. You are responsible for
|
||||
ensuring that the Source Code version remains available even if the
|
||||
Electronic Distribution Mechanism is maintained by a third party.
|
||||
|
||||
3.3. Description of Modifications.
|
||||
You must cause all Covered Code to which You contribute to contain a
|
||||
file documenting the changes You made to create that Covered Code and
|
||||
the date of any change. You must include a prominent statement that
|
||||
the Modification is derived, directly or indirectly, from Original
|
||||
Code provided by the Initial Developer and including the name of the
|
||||
Initial Developer in (a) the Source Code, and (b) in any notice in an
|
||||
Executable version or related documentation in which You describe the
|
||||
origin or ownership of the Covered Code.
|
||||
|
||||
3.4. Intellectual Property Matters
|
||||
(a) Third Party Claims.
|
||||
If Contributor has knowledge that a license under a third party's
|
||||
intellectual property rights is required to exercise the rights
|
||||
granted by such Contributor under Sections 2.1 or 2.2,
|
||||
Contributor must include a text file with the Source Code
|
||||
distribution titled "LEGAL" which describes the claim and the
|
||||
party making the claim in sufficient detail that a recipient will
|
||||
know whom to contact. If Contributor obtains such knowledge after
|
||||
the Modification is made available as described in Section 3.2,
|
||||
Contributor shall promptly modify the LEGAL file in all copies
|
||||
Contributor makes available thereafter and shall take other steps
|
||||
(such as notifying appropriate mailing lists or newsgroups)
|
||||
reasonably calculated to inform those who received the Covered
|
||||
Code that new knowledge has been obtained.
|
||||
|
||||
(b) Contributor APIs.
|
||||
If Contributor's Modifications include an application programming
|
||||
interface and Contributor has knowledge of patent licenses which
|
||||
are reasonably necessary to implement that API, Contributor must
|
||||
also include this information in the LEGAL file.
|
||||
|
||||
(c) Representations.
|
||||
Contributor represents that, except as disclosed pursuant to
|
||||
Section 3.4(a) above, Contributor believes that Contributor's
|
||||
Modifications are Contributor's original creation(s) and/or
|
||||
Contributor has sufficient rights to grant the rights conveyed by
|
||||
this License.
|
||||
|
||||
3.5. Required Notices.
|
||||
You must duplicate the notice in Exhibit A in each file of the Source
|
||||
Code. If it is not possible to put such notice in a particular Source
|
||||
Code file due to its structure, then You must include such notice in a
|
||||
location (such as a relevant directory) where a user would be likely
|
||||
to look for such a notice. If You created one or more Modification(s)
|
||||
You may add your name as a Contributor to the notice described in
|
||||
Exhibit A. You must also duplicate this License in any documentation
|
||||
for the Source Code where You describe recipients' rights or ownership
|
||||
rights relating to Covered Code. You may choose to offer, and to
|
||||
charge a fee for, warranty, support, indemnity or liability
|
||||
obligations to one or more recipients of Covered Code. However, You
|
||||
may do so only on Your own behalf, and not on behalf of the Initial
|
||||
Developer or any Contributor. You must make it absolutely clear than
|
||||
any such warranty, support, indemnity or liability obligation is
|
||||
offered by You alone, and You hereby agree to indemnify the Initial
|
||||
Developer and every Contributor for any liability incurred by the
|
||||
Initial Developer or such Contributor as a result of warranty,
|
||||
support, indemnity or liability terms You offer.
|
||||
|
||||
3.6. Distribution of Executable Versions.
|
||||
You may distribute Covered Code in Executable form only if the
|
||||
requirements of Section 3.1-3.5 have been met for that Covered Code,
|
||||
and if You include a notice stating that the Source Code version of
|
||||
the Covered Code is available under the terms of this License,
|
||||
including a description of how and where You have fulfilled the
|
||||
obligations of Section 3.2. The notice must be conspicuously included
|
||||
in any notice in an Executable version, related documentation or
|
||||
collateral in which You describe recipients' rights relating to the
|
||||
Covered Code. You may distribute the Executable version of Covered
|
||||
Code or ownership rights under a license of Your choice, which may
|
||||
contain terms different from this License, provided that You are in
|
||||
compliance with the terms of this License and that the license for the
|
||||
Executable version does not attempt to limit or alter the recipient's
|
||||
rights in the Source Code version from the rights set forth in this
|
||||
License. If You distribute the Executable version under a different
|
||||
license You must make it absolutely clear that any terms which differ
|
||||
from this License are offered by You alone, not by the Initial
|
||||
Developer or any Contributor. You hereby agree to indemnify the
|
||||
Initial Developer and every Contributor for any liability incurred by
|
||||
the Initial Developer or such Contributor as a result of any such
|
||||
terms You offer.
|
||||
|
||||
3.7. Larger Works.
|
||||
You may create a Larger Work by combining Covered Code with other code
|
||||
not governed by the terms of this License and distribute the Larger
|
||||
Work as a single product. In such a case, You must make sure the
|
||||
requirements of this License are fulfilled for the Covered Code.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation.
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Code due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description
|
||||
must be included in the LEGAL file described in Section 3.4 and must
|
||||
be included with all distributions of the Source Code. Except to the
|
||||
extent prohibited by statute or regulation, such description must be
|
||||
sufficiently detailed for a recipient of ordinary skill to be able to
|
||||
understand it.
|
||||
|
||||
5. Application of this License.
|
||||
|
||||
This License applies to code to which the Initial Developer has
|
||||
attached the notice in Exhibit A and to related Covered Code.
|
||||
|
||||
6. Versions of the License.
|
||||
|
||||
6.1. New Versions.
|
||||
Netscape Communications Corporation ("Netscape") may publish revised
|
||||
and/or new versions of the License from time to time. Each version
|
||||
will be given a distinguishing version number.
|
||||
|
||||
6.2. Effect of New Versions.
|
||||
Once Covered Code has been published under a particular version of the
|
||||
License, You may always continue to use it under the terms of that
|
||||
version. You may also choose to use such Covered Code under the terms
|
||||
of any subsequent version of the License published by Netscape. No one
|
||||
other than Netscape has the right to modify the terms applicable to
|
||||
Covered Code created under this License.
|
||||
|
||||
6.3. Derivative Works.
|
||||
If You create or use a modified version of this License (which you may
|
||||
only do in order to apply it to code which is not already Covered Code
|
||||
governed by this License), You must (a) rename Your license so that
|
||||
the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
|
||||
"MPL", "NPL" or any confusingly similar phrase do not appear in your
|
||||
license (except to note that your license differs from this License)
|
||||
and (b) otherwise make it clear that Your version of the license
|
||||
contains terms which differ from the Mozilla Public License and
|
||||
Netscape Public License. (Filling in the name of the Initial
|
||||
Developer, Original Code or Contributor in the notice described in
|
||||
Exhibit A shall not of themselves be deemed to be modifications of
|
||||
this License.)
|
||||
|
||||
7. DISCLAIMER OF WARRANTY.
|
||||
|
||||
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
|
||||
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
|
||||
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
|
||||
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
|
||||
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
|
||||
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
|
||||
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
|
||||
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
|
||||
|
||||
8. TERMINATION.
|
||||
|
||||
8.1. This License and the rights granted hereunder will terminate
|
||||
automatically if You fail to comply with terms herein and fail to cure
|
||||
such breach within 30 days of becoming aware of the breach. All
|
||||
sublicenses to the Covered Code which are properly granted shall
|
||||
survive any termination of this License. Provisions which, by their
|
||||
nature, must remain in effect beyond the termination of this License
|
||||
shall survive.
|
||||
|
||||
8.2. If You initiate litigation by asserting a patent infringement
|
||||
claim (excluding declatory judgment actions) against Initial Developer
|
||||
or a Contributor (the Initial Developer or Contributor against whom
|
||||
You file such action is referred to as "Participant") alleging that:
|
||||
|
||||
(a) such Participant's Contributor Version directly or indirectly
|
||||
infringes any patent, then any and all rights granted by such
|
||||
Participant to You under Sections 2.1 and/or 2.2 of this License
|
||||
shall, upon 60 days notice from Participant terminate prospectively,
|
||||
unless if within 60 days after receipt of notice You either: (i)
|
||||
agree in writing to pay Participant a mutually agreeable reasonable
|
||||
royalty for Your past and future use of Modifications made by such
|
||||
Participant, or (ii) withdraw Your litigation claim with respect to
|
||||
the Contributor Version against such Participant. If within 60 days
|
||||
of notice, a reasonable royalty and payment arrangement are not
|
||||
mutually agreed upon in writing by the parties or the litigation claim
|
||||
is not withdrawn, the rights granted by Participant to You under
|
||||
Sections 2.1 and/or 2.2 automatically terminate at the expiration of
|
||||
the 60 day notice period specified above.
|
||||
|
||||
(b) any software, hardware, or device, other than such Participant's
|
||||
Contributor Version, directly or indirectly infringes any patent, then
|
||||
any rights granted to You by such Participant under Sections 2.1(b)
|
||||
and 2.2(b) are revoked effective as of the date You first made, used,
|
||||
sold, distributed, or had made, Modifications made by that
|
||||
Participant.
|
||||
|
||||
8.3. If You assert a patent infringement claim against Participant
|
||||
alleging that such Participant's Contributor Version directly or
|
||||
indirectly infringes any patent where such claim is resolved (such as
|
||||
by license or settlement) prior to the initiation of patent
|
||||
infringement litigation, then the reasonable value of the licenses
|
||||
granted by such Participant under Sections 2.1 or 2.2 shall be taken
|
||||
into account in determining the amount or value of any payment or
|
||||
license.
|
||||
|
||||
8.4. In the event of termination under Sections 8.1 or 8.2 above,
|
||||
all end user license agreements (excluding distributors and resellers)
|
||||
which have been validly granted by You or any distributor hereunder
|
||||
prior to termination shall survive termination.
|
||||
|
||||
9. LIMITATION OF LIABILITY.
|
||||
|
||||
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
|
||||
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
|
||||
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
|
||||
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
|
||||
ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
|
||||
CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
|
||||
WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
|
||||
COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
|
||||
INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
|
||||
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
|
||||
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
|
||||
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
|
||||
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
|
||||
THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
10. U.S. GOVERNMENT END USERS.
|
||||
|
||||
The Covered Code is a "commercial item," as that term is defined in
|
||||
48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
|
||||
software" and "commercial computer software documentation," as such
|
||||
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
|
||||
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
|
||||
all U.S. Government End Users acquire Covered Code with only those
|
||||
rights set forth herein.
|
||||
|
||||
11. MISCELLANEOUS.
|
||||
|
||||
This License represents the complete agreement concerning subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. This License shall be governed by
|
||||
California law provisions (except to the extent applicable law, if
|
||||
any, provides otherwise), excluding its conflict-of-law provisions.
|
||||
With respect to disputes in which at least one party is a citizen of,
|
||||
or an entity chartered or registered to do business in the United
|
||||
States of America, any litigation relating to this License shall be
|
||||
subject to the jurisdiction of the Federal Courts of the Northern
|
||||
District of California, with venue lying in Santa Clara County,
|
||||
California, with the losing party responsible for costs, including
|
||||
without limitation, court costs and reasonable attorneys' fees and
|
||||
expenses. The application of the United Nations Convention on
|
||||
Contracts for the International Sale of Goods is expressly excluded.
|
||||
Any law or regulation which provides that the language of a contract
|
||||
shall be construed against the drafter shall not apply to this
|
||||
License.
|
||||
|
||||
12. RESPONSIBILITY FOR CLAIMS.
|
||||
|
||||
As between Initial Developer and the Contributors, each party is
|
||||
responsible for claims and damages arising, directly or indirectly,
|
||||
out of its utilization of rights under this License and You agree to
|
||||
work with Initial Developer and Contributors to distribute such
|
||||
responsibility on an equitable basis. Nothing herein is intended or
|
||||
shall be deemed to constitute any admission of liability.
|
||||
|
||||
13. MULTIPLE-LICENSED CODE.
|
||||
|
||||
Initial Developer may designate portions of the Covered Code as
|
||||
"Multiple-Licensed". "Multiple-Licensed" means that the Initial
|
||||
Developer permits you to utilize portions of the Covered Code under
|
||||
Your choice of the NPL or the alternative licenses, if any, specified
|
||||
by the Initial Developer in the file described in Exhibit A.
|
||||
|
||||
EXHIBIT A -Mozilla Public License.
|
||||
|
||||
``The contents of this file are subject to the Mozilla Public License
|
||||
Version 1.1 (the "License"); you may not use this file except in
|
||||
compliance with the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS"
|
||||
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
License for the specific language governing rights and limitations
|
||||
under the License.
|
||||
|
||||
The Original Code is ______________________________________.
|
||||
|
||||
The Initial Developer of the Original Code is ________________________.
|
||||
Portions created by ______________________ are Copyright (C) ______
|
||||
_______________________. All Rights Reserved.
|
||||
|
||||
Contributor(s): ______________________________________.
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms
|
||||
of the _____ license (the "[___] License"), in which case the
|
||||
provisions of [______] License are applicable instead of those
|
||||
above. If you wish to allow use of your version of this file only
|
||||
under the terms of the [____] License and not to allow others to use
|
||||
your version of this file under the MPL, indicate your decision by
|
||||
deleting the provisions above and replace them with the notice and
|
||||
other provisions required by the [___] License. If you do not delete
|
||||
the provisions above, a recipient may use your version of this file
|
||||
under either the MPL or the [___] License."
|
||||
|
||||
[NOTE: The text of this Exhibit A may differ slightly from the text of
|
||||
the notices in the Source Code files of the Original Code. You should
|
||||
use the text of this Exhibit A rather than the text found in the
|
||||
Original Code Source Code for Your Modifications.]
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AMENDMENTS
|
||||
|
||||
The Netscape Public License Version 1.1 ("NPL") consists of the
|
||||
Mozilla Public License Version 1.1 with the following Amendments,
|
||||
including Exhibit A-Netscape Public License. Files identified with
|
||||
"Exhibit A-Netscape Public License" are governed by the Netscape
|
||||
Public License Version 1.1.
|
||||
|
||||
Additional Terms applicable to the Netscape Public License.
|
||||
I. Effect.
|
||||
These additional terms described in this Netscape Public
|
||||
License -- Amendments shall apply to the Mozilla Communicator
|
||||
client code and to all Covered Code under this License.
|
||||
|
||||
II. "Netscape's Branded Code" means Covered Code that Netscape
|
||||
distributes and/or permits others to distribute under one or more
|
||||
trademark(s) which are controlled by Netscape but which are not
|
||||
licensed for use under this License.
|
||||
|
||||
III. Netscape and logo.
|
||||
This License does not grant any rights to use the trademarks
|
||||
"Netscape", the "Netscape N and horizon" logo or the "Netscape
|
||||
lighthouse" logo, "Netcenter", "Gecko", "Java" or "JavaScript",
|
||||
"Smart Browsing" even if such marks are included in the Original
|
||||
Code or Modifications.
|
||||
|
||||
IV. Inability to Comply Due to Contractual Obligation.
|
||||
Prior to licensing the Original Code under this License, Netscape
|
||||
has licensed third party code for use in Netscape's Branded Code.
|
||||
To the extent that Netscape is limited contractually from making
|
||||
such third party code available under this License, Netscape may
|
||||
choose to reintegrate such code into Covered Code without being
|
||||
required to distribute such code in Source Code form, even if
|
||||
such code would otherwise be considered "Modifications" under
|
||||
this License.
|
||||
|
||||
V. Use of Modifications and Covered Code by Initial Developer.
|
||||
V.1. In General.
|
||||
The obligations of Section 3 apply to Netscape, except to
|
||||
the extent specified in this Amendment, Section V.2 and V.3.
|
||||
|
||||
V.2. Other Products.
|
||||
Netscape may include Covered Code in products other than the
|
||||
Netscape's Branded Code which are released by Netscape
|
||||
during the two (2) years following the release date of the
|
||||
Original Code, without such additional products becoming
|
||||
subject to the terms of this License, and may license such
|
||||
additional products on different terms from those contained
|
||||
in this License.
|
||||
|
||||
V.3. Alternative Licensing.
|
||||
Netscape may license the Source Code of Netscape's Branded
|
||||
Code, including Modifications incorporated therein, without
|
||||
such Netscape Branded Code becoming subject to the terms of
|
||||
this License, and may license such Netscape Branded Code on
|
||||
different terms from those contained in this License.
|
||||
|
||||
VI. Litigation.
|
||||
Notwithstanding the limitations of Section 11 above, the
|
||||
provisions regarding litigation in Section 11(a), (b) and (c) of
|
||||
the License shall apply to all disputes relating to this License.
|
||||
|
||||
EXHIBIT A-Netscape Public License.
|
||||
|
||||
"The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s): ______________________________________.
|
||||
|
||||
Alternatively, the contents of this file may be used under the
|
||||
terms of the _____ license (the "[___] License"), in which case
|
||||
the provisions of [______] License are applicable instead of
|
||||
those above. If you wish to allow use of your version of this
|
||||
file only under the terms of the [____] License and not to allow
|
||||
others to use your version of this file under the NPL, indicate
|
||||
your decision by deleting the provisions above and replace them
|
||||
with the notice and other provisions required by the [___]
|
||||
License. If you do not delete the provisions above, a recipient
|
||||
may use your version of this file under either the NPL or the
|
||||
[___] License."
|
||||
|
After Width: | Height: | Size: 70 B |
|
After Width: | Height: | Size: 138 B |
|
After Width: | Height: | Size: 141 B |
|
After Width: | Height: | Size: 75 B |
|
After Width: | Height: | Size: 72 B |
|
After Width: | Height: | Size: 77 B |
|
After Width: | Height: | Size: 73 B |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 145 B |
|
After Width: | Height: | Size: 58 B |
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
// $Id: MailerUIProduct.m 603 2005-02-22 23:12:45Z helge $
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
@interface MailerUIProduct : NSObject
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#include "common.h"
|
||||
|
||||
@implementation MailerUIProduct
|
||||
@end /* MailerUIProduct */
|
||||
@@ -0,0 +1,2 @@
|
||||
// $Id: NOTES 603 2005-02-22 23:12:45Z helge $
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
SOGO Mailer UI
|
||||
==============
|
||||
|
||||
- own (Thunderbird styled) frame
|
||||
- component for tree
|
||||
|
||||
TODO
|
||||
====
|
||||
- a lot ;->
|
||||
- SOPE: does not recognize <input type="button"> !
|
||||
|
||||
Components
|
||||
==========
|
||||
UIxMailAccountView.wox
|
||||
UIxMailAccountsView.wox
|
||||
UIxMailEditor.wox
|
||||
UIxMailToSelection.wox
|
||||
UIxMailListView.wox
|
||||
UIxMailMainFrame.wox
|
||||
UIxMailTree.wox
|
||||
UIxMailView.wox
|
||||
|
||||
Class Hierarchy
|
||||
===============
|
||||
|
||||
[NSObject]
|
||||
MailerUIProduct
|
||||
[WOComponent]
|
||||
[SoComponent]
|
||||
<UIxComponent>
|
||||
UIxFilterList
|
||||
UIxMailAccountView
|
||||
UIxMailAccountsView
|
||||
UIxMailAddressbook
|
||||
UIxMailEditor
|
||||
(Scheduler_Privates)
|
||||
UIxMailListView
|
||||
UIxMailMainFrame
|
||||
UIxMailToSelection
|
||||
UIxMailToolbar
|
||||
UIxMailTree
|
||||
UIxMailView
|
||||
UIxSieveEditor
|
||||
UIxMailSortableTableHeader
|
||||
UIxMailEditorAttach.m
|
||||
UIxMailFilterPanel
|
||||
UIxMailMoveToPopUp
|
||||
UIxMailWindowCloser
|
||||
[WODirectAction]
|
||||
UIxMailEditorAction
|
||||
UIxMailForwardAction
|
||||
UIxMailReplyAction
|
||||
[NSFormatter]
|
||||
UIxMailFormatter
|
||||
UIxMailDateFormatter
|
||||
UIxSubjectFormatter
|
||||
UIxEnvelopeAddressFormatter
|
||||
UIxMailTreeBlock
|
||||
[WOContext]
|
||||
(UIxMailer)
|
||||
|
||||
Defaults
|
||||
========
|
||||
|
||||
SOGoShowInternetMarker - bool
|
||||
- show a marker in the editor that the request is from the outside
|
||||
|
||||
SOGoInternetDetectQualifier - string
|
||||
- an EOQualifier to detect whether a set of HTTP headers is from the outside,
|
||||
eg: "NOT (minequprovenance = 'intranet')"
|
||||
-SOGoInternetDetectQualifier '"NOT (minequprovenance = \"intranet\")"'
|
||||
Note: all header field names are lowercase
|
||||
|
||||
SOGoInternetMailHeaders - dictionary
|
||||
- if a request was detected as coming from the Internet, add the mail headers
|
||||
specified in this default
|
||||
eg: { received = "sogo depuis internet"; }
|
||||
-SOGoInternetMailHeaders "{received=\"sogo depuis internet\"; }"
|
||||
|
||||
SOGoMailEditorKeepTmpFile
|
||||
- for debugging, if a mail was send, keep the file containing the MIME in the
|
||||
temporary directory for review instead of deleting it
|
||||
|
||||
SOGoMailTreeRootClass
|
||||
- configure the root class of the mail tree, eg:
|
||||
- SOGoMailAccounts - standard view, show all IMAP4 accounts
|
||||
- SOGoMailAccount - just show the standard mail account (tree at Inbox!)
|
||||
- SoApplication - stop at the application object (show all folders)
|
||||
|
||||
SOGoDontUseETagsForMailViewer - YES|NO
|
||||
- when enable SOGo won't tag mail viewers with an entity-tag (HTTP etag)
|
||||
- the etag ensures that the viewer will only get resend to the browser when
|
||||
it changed. In the case of IMAP4 this is never because URLs are one-time
|
||||
IDs in the IMAP4 server and messages cannot be edited in IMAP4
|
||||
- use the default for debugging (otherwise you won't see changes ...)
|
||||
|
||||
SOGoUseLocationBasedSentFolder - YES | NO
|
||||
- when enable SOGo looks up the Sent folder by traversing the lookup-path
|
||||
until it finds a SOGoMailAccount object and then asks the account for the
|
||||
Sent folder.
|
||||
|
||||
Notes
|
||||
=====
|
||||
|
||||
- we might want to bind the content viewers as SOPE methods to the mail class?
|
||||
eg "viewTextPlain"
|
||||
- this would not return a WOComponent, but a SoPageInvocation
|
||||
- caching might be more difficult
|
||||
- some 'reuse component' support in SoPageInvocation for stateless
|
||||
components?
|
||||
- watch nested calls
|
||||
- for this we would need to add support for embedded calling of SOPE methods
|
||||
<var:component method="viewTextPlain" /> ?
|
||||
|
||||
Bodystructures
|
||||
==============
|
||||
|
||||
Multiparts: multipart/MIXED, multipart/SIGNED
|
||||
|
||||
Feature: we fetch all plain/text bodies in a single run by traversing the
|
||||
body structure.
|
||||
|
||||
Sample Bodystructure (GPG):
|
||||
---snip---
|
||||
{
|
||||
parts = (
|
||||
{
|
||||
bodyId = "";
|
||||
description = "";
|
||||
encoding = "QUOTED-PRINTABLE";
|
||||
lines = 22;
|
||||
parameterList = {};
|
||||
size = 731;
|
||||
subtype = PLAIN;
|
||||
type = text;
|
||||
},
|
||||
{
|
||||
bodyId = "";
|
||||
description = "Esta parte del mensaje";
|
||||
encoding = 7BIT;
|
||||
parameterList = {name = "signature.asc"; };
|
||||
size = 196;
|
||||
subtype = "PGP-SIGNATURE";
|
||||
type = application;
|
||||
}
|
||||
);
|
||||
subtype = SIGNED;
|
||||
type = multipart;
|
||||
}
|
||||
---snap---
|
||||
|
||||
Sample Body Structure (Image):
|
||||
---snip---
|
||||
{
|
||||
parts = (
|
||||
{
|
||||
bodyId = "";
|
||||
description = "";
|
||||
encoding = BASE64;
|
||||
parameterList = {name = "PoseChau.jpg"; "x-unix-mode" = 0644; };
|
||||
size = 58370;
|
||||
subtype = JPEG;
|
||||
type = image;
|
||||
},
|
||||
{
|
||||
bodyId = "";
|
||||
description = "";
|
||||
encoding = 7BIT;
|
||||
lines = 2;
|
||||
parameterList = {charset = "US-ASCII"; format = flowed; };
|
||||
size = 57;
|
||||
subtype = PLAIN;
|
||||
type = text;
|
||||
}
|
||||
);
|
||||
subtype = MIXED;
|
||||
type = multipart;
|
||||
}
|
||||
---snap---
|
||||