Monotone-Parent: 2ce562acf878ad1f7c91a19309985a2f48a7cd2d

Monotone-Revision: 5966d179f5ba5866b985546c60bf56fb8c81da28

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2008-08-28T20:42:55
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2008-08-28 20:42:55 +00:00
parent beae1ffdb4
commit c30a430881
+20 -5
View File
@@ -411,6 +411,14 @@ function checkAjaxRequestsState() {
progressImage.parentNode.removeChild(progressImage);
}
function isMac() {
return (navigator.platform.indexOf('Mac') > -1);
}
function isWindows() {
return (navigator.platform.indexOf('Win') > -1);
}
function isSafari3() {
return (navigator.appVersion.indexOf("Version") > -1);
}
@@ -552,15 +560,22 @@ function onRowClick(event) {
}
var initialSelection = $(node.parentNode).getSelectedNodes();
var isLeftClick = true;
if (isMac() && isSafari())
if (event.ctrlKey == 1)
isLeftClick = false; // Control-click is equivalent to right-click under Mac OS X
else
isLeftClick = Event.isLeftClick(event);
else
isLeftClick = Event.isLeftClick(event);
if (initialSelection.length > 0
&& initialSelection.indexOf(node) >= 0
&& (!isSafari() && !Event.isLeftClick(event) ||
isSafari() && event.ctrlKey == 1)) // Event.isLeftClick is not supported in Safari
&& !isLeftClick)
// Ignore non primary-click (ie right-click) inside current selection
return true;
if ((event.shiftKey == 1 || event.metaKey == 1)
if ((event.shiftKey == 1 || isMac() && event.metaKey == 1 || isWindows() && event.ctrlKey == 1)
&& (lastClickedRow >= 0)
&& (acceptMultiSelect(node.parentNode)
|| acceptMultiSelect(node.parentNode.parentNode))) {