propagate from branch 'ca.inverse.sogo.1_3_10' (head c4570925f011f2af2dfe09f5e9cc51de5bd1e13e)

to branch 'ca.inverse.sogo' (head 4f36a1c10a12396aed17d84ab4be1adc520d1663)

Monotone-Parent: 4f36a1c10a12396aed17d84ab4be1adc520d1663
Monotone-Parent: c4570925f011f2af2dfe09f5e9cc51de5bd1e13e
Monotone-Revision: 157b737337e2cd599c6a85f573fbd507b9e7b73e

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2011-11-21T14:52:42
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2011-11-21 14:52:42 +00:00
13 changed files with 349 additions and 31 deletions
@@ -27,8 +27,11 @@
"Add default email addresses" = "Add default email addresses";
"Days between responses :" = "Days between responses :";
"Do not send responses to mailing lists" = "Do not send responses to mailing lists";
"Disable auto reply on" = "Disable auto reply on";
"Please specify your message and your email addresses for which you want to enable auto reply."
= "Please specify your message and your email addresses for which you want to enable auto reply.";
"End date of your auto reply must be in the future."
= "End date of your auto reply must be in the future.";
/* forward messages */
"Forward incoming messages" = "Forward incoming messages";
+34
View File
@@ -883,6 +883,40 @@
return ignore;
}
- (BOOL) enableVacationEndDate
{
return [[vacationOptions objectForKey: @"endDateEnabled"] boolValue];
}
- (BOOL) disableVacationEndDate
{
return ![self enableVacationEndDate];
}
- (void) setEnableVacationEndDate: (BOOL) enableVacationEndDate
{
[vacationOptions setObject: [NSNumber numberWithBool: enableVacationEndDate]
forKey: @"endDateEnabled"];
}
- (void) setVacationEndDate: (NSCalendarDate *) endDate
{
NSNumber *time;
time = [NSNumber numberWithInt: [endDate timeIntervalSince1970]];
[vacationOptions setObject: time forKey: @"endDate"];
}
- (NSCalendarDate *) vacationEndDate
{
int time;
time = [[vacationOptions objectForKey: @"endDate"] intValue];
return [NSCalendarDate dateWithTimeIntervalSince1970: time];
}
/* mail forward */
- (BOOL) isForwardEnabled
+12 -1
View File
@@ -10,7 +10,7 @@
className="UIxPageFrame"
title="title"
const:popup="YES"
const:jsFiles="RowEditionController.js,PasswordPolicy.js,ckeditor/ckeditor.js"
const:jsFiles="RowEditionController.js,PasswordPolicy.js,ckeditor/ckeditor.js,skycalendar.js"
>
<script type="text/javascript">
var localeCode = '<var:string value="localeCode"/>';
@@ -379,6 +379,17 @@
var:checked="ignoreLists" />
<var:string label:value="Do not send responses to mailing lists" /></label><br/>
<label class="timeDate"><input var:checked="enableVacationEndDate"
const:name="enableVacationEndDate" const:id="enableVacationEndDate" type="checkbox" class="checkBox"
/><var:string label:value="Disable auto reply on" /><var:component className="UIxTimeDateControl"
const:displayTimeControl="0"
var:disabled="disableVacationEndDate"
const:controlID="vacationEndDate"
date="vacationEndDate"
const:dayStartHour="0"
const:dayEndHour="23"
/></label>
</div>
</div>
</var:if
-21
View File
@@ -1777,27 +1777,6 @@ function calendarDisplayCallback(http) {
+ http.readyState + "/" + http.status + ")");
}
function assignCalendar(name) {
if (typeof(skycalendar) != "undefined") {
var node = $(name);
if (node) {
node.calendar = new skycalendar(node);
node.calendar.setCalendarPage(ResourcesURL + "/skycalendar.html");
var dateFormat = node.getAttribute("dateFormat");
if (dateFormat)
node.calendar.setDateFormat(dateFormat);
}
}
}
function popupCalendar(node) {
var nodeId = $(node).readAttribute("inputId");
var input = $(nodeId);
input.calendar.popup();
return false;
}
function onEventsSelectionChange() {
listOfSelection = this;
this.removeClassName("_unfocused");
+17
View File
@@ -66,6 +66,20 @@ DIV.listWrapper
border-left: 1px solid #9b9b9b;
background: #ccddec; }
/* time date control */
SPAN.timeDateControl INPUT.textField
{ width: 7em;
vertical-align: text-bottom; }
#vacation LABEL.timeDate,
#vacation LABEL.timeDate input.checkBox
{ line-height: 2.0em;
}
#vacation LABEL.timeDate,
#vacation LABEL.timeDate input.checkBox,
SPAN.timeDateControl SPAN
{ vertical-align: text-top; }
/* vacation, forward */
#vacation, #forward
{ padding-left: 2.5em; }
@@ -81,6 +95,9 @@ DIV.listWrapper
{ height: 50px; }
#vacation SPAN
{ float: right; }
#vacation SPAN.timeDateControl,
#vacation SPAN.timeDateControl SPAN
{ float: none; }
#vacation BR,
#passwordView BR
{ clear: both; }
+19 -3
View File
@@ -23,7 +23,7 @@ function savePreferences(sender) {
var end = $("dayEndTime");
var selectedEnd = parseInt(end.options[end.selectedIndex].value);
if (selectedStart >= selectedEnd) {
alert (_("Day start time must be prior to day end time."));
showAlertDialog (_("Day start time must be prior to day end time."));
sendForm = false;
}
}
@@ -31,16 +31,24 @@ function savePreferences(sender) {
if ($("enableVacation") && $("enableVacation").checked) {
if ($("autoReplyText").value.strip().length == 0
|| $("autoReplyEmailAddresses").value.strip().length == 0) {
alert(_("Please specify your message and your email addresses for which you want to enable auto reply."));
showAlertDialog(_("Please specify your message and your email addresses for which you want to enable auto reply."));
sendForm = false;
}
if ($("enableVacationEndDate") && $("enableVacationEndDate").checked) {
var endDate = new Date($("vacationEndDate_date").value);
var now = new Date();
if (endDate.getTime() < now.getTime()) {
showAlertDialog(_("End date of your auto reply must be in the future."));
sendForm = false;
}
}
}
if ($("enableForward") && $("enableForward").checked) {
var addresses = $("forwardAddress").value.split(",");
for (var i = 0; i < addresses.length && sendForm; i++)
if (!emailRE.test(addresses[i].strip())) {
alert(_("Please specify an address to which you want to forward your messages."));
showAlertDialog(_("Please specify an address to which you want to forward your messages."));
sendForm = false;
}
}
@@ -198,6 +206,14 @@ function initPreferences() {
initSieveFilters();
initMailAccounts();
assignCalendar('vacationEndDate_date');
$("enableVacationEndDate").on("change", function(event) {
if (this.checked)
$("vacationEndDate_date").enable();
else
$("vacationEndDate_date").disable();
});
}
function initSieveFilters() {
+21
View File
@@ -25,6 +25,27 @@ var calendars = [];
var RE_NUM = /^\-?\d+$/;
var dateFormat = "yyyy-mm-dd";
function assignCalendar(name) {
if (typeof(skycalendar) != "undefined") {
var node = $(name);
if (node) {
node.calendar = new skycalendar(node);
node.calendar.setCalendarPage(ResourcesURL + "/skycalendar.html");
var dateFormat = node.getAttribute("dateFormat");
if (dateFormat)
node.calendar.setDateFormat(dateFormat);
}
}
}
function popupCalendar(node) {
var nodeId = $(node).readAttribute("inputId");
var input = $(nodeId);
input.calendar.popup();
return false;
}
function skycalendar(obj_target) {
// assing methods
this.gen_date = cal_gen_date1;