Monotone-Parent: 1b7e32ba68558b623b1ae7c252ace2acac8680fd

Monotone-Revision: a157cdab1102429e9d7b24c14204d15f42e774f5

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2008-01-15T21:45:48
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2008-01-15 21:45:48 +00:00
parent 0e71166572
commit 341c5477fe
17 changed files with 490 additions and 442 deletions
@@ -21,6 +21,14 @@
"Friday" = "Friday";
"Saturday" = "Saturday";
"Sun" = "Sun";
"Mon" = "Mon";
"Tue" = "Tue";
"Wed" = "Wed";
"Thu" = "Thu";
"Fri" = "Fri";
"Sat" = "Sat";
"a2_Sunday" = "Su";
"a2_Monday" = "Mo";
"a2_Tuesday" = "Tu";
@@ -291,6 +299,35 @@
"cycle_end_never" = "cycle_end_never";
"cycle_end_until" = "cycle_end_until";
"Recurrence pattern" = "Recurrence pattern";
"Range of recurrence" = "Range of recurrence";
"Repeat" = "Repeat";
"Daily" = "Daily";
"Weekly" = "Weekly";
"Monthly" = "Monthly";
"Yearly" = "Yearly";
"Every" = "Every";
"Days" = "Days";
"Week(s)" = "Week(s)";
"On" = "On";
"Month(s)" = "Month(s)";
"The" = "The";
"Recur on day(s)" = "Recur on day(s)";
"Year(s)" = "Year(s)";
"cycle_of" = "of";
"No end date" = "No end date";
"Create" = "Create";
"Appointment(s)" = "Appointment(s)";
"Repeat until" = "Repeat until";
"First" = "First";
"Second" = "Second";
"Third" = "Third";
"Fourth" = "Fourth";
"Fift" = "Fift";
"Last" = "Last";
/* Appointment categories */
"category_NONE" = "None";
+43 -6
View File
@@ -21,6 +21,14 @@
"Friday" = "Vendredi";
"Saturday" = "Samedi";
"Sun" = "Dim";
"Mon" = "Lun";
"Tue" = "Mar";
"Wed" = "Mer";
"Thu" = "Jeu";
"Fri" = "Ven";
"Sat" = "Sam";
"a2_Sunday" = "Di";
"a2_Monday" = "Lu";
"a2_Tuesday" = "Ma";
@@ -289,6 +297,35 @@
"cycle_end_never" = "Jamais";
"cycle_end_until" = "À la date :";
"Recurrence pattern" = "Définir la fréquence";
"Range of recurrence" = "Fenêtre de répétition";
"Repeat" = "Répétition";
"Daily" = "quotidienne";
"Weekly" = "hebdomadaire";
"Monthly" = "mensuelle";
"Yearly" = "annuelle";
"Every" = "Chaque";
"Days" = "Jours";
"Week(s)" = "Semaine(s)";
"On" = "Le";
"Month(s)" = "Mois";
"The" = "Le";
"Recur on day(s)" = "Se répète le(s) jour(s)";
"Year(s)" = "Année(s)";
"cycle_of" = "de";
"No end date" = "Pas de date de fin";
"Create" = "Créer";
"Appointment(s)" = "Rendez-vous";
"Repeat until" = "Répéter jusqu'à";
"First" = "premier";
"Second" = "deuxieme";
"Third" = "troisieme";
"Fourth" = "quatrieme";
"Fift" = "cinquieme";
"Last" = "dernier";
/* Appointment categories */
"category_NONE" = "Aucune";
@@ -315,12 +352,12 @@
"category_VACATION" = "Absence";
"repeat_NEVER" = "Ne se répète pas";
"repeat_DAILY" = "quotidiennement";
"repeat_WEEKLY" = "hebdomadairement";
"repeat_BI-WEEKLY" = "bi-hebdomadairement";
"repeat_EVERY WEEKDAY" = "les jours ouvrables";
"repeat_MONTHLY" = "mensuellement";
"repeat_YEARLY" = "annuellement";
"repeat_DAILY" = "Quotidiennement";
"repeat_WEEKLY" = "Hebdomadairement";
"repeat_BI-WEEKLY" = "Bi-hebdomadairement";
"repeat_EVERY WEEKDAY" = "Chaque jour ouvrable";
"repeat_MONTHLY" = "Mensuellement";
"repeat_YEARLY" = "Annuellement";
"repeat_CUSTOM" = "Personnaliser...";
"reminder_NONE" = "Pas de rappel";
+1 -5
View File
@@ -104,11 +104,7 @@ static NSArray *filters = nil;
- (NSString *) filterLabel
{
#if 1
return [[[self context] page] labelForKey: [self valueForKey:@"filter"]];
#else
return [self valueForKey: @"filter"];
#endif
return [self labelForKey: [self valueForKey:@"filter"]];
}
- (NSString *) selectedFilter
+3 -1
View File
@@ -1,6 +1,6 @@
/* UIxCalendarSelector.h - this file is part of SOGo
*
* Copyright (C) 2007 Inverse groupe conseil
* Copyright (C) 2007, 2008 Inverse groupe conseil
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
@@ -41,6 +41,8 @@
- (void) setCurrentCalendar: (NSDictionary *) newCalendar;
- (NSDictionary *) currentCalendar;
- (WOResponse *) calendarsListAction;
@end
#endif /* UIXCALENDARSELECTOR_H */
+16 -1
View File
@@ -1,6 +1,6 @@
/* UIxCalendarSelector.m - this file is part of SOGo
*
* Copyright (C) 2007 Inverse groupe conseil
* Copyright (C) 2007, 2008 Inverse groupe conseil
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
@@ -24,8 +24,11 @@
#import <Foundation/NSDictionary.h>
#import <Foundation/NSValue.h>
#import <NGObjWeb/WOResponse.h>
#import <SOGo/NSDictionary+Utilities.h>
#import <SoObjects/SOGo/NSArray+Utilities.h>
#import <SoObjects/SOGo/SOGoUser.h>
#import <Appointments/SOGoAppointmentFolder.h>
@@ -171,4 +174,16 @@ colorForNumber (unsigned int number)
keysWithFormat: @"color: %{color}; background-color: %{color};"];
}
- (WOResponse *) calendarsListAction
{
WOResponse *response;
response = [self responseWithStatus: 200];
[response setHeader: @"text/plain; charset=utf-8"
forKey: @"content-type"];
[response appendContentString: [[self calendars] jsonRepresentation]];
return response;
}
@end /* UIxCalendarSelector */
+1 -1
View File
@@ -226,7 +226,7 @@
iCalRecurrenceRule *rule;
[self setRepeat: @"CUSTOM"];
rule = [[component recurrenceRules] lastObject];
// If we either have an end date or a recurrence count
+1 -8
View File
@@ -28,23 +28,16 @@
@interface UIxRecurrenceEditor : UIxComponent
{
NSString *item, *repeat;
NSCalendarDate *aptStartDate;
}
- (NSArray *) dailyRadioList;
- (NSArray *) weeklyCheckBoxList;
- (NSArray *) dayMonthList;
- (NSArray *) monthlyRepeatList;
- (NSArray *) monthlyDayList;
- (NSArray *) monthlyRadioList;
- (NSArray *) yearlyMonthList;
- (NSArray *) yearlyDayList;
- (NSArray *) rangeRadioList;
- (NSArray *) repeatList;
- (NSArray *) yearlyRadioList;
- (void) setItem: (NSString *) theItem;
- (NSString *) item;
+15 -121
View File
@@ -36,71 +36,14 @@
return self;
}
//
// Items used for the "Daily" recurrences.
//
- (NSArray *) dailyRadioList
{
static NSArray *dailyItems = nil;
if (!dailyItems)
{
dailyItems = [NSArray arrayWithObjects: @"Every", @"Every weekday", nil];
[dailyItems retain];
}
return dailyItems;
}
//
// Items used for the "Weekly" recurrences.
//
- (NSArray *) weeklyCheckBoxList
{
static NSArray *dayItems = nil;
if (!dayItems)
{
dayItems = [NSArray arrayWithObjects: @"Mon", @"Tue", @"Wed",
@"Thu", @"Fri", @"Sat", @"Sun", nil];
[dayItems retain];
}
return dayItems;
}
//
// Items used for the "Montly" recurrences".
//
- (NSArray *) dayMonthList
{
static NSArray *dayMonthList = nil;
if (!dayMonthList)
{
int i;
dayMonthList = [[NSMutableArray alloc] init];
for (i = 1; i <= 31; i++)
{
[(NSMutableArray *)dayMonthList addObject: [NSString stringWithFormat: @"%d", i]];
}
}
return dayMonthList;
}
- (NSArray *) monthlyRepeatList
{
static NSArray *monthlyRepeatList = nil;
if (!monthlyRepeatList)
{
monthlyRepeatList = [NSArray arrayWithObjects: @"FIRST", @"SECOND", @"THIRD",
@"FOURTH", @"FIFT", @"LAST", nil];
monthlyRepeatList = [NSArray arrayWithObjects: @"First", @"Second", @"Third",
@"Fourth", @"Fift", @"Last", nil];
[monthlyRepeatList retain];
}
@@ -113,54 +56,24 @@
if (!monthlyDayList)
{
monthlyDayList = [NSArray arrayWithObjects: @"SUNDAY", @"MONDAY", @"TUESDAY",
@"WEDNESDAY", @"THURSDAY", @"FRIDAY",
@"SATURDAY", @"DAYOFTHEMONTH", nil];
monthlyDayList = [NSArray arrayWithObjects: @"Sunday", @"Monday", @"Tuesday",
@"Wednesday", @"Thursday", @"Friday",
@"Saturday", @"DayOfTheMonth", nil];
[monthlyDayList retain];
}
return monthlyDayList;
}
- (NSArray *) monthlyRadioList
{
static NSArray *monthlyRadioList = nil;
if (!monthlyRadioList)
{
monthlyRadioList = [NSArray arrayWithObjects: @"The", @"Recur on day(s)", nil];
[monthlyRadioList retain];
}
return monthlyRadioList;
}
//
// Items used for the "Yearly" recurrences".
//
- (NSArray *) yearlyRadioList
{
static NSArray *yearlyRadioList = nil;
if (!yearlyRadioList)
{
yearlyRadioList = [NSArray arrayWithObjects: @"Every", @"Every", nil];
[yearlyRadioList retain];
}
return yearlyRadioList;
}
- (NSArray *) yearlyMonthList
{
static NSArray *yearlyMonthList = nil;
if (!yearlyMonthList)
{
yearlyMonthList = [NSArray arrayWithObjects: @"JANUARY", @"FEBRUARY", @"MARCH",
@"APRIL", @"MAY", @"JUNE", @"JULY", @"AUGUST",
@"SEPTEMBER", @"OCTOBER", @"NOVEMBER", @"DECEMBER", nil];
yearlyMonthList = [NSArray arrayWithObjects: @"January", @"February", @"March",
@"April", @"May", @"June", @"July", @"August",
@"September", @"October", @"November", @"December", nil];
[yearlyMonthList retain];
}
@@ -173,34 +86,15 @@
if (!yearlyDayList)
{
yearlyDayList = [NSArray arrayWithObjects: @"SUNDAY", @"MONDAY", @"TUESDAY",
@"WEDNESDAY", @"THURSDAY", @"FRIDAY",
@"SATURDAY", nil];
yearlyDayList = [NSArray arrayWithObjects: @"Sunday", @"Monday", @"Tuesday",
@"Wednesday", @"Thursday", @"Friday",
@"Saturday", nil];
[yearlyDayList retain];
}
return yearlyDayList;
}
//
// Items used to specify the range.
//
- (NSArray *) rangeRadioList
{
static NSArray *rangeRadioList = nil;
if (!rangeRadioList)
{
rangeRadioList = [NSArray arrayWithObjects: @"No end date", @"Create",
@"Repeat until", nil];
[rangeRadioList retain];
}
return rangeRadioList;
}
//
// Items used to specify what kind of recurrence we want
//
@@ -210,8 +104,8 @@
if (!repeatList)
{
repeatList = [NSArray arrayWithObjects: @"DAILY", @"WEEKLY",
@"MONTHLY", @"YEARLY", nil];
repeatList = [NSArray arrayWithObjects: @"Daily", @"Weekly",
@"Monthly", @"Yearly", nil];
[repeatList retain];
}
@@ -232,11 +126,11 @@
return item;
}
- (NSString *) itemText
- (NSString *) itemText
{
NSString *text;
text = [self labelForKey: [NSString stringWithFormat: @"repeat_%@", item]];
text = [self labelForKey: item];
return text;
}
+5
View File
@@ -44,6 +44,11 @@
protectedBy = "View";
pageName = "UIxCalDateSelector";
};
calendarslist = {
protectedBy = "View";
pageName = "UIxCalendarSelector";
actionName = "calendarsList";
};
eventslist = {
protectedBy = "View";
actionClass = "UIxCalListingActions";
@@ -76,9 +76,11 @@
<span class="content"><var:popup list="repeatList" item="item"
label:noSelectionString="repeat_NEVER"
const:disabledValue="-"
const:name="repeatList"
const:id="repeatList"
string="itemRepeatText" selection="repeat"
/></span></label>
string="itemRepeatText" var:selection="repeat"
/> <a href="#" id="repeatHref" style="display: none;"
><var:string label:value="Edit"/></a></span></label>
<hr />
<label><var:string label:value="Reminder:" />
<span class="content"><var:popup list="reminderList" item="item"
+229 -229
View File
@@ -12,237 +12,237 @@
const:popup="YES"
const:jsFiles="skycalendar.js">
<form id="recurrence_form">
<div id="recurrence_pattern">
<span class="caption"><var:string label:value="Recurrence pattern"/></span>
<table class="section">
<tr>
<th>
<var:string label:value="Repeat"/>
</th>
<td colspan="2">
<var:popup list="repeatList" const:name="repeatType" const:id="repeatType" item="item"
string="itemText" selection="repeatType"/>
</td>
</tr>
<tr class="recurrenceDaily" style="display:none;">
<td><!-- empty cell --></td>
<td colspan="2">
<input name="dailyRadioButtonName" value="0" id="dailyRadioButton" type="radio"
/><var:string label:value="Every"
/><input type="text" name="dailyDaysFieldName" id="dailyDaysField"
class="textField"
/><var:string label:value="Days"/>
</td>
</tr>
<tr class="recurrenceDaily" style="display:none;">
<td><!-- empty cell --></td>
<td colspan="2">
<input name="dailyRadioButtonName" value="1" id="dailyRadioButton" type="radio"
/><var:string label:value="Every weekday"/>
</td>
</tr>
<tr class="recurrenceWeekly" style="display:none;">
<td><!-- empty cell --></td>
<td colspan="2">
<var:string label:value="Every"/><input type="text" name="weeklyWeeksFieldName" const:id="weeklyWeeksField"
class="textField"
var:value="title"
/><var:string label:value="Week(s)"/>
</td>
</tr>
<tr class="recurrenceWeekly" style="display:none;">
<td><!-- empty cell --></td>
<td class="label">
<var:string label:value="On"/>
</td>
<td>
<div id="week"><div class="week">
<div name="0"><p><var:string label:value="Sun"/></p></div>
<div name="1"><p><var:string label:value="Mon"/></p></div>
<div name="2"><p><var:string label:value="Tue"/></p></div>
<div name="3"><p><var:string label:value="Wed"/></p></div>
<div name="4"><p><var:string label:value="Thu"/></p></div>
<div name="5"><p><var:string label:value="Fri"/></p></div>
<div name="6"><p><var:string label:value="Sat"/></p></div>
</div><div class="week"></div>
</div>
</td>
</tr>
<tr class="recurrenceMonthly" style="display:none;">
<td><!-- empty cell --></td>
<td colspan="2">
<var:string label:value="Every"
/><input type="text" name="monthlyMonthsFieldName" const:id="monthlyMonthsField"
class="textField"
var:value="title"
/><var:string label:value="Month(s)"/>
</td>
</tr>
<tr class="recurrenceMonthly" style="display:none;">
<td><!-- empty cell --></td>
<td colspan="2">
<input name="monthlyRadioButtonName" value="0" id="monthlyRadioButton" type="radio"
/><var:string label:value="The"
/><var:popup list="monthlyRepeatList" const:id="monthlyRepeat" item="item"
label:noSelectionString="FIRST"
string="itemText" selection="FIRST"
/><var:popup list="monthlyDayList" const:id="monthlyDay" item="item"
label:noSelectionString="MONDAY"
string="itemText" selection="MONDAY"
/>
</td>
</tr>
<tr class="recurrenceMonthly" style="display:none;">
<td><!-- empty cell --></td>
<td class="label">
<input name="monthlyRadioButtonName" value="0" id="monthlyRadioButton" type="radio"
/><var:string label:value="Recur on day(s)"/>
</td>
<td>
<div id="month">
<div class="week">
<div name="1"><p>1</p></div>
<div name="2"><p>2</p></div>
<div name="3"><p>3</p></div>
<div name="4"><p>4</p></div>
<div name="5"><p>5</p></div>
<div name="6"><p>6</p></div>
<div name="7"><p>7</p></div>
<form name="recurrence_form" id="recurrence_form" href="editRecurrence">
<div id="recurrence_pattern" style="display: none;">
<span class="caption"><var:string label:value="Recurrence pattern"/></span>
<table class="section">
<tr>
<th>
<var:string label:value="Repeat"/>
</th>
<td colspan="2">
<var:popup list="repeatList" const:name="repeatType" const:id="repeatType" item="item"
string="itemText"/>
</td>
</tr>
<tr class="recurrenceDaily" style="display:none;">
<td><!-- empty cell --></td>
<td colspan="2">
<input name="dailyRadioButtonName" value="0" id="dailyRadioButton" type="radio"
/><var:string label:value="Every"
/><input type="text" name="dailyDaysFieldName" id="dailyDaysField"
class="textField"
/><var:string label:value="Days"/>
</td>
</tr>
<tr class="recurrenceDaily" style="display:none;">
<td><!-- empty cell --></td>
<td colspan="2">
<input name="dailyRadioButtonName" value="1" id="dailyRadioButton" type="radio"
/><var:string label:value="repeat_EVERY WEEKDAY"/>
</td>
</tr>
<tr class="recurrenceWeekly" style="display:none;">
<td><!-- empty cell --></td>
<td colspan="2">
<var:string label:value="Every"/><input type="text" name="weeklyWeeksFieldName" const:id="weeklyWeeksField"
class="textField"
var:value="title"
/><var:string label:value="Week(s)"/>
</td>
</tr>
<tr class="recurrenceWeekly" style="display:none;">
<td><!-- empty cell --></td>
<td class="label">
<var:string label:value="On"/>
</td>
<td>
<div id="week"><span class="week">
<div name="0"><p><var:string label:value="Sun"/></p></div>
<div name="1"><p><var:string label:value="Mon"/></p></div>
<div name="2"><p><var:string label:value="Tue"/></p></div>
<div name="3"><p><var:string label:value="Wed"/></p></div>
<div name="4"><p><var:string label:value="Thu"/></p></div>
<div name="5"><p><var:string label:value="Fri"/></p></div>
<div name="6"><p><var:string label:value="Sat"/></p></div>
</span><span class="week"></span>
</div>
<div class="week">
<div name="8"><p>8</p></div>
<div name="9"><p>9</p></div>
<div name="10"><p>10</p></div>
<div name="11"><p>11</p></div>
<div name="12"><p>12</p></div>
<div name="13"><p>13</p></div>
<div name="14"><p>14</p></div>
</td>
</tr>
<tr class="recurrenceMonthly" style="display:none;">
<td><!-- empty cell --></td>
<td colspan="2">
<var:string label:value="Every"
/><input type="text" name="monthlyMonthsFieldName" const:id="monthlyMonthsField"
class="textField"
var:value="title"
/><var:string label:value="Month(s)"/>
</td>
</tr>
<tr class="recurrenceMonthly" style="display:none;">
<td><!-- empty cell --></td>
<td colspan="2">
<input name="monthlyRadioButtonName" value="0" id="monthlyRadioButton" type="radio"
/><var:string label:value="The"
/><var:popup list="monthlyRepeatList" const:id="monthlyRepeat" item="item"
string="itemText" selection="First"
/><var:popup list="monthlyDayList" const:id="monthlyDay" item="item"
string="itemText" selection="Monday"
/>
</td>
</tr>
<tr class="recurrenceMonthly" style="display:none;">
<td><!-- empty cell --></td>
<td class="label">
<input name="monthlyRadioButtonName" value="1" id="monthlyRadioButton" type="radio"
/><var:string label:value="Recur on day(s)"/>
</td>
<td>
<div id="month">
<span class="week">
<div name="1"><p>1</p></div>
<div name="2"><p>2</p></div>
<div name="3"><p>3</p></div>
<div name="4"><p>4</p></div>
<div name="5"><p>5</p></div>
<div name="6"><p>6</p></div>
<div name="7"><p>7</p></div>
</span>
<span class="week">
<div name="8"><p>8</p></div>
<div name="9"><p>9</p></div>
<div name="10"><p>10</p></div>
<div name="11"><p>11</p></div>
<div name="12"><p>12</p></div>
<div name="13"><p>13</p></div>
<div name="14"><p>14</p></div>
</span>
<span class="week">
<div name="15"><p>15</p></div>
<div name="16"><p>16</p></div>
<div name="17"><p>17</p></div>
<div name="18"><p>18</p></div>
<div name="19"><p>19</p></div>
<div name="20"><p>20</p></div>
<div name="21"><p>21</p></div>
</span>
<span class="week">
<div name="22"><p>22</p></div>
<div name="23"><p>23</p></div>
<div name="24"><p>24</p></div>
<div name="25"><p>25</p></div>
<div name="26"><p>26</p></div>
<div name="27"><p>27</p></div>
<div name="28"><p>28</p></div>
</span>
<span class="week">
<div name="29"><p>29</p></div>
<div name="30"><p>30</p></div>
<div name="31"><p>31</p></div>
</span>
<span class="week"></span>
</div>
<div class="week">
<div name="15"><p>15</p></div>
<div name="16"><p>16</p></div>
<div name="17"><p>17</p></div>
<div name="18"><p>18</p></div>
<div name="19"><p>19</p></div>
<div name="20"><p>20</p></div>
<div name="21"><p>21</p></div>
</div>
<div class="week">
<div name="22"><p>22</p></div>
<div name="23"><p>23</p></div>
<div name="24"><p>24</p></div>
<div name="25"><p>25</p></div>
<div name="26"><p>26</p></div>
<div name="27"><p>27</p></div>
<div name="28"><p>28</p></div>
</div>
<div class="week">
<div name="29"><p>29</p></div>
<div name="30"><p>30</p></div>
<div name="31"><p>31</p></div>
</div>
<div class="week"></div>
</div>
</td>
</tr>
<tr class="recurrenceYearly" style="display:none;">
<td><!-- empty cell --></td>
<td colspan="2">
<var:string label:value="Every"
/><input type="text" name="yearlyYearsFieldName" const:id="yearlyYearsField"
class="textField"
var:value="title"
/><var:string label:value="Year(s)"/>
</td>
</tr>
<tr class="recurrenceYearly" style="display:none;">
<td><!-- empty cell --></td>
<td colspan="2">
<input name="yearlyRadioButtonName" value="0" id="yearlyRadioButton" type="radio"
/><var:string label:value="Every"
/><input type="text" name="yearlyDayFieldName" const:id="yearlyDayField"
class="textField"
var:value="title"
/><var:popup list="yearlyMonthList" const:id="yearlyMonth1" item="item"
label:noSelectionString="JANUARY"
string="itemText" selection="JANUARY"/>
</td>
</tr>
<tr class="recurrenceYearly" style="display:none;">
<td><!-- empty cell --></td>
<td class="label">
<input name="yearlyRadioButtonName" value="1" id="yearlyRadioButton" type="radio"
/><var:string label:value="Every"/>
</td>
<td>
<var:popup list="monthlyRepeatList" const:id="yearlyRepeat" item="item"
label:noSelectionString="FIRST"
string="itemText" selection="FIRST"
/><var:popup list="yearlyDayList" const:id="yearlyDay" item="item"
label:noSelectionString="MONDAY"
string="itemText" selection="MONDAY"/>
</td>
</tr>
<tr class="recurrenceYearly" style="display:none;">
<td><!-- empty cell --></td>
<td class="label" style="text-align: right;">
<var:string label:value="of"/>
</td>
<td>
<var:popup list="yearlyMonthList" const:id="yearlyMonth2" item="item"
label:noSelectionString="JANUARY"
string="itemText" selection="JANUARY"/>
</td>
</tr>
</table>
</div>
<div id="range_of_recurrence">
<span class="caption"><var:string label:value="Range of recurrence"/></span>
<table class="section">
<tr>
<td>
<input name="rangeRadioButtonName" value="0" id="rangeRadioButton" type="radio"
/><var:string label:value="No end date"/>
</td>
</tr>
<tr>
<td>
<input name="rangeRadioButtonName" value="1" id="rangeRadioButton" type="radio"
/><var:string label:value="Create"
/><input type="text" name="rangeAppointmentsFieldName" const:id="rangeAppointmentsField"
class="textField"
var:value="title"
/><var:string label:value="Appointments(s)"/>
</td>
</tr>
<tr>
<td>
<input name="rangeRadioButtonName" value="2" id="rangeRadioButton" type="radio"
/><var:string label:value="Repeat until"
/><var:component className="UIxDatePicker"
const:dateID="endDate"
day="endDateDay"
month="endDateMonth"
year="endDateYear"
label:label="browse end date"/>
</td>
</tr>
</table>
</div>
<div id="windowButtons">
<hr />
<a id="cancelButton" href="#" class="button"
><var:string label:value="Cancel"/></a>
<a id="okButton" href="#" class="button"
><var:string label:value="OK"/></a>
</div>
</td>
</tr>
<tr class="recurrenceYearly" style="display:none;">
<td><!-- empty cell --></td>
<td colspan="2">
<var:string label:value="Every"
/><input type="text" name="yearlyYearsFieldName" const:id="yearlyYearsField"
class="textField"
var:value="title"
/><var:string label:value="Year(s)"/>
</td>
</tr>
<tr class="recurrenceYearly" style="display:none;">
<td><!-- empty cell --></td>
<td colspan="2">
<input name="yearlyRadioButtonName" value="0" id="yearlyRadioButton" type="radio"
/><var:string label:value="Every"
/><input type="text" name="yearlyDayFieldName" const:id="yearlyDayField"
class="textField"
var:value="title"
/><var:popup list="yearlyMonthList" const:id="yearlyMonth1" item="item"
string="itemText" selection="January"/>
</td>
</tr>
<tr class="recurrenceYearly" style="display:none;">
<td><!-- empty cell --></td>
<td class="label">
<input name="yearlyRadioButtonName" value="1" id="yearlyRadioButton" type="radio"
/><var:string label:value="Every"/>
</td>
<td>
<var:popup list="monthlyRepeatList" const:id="yearlyRepeat" item="item"
string="itemText" selection="First"
/><var:popup list="yearlyDayList" const:id="yearlyDay" item="item"
string="itemText" selection="Monday"/>
</td>
</tr>
<tr class="recurrenceYearly" style="display:none;">
<td><!-- empty cell --></td>
<td class="label" style="text-align: right;">
<var:string label:value="cycle_of"/>
</td>
<td>
<var:popup list="yearlyMonthList" const:id="yearlyMonth2" item="item"
string="itemText" selection="January"/>
</td>
</tr>
</table>
</div>
<div id="range_of_recurrence" style="display: none;">
<span class="caption"><var:string label:value="Range of recurrence"/></span>
<table class="section">
<tr>
<td>
<input name="rangeRadioButtonName" value="0" id="rangeRadioButton" type="radio"
/><var:string label:value="No end date"/>
</td>
</tr>
<tr>
<td>
<input name="rangeRadioButtonName" value="1" id="rangeRadioButton" type="radio"
/><var:string label:value="Create"
/><input type="text" name="rangeAppointmentsFieldName" const:id="rangeAppointmentsField"
class="textField"
var:value="title"
/><var:string label:value="Appointments(s)"/>
</td>
</tr>
<tr>
<td>
<input name="rangeRadioButtonName" value="2" id="rangeRadioButton" type="radio"
/><var:string label:value="Repeat until"
/><var:component className="UIxTimeDateControl"
const:displayTimeControl="0"
const:controlID="endDate"
const:id="endDate"
date="endDate"
const:dayStartHour="0"
const:dayEndHour="23"
/><!--<var:component className="UIxDatePicker"
const:dateID="endDate"
day="endDateDay"
month="endDateMonth"
year="endDateYear"
label="label"/>-->
</td>
</tr>
</table>
</div>
<div id="windowButtons">
<a id="cancelButton" href="#" class="button"
><var:string label:value="Cancel"/></a>
<a id="okButton" href="#" class="button"
><var:string label:value="OK"/></a>
</div>
</form>
</var:component>
+2
View File
@@ -1595,6 +1595,8 @@ function appendCalendar(folderName, folderPath) {
li.appendChild(checkBox);
li.appendChild(document.createTextNode(" "));
$(checkBox).addClassName("checkBox");
if (owner == UserLogin)
checkBox.checked = 1;
var colorBox = document.createElement("div");
li.appendChild(colorBox);
@@ -93,7 +93,7 @@ TEXTAREA
padding-bottom: 0em; }
SELECT#calendarList
{ width: 17em; }
{ width: 16em; }
A#changeUrlButton
{ margin-left: 1em; }
+12 -3
View File
@@ -125,16 +125,25 @@ function onComponentEditorLoad(event) {
onMenuSetClassification.bindAsEventListener(menuItems[i]),
false);
$("repeatHref").observe("click", onPopupRecurrenceWindow);
$("repeatList").observe("change", onPopupRecurrenceWindow);
onPopupRecurrenceWindow(null);
}
function onPopupRecurrenceWindow(event) {
if (event)
preventDefault(event);
if ($("repeatList").value == 7)
window.open(ApplicationBaseURL + "/editRecurrence", null,
"width=803,height=573");
var repeatHref = $("repeatHref");
if ($("repeatList").value == 7) {
repeatHref.show();
if (event)
window.open(ApplicationBaseURL + "editRecurrence", null,
"width=500,height=400");
}
else
repeatHref.hide();
return false;
}
+19 -12
View File
@@ -3,7 +3,8 @@ DIV#windowButtons
bottom: 0px;
left: 0px;
right: 0px;
height: 4em;
height: 2em;
margin: 1em;
text-align: right; }
DIV#pageContent
@@ -47,13 +48,16 @@ INPUT.textField
{ margin: 0px 0.7em;
width: 2em; }
SPAN.datePicker INPUT.textField
{ width: 6em; }
/* Days selectors */
DIV#week,
DIV#month
{ background-color: #fff;
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
border-top: 1px solid #fff;
border-left: 1px solid #fff;
border-right: 1px solid #999;
border-bottom: 1px solid #999; }
@@ -63,29 +67,32 @@ DIV#week
DIV#month
{ width: 140px; /* 7*(18+2)px */ }
DIV.week
SPAN.week
{ clear: both;
display: block; }
DIV.week DIV
SPAN.week DIV
{ border: 1px solid #fff;
cursor: pointer;
display: block;
float: left; }
DIV.week DIV.selected
{ background-color: #ccc; }
SPAN.week DIV._selected
{ background-color: #4b6983;
border-color: #4b6983;
color: #fff; }
DIV.week DIV P
SPAN.week DIV P
{ display: block;
margin: 2px 0px;
padding: 0px;
text-align: center; }
DIV#week DIV.week DIV P
DIV#week SPAN.week DIV P
{ width: 28px; }
DIV#month DIV.week DIV P
DIV#month SPAN.week DIV P
{ width: 18px; }
DIV.week DIV:hover
{ border: 1px solid blue; }
SPAN.week DIV:hover
{ border: 1px solid #4b6983; }
+100 -51
View File
@@ -12,7 +12,7 @@ function setRepeatType(type) {
RecurrenceEditor.currentRepeatType = type;
for (var i = 0; i <=3; i++) {
for (var i = 0; i <= 3; i++) {
elements = $$("TABLE TR.recurrence" + RecurrenceEditor.types[i]);
if (i != type)
elements.each(function(row) {
@@ -25,20 +25,38 @@ function setRepeatType(type) {
});
}
function getSelectedDays(element) {
var elementsArray = $A(element.getElementsByTagName('DIV'));
var days = new Array();
elementsArray.each(function(item) {
if (isNodeSelected(item))
days.push(item.readAttribute("name"));
});
return days.join(",");
}
function onDayClick(event) {
var element = $(this);
if (element.hasClassName("selected"))
this.removeClassName("selected");
if (isNodeSelected(element))
this.removeClassName("_selected");
else
this.addClassName("selected");
this.addClassName("_selected");
}
function onRangeChange(event) {
$('endDate_date').disabled = (this.value != 2);
}
function onAdjustTime(event) {
// must be defined for date picker widget
}
function initializeSelectors() {
$$("DIV#week DIV.week DIV").each(function(element) {
$$("DIV#week SPAN.week DIV").each(function(element) {
element.observe("click", onDayClick, false);
});
$$("DIV#month DIV.week DIV").each(function(element) {
$$("DIV#month SPAN.week DIV").each(function(element) {
element.observe("click", onDayClick, false);
});
}
@@ -51,28 +69,48 @@ function initializeWindowButtons() {
Event.observe(cancelButton, "click", onEditorCancelClick, false);
$("repeatType").observe("change", onRepeatTypeChange, false);
}
function initializeFormValues() {
var repeatType = parent$("repeatType").value;
if (repeatType === 0) {
// Select repeat type
$("repeatType").value = repeatType;
// Default values
$('recurrence_form').setRadioValue('dailyRadioButtonName', 0);
$('recurrence_form').setRadioValue('monthlyRadioButtonName', 0);
$('recurrence_form').setRadioValue('yearlyRadioButtonName', 0);
$('endDate_date').disabled = true;
if (repeatType == 0) {
// Repeat daily
$('recurrence_form').setRadioValue('dailyRadioButtonName', parent$("repeat1").value);
$('dailyDaysField').value = parent$("repeat2").value;
}
else if ($("repeatType").value == 1) {
else if (repeatType == 1) {
// Repeat weekly
$('weeklyWeeksField').value = parent$("repeat1").value;
$('recurrence_form').setCheckBoxListValues('weeklyCheckBoxName', parent$("repeat2").value);
var weekDiv = $("week").firstChild;
var daysArray = parent$("repeat2").value.split(",");
daysArray.each(function(index) {
$(weekDiv).down('div', index).addClassName("_selected");
});
}
else if ($("repeatType").value == 2) {
else if (repeatType == 2) {
// Repeat monthly
$('monthlyMonthsField').value = parent$("repeat1").value;
$('recurrence_form').setRadioValue('monthlyRadioButtonName', parent$("repeat2").value);
$('monthlyRepeat').value = parent$("repeat3").value;
$('monthlyDay').value = parent$("repeat4").value;
$('recurrence_form').setCheckBoxListValues('monthlyCheckBoxName', parent$("repeat5").value);
var monthDiv = $("month");
var daysArray = parent$("repeat5").value.split(",");
daysArray.each(function(index) {
$(monthDiv).down('DIV[name="'+index+'"]').addClassName("_selected");
});
}
else if (repeatType == 3) {
// Repeat yearly
$('yearlyYearsField').value = parent$("repeat1").value;
$('recurrence_form').setRadioValue('yearlyRadioButtonName', parent$("repeat2").value);
$('yearlyDayField').value = parent$("repeat3").value;
@@ -81,76 +119,85 @@ function initializeFormValues() {
$('yearlyDay').value = parent$("repeat6").value;
$('yearlyMonth2').value = parent$("repeat7").value;
}
else {
// Default values
setRepeatType(0);
$('recurrence_form').setRadioValue('dailyRadioButtonName', 0);
$('dailyDaysField').value = 1;
else
repeatType = 0;
setRepeatType(repeatType);
$('weeklyWeeksField').value = 1;
var range = parent$("range1").value;
$('recurrence_form').setRadioValue('rangeRadioButtonName', range);
$('monthlyMonthsField').value = 1;
$('recurrence_form').setRadioValue('monthlyRadioButtonName', 0);
$('yearlyYearsField').value = 1;
$('recurrence_form').setRadioValue('yearlyRadioButtonName', 0);
$('yearlyDayField').value = 1;
}
$('recurrence_form').setRadioValue('rangeRadioButtonName', parent$("range1").value);
if (parent$("range1").value == 1) {
if (range == 1) {
$('rangeAppointmentsField').value = parent$("range2").value;
}
else if (parent$("range1").value == 2) {
else if (range == 2) {
$('endDate').value = parent$("range2").value;
$('endDate_date').disabled = false;
}
// Observe change of range radio buttons to activate the date picker when required
Form.getInputs($('recurrence_form'), 'radio', 'rangeRadioButtonName').each(function(input) {
input.observe("change", onRangeChange);
});
// Show page
$("recurrence_pattern").show();
$("range_of_recurrence").show();
}
function onEditorOkClick(event) {
preventDefault(event);
var repeatType = $("repeatType").value;
var v;
parent$("repeatType").value = $("repeatType").value;
parent$("repeatType").value = repeatType;
if ($("repeatType").value == 0) {
parent$("repeat1").value = $('recurrence_form').getRadioValue('dailyRadioButtonName');
parent$("repeat2").value = $('dailyDaysField').value;
if (repeatType == 0) {
// Repeat daily
v = $('recurrence_form').getRadioValue('dailyRadioButtonName')
parent$("repeat1").value = v;
// We check if the dailyDaysField really contains an integer
v = parseInt(parent$("repeat2").value);
if (parent$("repeat1").value == 0 && (isNaN(v) || v <= 0)) {
window.alert("Please specify a numerical value in the Days field greater or equal to 1.");
return false;
if (v == 0) {
parent$("repeat2").value = $('dailyDaysField').value;
v = parseInt(parent$("repeat2").value);
if (isNaN(v) || v <= 0) {
window.alert("Please specify a numerical value in the Days field greater or equal to 1.");
return false;
}
}
}
else if ($("repeatType").value == 1) {
parent$("repeat1").value = $('weeklyWeeksField').value;
parent$("repeat2").value = $('recurrence_form').getCheckBoxListValues('weeklyCheckBoxName');
else if (repeatType == 1) {
// Repeat weekly
v = $('weeklyWeeksField').value;
parent$("repeat1").value = v;
parent$("repeat2").value = getSelectedDays($('week'));
// We check if the weeklyWeeksField really contains an integer
v = parseInt(parent$("repeat1").value);
v = parseInt(v);
if (isNaN(v) || v <= 0) {
window.alert("Please specify a numerical value in the Week(s) field greater or equal to 1.");
return false;
}
}
else if ($("repeatType").value == 2) {
parent$("repeat1").value = $('monthlyMonthsField').value;
else if (repeatType == 2) {
// Repeat monthly
v = $('monthlyMonthsField').value;
parent$("repeat1").value = v;
parent$("repeat2").value = $('recurrence_form').getRadioValue('monthlyRadioButtonName');
parent$("repeat3").value = $('monthlyRepeat').value;
parent$("repeat4").value = $('monthlyDay').value;
parent$("repeat5").value = $('recurrence_form').getCheckBoxListValues('monthlyCheckBoxName');
parent$("repeat5").value = getSelectedDays($('month'));
// We check if the monthlyMonthsField really contains an integer
v = parseInt(parent$("repeat1").value);
v = parseInt(v);
if (isNaN(v) || v <= 0) {
window.alert("Please specify a numerical value in the Month(s) field greater or equal to 1.");
return false;
}
}
else {
// Repeat yearly
parent$("repeat1").value = $('yearlyYearsField').value;
parent$("repeat2").value = $('recurrence_form').getRadioValue('yearlyRadioButtonName');
parent$("repeat3").value = $('yearlyDayField').value;
@@ -167,9 +214,10 @@ function onEditorOkClick(event) {
}
}
parent$("range1").value = $('recurrence_form').getRadioValue('rangeRadioButtonName');
var range = $('recurrence_form').getRadioValue('rangeRadioButtonName');
parent$("range1").value = range;
if (parent$("range1").value == 1) {
if (range == 1) {
parent$("range2").value = $('rangeAppointmentsField').value;
// We check if the rangeAppointmentsField really contains an integer
@@ -179,7 +227,7 @@ function onEditorOkClick(event) {
return false;
}
}
else if (parent$("range1").value == 2) {
else if (range == 2) {
parent$("range2").value = $('endDate').value;
}
@@ -195,6 +243,7 @@ function onRecurrenceLoadHandler() {
initializeFormValues();
initializeSelectors();
initializeWindowButtons();
assignCalendar('endDate_date');
}
FastInit.addOnLoad(onRecurrenceLoadHandler);
+1 -1
View File
@@ -62,7 +62,7 @@ function cal_popup1(str_datetime) {
var obj_calwindow = window.open(
this.calpage+'?datetime=' + this.dt_current.valueOf()+ '&id=' + this.id,
'Calendar', 'width=200,height=190'+
'Calendar', 'width=253,height=190'+
',status=no,resizable=no,top=200,left=200,dependent=yes,alwaysRaised=yes'
);
obj_calwindow.opener = window;