Allow right click on the CryptPad logo/link in the top left corner
This commit is contained in:
parent
1cc6eab871
commit
ceaf757680
@ -407,8 +407,11 @@ define([
|
|||||||
window.location = "/";
|
window.location = "/";
|
||||||
};
|
};
|
||||||
|
|
||||||
$aTagBig.click(onClick);
|
var onContext = function (e) { e.stopPropagation(); };
|
||||||
$aTagSmall.click(onClick);
|
|
||||||
|
$aTagBig.click(onClick).contextmenu(onContext);
|
||||||
|
$aTagSmall.click(onClick).contextmenu(onContext);
|
||||||
|
|
||||||
$linkContainer.append($aTagSmall).append($aTagBig);
|
$linkContainer.append($aTagSmall).append($aTagBig);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -181,6 +181,7 @@ define([
|
|||||||
|
|
||||||
var $tree = $iframe.find("#tree");
|
var $tree = $iframe.find("#tree");
|
||||||
var $content = $iframe.find("#content");
|
var $content = $iframe.find("#content");
|
||||||
|
var $appContainer = $iframe.find(".app-container");
|
||||||
var $driveToolbar = $iframe.find("#driveToolbar");
|
var $driveToolbar = $iframe.find("#driveToolbar");
|
||||||
var $contextMenu = $iframe.find("#treeContextMenu");
|
var $contextMenu = $iframe.find("#treeContextMenu");
|
||||||
var $contentContextMenu = $iframe.find("#contentContextMenu");
|
var $contentContextMenu = $iframe.find("#contentContextMenu");
|
||||||
@ -1737,7 +1738,8 @@ define([
|
|||||||
|
|
||||||
// Disable middle click in the context menu to avoid opening /drive/inner.html# in new tabs
|
// Disable middle click in the context menu to avoid opening /drive/inner.html# in new tabs
|
||||||
$(ifrw).click(function (e) {
|
$(ifrw).click(function (e) {
|
||||||
if (e.which !== 3) {
|
if (!e.target || !$(e.target).parents('.cryptpad-dropdown').length) { return; }
|
||||||
|
if (e.which !== 1) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1900,21 +1902,21 @@ define([
|
|||||||
module.hideMenu();
|
module.hideMenu();
|
||||||
});
|
});
|
||||||
|
|
||||||
$(ifrw).on('click', function (e) {
|
$appContainer.on('click', function (e) {
|
||||||
if (e.which !== 1) { return ; }
|
if (e.which !== 1) { return ; }
|
||||||
removeSelected(e);
|
removeSelected(e);
|
||||||
removeInput();
|
removeInput();
|
||||||
module.hideMenu(e);
|
module.hideMenu(e);
|
||||||
hideNewButton();
|
hideNewButton();
|
||||||
});
|
});
|
||||||
$(ifrw).on('drag drop', function (e) {
|
$appContainer.on('drag drop', function (e) {
|
||||||
removeInput();
|
removeInput();
|
||||||
module.hideMenu(e);
|
module.hideMenu(e);
|
||||||
});
|
});
|
||||||
$(ifrw).on('mouseup drop', function (e) {
|
$appContainer.on('mouseup drop', function (e) {
|
||||||
$iframe.find('.droppable').removeClass('droppable');
|
$iframe.find('.droppable').removeClass('droppable');
|
||||||
});
|
});
|
||||||
$(ifrw).on('keydown', function (e) {
|
$appContainer.on('keydown', function (e) {
|
||||||
// "Del"
|
// "Del"
|
||||||
if (e.which === 46) {
|
if (e.which === 46) {
|
||||||
if (filesOp.isPathInFilesData(currentPath)) { return; } // We can't remove elements directly from filesData
|
if (filesOp.isPathInFilesData(currentPath)) { return; } // We can't remove elements directly from filesData
|
||||||
@ -1948,7 +1950,7 @@ define([
|
|||||||
moveElements(paths, [TRASH], false, refresh);
|
moveElements(paths, [TRASH], false, refresh);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(ifrw).contextmenu(function () {
|
$appContainer.contextmenu(function () {
|
||||||
module.hideMenu();
|
module.hideMenu();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
@ -2005,7 +2007,7 @@ define([
|
|||||||
updatePathSize();
|
updatePathSize();
|
||||||
}, 100);
|
}, 100);
|
||||||
});
|
});
|
||||||
$(ifrw).mouseup(function (e) {
|
$appContainer.mouseup(function (e) {
|
||||||
window.clearInterval(APP.resizeTree);
|
window.clearInterval(APP.resizeTree);
|
||||||
APP.resizeTree = undefined;
|
APP.resizeTree = undefined;
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user