mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-05 11:35:26 +00:00
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:
@@ -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))) {
|
||||
|
||||
Reference in New Issue
Block a user