merge of '5d72cbe984ee92d95ab972816ac529dab70a9143'

and 'c2585f82f4d8e290b032bc65809c929cabaa8389'

Monotone-Parent: 5d72cbe984ee92d95ab972816ac529dab70a9143
Monotone-Parent: c2585f82f4d8e290b032bc65809c929cabaa8389
Monotone-Revision: f2fe2bb08a995eb4ae8043ab64aef1f18a8b3823

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-03-24T20:44:50
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2009-03-24 20:44:50 +00:00
7 changed files with 94 additions and 52 deletions
+5
View File
@@ -1,3 +1,8 @@
2009-03-24 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Scheduler/UIxCalMainView.m: if the module settings key
exists, do not reset it.
2009-03-24 Ludovic Marcotte <lmarcotte@inverse.ca>
* UI/MailerUI/UIxMailListView.m
+1 -1
View File
@@ -561,8 +561,8 @@ SEL SOGoSelectorForPropertySetter (NSString *property)
[self _davPrivilegesFromRoles: roles]);
[currentAce addObject: currentGrant];
[aces addObject: davElementWithContent (@"ace", @"DAV:", currentAce)];
[currentAce release];
}
[currentAce release];
}
- (void) _fillAcesWithRolesForPseudoPrincipals: (NSMutableArray *) aces
+1 -1
View File
@@ -1,5 +1,5 @@
# Version file
SUBMINOR_VERSION:=0
SUBMINOR_VERSION:=1
# v0.9.1 requires Main v0.9.59
+6 -11
View File
@@ -40,9 +40,6 @@
#import <Appointments/SOGoAppointmentFolder.h>
static NSMutableArray *monthMenuItems = nil;
static NSMutableArray *yearMenuItems = nil;
@implementation UIxCalMainView
- (void) _setupContext
@@ -60,24 +57,22 @@ static NSMutableArray *yearMenuItems = nil;
moduleSettings = [ud objectForKey: module];
if (!moduleSettings)
{
moduleSettings = [NSMutableDictionary new];
[moduleSettings autorelease];
moduleSettings = [NSMutableDictionary dictionary];
[ud setObject: moduleSettings forKey: module];
}
[ud setObject: moduleSettings forKey: module];
}
- (NSArray *) monthMenuItems
{
static NSMutableArray *monthMenuItems = nil;
unsigned int count;
if (!monthMenuItems)
{
monthMenuItems = [NSMutableArray arrayWithCapacity: 12];
monthMenuItems = [[NSMutableArray alloc] initWithCapacity: 12];
for (count = 1; count < 13; count++)
[monthMenuItems addObject:
[NSString stringWithFormat: @"%.2d", count]];
[monthMenuItems retain];
}
return monthMenuItems;
@@ -100,15 +95,15 @@ static NSMutableArray *yearMenuItems = nil;
- (NSArray *) yearMenuItems
{
static NSMutableArray *yearMenuItems = nil;
int count, year;
if (!yearMenuItems)
{
year = [[NSCalendarDate date] yearOfCommonEra];
yearMenuItems = [NSMutableArray arrayWithCapacity: 11];
yearMenuItems = [[NSMutableArray alloc] initWithCapacity: 11];
for (count = -5; count < 6; count++)
[yearMenuItems addObject: [NSNumber numberWithInt: year + count]];
[yearMenuItems retain];
}
return yearMenuItems;
+12 -8
View File
@@ -94,15 +94,16 @@ iRANGE(2);
- (id) init
{
UIxDatePicker *datePicker;
if ((self = [super init]))
{
UIxDatePicker *datePicker;
// We must instanciate a UIxDatePicker object to retrieve
// the proper date format to use.
datePicker = [[UIxDatePicker alloc] initWithContext: context];
dateFormat = [datePicker dateFormat];
[datePicker release];
component = nil;
componentCalendar = nil;
[self setPrivacy: @"PUBLIC"];
@@ -127,8 +128,6 @@ iRANGE(2);
repeat7 = nil;
range1 = nil;
range2 = nil;
[datePicker release];
}
return self;
@@ -167,7 +166,7 @@ iRANGE(2);
[repeat7 release];
[range1 release];
[range2 release];
[component release];
[componentCalendar release];
@@ -195,7 +194,7 @@ iRANGE(2);
[names appendFormat: @"%@,", [currentAttendee cn]];
else
[names appendFormat: @"%@,", [currentAttendee rfc822Email]];
[emails appendFormat: @"%@,", [currentAttendee rfc822Email]];
uid = [um getUIDForEmail: [currentAttendee rfc822Email]];
if (uid != nil)
@@ -363,7 +362,12 @@ iRANGE(2);
[self setRange1: @"0"];
}
else
DESTROY(repeat);
{
DESTROY(repeat);
repeatType = @"0";
repeat1 = @"0";
repeat2 = @"1";
}
}
/* warning: we use this method which will be triggered by the template system
+1 -8
View File
@@ -29,13 +29,6 @@
@implementation UIxRecurrenceEditor
- (id) defaultAction
{
[[self parent] setToolbar: @""];
return self;
}
- (NSArray *) monthlyRepeatList
{
static NSArray *monthlyRepeatList = nil;
@@ -43,7 +36,7 @@
if (!monthlyRepeatList)
{
monthlyRepeatList = [NSArray arrayWithObjects: @"First", @"Second", @"Third",
@"Fourth", @"Fift", @"Last", nil];
@"Fourth", @"Fift", @"Last", nil];
[monthlyRepeatList retain];
}
+68 -23
View File
@@ -86,10 +86,20 @@ function initializeFormValues() {
$("repeatType").value = repeatType;
// Default values
var startTimeDate = parent$("startTime_date").value.asDate();
$('yearlyDayField').value = startTimeDate.getDate();
$('yearlyMonth1').value = startTimeDate.getMonth();
$("weekDay"+startTimeDate.getDay()).addClassName("_selected");
$("monthDay"+startTimeDate.getDate()).addClassName("_selected");
$('recurrence_form').setRadioValue('dailyRadioButtonName', 0);
$('recurrence_form').setRadioValue('monthlyRadioButtonName', 0);
$('recurrence_form').setRadioValue('monthlyRadioButtonName', 1);
$('recurrence_form').setRadioValue('yearlyRadioButtonName', 0);
$('endDate_date').disabled = true;
$('dailyDaysField').value = "1";
$('weeklyWeeksField').value = "1";
$('monthlyMonthsField').value = "1";
$('yearlyYearsField').value = "1";
if (repeatType == 0) {
// Repeat daily
@@ -101,6 +111,9 @@ function initializeFormValues() {
$('weeklyWeeksField').value = parent$("repeat1").value;
// log ("div: " + weekDiv);
// log ("days: " + parent$("repeat2").value);
for (var i = 0; i < 7; i++) {
$("weekDay" + i).removeClassName("_selected");
}
var days = "" + parent$("repeat2").value;
if (days.length > 0) {
var daysArray = days.split(",");
@@ -116,6 +129,10 @@ function initializeFormValues() {
$('monthlyRepeat').value = parent$("repeat3").value;
$('monthlyDay').value = parent$("repeat4").value;
var days = "" + parent$("repeat5").value;
for (var i = 0; i < 31; i++) {
$("monthDay" + (i + 1)).removeClassName("_selected");
}
if (days.length > 0) {
var daysArray = days.split(",");
daysArray.each(function(index) {
@@ -253,37 +270,65 @@ function handleMonthlyRecurrence() {
return validate;
}
function validateYearlyRecurrence() {
var errors = ["Please specify a numerical value in the Year(s)"
+ " field greater or equal to 1.",
"Please specify a numerical value in the month day"
+ " field greater or equal to 1."];
var errorToShow = 0;
var fieldValue = "" + $('yearlyYearsField').value;
if (fieldValue.length > 0) {
// We check if the yearlyYearsField really contains an integer
var v = parseInt(fieldValue);
if (!isNaN(v) && v > 0) {
errorToShow = 1;
fieldValue = "" + $('yearlyDayField').value;
if (fieldValue.length > 0) {
// We check if the yearlyYearsField really contains an integer
var v = parseInt(fieldValue);
if (!isNaN(v) && v > 0) {
errorToShow = -1;
}
}
}
}
if (errorToShow > -1)
window.alert(errors[errorToShow]);
return (errorToShow == -1);
}
function handleYearlyRecurrence() {
var validate = false;
var radioValue = $('recurrence_form').getRadioValue('yearlyRadioButtonName');
// FIXME - right now we do not support rules
// such as Every Second Tuesday of February
if (radioValue == 1)
window.alert("This type of recurrence is currently unsupported.");
else {
var showError = true;
var fieldValue = "" + $('yearlyYearsField').value;
if (fieldValue.length > 0) {
// We check if the yearlyYearsField really contains an integer
var v = parseInt(fieldValue);
if (!isNaN(v) && v > 0) {
validate = true;
showError = false;
parent$("repeat1").value = fieldValue;
parent$("repeat2").value = radioValue;
parent$("repeat3").value = $('yearlyDayField').value;
parent$("repeat4").value = $('yearlyMonth1').value;
parent$("repeat5").value = $('yearlyRepeat').value;
parent$("repeat6").value = $('yearlyDay').value;
parent$("repeat7").value = $('yearlyMonth2').value;
}
}
if (showError)
window.alert("Please specify a numerical value in the Year(s) field greater or equal to 1.");
if (validateYearlyRecurrence()) {
var fieldValue = "" + $('yearlyYearsField').value;
if (fieldValue.length > 0) {
// We check if the yearlyYearsField really contains an integer
var v = parseInt(fieldValue);
if (!isNaN(v) && v > 0) {
validate = true;
showError = false;
parent$("repeat1").value = fieldValue;
parent$("repeat2").value = radioValue;
parent$("repeat3").value = $('yearlyDayField').value;
parent$("repeat4").value = $('yearlyMonth1').value;
parent$("repeat5").value = $('yearlyRepeat').value;
parent$("repeat6").value = $('yearlyDay').value;
parent$("repeat7").value = $('yearlyMonth2').value;
}
}
}
else
validate = false;
}
return validate;