Monotone-Parent: 1816a792f1f7aa94e6d90dc5abea13dcd55ac0c6
Monotone-Revision: 41e367adacf1d4f3454da39608bfaa1cd481222d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-07-25T18:44:31 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
ef0b52dfe6
commit
ff33b152a1
13
ChangeLog
13
ChangeLog
|
@ -1,5 +1,18 @@
|
|||
2008-07-25 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/Scheduler/UIxCalMainView.m ([UIxCalMainView -dayStartHour]):
|
||||
new getter for computing the default scroll point in the day and
|
||||
week views.
|
||||
|
||||
* UI/Scheduler/UIxCalDayTable.m ([UIxCalDayTable
|
||||
-clickableHourCellClass]): the "dayEndHour" is the hour where the
|
||||
outOfDay class starts.
|
||||
|
||||
* UI/PreferencesUI/UIxPreferences.m ([UIxPreferences -hasChanged])
|
||||
([UIxPreferences -setHasChanged:newHasChanged]): new accessors
|
||||
method for a new hidden input field that is set to 1 if the values
|
||||
have changed and require a refresh of the main window.
|
||||
|
||||
* SoObjects/SOGo/AgenorUserDefaults.[hm]: renamed module class and
|
||||
class moduel to SOGoUserDefaults.
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
NSCalendarDate *today;
|
||||
NSMutableArray *hours;
|
||||
NSArray *daysOfWeek;
|
||||
BOOL hasChanged;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -74,6 +74,7 @@ static BOOL shouldDisplayPasswordChange = NO;
|
|||
locale = [context valueForKey: @"locale"];
|
||||
ASSIGN (daysOfWeek,
|
||||
[locale objectForKey: NSWeekDayNameArray]);
|
||||
hasChanged = NO;
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -90,6 +91,16 @@ static BOOL shouldDisplayPasswordChange = NO;
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) setHasChanged: (BOOL) newHasChanged
|
||||
{
|
||||
hasChanged = newHasChanged;
|
||||
}
|
||||
|
||||
- (BOOL) hasChanged
|
||||
{
|
||||
return hasChanged;
|
||||
}
|
||||
|
||||
- (void) setItem: (NSString *) newItem
|
||||
{
|
||||
ASSIGN (item, newItem);
|
||||
|
@ -503,12 +514,17 @@ static BOOL shouldDisplayPasswordChange = NO;
|
|||
{
|
||||
id <WOActionResults> results;
|
||||
WORequest *request;
|
||||
NSString *method;
|
||||
|
||||
request = [context request];
|
||||
if ([[request method] isEqualToString: @"POST"])
|
||||
{
|
||||
[userDefaults synchronize];
|
||||
results = [self jsCloseWithRefreshMethod: nil];
|
||||
if (hasChanged)
|
||||
method = @"window.location.reload()";
|
||||
else
|
||||
method = nil;
|
||||
results = [self jsCloseWithRefreshMethod: method];
|
||||
}
|
||||
else
|
||||
results = self;
|
||||
|
|
|
@ -316,7 +316,7 @@
|
|||
user = [context activeUser];
|
||||
[cellClass appendFormat: @"clickableHourCell clickableHourCell%d", hour];
|
||||
if (hour < [user dayStartHour]
|
||||
|| hour > [user dayEndHour])
|
||||
|| hour > [user dayEndHour] - 1)
|
||||
[cellClass appendString: @" outOfDay"];
|
||||
|
||||
return cellClass;
|
||||
|
|
|
@ -177,4 +177,9 @@ static NSMutableArray *yearMenuItems = nil;
|
|||
return [[context activeUser] firstDayOfWeek];
|
||||
}
|
||||
|
||||
- (unsigned int) dayStartHour
|
||||
{
|
||||
return [[context activeUser] dayStartHour];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -32,19 +32,23 @@
|
|||
<div id="generalView" class="tab">
|
||||
<label><var:string label:value="Current Time Zone :"/>
|
||||
<var:popup list="timeZonesList" item="item"
|
||||
const:id="timezone"
|
||||
string="item" selection="userTimeZone" /></label><br/>
|
||||
<br/>
|
||||
<div id="dateTimeFormat">
|
||||
<label><var:string label:value="Short Date Format :"/>
|
||||
<var:popup list="shortDateFormatsList" item="item"
|
||||
const:id="shortDateFormat"
|
||||
string="itemShortDateFormatText" selection="userShortDateFormat"
|
||||
/></label><br/>
|
||||
<label><var:string label:value="Long Date Format :"/>
|
||||
<var:popup list="longDateFormatsList" item="item"
|
||||
const:id="longDateFormat"
|
||||
string="itemLongDateFormatText" selection="userLongDateFormat"
|
||||
/></label><br/>
|
||||
<label><var:string label:value="Time Format :"/>
|
||||
<var:popup list="timeFormatsList" item="item"
|
||||
const:id="timeFormat"
|
||||
string="itemTimeFormatText" selection="userTimeFormat"
|
||||
/></label>
|
||||
</div>
|
||||
|
@ -53,18 +57,22 @@
|
|||
<div id="calendarOptionsView" class="tab">
|
||||
<label><var:string label:value="Week begins on :"/>
|
||||
<var:popup list="daysList" item="item"
|
||||
const:id="weekStartDay"
|
||||
string="itemWeekStartDay" selection="userWeekStartDay"
|
||||
/></label><br/>
|
||||
<label><var:string label:value="Day start time :"/>
|
||||
<var:popup list="hoursList" item="item"
|
||||
const:id="dayStartTime"
|
||||
string="item" selection="userDayStartTime"
|
||||
/></label>
|
||||
<label><var:string label:value="Day end time :"/>
|
||||
<var:popup list="hoursList" item="item"
|
||||
const:id="dayEndTime"
|
||||
string="item" selection="userDayEndTime"
|
||||
/></label><br/>
|
||||
<label><var:string label:value="First week of year :"/>
|
||||
<var:popup list="firstWeekList" item="item"
|
||||
const:id="firstWeek"
|
||||
string="itemFirstWeekText" selection="userFirstWeek"
|
||||
/></label><br/>
|
||||
<!-- <br/> -->
|
||||
|
@ -85,10 +93,13 @@
|
|||
<div id="mailOptionsView" class="tab">
|
||||
<label><var:string label:value="Check for new mail:"/>
|
||||
<var:popup list="messageCheckList" item="item"
|
||||
const:id="messageCheck"
|
||||
string="itemMessageCheckText" selection="userMessageCheck"/></label><br/>
|
||||
<label><var:string label:value="Forward messages:"/>
|
||||
<var:popup list="messageForwardingList" item="item"
|
||||
string="itemMessageForwardingText" selection="userMessageForwarding"/></label><br/>
|
||||
const:id="messageForwarding"
|
||||
string="itemMessageForwardingText"
|
||||
selection="userMessageForwarding"/></label><br/>
|
||||
<!-- <label><input
|
||||
const:name="inTheOffice" type="radio" const:value="YES"
|
||||
var:selection="inTheOffice"/>
|
||||
|
@ -112,20 +123,22 @@
|
|||
var:value="signature"/>
|
||||
</div>
|
||||
</var:if>
|
||||
<var:if condition="shouldDisplayPasswordChange">
|
||||
<div id="passwordView" class="tab">
|
||||
<label><var:string label:value="New password:"
|
||||
/><input type="text" class="textField"
|
||||
const:enabled="disabled"
|
||||
var:value="newPassword"/></label><br/>
|
||||
<label><var:string label:value="Confirmation:"
|
||||
/><input type="text" class="textField"
|
||||
const:enabled="disabled"
|
||||
var:value="newPasswordConfirmation"/></label><br/>
|
||||
<input type="button" class="button"
|
||||
id="changePasswordBtn" label:value="Change"/>
|
||||
</div>
|
||||
</var:if>
|
||||
<!-- <var:if condition="shouldDisplayPasswordChange"> -->
|
||||
<!-- <div id="passwordView" class="tab"> -->
|
||||
<!-- <label><var:string label:value="New password:" -->
|
||||
<!-- /><input type="text" class="textField" -->
|
||||
<!-- const:enabled="disabled" -->
|
||||
<!-- var:value="newPassword"/></label><br/> -->
|
||||
<!-- <label><var:string label:value="Confirmation:" -->
|
||||
<!-- /><input type="text" class="textField" -->
|
||||
<!-- const:enabled="disabled" -->
|
||||
<!-- var:value="newPasswordConfirmation"/></label><br/> -->
|
||||
<!-- <input type="button" class="button" -->
|
||||
<!-- id="changePasswordBtn" label:value="Change"/> -->
|
||||
<!-- </div> -->
|
||||
<!-- </var:if> -->
|
||||
<input type="hidden" id="hasChanged" name="hasChanged"
|
||||
var:value="hasChanged"/>
|
||||
</div>
|
||||
</form>
|
||||
</var:component>
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
title="title">
|
||||
<script type="text/javascript">
|
||||
var firstDayOfWeek = <var:string value="firstDayOfWeek"/>;
|
||||
var dayStartHour = <var:string value="dayStartHour"/>;
|
||||
</script>
|
||||
<style type="text/css">
|
||||
<var:if condition="horizontalDragHandleStyle">
|
||||
|
|
|
@ -746,8 +746,7 @@ function scrollDayView(scrollEvent) {
|
|||
var hours = $(daysView.childNodesWithTag("div")[0])
|
||||
.childNodesWithTag("div");
|
||||
|
||||
// Scroll to 8 AM by default
|
||||
offset = hours[8].offsetTop;
|
||||
offset = hours[dayStartHour].offsetTop;
|
||||
|
||||
if (scrollEvent && calendarEvents) {
|
||||
var event = calendarEvents[scrollEvent];
|
||||
|
|
|
@ -3,3 +3,29 @@ function savePreferences(sender) {
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
function _setupEvents(enable) {
|
||||
var widgets = [ "timezone", "shortDateFormat", "longDateFormat",
|
||||
"timeFormat", "weekStartDay", "dayStartTime", "dayEndTime",
|
||||
"firstWeek", "messageCheck" ];
|
||||
for (var i = 0; i < widgets.length; i++) {
|
||||
var widget = $(widgets[i]);
|
||||
if (enable)
|
||||
widget.observe("change", onChoiceChanged);
|
||||
else
|
||||
widget.stopObserving("change", onChoiceChanged);
|
||||
}
|
||||
}
|
||||
|
||||
function onChoiceChanged(event) {
|
||||
var hasChanged = $("hasChanged");
|
||||
hasChanged.value = "1";
|
||||
|
||||
_setupEvents(false);
|
||||
}
|
||||
|
||||
function initPreferences() {
|
||||
_setupEvents(true);
|
||||
}
|
||||
|
||||
FastInit.addOnLoad(initPreferences);
|
||||
|
|
Loading…
Reference in New Issue