mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-03 02:25:25 +00:00
merge of '94a1d0365a333120f4aa3a3d2b1eac63bb97797b'
and 'bd49b8f89c873201475aa9e23f9d1876e0f158f7' Monotone-Parent: 94a1d0365a333120f4aa3a3d2b1eac63bb97797b Monotone-Parent: bd49b8f89c873201475aa9e23f9d1876e0f158f7 Monotone-Revision: fc8e6bbe0cff3fd2f022a39f28fc8c57fac144e9 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-08-21T16:01:44 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
2007-08-21 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor
|
||||
-takeValuesFromRequest:_rqinContext:_ctx]): save the category
|
||||
selected in the dialog.
|
||||
([UIxComponentEditor -setComponent:newComponent]): retrieve the
|
||||
first category, if ever, of the calendar entity.
|
||||
|
||||
* UI/MailerUI/UIxMailMainFrame.m ([UIxMailMainFrame
|
||||
-composeAction]): restored method since it is needed by the
|
||||
address book.
|
||||
|
||||
@@ -241,7 +241,7 @@ static BOOL sendEMailNotifications = NO;
|
||||
|
||||
- (NSException *) delete
|
||||
{
|
||||
return [self deleteWithBaseSequence:0];
|
||||
return [self deleteWithBaseSequence: 0];
|
||||
}
|
||||
|
||||
/* EMail Notifications */
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
NSString *priority;
|
||||
NSString *privacy;
|
||||
NSString *status;
|
||||
NSString *category;
|
||||
NSArray *categories;
|
||||
NSDictionary *cycle;
|
||||
NSString *cycleEnd;
|
||||
|
||||
@@ -121,6 +121,19 @@
|
||||
[emails release];
|
||||
}
|
||||
|
||||
- (void) _loadCategories
|
||||
{
|
||||
NSString *compCategories, *simpleCategory;
|
||||
|
||||
compCategories = [component categories];
|
||||
if ([compCategories length] > 0)
|
||||
{
|
||||
simpleCategory = [[compCategories componentsSeparatedByString: @","]
|
||||
objectAtIndex: 0];
|
||||
ASSIGN (category, [simpleCategory uppercaseString]);
|
||||
}
|
||||
}
|
||||
|
||||
/* warning: we use this method which will be triggered by the template system
|
||||
when the page is instantiated, but we should find another and cleaner way of
|
||||
doing this... for example, when the clientObject is set */
|
||||
@@ -145,6 +158,7 @@
|
||||
ASSIGN (status, [component status]);
|
||||
ASSIGN (categories, [[component categories] commaSeparatedValues]);
|
||||
ASSIGN (organizer, [component organizer]);
|
||||
[self _loadCategories];
|
||||
[self _loadAttendees];
|
||||
}
|
||||
// /* cycles */
|
||||
@@ -300,6 +314,16 @@
|
||||
return categories;
|
||||
}
|
||||
|
||||
- (void) setCategory: (NSArray *) newCategory
|
||||
{
|
||||
ASSIGN (category, newCategory);
|
||||
}
|
||||
|
||||
- (NSString *) category
|
||||
{
|
||||
return category;
|
||||
}
|
||||
|
||||
- (NSString *) itemCategoryText
|
||||
{
|
||||
return [self labelForKey:
|
||||
@@ -822,6 +846,7 @@
|
||||
[component setComment: comment];
|
||||
[component setUrl: url];
|
||||
[component setAccessClass: privacy];
|
||||
[component setCategories: [category capitalizedString]];
|
||||
[self _handleAttendeesEdition];
|
||||
[self _handleOrganizer];
|
||||
clientObject = [self clientObject];
|
||||
|
||||
@@ -6,11 +6,6 @@ var currentContactFolder = null;
|
||||
var usersRightsWindowHeight = 200;
|
||||
var usersRightsWindowWidth = 450;
|
||||
|
||||
function openContactWindow(sender, url) {
|
||||
var msgWin = window.open(url, null, "width=450,height=600,resizable=0");
|
||||
msgWin.focus();
|
||||
}
|
||||
|
||||
function validateEditorInput(sender) {
|
||||
var errortext = "";
|
||||
var field;
|
||||
@@ -280,9 +275,8 @@ function onContactRowClick(event, node) {
|
||||
function onContactRowDblClick(event, node) {
|
||||
var contactId = node.getAttribute('id');
|
||||
|
||||
openContactWindow(null,
|
||||
URLForFolderID(currentContactFolder)
|
||||
+ "/" + contactId + "/edit");
|
||||
openContactWindow(URLForFolderID(currentContactFolder)
|
||||
+ "/" + contactId + "/edit", contactId);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -290,9 +284,8 @@ function onContactRowDblClick(event, node) {
|
||||
function onMenuEditContact(event) {
|
||||
var contactId = document.menuTarget.getAttribute('id');
|
||||
|
||||
openContactWindow(null,
|
||||
URLForFolderID(currentContactFolder)
|
||||
+ "/" + contactId + "/edit");
|
||||
openContactWindow(URLForFolderID(currentContactFolder)
|
||||
+ "/" + contactId + "/edit", contactId);
|
||||
}
|
||||
|
||||
function onMenuWriteToContact(event) {
|
||||
@@ -311,9 +304,8 @@ function onToolbarEditSelectedContacts(event) {
|
||||
var rows = contactsList.getSelectedRowsId();
|
||||
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
openContactWindow(null,
|
||||
URLForFolderID(currentContactFolder)
|
||||
+ "/" + rows[i] + "/edit");
|
||||
openContactWindow(URLForFolderID(currentContactFolder)
|
||||
+ "/" + rows[i] + "/edit", rows[i]);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -372,13 +364,7 @@ function newEmailTo(sender) {
|
||||
var mailto = sanitizeMailTo(sender.parentNode.parentNode.menuTarget.innerHTML);
|
||||
|
||||
if (mailto.length > 0)
|
||||
{
|
||||
w = window.open("compose?mailto=" + mailto,
|
||||
"SOGo_compose",
|
||||
"width=680,height=520,resizable=1,scrollbars=1,toolbar=0," +
|
||||
"location=0,directories=0,status=0,menubar=0,copyhistory=0");
|
||||
w.focus();
|
||||
}
|
||||
openMailComposeWindow("compose?mailto=" + mailto);
|
||||
|
||||
return false; /* stop following the link */
|
||||
}
|
||||
@@ -411,13 +397,8 @@ function onHeaderClick(event) {
|
||||
preventDefault(event);
|
||||
}
|
||||
|
||||
function registerDraggableMessageNodes() {
|
||||
log ("can we drag...");
|
||||
}
|
||||
|
||||
function newContact(sender) {
|
||||
openContactWindow(sender,
|
||||
URLForFolderID(currentContactFolder) + "/new");
|
||||
openContactWindow(URLForFolderID(currentContactFolder) + "/new");
|
||||
|
||||
return false; /* stop following the link */
|
||||
}
|
||||
|
||||
@@ -19,9 +19,7 @@ function openMessageWindow(msguid, url) {
|
||||
wId += "SOGo_msg_" + msguid;
|
||||
markMailReadInWindow(window, msguid);
|
||||
}
|
||||
var msgWin = window.open(url, wId,
|
||||
"width=680,height=520,resizable=1,scrollbars=1,toolbar=0,"
|
||||
+ "location=0,directories=0,status=0,menubar=0,copyhistory=0");
|
||||
var msgWin = openMailComposeWindow(url, wId);
|
||||
if (msguid) {
|
||||
msgWin.messageId = msguid;
|
||||
msgWin.messageURL = ApplicationBaseURL + currentMailbox + "/" + msguid;
|
||||
@@ -122,25 +120,6 @@ function markMailReadInWindow(win, msguid) {
|
||||
return markMailInWindow(win, msguid, true);
|
||||
}
|
||||
|
||||
/* main window */
|
||||
|
||||
function reopenToRemoveLocationBar() {
|
||||
// we cannot really use this, see below at the close comment
|
||||
if (window.locationbar && window.locationbar.visible) {
|
||||
newwin = window.open(window.location.href, "SOGo",
|
||||
"width=800,height=600,resizable=1,scrollbars=1," +
|
||||
"toolbar=0,location=0,directories=0,status=0," +
|
||||
"menubar=0,copyhistory=0");
|
||||
if (newwin) {
|
||||
window.close(); // this does only work for windows opened by scripts!
|
||||
newwin.focus();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/* mail list reply */
|
||||
|
||||
function openMessageWindowsForSelection(action, firstOnly) {
|
||||
@@ -393,9 +372,7 @@ function onComposeMessage() {
|
||||
function composeNewMessage() {
|
||||
var account = currentMailbox.split("/")[1];
|
||||
var url = ApplicationBaseURL + "/" + account + "/compose";
|
||||
window.open(url, null,
|
||||
"width=680,height=520,resizable=1,scrollbars=1,toolbar=0,"
|
||||
+ "location=0,directories=0,status=0,menubar=0,copyhistory=0");
|
||||
openMailComposeWindow(url);
|
||||
}
|
||||
|
||||
function openMailbox(mailbox, reload, idx) {
|
||||
@@ -823,9 +800,7 @@ function onMenuViewMessageSource(event) {
|
||||
if (rows.length > 0) {
|
||||
var url = (ApplicationBaseURL + currentMailbox + "/"
|
||||
+ rows[0].substr(4) + "/viewsource");
|
||||
window.open(url, "",
|
||||
"width=680,height=520,resizable=1,scrollbars=1,toolbar=0,"
|
||||
+ "location=0,directories=0,status=0,menubar=0,copyhistory=0");
|
||||
openMailComposeWindow(url);
|
||||
}
|
||||
|
||||
preventDefault(event);
|
||||
@@ -842,10 +817,7 @@ function newContactFromEmail(event) {
|
||||
var url = UserFolderURL + "Contacts/new?contactEmail=" + email;
|
||||
if (c_name)
|
||||
url += "&contactFN=" + c_name;
|
||||
w = window.open(url, null,
|
||||
"width=546,height=490,resizable=1,scrollbars=1,toolbar=0,"
|
||||
+ "location=0,directories=0,status=0,menubar=0,copyhistory=0");
|
||||
w.focus();
|
||||
openContactWindow(url);
|
||||
}
|
||||
|
||||
return false; /* stop following the link */
|
||||
|
||||
@@ -212,8 +212,20 @@ function openUserFolderSelector(callback, type) {
|
||||
w.focus();
|
||||
}
|
||||
|
||||
function openMailComposeWindow(url) {
|
||||
var w = window.open(url, null,
|
||||
function openContactWindow(url, wId) {
|
||||
if (!wId)
|
||||
wId = "" + (new Date().getTime());
|
||||
var w = window.open(url, wId,
|
||||
"width=450,height=600,resizable=0");
|
||||
w.focus();
|
||||
|
||||
return w;
|
||||
}
|
||||
|
||||
function openMailComposeWindow(url, wId) {
|
||||
if (!wId)
|
||||
wId = "" + (new Date().getTime());
|
||||
var w = window.open(url, wId,
|
||||
"width=680,height=520,resizable=1,scrollbars=1,toolbar=0,"
|
||||
+ "location=0,directories=0,status=0,menubar=0"
|
||||
+ ",copyhistory=0");
|
||||
|
||||
Reference in New Issue
Block a user