+++ /dev/null
-Files
-=====
-
-appointment-create.psql
-- this is a template for creating appointment quick/blob tables
-- not used by code atm
-
-folderinfo-create.psql
-- create folder info table (folder registry table)
-- insert some folders per default:
- - /Users
- - /Users/helge
- - /Users/helge/Calendar
-
-foldertablecreate-root.psql
-- insert "/" and "/Users" parent folders (without storage, quick and type)
-
-foldertablecreate-helge-privcal.psql
-- create a quick and content table for 'helge/Calendar' folder
-
-register-agenor-helge-privcal.psql
-- register folder "/Users/helge/Calendar" folder in the registry table with
- a link to the proper quick and content tables
-
-testapt-agenor-helge-privcal.psql
-- insert a raw iCalendar test appointment in the /Users/helge/Calendar
- folder quick and content tables
-
-
-Notes
-=====
-
-Listing the folders of a certain user:
-
- sqlite> SELECT c_path FROM SOGo_folder_info \
- WHERE c_path2 = 'test.et.di.cete-lyon';
- /Users/test.et.di.cete-lyon
- /Users/test.et.di.cete-lyon/Calendar
- /Users/test.et.di.cete-lyon/Contacts
+++ /dev/null
-#!/bin/bash
-#
-# Usage: generate-folderinfo-sql-for-users user1 [user2] [user3] [...]
-#
-
-DB_USER="sogo"
-DB_PASS="sogo"
-DB_HOST="192.168.0.4"
-DB_PORT="5432"
-DB_NAME="sogo"
-TIMEZONE="Canada/Eastern"
-
-
-while [ "$1" != "" ]; do
-USER_ID=$1
-USER_TABLE=`echo $USER_ID | tr -s [:punct:] _`
-cat << EOF
---
--- (C) 2004 SKYRIX Software AG
---
--- TODO:
--- add a unique constraints on path
-
-UPDATE SOGo_folder_info
- SET c_acl_location = 'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_${USER_TABLE}_acl'
- WHERE c_folder_type = 'Container'
- AND c_path2 = '${USER_ID}';
-UPDATE SOGo_folder_info
- SET c_acl_location = 'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_${USER_TABLE}_contacts_acl'
- WHERE c_folder_type = 'Contact'
- AND c_path2 = '${USER_ID}';
-UPDATE SOGo_folder_info
- SET c_acl_location = 'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_${USER_TABLE}_privcal_acl'
- WHERE c_folder_type = 'Appointment'
- AND c_path2 = '${USER_ID}';
-
-DROP TABLE SOGo_${USER_TABLE}_acls;
-DROP TABLE SOGo_${USER_TABLE}_privcal_acls;
-DROP TABLE SOGo_${USER_TABLE}_contacts_acls;
-
-DROP TABLE SOGo_${USER_TABLE}_acl;
-DROP TABLE SOGo_${USER_TABLE}_privcal_acl;
-DROP TABLE SOGo_${USER_TABLE}_contacts_acl;
-
-CREATE TABLE SOGo_${USER_TABLE}_acl (
- c_uid VARCHAR(256) NOT NULL,
- c_object VARCHAR(256) NOT NULL,
- c_role VARCHAR(80) NOT NULL
-);
-
-CREATE TABLE SOGo_${USER_TABLE}_privcal_acl (
- c_uid VARCHAR(256) NOT NULL,
- c_object VARCHAR(256) NOT NULL,
- c_role VARCHAR(80) NOT NULL
-);
-
-CREATE TABLE SOGo_${USER_TABLE}_contacts_acl (
- c_uid VARCHAR(256) NOT NULL,
- c_object VARCHAR(256) NOT NULL,
- c_role VARCHAR(80) NOT NULL
-);
-
-EOF
-shift
-done
+++ /dev/null
---
--- (C) 2004-2005 SKYRIX Software AG
---
-
-CREATE TABLE %s_quick (
- c_name VARCHAR(256) NOT NULL PRIMARY KEY, -- the filename
- uid VARCHAR(256) NOT NULL,
- startdate INT NOT NULL,
- enddate INT NOT NULL,
- title VARCHAR(1000) NOT NULL,
- participants VARCHAR(100000) NOT NULL, -- the CNs of the participants
- isallday INT NULL,
- iscycle INT NULL, -- client needs to fetch to resolve
- classification INT NOT NULL,
- status INT NOT NULL,
- isopaque INT NOT NULL,
- location VARCHAR(256) NULL,
- orgmail VARCHAR(256) NULL,
- partmails VARCHAR(100000) NOT NULL, -- the emails of the participants
- partstates VARCHAR(256) NOT NULL, -- the status of each participant
- sequence INT NULL -- the iCal sequence
-);
-
-CREATE TABLE %s_blob (
- c_name VARCHAR(256) NOT NULL PRIMARY KEY, -- the filename
- c_content VARCHAR(100000) NOT NULL, -- the BLOB
- c_creationdate INT NOT NULL, -- creation date
- c_lastmodified INT NOT NULL, -- last modification (UPDATE)
- c_version INT NOT NULL, -- version counter
-);
+++ /dev/null
---
--- (C) 2004 SKYRIX Software AG
---
-
-DROP TABLE SOGo_helge_privcal_quick;
-DROP TABLE SOGo_helge_privcal;
-
-CREATE TABLE SOGo_helge_privcal_quick (
- c_name VARCHAR(256) NOT NULL PRIMARY KEY, -- the filename
- uid VARCHAR(256) NOT NULL,
- startdate INT NOT NULL,
- enddate INT NOT NULL,
- cycleenddate INT NULL, -- enddate for cyclic events
- title VARCHAR(1000) NOT NULL,
- cycleinfo VARCHAR(1000) NULL, -- property list with cycle infos
- participants VARCHAR(100000) NOT NULL, -- the CNs of the participants
- isallday INT NULL,
- iscycle INT NULL, -- client needs to fetch to resolve
- ispublic INT NOT NULL,
- status INT NOT NULL,
- isopaque INT NULL,
- location VARCHAR(256) NULL,
- orgmail VARCHAR(256) NULL,
- partmails VARCHAR(100000) NOT NULL, -- the emails of the participants
- partstates VARCHAR(256) NOT NULL, -- the status of each participant
- sequence INT NULL -- the iCal sequence
-);
-
-CREATE TABLE SOGo_helge_privcal (
- c_name VARCHAR(256) NOT NULL PRIMARY KEY, -- the filename
- c_content VARCHAR(100000) NOT NULL, -- the BLOB
- c_creationdate INT NOT NULL, -- creation date
- c_lastmodified INT NOT NULL, -- last modification (UPDATE)
- c_version INT NOT NULL -- version counter
-);
+++ /dev/null
-# $Id$
-
-INSERT INTO sogo_folder_info
- (c_path,c_path1,c_path2,c_path3,c_path4,c_foldername,c_location,c_folder_type)
- VALUES ('/', '', NULL, NULL, NULL, '', '', 'Container');
-
-INSERT INTO sogo_folder_info
- (c_path,c_path1,c_path2,c_path3,c_path4,c_foldername,c_location,c_folder_type)
- VALUES ('/Users', 'Users', NULL, NULL, NULL, 'Users', '', 'Container');
+++ /dev/null
--- $Id$
---
--- (C) 2004 SKYRIX Software AG
---
-
-DROP TABLE SOGo_test_contacts_quick;
-DROP TABLE SOGo_test_contacts_blob;
-
-CREATE TABLE SOGo_test_contacts_quick (
- c_name VARCHAR(256) NOT NULL PRIMARY KEY, -- the filename
- givenname VARCHAR(256),
- cn VARCHAR(256),
- sn VARCHAR(256),
- l VARCHAR(256),
- mail VARCHAR(256),
- o VARCHAR(256),
- ou VARCHAR(256),
- telephonenumber VARCHAR(256)
-);
-
-CREATE TABLE SOGo_test_contacts_blob (
- c_name VARCHAR(256) NOT NULL PRIMARY KEY, -- the filename
- c_content VARCHAR(100000) NOT NULL, -- the BLOB
- c_creationdate INT NOT NULL, -- creation date
- c_lastmodified INT NOT NULL, -- last modification (UPDATE)
- c_version INT NOT NULL -- version counter
-);
+++ /dev/null
-INSERT INTO SOGo_folder_info
- ( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername,
- c_location, c_quick_location, c_folder_type )
-VALUES
- ( '/Users/helge/Calendar',
- 'Users',
- 'helge',
- 'Calendar',
- NULL,
- 'Calendar',
- 'http://postgres:@agenor-db:5432/test/SOGo_helge_privcal',
- 'http://postgres:@agenor-db:5432/test/SOGo_helge_privcal_quick',
- 'Appointment' );
+++ /dev/null
-INSERT INTO SOGo_folder_info
- ( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername,
- c_location, c_quick_location, c_folder_type )
-VALUES
- ( '/Users/test.et.di.cete-lyon/Contacts',
- 'Users',
- 'test.et.di.cete-lyon',
- 'Contacts',
- NULL,
- 'Contacts',
- 'http://postgres:@agenor-db:5432/test/SOGo_test_contacts_blob',
- 'http://postgres:@agenor-db:5432/test/SOGo_test_contacts_quick',
- 'Contact' );
+++ /dev/null
-#!/bin/bash
-#
-# Usage: generate-folderinfo-sql-for-users user1 [user2] [user3] [...]
-#
-
-DB_USER="sogo"
-DB_PASS="sogo"
-DB_HOST="192.168.0.4"
-DB_PORT="5432"
-DB_NAME="sogo"
-TIMEZONE="Canada/Eastern"
-
-
-while [ "$1" != "" ]; do
-USER_ID=$1
-USER_TABLE=`echo $USER_ID | tr -s [:punct:] _`
-cat << EOF
---
--- (C) 2004 SKYRIX Software AG
---
--- TODO:
--- add a unique constraints on path
-
-DELETE FROM SOGo_folder_info WHERE c_path2 = '${USER_ID}';
-
-INSERT INTO SOGo_folder_info
- ( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername,
- c_location, c_quick_location, c_folder_type )
-VALUES
- ( '/Users/${USER_ID}',
- 'Users',
- '${USER_ID}',
- NULL,
- NULL,
- '${USER_ID}',
- 'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_user_folder',
- 'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_user_folder_quick',
- 'Container' );
-
-INSERT INTO SOGo_folder_info
- ( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername,
- c_location, c_quick_location, c_folder_type )
-VALUES
- ( '/Users/${USER_ID}/Calendar',
- 'Users',
- '${USER_ID}',
- 'Calendar',
- NULL,
- 'Calendar',
- 'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_${USER_TABLE}_privcal',
- 'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_${USER_TABLE}_privcal_quick',
- 'Appointment' );
-
-INSERT INTO SOGo_folder_info
- ( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername,
- c_location, c_quick_location, c_folder_type )
-VALUES
- ( '/Users/${USER_ID}/Contacts/personal',
- 'Users',
- '${USER_ID}',
- 'Contacts',
- 'personal',
- 'Contacts',
- 'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_${USER_TABLE}_contacts',
- 'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_${USER_TABLE}_contacts_quick',
- 'Contact' );
-
-EOF
-shift
-done
+++ /dev/null
---
--- (C) 2004 SKYRIX Software AG
---
-
-DELETE FROM SOGo_helge_privcal
- WHERE c_name = 'BD91C454-AA65-11D8-84CA-000D93C1A604';
-DELETE FROM SOGo_helge_privcal_quick
- WHERE c_name = 'BD91C454-AA65-11D8-84CA-000D93C1A604';
-
-
-
-INSERT INTO SOGo_helge_privcal
- ( c_name, c_creationdate, c_lastmodified, c_version, c_content )
-VALUES (
- 'BD91C454-AA65-11D8-84CA-000D93C1A604',
- 928383,
- 928383,
- 1,
- 'BEGIN:VEVENT
-DURATION:PT1H
-ATTENDEE;CN="Elke Bethke";DIR="addressbook://B156F3F0-9CFD-11D8-8561-000D93C1A604:ABPerson":mailto:E.Bethke@Sachsen-Anhalt-Lotto.de
-ATTENDEE;CN="Erik Doernenburg";DIR="addressbook://B15FCB0F-9CFD-11D8-8561-000D93C1A604:ABPerson":mailto:erik@x101.net
-ATTENDEE;CN="Christian Schnelle";DIR="addressbook://B1418D4E-9CFD-11D8-8561-000D93C1A604:ABPerson":mailto:cs@enervation.de
-ATTENDEE;CN="Chris Herrenberger";DIR="addressbook://B14A390C-9CFD-11D8-8561-000D93C1A604:ABPerson":invalid:nomail
-ATTENDEE;CN="Horst Parplies";DIR="addressbook://B19B47E5-9CFD-11D8-8561-000D93C1A604:ABPerson":mailto:horst.parplies@freenet.de
-ATTENDEE;CN="Imdat Solak";DIR="addressbook://B19EDB62-9CFD-11D8-8561-000D93C1A604:ABPerson":mailto:imdat@solak.de
-ATTENDEE;CN="Jens Enders";DIR="addressbook://B1B6819F-9CFD-11D8-8561-000D93C1A604:ABPerson":mailto:jens.enders@skyrix.com
-ATTENDEE;CN="Jens Muenster";DIR="addressbook://B1BBA42E-9CFD-11D8-8561-000D93C1A604:ABPerson":mailto:jens.muenster@skyrix.com
-ATTENDEE;CN="Laurent Pierre";DIR="addressbook://9337C270-A825-11D8-B930-000D93C1A604:ABPerson":mailto:laurent.pierre@linagora.com
-ATTENDEE;CN="Marcel Weiher";DIR="addressbook://B1F9BB12-9CFD-11D8-8561-000D93C1A604:ABPerson":mailto:marcel@metaobject.co
-DTSTAMP:20040520T140002Z
-UID:BD91C454-AA65-11D8-84CA-000D93C1A604
-SEQUENCE:3
-STATUS:CONFIRMED
-DTSTART;TZID=Europe/Berlin:20040814T120000
-SUMMARY:SIZE EVENT
-X-WR-ITIPSTATUSML:UNCLEAN
-END:VEVENT
-'
-);
-
-INSERT INTO SOGo_helge_privcal_quick
- ( c_name, uid, startdate, enddate, title, participants, isallday, iscycle,
- location, partmails, sequence )
-VALUES (
- 'BD91C454-AA65-11D8-84CA-000D93C1A604',
- 'BD91C454-AA65-11D8-84CA-000D93C1A604',
- 1092477600,
- 1092481200,
- 'SIZE EVENT',
- 'Elke Bethke, Erik Doernenburg, Christian Schnelle, Chris Herrenberger, Horst Parplies, Imdat Solak, Jens Enders, Jens Muenster, Laurent Pierre, Marcel Weiher',
- 0,
- 0,
- NULL,
- 'E.Bethke@Sachsen-Anhalt-Lotto.de, erik@x101.net, cs@enervation.de, nomail, horst.parplies@freenet.de, imdat@solak.de, jens.enders@skyrix.com, jens.muenster@skyrix.com, laurent.pierre@linagora.com, marcel@metaobject.com',
- 1
-);
+++ /dev/null
--- $Id$
---
--- (C) 2004 SKYRIX Software AG
---
-
-DELETE FROM SOGo_helge_privcal
- WHERE c_name = 'BD91C454-AA65-11D8-84CA-000D93C1A604';
-DELETE FROM SOGo_helge_privcal_quick
- WHERE c_name = 'BD91C454-AA65-11D8-84CA-000D93C1A604';
-
-
-
-INSERT INTO SOGo_helge_privcal
- ( c_name, c_creationdate, c_lastmodified, c_version, c_content )
-VALUES (
- 'BD91C454-AA65-11D8-84CA-000D93C1A604',
- 928383,
- 928383,
- 1,
-
- 'BEGIN:VEVENT\r2
-DURATION:PT1H\r
-ATTENDEE;CN="Elke Bethke";DIR="addressbook://B156F3F0-9CFD-11D8-8561-000\r
- D93C1A604:ABPerson":mailto:E.Bethke@Sachsen-Anhalt-Lotto.de\r
-ATTENDEE;CN="Erik Doernenburg";DIR="addressbook://B15FCB0F-9CFD-11D8-8561\r
- -000D93C1A604:ABPerson":mailto:erik@x101.net\r
-ATTENDEE;CN="Christian Schnelle";DIR="addressbook://B1418D4E-9CFD-11D8-8\r
- 561-000D93C1A604:ABPerson":mailto:cs@enervation.de\r
-ATTENDEE;CN="Chris Herrenberger";DIR="addressbook://B14A390C-9CFD-11D8-8\r
- 561-000D93C1A604:ABPerson":invalid:nomail\r
-ATTENDEE;CN="Horst Parplies";DIR="addressbook://B19B47E5-9CFD-11D8-8561-\r
- 000D93C1A604:ABPerson":mailto:horst.parplies@freenet.de\r
-ATTENDEE;CN="Imdat Solak";DIR="addressbook://B19EDB62-9CFD-11D8-8561-000\r
- D93C1A604:ABPerson":mailto:imdat@solak.de\r
-ATTENDEE;CN="Jens Enders";DIR="addressbook://B1B6819F-9CFD-11D8-8561-000\r
- D93C1A604:ABPerson":mailto:jens.enders@skyrix.com\r
-ATTENDEE;CN="Jens Muenster";DIR="addressbook://B1BBA42E-9CFD-11D8-8561-00\r
- 0D93C1A604:ABPerson":mailto:jens.muenster@skyrix.com\r
-ATTENDEE;CN="Laurent Pierre";DIR="addressbook://9337C270-A825-11D8-B930-\r
- 000D93C1A604:ABPerson":mailto:laurent.pierre@linagora.com\r
-ATTENDEE;CN="Marcel Weiher";DIR="addressbook://B1F9BB12-9CFD-11D8-8561-0\r
- 00D93C1A604:ABPerson":mailto:marcel@metaobject.co\r
-DTSTAMP:20040520T140002Z\r
-UID:BD91C454-AA65-11D8-84CA-000D93C1A604\r
-SEQUENCE:3\r
-STATUS:CONFIRMED\r
-DTSTART;TZID=Europe/Berlin:20040618T160000\r
-SUMMARY:SIZE EVENT\r
-X-WR-ITIPSTATUSML:UNCLEAN\r
-END:VEVENT\r
-'
-);
-
-INSERT INTO SOGo_helge_privcal_quick
- ( c_name, uid, startdate, enddate, title, participants )
-VALUES (
- 'BD91C454-AA65-11D8-84CA-000D93C1A604',
- 'BD91C454-AA65-11D8-84CA-000D93C1A604',
- 8928837,
- 8929000,
- 'SIZE EVENT',
- 'Elke Bethke, Erik Doernenburg, Christian Schnelle, Chris Herrenberger, Horst Parplies, Imdat Solak, Jens Enders, Jens Muenster, Laurent Pierre, Marcel Weiher'
-);
+++ /dev/null
---
--- (C) 2004 SKYRIX Software AG
---
-
-DELETE FROM SOGo_test_contacts_blob
- WHERE c_name = 'contact_donald';
-DELETE FROM SOGo_test_contacts_quick
- WHERE c_name = 'contact_donald';
-
-INSERT INTO SOGo_test_contacts_blob
- ( c_name, c_creationdate, c_lastmodified, c_version, c_content )
-VALUES (
- 'contact_donald',
- 928383,
- 928383,
- 1,
- '{
- givenName="Donald"; cn="Donald Duck"; sn="Duck";
- l="Entenhausen";
- mail="dd@entenhausen.com";
- o="Geldspeicher AG";
- ou="Support";
- telephoneNumber="0190-1234567";
- }'
-);
-
-INSERT INTO SOGo_test_contacts_quick
- ( c_name, givenname, cn, sn, l, mail, o, ou, telephoneNumber )
-VALUES (
- 'contact_donald', 'Donald', 'Donald Duck', 'Duck', 'Entenhausen',
- 'dd@entenhausen.com', 'Geldspeicher AG', 'Support',
- '0190-1234567'
-);
acquire: (BOOL) _flag
{
id obj;
+ BOOL isPut;
+ isPut = NO;
/* first check attributes directly bound to the application */
obj = [super lookupName:_key inContext:_ctx acquire:NO];
if (!obj)
{
if ([[[_ctx request] method] isEqualToString: @"PUT"])
- {
- obj = [[SOGoContactGCSEntry alloc] initWithName: _key
- inContainer: self];
- [obj autorelease];
- }
+ {
+ if ([_key isEqualToString: @"PUT"])
+ isPut = YES;
+ else
+ obj = [SOGoContactGCSEntry objectWithName: _key
+ inContainer: self];
+ }
else
obj = [self lookupContactWithId: _key];
}
- if (!obj)
- obj = [NSException exceptionWithHTTPStatus:404 /* Not Found */];
+// if (!(obj || isPut))
+// obj = [NSException exceptionWithHTTPStatus:404 /* Not Found */];
// #if 0
// if ([[self ocsFolder] versionOfContentWithName:_key])
/* actions */
+// - (id) lookupName:
+// {
+// SoSelectorInvocation *invocation;
+// NSString *name;
+
+// name = [NSString stringWithFormat: @"%@:", [_key davMethodToObjC]];
+
+// invocation = [[SoSelectorInvocation alloc]
+// initWithSelectorNamed: name
+// addContextParameter: YES];
+// [invocation autorelease];
+
+// return invocation;
+
+// }
+
- (id) PUTAction: (WOContext *) _ctx
{
WORequest *rq;
#import <GDLContentStore/GCSFolderManager.h>
#import <GDLContentStore/GCSFolder.h>
#import <GDLContentStore/GCSFolderType.h>
+#import <SaxObjC/XMLNamespaces.h>
#import "SOGoPermissions.h"
#import "SOGoFolder.h"
if ([self respondsToSelector: @selector (groupDavResourceType)])
{
groupDavCollection = [NSArray arrayWithObjects: [self groupDavResourceType],
- @"http://groupdav.org/", @"G", nil];
+ XMLNS_GROUPDAV, nil];
rType = [NSArray arrayWithObjects: @"collection", groupDavCollection, nil];
}
else
superclass = "SOGoObject";
protectedBy = "Access Object";
defaultRoles = {
- "Access Object" = ( "Owner", "AuthorizedSubscriber" );
+ "Access Object" = ( "Owner", "ObjectViewer" );
};
};
SOGoFolder = {
protectedBy = "Access Object";
defaultRoles = {
"Change Images And Files" = ( "Owner", "ObjectEditor" );
- "WebDAV Access" = ( "Owner", "AuthorizedSubscriber" );
- "Access Object" = ( "Owner", "AuthorizedSubscriber" );
+ "WebDAV Access" = ( "Owner", "ObjectViewer" );
+ "Access Object" = ( "Owner", "ObjectViewer" );
"Access Contents Information" = ( "Owner", "ObjectViewer" );
};
};
><td colspan="6" class="tbtv_navcell"
><var:if condition="hasPrevious">
<a href="#"
- onclick="openMailboxAtIndex(this);"
idx="1"><var:string label:value="first"/></a> |
<a href="#"
- onclick="openMailboxAtIndex(this);"
var:idx="prevFirstMessageNumber"
><var:string label:value="previous"/></a> |
</var:if>
<var:string value="sortedUIDs.count" />
<var:if condition="hasNext"
>| <a href="#"
- onclick="openMailboxAtIndex(this);"
var:idx="nextFirstMessageNumber"
><var:string label:value="next" /></a>
</var:if
// triggerAjaxRequest(mailbox, 'toolbar', toolbarCallback);
}
-function openMailboxAtIndex(element) {
- var idx = element.getAttribute("idx");
+function openMailboxAtIndex(event) {
+ var idx = this.getAttribute("idx");
var url = ApplicationBaseURL + currentMailbox + "/view?noframe=1&idx=" + idx;
if (document.messageListAjaxRequest) {
document.messageListAjaxRequest
= triggerAjaxRequest(url, messageListCallback);
- return false;
+ event.preventDefault();
}
function messageListCallback(http) {
var rows = messageList.tBodies[0].rows;
var start = 0;
if (rows.length > 1) {
- while (rows[start].cells[0].hasClassName("tbtv_headercell")
- || rows[start].cells[0].hasClassName("tbtv_navcell"))
+ if (rows[start].cells[0].hasClassName("tbtv_headercell"))
start++;
+ if (rows[start].cells[0].hasClassName("tbtv_navcell")) {
+ log("start:" + start);
+ var anchors = $(rows[start].cells[0]).childNodesWithTag("a");
+ log("nr anchors: " + anchors.length);
+ for (var i = 0; i < anchors.length; i++)
+ Event.observe(anchors[i], "click", openMailboxAtIndex);
+ start++;
+ }
for (var i = start; i < rows.length; i++) {
Event.observe(rows[i], "mousedown", onRowClick);
Event.observe(rows[i], "contextmenu", onMessageContextMenu);