Monotone-Parent: c4392a8d8578caf8d80806e5cb77d1c4ee24ccd7
Monotone-Revision: 985f6c7ac0c60b58fa6e6745ff81be38452afa1e Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2007-12-05T17:07:40 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
1435638871
commit
fe1c2b0d18
|
@ -255,9 +255,11 @@ function deleteSelectedMessagesCallback(http) {
|
|||
// row.addClassName("deleted"); // when we'll offer "mark as deleted"
|
||||
|
||||
if (deleteMessageRequestCount == 0) {
|
||||
if (nextRow)
|
||||
if (nextRow) {
|
||||
Mailer.currentMessages[Mailer.currentMailbox] = nextRow.getAttribute("id").substr(4);
|
||||
openMailbox(data["mailbox"], true);
|
||||
nextRow.select();
|
||||
loadMessage(Mailer.currentMessages[Mailer.currentMailbox]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -522,7 +524,10 @@ function messageListCallback(http) {
|
|||
if (row) {
|
||||
row.select();
|
||||
lastClickedRow = row.rowIndex - $(row).up('table').down('thead').getElementsByTagName('tr').length;
|
||||
div.scrollTop = row.rowIndex * row.getHeight(); // scroll to selected message
|
||||
var rowPosition = row.rowIndex * row.getHeight();
|
||||
if ($(row).up('div').getHeight() > rowPosition)
|
||||
rowPosition = 0;
|
||||
div.scrollTop = rowPosition; // scroll to selected message
|
||||
}
|
||||
else
|
||||
$("messageContent").update();
|
||||
|
@ -715,7 +720,6 @@ function onMessageSelectionChange() {
|
|||
|
||||
if (rows.length == 1) {
|
||||
var idx = rows[0].substr(4);
|
||||
|
||||
if (Mailer.currentMessages[Mailer.currentMailbox] != idx) {
|
||||
Mailer.currentMessages[Mailer.currentMailbox] = idx;
|
||||
loadMessage(idx);
|
||||
|
|
|
@ -74,6 +74,7 @@ function _editEventId(id, calendar) {
|
|||
var targetname = "SOGo_edit_" + id;
|
||||
var win = window.open(urlstr, "_blank",
|
||||
"width=490,height=470,resizable=0");
|
||||
if (win)
|
||||
win.focus();
|
||||
}
|
||||
|
||||
|
@ -346,8 +347,8 @@ function eventsListCallback(http) {
|
|||
startDate.setTime(data[i][4] * 1000);
|
||||
row.day = startDate.getDayString();
|
||||
row.hour = startDate.getHourString();
|
||||
Event.observe(row, "click",
|
||||
onEventClick.bindAsEventListener(row));
|
||||
Event.observe(row, "mousedown", onRowClick);
|
||||
Event.observe(row, "selectstart", listRowMouseDownHandler);
|
||||
Event.observe(row, "dblclick",
|
||||
editDoubleClickedEvent.bindAsEventListener(row));
|
||||
Event.observe(row, "contextmenu",
|
||||
|
@ -919,21 +920,10 @@ function popupCalendar(node) {
|
|||
|
||||
function onEventContextMenu(event) {
|
||||
var topNode = $("eventsList");
|
||||
// log(topNode);
|
||||
|
||||
var menu = $("eventsListMenu");
|
||||
|
||||
Event.observe(menu, "hideMenu", onEventContextMenuHide);
|
||||
popupMenu(event, "eventsListMenu", this);
|
||||
|
||||
var topNode = $("eventsList");
|
||||
var selectedNodes = topNode.getSelectedRows();
|
||||
topNode.menuSelectedRows = selectedNodes;
|
||||
for (var i = 0; i < selectedNodes.length; i++)
|
||||
selectedNodes[i].deselect();
|
||||
|
||||
topNode.menuSelectedEntry = this;
|
||||
this.select();
|
||||
}
|
||||
|
||||
function onEventContextMenuHide(event) {
|
||||
|
@ -943,20 +933,20 @@ function onEventContextMenuHide(event) {
|
|||
topNode.menuSelectedEntry.deselect();
|
||||
topNode.menuSelectedEntry = null;
|
||||
}
|
||||
if (topNode.menuSelectedRows) {
|
||||
var nodeIds = topNode.menuSelectedRows;
|
||||
for (var i = 0; i < nodeIds.length; i++) {
|
||||
var node = $(nodeIds[i]);
|
||||
node.select();
|
||||
}
|
||||
topNode.menuSelectedRows = null;
|
||||
}
|
||||
}
|
||||
|
||||
function onEventsSelectionChange() {
|
||||
listOfSelection = this;
|
||||
this.removeClassName("_unfocused");
|
||||
$("tasksList").addClassName("_unfocused");
|
||||
|
||||
var rows = this.tBodies[0].getSelectedNodes();
|
||||
if (rows.length == 1) {
|
||||
var row = rows[0];
|
||||
changeCalendarDisplay( { "day": row.day,
|
||||
"scrollEvent": row.getAttribute("id") } );
|
||||
changeDateSelectorDisplay(row.day);
|
||||
}
|
||||
}
|
||||
|
||||
function onTasksSelectionChange() {
|
||||
|
@ -1048,14 +1038,6 @@ function onListFilterChange() {
|
|||
return refreshEvents();
|
||||
}
|
||||
|
||||
function onEventClick(event) {
|
||||
changeCalendarDisplay( { "day": this.day,
|
||||
"scrollEvent": this.getAttribute("id") } );
|
||||
changeDateSelectorDisplay(this.day);
|
||||
|
||||
return onRowClick(event);
|
||||
}
|
||||
|
||||
function selectMonthInMenu(menu, month) {
|
||||
var entries = menu.childNodes[1].childNodesWithTag("LI");
|
||||
for (i = 0; i < entries.length; i++) {
|
||||
|
@ -1721,9 +1703,6 @@ function configureLists() {
|
|||
TableKit.Resizable.init(list, {'trueResize' : true, 'keepWidth' : true});
|
||||
Event.observe(list, "mousedown",
|
||||
onEventsSelectionChange.bindAsEventListener(list));
|
||||
var div = list.parentNode;
|
||||
Event.observe(div, "contextmenu",
|
||||
onEventContextMenu.bindAsEventListener(div));
|
||||
}
|
||||
|
||||
function initDateSelectorEvents() {
|
||||
|
|
|
@ -140,20 +140,20 @@ function addressFieldLostFocus(sender) {
|
|||
}
|
||||
|
||||
function removeLastEditedRowIfEmpty() {
|
||||
var idx, addr, addressList, senderRow;
|
||||
var addr, addressList, senderRow;
|
||||
|
||||
idx = lastIndex;
|
||||
if (idx == 0) return;
|
||||
addr = $('addr_' + idx);
|
||||
addressList = $("addressList").tBodies[0];
|
||||
|
||||
if (lastIndex == 0 && addressList.childNodes.length <= 2) return;
|
||||
addr = $('addr_' + lastIndex);
|
||||
if (!addr) return;
|
||||
if (addr.value.strip() != '') return;
|
||||
addr = this.findAddressWithIndex(idx);
|
||||
addr = this.findAddressWithIndex(lastIndex);
|
||||
if(addr) {
|
||||
var addresses = $('addr_addresses');
|
||||
addresses.removeChild(addr);
|
||||
}
|
||||
addressList = $("addressList").tBodies[0];
|
||||
senderRow = $("row_" + idx);
|
||||
senderRow = $("row_" + lastIndex);
|
||||
addressList.removeChild(senderRow);
|
||||
}
|
||||
|
||||
|
|
|
@ -509,9 +509,10 @@ function onRowClick(event) {
|
|||
}
|
||||
|
||||
var initialSelection = $(node.parentNode).getSelectedNodes();
|
||||
|
||||
if (initialSelection.length > 0 && !Event.isLeftClick(event))
|
||||
// Ignore non primary-click (ie right-click)
|
||||
if (initialSelection.length > 0
|
||||
&& initialSelection.indexOf(node) >= 0
|
||||
&& !Event.isLeftClick(event))
|
||||
// Ignore non primary-click (ie right-click) inside current selection
|
||||
return true;
|
||||
|
||||
if ((event.shiftKey == 1 || event.ctrlKey == 1)
|
||||
|
|
Loading…
Reference in a new issue