comparison public/javascripts/.svn/text-base/context_menu.js.svn-base @ 441:cbce1fd3b1b7 redmine-1.2

Update to Redmine 1.2-stable branch (Redmine SVN rev 6000)
author Chris Cannam
date Mon, 06 Jun 2011 14:24:13 +0100
parents 051f544170fe
children
comparison
equal deleted inserted replaced
245:051f544170fe 441:cbce1fd3b1b7
34 this.showMenu(e); 34 this.showMenu(e);
35 }, 35 },
36 36
37 Click: function(e) { 37 Click: function(e) {
38 this.hideMenu(); 38 this.hideMenu();
39 if (Event.element(e).tagName == 'A') { return; } 39 if (Event.element(e).tagName == 'A' || Event.element(e).tagName == 'IMG') { return; }
40 if (Event.isLeftClick(e) || (navigator.appVersion.match(/\bMSIE\b/))) { 40 if (Event.isLeftClick(e) || (navigator.appVersion.match(/\bMSIE\b/))) {
41 var tr = Event.findElement(e, 'tr'); 41 var tr = Event.findElement(e, 'tr');
42 if (tr!=null && tr!=document && tr.hasClassName('hascontextmenu')) { 42 if (tr!=null && tr!=document && tr.hasClassName('hascontextmenu')) {
43 // a row was clicked, check if the click was on checkbox 43 // a row was clicked, check if the click was on checkbox
44 var box = Event.findElement(e, 'input'); 44 var box = Event.findElement(e, 'input');
48 tr.addClassName('context-menu-selection'); 48 tr.addClassName('context-menu-selection');
49 } else { 49 } else {
50 tr.removeClassName('context-menu-selection'); 50 tr.removeClassName('context-menu-selection');
51 } 51 }
52 } else { 52 } else {
53 if (e.ctrlKey) { 53 if (e.ctrlKey || e.metaKey) {
54 this.toggleSelection(tr); 54 this.toggleSelection(tr);
55 } else if (e.shiftKey) { 55 } else if (e.shiftKey) {
56 if (this.lastSelected != null) { 56 if (this.lastSelected != null) {
57 var toggling = false; 57 var toggling = false;
58 var rows = $$('.hascontextmenu'); 58 var rows = $$('.hascontextmenu');