Monotone-Parent: 773965cc12e1e34ce72a11b7b25f3ff6e0dc7887

Monotone-Revision: c0da933d3e86c470a7d83491a010f1ba6edc3fcd

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2008-03-25T19:59:13
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Francis Lachapelle 2008-03-25 19:59:13 +00:00
parent faff3ed110
commit a62cd61e0d
26 changed files with 547 additions and 492 deletions

View File

@ -1,3 +1,23 @@
2008-03-25 Francis Lachapelle <flachapelle@inverse.ca>
* UI/Scheduler/UIxCalMainView.m ([UIxCalMainView
-verticalDragHandleStyle]): CSS style wrt to position of drag
handle saved by current user.
([UIxCalMainView -horizontalDragHandleStyle]): idem.
([UIxCalMainView -eventsListViewStyle]): idem.
* UI/Contacts/UIxContactsListViewContainer.m
([UIxContactsListViewContainer -verticalDragHandleStyle]): CSS
style wrt to position of drag handle saved by current user.
([UIxContactsListViewContainer -horizontalDragHandleStyle]): idem.
([UIxContactsListViewContainer -contactsListContentStyle]): idem.
* UI/MailerUI/UIxMailMainFrame.m ([UIxMailMainFrame
-verticalDragHandleStyle]): CSS style wrt to position of drag
handle saved by current user.
([UIxMailMainFrame -horizontalDragHandleStyle]): idem.
([UIxMailMainFrame -mailboxContentStyle]): idem.
2008-03-18 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Appointments/SOGoAppointmentFolder.m

3
NEWS
View File

@ -5,6 +5,9 @@
- pressing enter in the contact edition dialog will perform the creation/update operation
- implemented more of the CalDAV specification for compatibility with Lightning 0.8
- added Italian translation, thanks to Marco Lertora
- improved restoration of drag hanldes state
- improved contextual menu handling of Address Book module
- fixed various bugs with Safari 3.1
0.9.0-20080208 (1.0 rc5)
------------------------

View File

@ -108,6 +108,8 @@
"Name of the Address Book" = "Name of the Address Book";
"Are you sure you want to delete the selected address book?"
= "Are you sure you want to delete the selected address book?";
"You cannot delete the selected contact(s)"
= "You cannot delete the selected contact(s).";
"Address Book Name" = "Address Book Name";

View File

@ -121,7 +121,8 @@
"Name of the Address Book" = "Nom du carnet d'adresses";
"Are you sure you want to delete the selected address book?"
= "Voulez-vous vraiment supprimer le carnet d'adresses sélectionné ?";
"You cannot delete the selected contact(s)"
= "Vous ne pouvez pas supprimer les contacts sélectionnés.";
"Address Book Name" = "Nom du carnet d'adresses";
"You cannot subscribe to a folder that you own!"

View File

@ -112,6 +112,8 @@
"Name of the Address Book" = "Adressbuch-Name";
"Are you sure you want to delete the selected address book?"
= "Wollen Sie wirklich das ausgewählte Adressbuch löschen?";
"You cannot delete the selected contact(s)"
= "Ausgewählte Karten können nicht gelöscht werden.";
"Address Book Name" = "Adressbuch Name";

View File

@ -31,7 +31,6 @@
NSMutableDictionary *moduleSettings;
}
- (WOResponse *) getDragHandlesStateAction;
- (WOResponse *) saveDragHandleStateAction;
@end

View File

@ -269,24 +269,6 @@
// ? contactFolder : nil);
// }
- (WOResponse *) getDragHandlesStateAction
{
NSArray *dragHandles;
NSString *vertical, *horizontal;
[self _setupContext];
vertical = [moduleSettings objectForKey: @"DragHandleVertical"];
horizontal = [moduleSettings objectForKey: @"DragHandleHorizontal"];
dragHandles = [[NSArray alloc] initWithObjects:
vertical ? vertical : @"",
horizontal ? horizontal : @"",
nil];
return [self responseWithStatus: 200
andString: [dragHandles jsonRepresentation]];
}
- (WOResponse *) saveDragHandleStateAction
{
WORequest *request;

View File

@ -33,6 +33,8 @@
{
NSString *selectorComponentClass;
id currentFolder;
NSUserDefaults *ud;
NSMutableDictionary *moduleSettings;
}
- (void) setCurrentFolder: (id) folder;
@ -43,6 +45,10 @@
- (NSString *) currentContactFolderOwner;
- (NSString *) currentContactFolderName;
- (NSString *) verticalDragHandleStyle;
- (NSString *) horizontalDragHandleStyle;
- (NSString *) contactsListContentStyle;
@end
#endif /* UIXCONTACTSLISTVIEWCONTAINERBASE_H */

View File

@ -37,6 +37,27 @@
@implementation UIxContactsListViewContainer
- (void) _setupContext
{
SOGoUser *activeUser;
NSString *module;
SOGoContactFolders *clientObject;
activeUser = [context activeUser];
clientObject = [[self clientObject] container];
module = [clientObject nameInContainer];
ud = [activeUser userSettings];
moduleSettings = [ud objectForKey: module];
if (!moduleSettings)
{
moduleSettings = [NSMutableDictionary new];
[moduleSettings autorelease];
}
[ud setObject: moduleSettings forKey: module];
}
- (id) init
{
if ((self = [super init]))
@ -120,4 +141,34 @@
return [[self queryParameterForKey: @"popup"] boolValue];
}
- (NSString *) verticalDragHandleStyle
{
NSString *vertical;
[self _setupContext];
vertical = [moduleSettings objectForKey: @"DragHandleVertical"];
return (vertical ? [vertical stringByAppendingFormat: @"px"] : nil);
}
- (NSString *) horizontalDragHandleStyle
{
NSString *horizontal;
[self _setupContext];
horizontal = [moduleSettings objectForKey: @"DragHandleHorizontal"];
return (horizontal ? [horizontal stringByAppendingFormat: @"px"] : nil);
}
- (NSString *) contactsListContentStyle
{
int height;
[self _setupContext];
height = [[moduleSettings objectForKey: @"DragHandleVertical"] intValue];
return (height ? [NSString stringWithFormat: @"%ipx", (height - 27)] : nil);
}
@end

View File

@ -50,11 +50,6 @@
protectedBy = "View";
pageName = "UIxContactsUserFolders";
};
dragHandlesState = {
protectedBy = "<public>";
pageName = "UIxContactFoldersView";
actionName = "getDragHandlesState";
};
saveDragHandleState = {
protectedBy = "View";
pageName = "UIxContactFoldersView";

View File

@ -31,9 +31,12 @@
NSMutableDictionary *moduleSettings;
}
- (WOResponse *) getDragHandlesStateAction;
- (WOResponse *) getFoldersStateAction;
- (NSString *) verticalDragHandleStyle;
- (NSString *) horizontalDragHandleStyle;
- (NSString *) mailboxContentStyle;
- (WOResponse *) saveDragHandleStateAction;
- (WOResponse *) saveFoldersStateAction;

View File

@ -163,24 +163,6 @@
return [self redirectToLocation: newLocation];
}
- (WOResponse *) getDragHandlesStateAction
{
NSArray *dragHandles;
NSString *vertical, *horizontal;
[self _setupContext];
vertical = [moduleSettings objectForKey: @"DragHandleVertical"];
horizontal = [moduleSettings objectForKey: @"DragHandleHorizontal"];
dragHandles = [[NSArray alloc] initWithObjects:
vertical ? vertical : @"",
horizontal ? horizontal : @"",
nil];
return [self responseWithStatus: 200
andString: [dragHandles jsonRepresentation]];
}
- (WOResponse *) getFoldersStateAction
{
NSString *expandedFolders;
@ -191,6 +173,36 @@
return [self responseWithStatus: 200 andString: expandedFolders];
}
- (NSString *) verticalDragHandleStyle
{
NSString *vertical;
[self _setupContext];
vertical = [moduleSettings objectForKey: @"DragHandleVertical"];
return (vertical ? [vertical stringByAppendingFormat: @"px"] : nil);
}
- (NSString *) horizontalDragHandleStyle
{
NSString *horizontal;
[self _setupContext];
horizontal = [moduleSettings objectForKey: @"DragHandleHorizontal"];
return (horizontal ? [horizontal stringByAppendingFormat: @"px"] : nil);
}
- (NSString *) mailboxContentStyle
{
NSString *height;
[self _setupContext];
height = [moduleSettings objectForKey: @"DragHandleVertical"];
return (height ? [NSString stringWithFormat: @"%ipx", ([height intValue] - 27)] : nil);
}
- (WOResponse *) saveDragHandleStateAction
{
WORequest *request;

View File

@ -330,11 +330,6 @@
pageName = "UIxMailMainFrame";
actionName = "compose";
};
dragHandlesState = {
protectedBy = "View";
pageName = "UIxMailMainFrame";
actionName = "getDragHandlesState";
};
foldersState = {
protectedBy = "View";
pageName = "UIxMailMainFrame";

View File

@ -47,7 +47,10 @@
- (void) setYearMenuItem: (NSNumber *) aYearMenuItem;
- (NSNumber *) yearMenuItem;
- (WOResponse *) getDragHandlesStateAction;
- (NSString *) verticalDragHandleStyle;
- (NSString *) horizontalDragHandleStyle;
- (NSString *) eventsListViewStyle;
- (WOResponse *) saveDragHandleStateAction;
@end

View File

@ -124,22 +124,34 @@ static NSMutableArray *yearMenuItems = nil;
return yearMenuItem;
}
- (WOResponse *) getDragHandlesStateAction
- (NSString *) verticalDragHandleStyle
{
NSArray *dragHandles;
NSString *vertical, *horizontal;
NSString *vertical;
[self _setupContext];
vertical = [moduleSettings objectForKey: @"DragHandleVertical"];
horizontal = [moduleSettings objectForKey: @"DragHandleHorizontal"];
dragHandles = [[NSArray alloc] initWithObjects:
vertical != nil ? vertical : @"",
horizontal ? horizontal : @"",
nil];
return [self responseWithStatus: 200
andString: [dragHandles jsonRepresentation]];
return (vertical ? [vertical stringByAppendingFormat: @"px"] : nil);
}
- (NSString *) horizontalDragHandleStyle
{
NSString *horizontal;
[self _setupContext];
horizontal = [moduleSettings objectForKey: @"DragHandleHorizontal"];
return (horizontal ? [horizontal stringByAppendingFormat: @"px"] : nil);
}
- (NSString *) eventsListViewStyle
{
NSString *height;
[self _setupContext];
height = [moduleSettings objectForKey: @"DragHandleVertical"];
return (height ? [NSString stringWithFormat: @"%ipx", ([height intValue] - 27)] : nil);
}
- (WOResponse *) saveDragHandleStateAction

View File

@ -40,11 +40,6 @@
protectedBy = "View";
pageName = "UIxCalMainView";
};
dragHandlesState = {
protectedBy = "<public>";
pageName = "UIxCalMainView";
actionName = "getDragHandlesState";
};
saveDragHandleState = {
protectedBy = "View";
pageName = "UIxCalMainView";

View File

@ -31,12 +31,7 @@
<tr class="tableview"
var:id="currentCName"
var:contactname="currentContact.displayName"
var:contactid="currentContact.c_uid"
onclick="return onContactRowClick(event, this);"
ondblclick="return onContactRowDblClick(event, this);"
onmousedown="return false;"
onselectstart="return false;"
oncontextmenu="return onContactContextMenu(event, this);">
var:contactid="currentContact.c_uid">
<td><img rsrc:src="abcard.gif"
/><var:string value="currentContact.displayName" const:escapeHTML="YES" /></td>
<td><var:string value="currentContact.mail"/></td>

View File

@ -11,6 +11,22 @@
title="name"
var:popup="isPopup">
<var:if condition="hideFrame" const:negate="YES">
<style type="text/css">
<var:if condition="horizontalDragHandleStyle">
DIV#dragHandle, DIV#rightPanel
{ left: <var:string value="horizontalDragHandleStyle" />; }
DIV#contactFoldersList
{ width: <var:string value="horizontalDragHandleStyle" />; }
</var:if><var:if condition="verticalDragHandleStyle">
DIV#rightDragHandle, DIV#contactView
{ top: <var:string value="verticalDragHandleStyle" />; }
</var:if><var:if condition="contactsListContentStyle">
DIV#contactsListContent
{ height: <var:string value="contactsListContentStyle" />; }
</var:if>
</style>
<div class="menu" id="contactFoldersMenu">
<ul>
<li><var:string label:value="Modify" /></li>
@ -85,8 +101,7 @@
<div class="dragHandle" id="rightDragHandle"><!-- space --></div>
<div id="contactView" onmousedown="return false;"
></div>
<div id="contactView" onmousedown="return false;"><!-- space --></div>
</div>
<!-- /var:if> -->

View File

@ -12,6 +12,20 @@
var textMailAccounts = '<var:string value="mailAccounts" const:escapeHTML="NO"/>';
var textQuotaSupport = '<var:string value="quotaSupport" const:escapeHTML="NO"/>';
</script>
<style type="text/css">
<var:if condition="horizontalDragHandleStyle">
DIV#verticalDragHandle, DIV#rightPanel
{ left: <var:string value="horizontalDragHandleStyle" />; }
DIV#leftPanel
{ width: <var:string value="horizontalDragHandleStyle" />; }
</var:if><var:if condition="verticalDragHandleStyle">
DIV#rightDragHandle, DIV#messageContent
{ top: <var:string value="verticalDragHandleStyle" />; }
</var:if><var:if condition="mailboxContentStyle">
DIV#mailboxContent
{ height: <var:string value="mailboxContentStyle" />; }
</var:if>
</style>
<div class="menu" id="accountIconMenu">
<ul>
<li><var:string label:value="Subscribe..." /></li>

View File

@ -8,6 +8,20 @@
xmlns:label="OGo:label"
className="UIxPageFrame"
title="title">
<style type="text/css">
<var:if condition="horizontalDragHandleStyle">
DIV#verticalDragHandle, DIV#rightPanel
{ left: <var:string value="horizontalDragHandleStyle" />; }
DIV#leftPanel
{ width: <var:string value="horizontalDragHandleStyle" />; }
</var:if><var:if condition="verticalDragHandleStyle">
DIV#rightDragHandle, DIV#calendarView
{ top: <var:string value="verticalDragHandleStyle" />; }
</var:if><var:if condition="eventsListViewStyle">
DIV#eventsListView
{ height: <var:string value="eventsListViewStyle" />; }
</var:if>
</style>
<div class="preload" style="visibility: hidden;">
<img rsrc:src="event-gradient.png"/>
</div>

View File

@ -38,7 +38,7 @@ DIV#contactsListContent
top: 2.5em;
left: 0px;
right: 0px;
height: 16em;
height: 15.5em;
overflow: auto;
overflow-x: hidden; }
@ -169,7 +169,8 @@ DIV#folderTreeContent TABLE TD
padding: 0px; }
TABLE#contactsList
{ -khtml-user-select: none;
{ -moz-user-select: none;
-khtml-user-select: none;
width: 100%; }
TABLE#contactsList TD,
@ -249,13 +250,11 @@ INPUT#searchValue:focus
/* drag handles */
DIV#dragHandle
{
cursor: e-resize;
{ cursor: e-resize;
top: 8em;
left: 15em;
width: 5px;
bottom: 0px;
}
bottom: 0px; }
DIV#rightDragHandle
{

View File

@ -46,8 +46,8 @@ function openContactsFolder(contactsFolder, reload, idx) {
var contactsList = $("contactsList");
if (contactsList)
selection = contactsList.getSelectedRowsId();
// else
// window.alert("no contactsList");
// else
// window.alert("no contactsList");
}
else
selection = null;
@ -86,7 +86,15 @@ function contactsListCallback(http) {
var tbody = table.tBodies[0];
var tmp = document.createElement('div');
$(tmp).update(html);
table.replaceChild(tmp.firstChild.tBodies[0], tbody);
table.replaceChild($(tmp).select("table tbody")[0], tbody);
var rows = table.tBodies[0].rows;
for (var i = 0; i < rows.length; i++) {
Event.observe(rows[i], "mousedown", onRowClick);
Event.observe(rows[i], "dblclick", onContactRowDblClick.bindAsEventListener(rows[i]));
Event.observe(rows[i], "selectstart", listRowMouseDownHandler);
Event.observe(rows[i], "contextmenu", onContactContextMenu.bindAsEventListener(rows[i]));
}
}
else {
// Add table (doesn't happen .. yet)
@ -113,7 +121,7 @@ function contactsListCallback(http) {
sortHeader = null;
if (sortHeader) {
var sortImages = $(table.tHead).getElementsByClassName("sortImage");
var sortImages = $(table.tHead).select(".sortImage");
$(sortImages).each(function(item) {
item.remove();
});
@ -139,7 +147,7 @@ function contactsListCallback(http) {
else {
var table = $("contactsList");
if (table) {
var sortImages = $(table.tHead).getElementsByClassName("sortImage");
var sortImages = $(table.tHead).select(".sortImage");
$(sortImages).each(function(item) {
item.remove();
});
@ -156,7 +164,6 @@ function contactsListCallback(http) {
function onContactFoldersContextMenu(event) {
var menu = $("contactFoldersMenu");
//Event.observe(menu, "hideMenu", onContactFoldersContextMenuHide, false);
Event.observe(menu, "mousedown", onContactFoldersContextMenuHide, false);
popupMenu(event, "contactFoldersMenu", this);
@ -169,19 +176,18 @@ function onContactFoldersContextMenu(event) {
$(this).selectElement();
}
function onContactContextMenu(event, element) {// log ("onContactContextMenu");
function onContactContextMenu(event) {
var menu = $("contactMenu");
Event.observe(menu, "mousedown", onContactContextMenuHide, false);
popupMenu(event, "contactMenu", element);
var topNode = $("contactsList");
var topNode = $('contactsList');
var selectedNodes = topNode.getSelectedRows();
topNode.menuSelectedRows = selectedNodes;
for (var i = 0; i < selectedNodes.length; i++)
$(selectedNodes[i]).deselect();
topNode.menuSelectedEntry = element;
$(element).selectElement();
if (selectedNodes.length > 1) {
// TODO: Add support for selection of multiple contacts
}
else {
Event.observe(menu, "hideMenu", onContactContextMenuHide);
popupMenu(event, "contactMenu", this);
}
}
function onContactContextMenuHide(event) {
@ -287,14 +293,8 @@ function moveTo(uri) {
}
/* contact menu entries */
function onContactRowClick(event, node) {
loadContact(node.getAttribute('id'));
return onRowClick(event);
}
function onContactRowDblClick(event, node) {
var contactId = node.getAttribute('id');
function onContactRowDblClick(event) {
var contactId = this.getAttribute('id');
openContactWindow(URLForFolderID(currentContactFolder)
+ "/" + contactId + "/edit", contactId);
@ -302,6 +302,18 @@ function onContactRowDblClick(event, node) {
return false;
}
function onContactSelectionChange(event) {
var rows = this.getSelectedRowsId();
if (rows.length == 1) {
var node = $(rows[0]);
loadContact(node.getAttribute('id'));
}
else if (rows.length > 1) {
$('contactView').update();
}
}
function onMenuEditContact(event) {
var contactId = document.menuTarget.getAttribute('id');
@ -386,7 +398,6 @@ function uixDeleteSelectedContacts(sender) {
}
var contactView = $('contactView');
contactView.update();
for (var i = 0; i < rows.length; i++) {
var url, http, rowElem;
@ -414,7 +425,9 @@ function uixDeleteSelectedContacts(sender) {
}
if (failCount > 0)
alert("Could not delete the selected contacts!");
alert(labels["You cannot delete the selected contact(s)."]);
else
contactView.update();
return false;
}
@ -714,8 +727,8 @@ function configureAbToolbar() {
function configureContactFolders() {
var contactFolders = $("contactFolders");
if (contactFolders) {
Event.observe(contactFolders, "mousedown", listRowMouseDownHandler);
Event.observe(contactFolders, "click", onFolderSelectionChange);
contactFolders.observe("mousedown", listRowMouseDownHandler);
contactFolders.observe("click", onFolderSelectionChange);
var lis = contactFolders.childNodesWithTag("li");
for (var i = 0; i < lis.length; i++)
setEventsOnContactFolder(lis[i]);
@ -728,11 +741,13 @@ function configureContactFolders() {
}
}
function setEventsOnContactFolder(node) {
Event.observe(node, "mousedown", listRowMouseDownHandler, false);
Event.observe(node, "click", onRowClick, false);
function setEventsOnContactFolder(folder) {
var node = $(folder);
node.observe("mousedown", listRowMouseDownHandler);
node.observe("click", onRowClick);
Event.observe(node, "contextmenu",
onContactFoldersContextMenu.bindAsEventListener(node), false);
onContactFoldersContextMenu.bindAsEventListener(node));
}
function onMenuModify(event) {
@ -763,31 +778,6 @@ function folderRenameCallback(http) {
}
}
function getDragHandlesState() {
var urlstr = ApplicationBaseURL + "dragHandlesState";
triggerAjaxRequest(urlstr, getDragHandlesStateCallback);
}
function getDragHandlesStateCallback(http) {
if (http.status == 200) {
if (http.responseText.length > 0) {
// The response text is a JSON array
// of the top and right offsets.
var data = http.responseText.evalJSON(true);
if (data[0].length > 0) {
$("contactsListContent").setStyle({ height: data[0] });
$("contactView").setStyle({ top: data[0] });
$("rightDragHandle").setStyle({ top: data[0] });
}
if (data[1].length > 0) {
$("contactFoldersList").setStyle({ width: data[1] });
$("rightPanel").setStyle({ left: data[1] });
$("dragHandle").setStyle({ left: data[1] });
}
}
}
}
function onMenuSharing(event) {
if ($(this).hasClassName("disabled"))
return;
@ -880,10 +870,10 @@ function configureSelectionButtons() {
function initContacts(event) {
if (!document.body.hasClassName("popup")) {
configureAbToolbar();
getDragHandlesState();
}
else
configureSelectionButtons();
configureContactFolders();
// initDnd();
@ -891,6 +881,8 @@ function initContacts(event) {
if (table) {
// Initialize contacts table
table.multiselect = true;
Event.observe(table, "mousedown",
onContactSelectionChange.bindAsEventListener(table));
configureSortableTableHeaders(table);
TableKit.Resizable.init(table, {'trueResize' : true, 'keepWidth' : true});
}

View File

@ -626,22 +626,18 @@ TABLE#messageList TR[labels~="label1"]._selected TD
/* drag handles */
DIV#verticalDragHandle
{
cursor: e-resize;
{ cursor: e-resize;
top: 7.5em;
left: 15em;
width: 5px;
bottom: 0px;
}
bottom: 0px; }
DIV#rightDragHandle
{
cursor: n-resize;
{ cursor: n-resize;
top: 18em;
left: 0px;
right: 0px;
height: 5px;
}
height: 5px; }
@media print
{

View File

@ -558,7 +558,7 @@ function messageListCallback(http) {
var sortHeader = $(sorting["attribute"] + "Header");
if (sortHeader) {
var sortImages = $(table.tHead).getElementsByClassName("sortImage");
var sortImages = $(table.tHead).select(".sortImage");
$(sortImages).each(function(item) {
item.remove();
});
@ -1259,7 +1259,6 @@ function initMailer(event) {
// initDnd();
initMailboxTree();
initMessageCheckTimer();
getDragHandlesState();
}
// Default sort options
@ -1493,31 +1492,6 @@ function buildMailboxes(accountName, encoded) {
return account;
}
function getDragHandlesState() {
var urlstr = ApplicationBaseURL + "dragHandlesState";
triggerAjaxRequest(urlstr, getDragHandlesStateCallback);
}
function getDragHandlesStateCallback(http) {
if (http.status == 200) {
if (http.responseText.length > 0) {
// The response text is a JSON array
// of the top and right offsets.
var data = http.responseText.evalJSON(true);
if (data[0].length > 0) {
$("mailboxContent").setStyle({ height: data[0] });
$("messageContent").setStyle({ top: data[0] });
$("rightDragHandle").setStyle({ top: data[0] });
}
if (data[1].length > 0) {
$("leftPanel").setStyle({ width: data[1] });
$("rightPanel").setStyle({ left: data[1] });
$("verticalDragHandle").setStyle({ left: data[1] });
}
}
}
}
function getFoldersState() {
if (mailAccounts.length > 0) {
var urlstr = ApplicationBaseURL + "foldersState";

View File

@ -70,7 +70,7 @@ var SOGoDragHandlesInterface = {
this.rightBlock.setStyle({ left: (this.origRight + deltaX) + 'px' });
this.leftBlock.setStyle({ width: (this.origLeft + deltaX) + 'px' });
}
this.saveDragHandleState(this.dhType, this.leftBlock.getStyle("width"));
this.saveDragHandleState(this.dhType, parseInt(this.leftBlock.getStyle("width")));
}
else if (this.dhType == 'vertical') {
var pointerY = Event.pointerY(event);
@ -83,7 +83,7 @@ var SOGoDragHandlesInterface = {
this.lowerBlock.setStyle({ top: (this.origLower + deltaY - delta) + 'px' });
this.upperBlock.setStyle({ height: (this.origUpper + deltaY - delta) + 'px' });
}
this.saveDragHandleState(this.dhType, this.upperBlock.getStyle("height"));
this.saveDragHandleState(this.dhType, parseInt(this.lowerBlock.getStyle("top")));
}
Event.stopObserving(document.body, "mouseup", this.stopHandleDraggingBound, true);
Event.stopObserving(document.body, "mousemove", this.moveBound, true);

View File

@ -385,7 +385,7 @@ function eventsListCallback(http) {
var sortHeader = $(sorting["attribute"] + "Header");
if (sortHeader) {
var sortImages = $(table.tHead).getElementsByClassName("sortImage");
var sortImages = $(table.tHead).select(".sortImage");
$(sortImages).each(function(item) {
item.remove();
});
@ -698,15 +698,16 @@ function refreshCalendarEvents(scrollEvent) {
function refreshCalendarEventsCallback(http) {
if (http.readyState == 4
&& http.status == 200) {
if (http.responseText.length > 0) {
var data = http.responseText.evalJSON(true);
// log("refresh calendar events: " + data.length);
for (var i = 0; i < data.length; i++)
var dateTuples = new Array();
for (var i = 0; i < data.length; i++) {
drawCalendarEvent(data[i],
http.callbackData["startDate"],
http.callbackData["endDate"]);
}
}
scrollDayView(http.callbackData["scrollEvent"]);
}
else
@ -722,7 +723,7 @@ function drawCalendarEvent(eventData, sd, ed) {
var endDate = new Date();
endDate.setTime(eventData[5] * 1000);
// log ("s: " + startDate + "; e: " + endDate);
//log ("s: " + startDate + "; e: " + endDate);
var days = startDate.daysUpTo(endDate);
@ -773,7 +774,7 @@ function drawCalendarEvent(eventData, sd, ed) {
siblings.push(eventDiv);
eventDiv.siblings = siblings;
if (eventData[9].length > 0)
eventDiv.addClassName(eventData[9]);
eventDiv.addClassName(eventData[9]); // event owner status
var dayString = days[i].getDayString();
// log("day: " + dayString);
var parentDiv = null;
@ -1723,31 +1724,6 @@ function deletePersonalCalendarCallback(http) {
log ("ajax problem 5: " + http.status);
}
function getDragHandlesState() {
var urlstr = ApplicationBaseURL + "dragHandlesState";
triggerAjaxRequest(urlstr, getDragHandlesStateCallback);
}
function getDragHandlesStateCallback(http) {
if (http.status == 200) {
if (http.responseText.length > 0) {
// The response text is a JSON array
// of the top and right offsets.
var data = http.responseText.evalJSON(true);
if (data[0].length > 0) {
$("eventsListView").setStyle({ height: data[0] });
$("calendarView").setStyle({ top: data[0] });
$("rightDragHandle").setStyle({ top: data[0] });
}
if (data[1].length > 0) {
$("leftPanel").setStyle({ width: data[1] });
$("rightPanel").setStyle({ left: data[1] });
$("verticalDragHandle").setStyle({ left: data[1] });
}
}
}
}
function configureLists() {
var list = $("tasksList");
list.multiselect = true;
@ -1787,7 +1763,6 @@ function initCalendars() {
sorting["ascending"] = true;
if (!document.body.hasClassName("popup")) {
getDragHandlesState();
initDateSelectorEvents();
initCalendarSelector();
configureSearchField();