See ChangeLog

Monotone-Parent: 3c56ca9ef63d29beeb411890d72b4047a46d7713
Monotone-Revision: 4126acd8a39c70e133baeb54d6b5122aac7b5b8a

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2011-05-31T19:12:46
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Francis Lachapelle 2011-05-31 19:12:46 +00:00
parent 792952088a
commit cf4de4c817
9 changed files with 100 additions and 72 deletions

View File

@ -1,3 +1,15 @@
2011-05-31 Francis Lachapelle <flachapelle@inverse.ca>
* UI/WebServerResources/HTMLElement.js (selectElement): if element
has no ID, keep track of it anyway. This fixes an issue when
deleting attachments in the mail composition window.
* UI/WebServerResources/UIxMailEditor.js (initMailEditor): use
events delegation in the attachments list.
* UI/Scheduler/NSArray+Scheduler.m (-compareTasksAscending): sort
the tasks by their name if they are from the same calendar.
2011-05-31 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/MAPIStoreTypes.m (NSObjectFromMAPISPropValue)
@ -62,6 +74,23 @@
(__main__): we output getter indexes as 16 bit hex values, for
consistency.
2011-05-30 Francis Lachapelle <flachapelle@inverse.ca>
* UI/WebServerResources/ContactsUI.js (contactsListCallback):
restored activation of drag'n'drop.
(configureAddressBooks, onFolderSelectionChange)
(appendAddressBook): delegated rows events to the table.
(setEventsOnAddressBook): this function removed following the new event
delegation model.
2011-05-27 Francis Lachapelle <flachapelle@inverse.ca>
* UI/PreferencesUI/UIxPreferences.m (-forwardAddress)
(-setForwardAddress): allow to define multiple forwarding addresses.
* UI/WebServerResources/UIxPreferences.js (savePreferences): test
each specified forwarding address.
2011-05-17 Ludovic Marcotte <lmarcotte@inverse.ca>
* We now remove the /inverse.ca/20101018_1/ identifier

1
NEWS
View File

@ -34,6 +34,7 @@ Enhancements
- updated Ukranian translation
- updated Spanish translation
- "check while typing" is no longer enabled by default in HTML editor
- show unread messages count in window title in the webmail interface
- updated CKEditor to version 3.5.2
- contact lists now have their own icons in the contacts web module
- added the ability to invite people and to answer invitations from the iOS

View File

@ -118,13 +118,12 @@
{
NSComparisonResult result;
unsigned int selfTime, otherTime;
Class nullClass;
result = [self _compareCompletionWithStatus1: [self objectAtIndex: 2]
andStatus2: [otherTask objectAtIndex: 2]];
andStatus2: [otherTask objectAtIndex: 2]];
if (result == NSOrderedSame)
{
nullClass = [NSNull class];
// End date
selfTime = [[self objectAtIndex: 4] intValue];
otherTime = [[otherTask objectAtIndex: 4] intValue];
if (selfTime && !otherTime)
@ -138,8 +137,16 @@
else if (selfTime < otherTime)
result = NSOrderedAscending;
else
result = [[self objectAtIndex: 1]
compare: [otherTask objectAtIndex: 1]];
{
// Calendar ID
result = [[self objectAtIndex: 1]
compare: [otherTask objectAtIndex: 1]];
if (result == NSOrderedSame)
// Task name
result = [[self objectAtIndex: 3]
compare: [otherTask objectAtIndex: 3]
options: NSCaseInsensitiveSearch];
}
}
}

View File

@ -140,6 +140,8 @@ function contactsListCallback(http) {
if (contact["c_telephonenumber"])
cell.appendChild(document.createTextNode(contact["c_telephonenumber"]));
}
configureDraggables();
}
// Remove unnecessary rows
@ -259,7 +261,7 @@ function _onContactMenuAction(folderItem, action, refresh) {
for (var i = 0; i < contactIds.length; i++) {
if (contactIds[i].endsWith ("vlf")) {
alert (_("Lists can't be moved or copied."));
showAlertDialog(_("Lists can't be moved or copied."));
return false;
}
}
@ -575,7 +577,7 @@ function newContact(sender) {
function newList(sender) {
var li = $(Contact.currentAddressBook);
if (li.hasClassName("remote"))
alert(_("You cannot create a list in a shared address book."));
showAlertDialog(_("You cannot create a list in a shared address book."));
else
openContactWindow(URLForFolderID(Contact.currentAddressBook) + "/newlist");
@ -584,14 +586,16 @@ function newList(sender) {
function onFolderSelectionChange(event) {
var folderList = $("contactFolders");
var nodes = folderList.getSelectedNodes();
if (event) {
var node = getTarget(event);
if (node.tagName == 'UL')
return;
// Update rows selection
onRowClick(event, node);
}
var nodes = folderList.getSelectedNodes();
$("contactView").update();
Contact.currentContact = null;
@ -713,7 +717,6 @@ function appendAddressBook(name, folder) {
li.appendChild(document.createTextNode(name
.replace("&lt;", "<", "g")
.replace("&gt;", ">", "g")));
setEventsOnAddressBook(li);
updateAddressBooksMenus();
configureDroppables();
}
@ -931,12 +934,9 @@ function configureAbToolbar() {
function configureAddressBooks() {
var contactFolders = $("contactFolders");
if (contactFolders) {
contactFolders.observe("mousedown", listRowMouseDownHandler);
contactFolders.observe("click", onFolderSelectionChange);
contactFolders.on("mousedown", onFolderSelectionChange);
contactFolders.on("dblclick", onAddressBookModify);
contactFolders.attachMenu("contactFoldersMenu");
var lis = contactFolders.childNodesWithTag("li");
for (var i = 0; i < lis.length; i++)
setEventsOnAddressBook(lis[i]);
lookupDeniedFolders();
configureDroppables();
@ -1003,23 +1003,10 @@ function updateAddressBooksMenus() {
}
}
function setEventsOnAddressBook(folder) {
var node = $(folder);
node.observe("mousedown", listRowMouseDownHandler);
node.observe("click", onRowClick);
if (node.readAttribute("owner") != "nobody") {
node.observe("dblclick", onAddressBookModify);
}
}
function onAddressBookModify(event) {
var folders = $("contactFolders");
var selected = folders.getSelectedNodes()[0];
if (selected.getAttribute("owner") == "nobody") {
showAlertDialog(_("Unable to rename that folder!"));
}
else {
if (selected.getAttribute("owner") != "nobody") {
var currentName = selected.innerHTML.unescapeHTML();
showPromptDialog(_("Properties"),
_("Address Book Name"),
@ -1289,6 +1276,7 @@ function initContacts(event) {
Event.observe(document, "keydown", onDocumentKeydown);
configureAddressBooks();
configureDraggables();
updateAddressBooksMenus();
var table = $("contactsList");
@ -1519,7 +1507,7 @@ function dropSelectedContacts (action, toId) {
var contactIds = $('contactsList').getSelectedRowsId();
for (var i = 0; i < contactIds.length; i++) {
if (contactIds[i].endsWith ("vlf")) {
alert (_("Lists can't be moved or copied."));
showAlertDialog(_("Lists can't be moved or copied."));
return false;
}
}

View File

@ -181,7 +181,6 @@ Element.addMethods({
selectElement: function(element) {
element = $(element);
element.addClassName('_selected');
var parent = element.up();
if (!parent.selectedElements || !parent.selectedIds) {
// Selected nodes are kept in a array at the
@ -191,10 +190,12 @@ Element.addMethods({
}
for (var i = 0; i < parent.selectedElements.length; i++)
if (parent.selectedElements[i] == element) return;
for (var i = 0; i < parent.selectedIds.length; i++)
if (parent.selectedIds[i] == element.id) return;
parent.selectedElements.push(element); // use index instead ?
parent.selectedIds.push(element.id);
if (element.id) {
for (var i = 0; i < parent.selectedIds.length; i++)
if (parent.selectedIds[i] == element.id) return;
parent.selectedIds.push(element.id);
}
},
selectRange: function(element, startIndex, endIndex) {
@ -228,9 +229,10 @@ Element.addMethods({
rows = element.getElementsByTagName('LI');
else
rows = element.select('TBODY TR');
for (var i = 0; i < rows.length; i++)
for (var i = 0; i < rows.length; i++) {
if (rows[i].nodeType == 1)
$(rows[i]).selectElement();
}
},
deselect: function(element) {

View File

@ -58,7 +58,9 @@ UL#tasksList, UL#calendarList
list-style-type: none;
list-style-image: none;
overflow: hidden;
overflow-y: auto; }
overflow-y: auto;
-moz-user-select: none;
-khtml-user-select: none; }
UL#calendarList
{ clear: left;
@ -147,6 +149,7 @@ DIV#calendarView
width: 100%;
border-top: 1px solid #aaa;
border-left: 1px solid #aaa;
-moz-user-select: none;
-khtml-user-select: none; }
DIV#calendarView A

View File

@ -990,9 +990,7 @@ function tasksListCallback(http) {
for (var i = 0; i < data.length; i++) {
var listItem = createElement("li");
list.appendChild(listItem);
listItem.observe("mousedown", listRowMouseDownHandler);
listItem.observe("click", onRowClick);
listItem.observe("dblclick", editDoubleClickedEvent);
listItem.on("dblclick", editDoubleClickedEvent);
var calendar = escape(data[i][1]);
var cname = escape(data[i][0]);
@ -1020,8 +1018,6 @@ function tasksListCallback(http) {
var t = new Element ("span");
t.update(data[i][3]);
listItem.appendChild (t);
listItem.attachMenu("tasksListMenu");
}
list.scrollTop = list.previousScroll;
@ -1809,12 +1805,19 @@ function onEventsSelectionChange() {
}
}
function onTasksSelectionChange() {
function onTasksSelectionChange(event) {
listOfSelection = this;
this.removeClassName("_unfocused");
var target = Event.element(event);
if (target.tagName == 'SPAN')
target = target.parentNode;
// Update selection
onRowClick(event, target);
var eventsList = $("eventsList");
eventsList.addClassName("_unfocused");
deselectAll(eventsList);
eventsList.deselectAll();
}
function _loadEventHref(href) {
@ -2831,8 +2834,9 @@ function deletePersonalCalendarCallback(http) {
function configureLists() {
var list = $("tasksList");
list.multiselect = true;
list.observe("mousedown", onTasksSelectionChange);
list.observe("selectstart", listRowMouseDownHandler);
list.on("mousedown", onTasksSelectionChange);
list.on("selectstart", listRowMouseDownHandler);
list.attachMenu("tasksListMenu");
var input = $("showHideCompletedTasks");
input.observe("click", onShowCompletedTasks);
@ -2945,7 +2949,7 @@ function onDocumentKeydown(event) {
}
}
function initCalendars() {
function initScheduler() {
sorting["attribute"] = "start";
sorting["ascending"] = true;
@ -2980,4 +2984,4 @@ function initCalendars() {
Event.observe(window, "resize", onWindowResize);
}
document.observe("dom:loaded", initCalendars);
document.observe("dom:loaded", initScheduler);

View File

@ -240,7 +240,6 @@ function createAttachment(node, list) {
var attachment = createElement("li", null, null, { node: node }, null, list);
createElement("img", null, null, { src: ResourcesURL + "/attachment.gif" },
null, attachment);
attachment.on("click", onRowClick);
var filename = node.value;
var separator;
@ -362,11 +361,9 @@ function initMailEditor() {
var list = $("attachments");
if (!list) return;
list.on("click", onRowClick);
list.attachMenu("attachmentsMenu");
var elements = $(list).childNodesWithTag("li");
for (var i = 0; i < elements.length; i++)
elements[i].on("click", onRowClick);
if (elements.length > 0)
$("attachmentsArea").setStyle({ display: "block" });
@ -551,10 +548,7 @@ function onMenuSetPriority(event) {
}
function onSelectAllAttachments() {
var list = $("attachments");
var nodes = list.childNodesWithTag("li");
for (var i = 0; i < nodes.length; i++)
nodes[i].selectElement();
$("attachments").selectAll();
}
function onSelectOptions(event) {

View File

@ -485,7 +485,7 @@ LI._selected,
TR._selected > TD,
TD._selected
{
background: #9ABCD8;
background-color: #9ABCD8 !important;
color: #fff;
}
@ -534,22 +534,6 @@ DIV.resize-handle
top: 0px;
left: 0px; }
@media print
{
BODY
{ position: static;
font-size: 10pt;
height: auto;
overflow: visible; }
DIV#logConsole,
DIV#linkBanner,
DIV#toolbar,
DIV.menu,
DIV.tabsContainer
{ display: none; }
}
.genericHoverClass
{
background-color: #9ABCD8 !important;
@ -559,7 +543,7 @@ DIV.resize-handle
DIV.dialog
{ position: absolute;
width: 350px;
z-index: 3; }
z-index: 50; }
DIV.dialog > DIV
{ border: 1px solid #444;
@ -1010,3 +994,19 @@ DIV.bottomToolbar A.bottomButton SPAN:active
/* row editing */
.editing > INPUT[type="text"]
{ width: 98%; }
@media print
{
BODY
{ position: static;
font-size: 10pt;
height: auto;
overflow: visible; }
DIV#logConsole,
DIV#linkBanner,
DIV#toolbar,
DIV.menu,
DIV.tabsContainer
{ display: none; }
}