summaryrefslogtreecommitdiffstats
path: root/public/javascripts/context_menu.js
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-06-28 11:34:53 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-06-28 11:34:53 +0000
commit75a5dbd01dd4c57b96dd1fa322bc4d9ec9f865d1 (patch)
tree448af5ff827f608bed8a980ba2301da6014737b9 /public/javascripts/context_menu.js
parentbd3191f80da433322fc9d2ec7b61ae6b89e216fa (diff)
downloadredmine-75a5dbd01dd4c57b96dd1fa322bc4d9ec9f865d1.tar.gz
redmine-75a5dbd01dd4c57b96dd1fa322bc4d9ec9f865d1.zip
Upgraded to Prototype 1.6.0.1.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1594 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public/javascripts/context_menu.js')
-rw-r--r--public/javascripts/context_menu.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/public/javascripts/context_menu.js b/public/javascripts/context_menu.js
index 3e2d571fa..dfd72b1fa 100644
--- a/public/javascripts/context_menu.js
+++ b/public/javascripts/context_menu.js
@@ -28,11 +28,11 @@ ContextMenu.prototype = {
RightClick: function(e) {
this.hideMenu();
// do not show the context menu on links
- if (Event.findElement(e, 'a') != document) { return; }
+ if (Event.findElement(e, 'a') != document && Event.findElement(e, 'a') != undefined) { return; }
// right-click simulated by Alt+Click with Opera
if (window.opera && !e.altKey) { return; }
var tr = Event.findElement(e, 'tr');
- if ((tr == document) || !tr.hasClassName('hascontextmenu')) { return; }
+ if (tr == document || tr == undefined || !tr.hasClassName('hascontextmenu')) { return; }
Event.stop(e);
if (!this.isSelected(tr)) {
this.unselectAll();
@@ -44,14 +44,14 @@ ContextMenu.prototype = {
Click: function(e) {
this.hideMenu();
- if (Event.findElement(e, 'a') != document) { return; }
+ if (Event.findElement(e, 'a') != document && Event.findElement(e, 'a') != undefined ) { return; }
if (window.opera && e.altKey) { return; }
if (Event.isLeftClick(e) || (navigator.appVersion.match(/\bMSIE\b/))) {
var tr = Event.findElement(e, 'tr');
if (tr!=document && tr.hasClassName('hascontextmenu')) {
// a row was clicked, check if the click was on checkbox
var box = Event.findElement(e, 'input');
- if (box!=document) {
+ if (box!=document && box!=undefined) {
// a checkbox may be clicked
if (box.checked) {
tr.addClassName('context-menu-selection');