Defect #27779 » context_menu.js.patch
redmine_new/public/javascripts/context_menu.js 2017-11-29 15:56:31.674827000 +0500 | ||
---|---|---|
85 | 85 |
} |
86 | 86 | |
87 | 87 |
function contextMenuShow(event) { |
88 |
var $wrapper = $("div#main"); |
|
89 |
var wrapper_height = $wrapper.height(); |
|
90 |
|
|
88 | 91 |
var mouse_x = event.pageX; |
89 | 92 |
var mouse_y = event.pageY; |
90 | 93 |
var mouse_y_c = event.clientY; |
... | ... | |
115 | 118 |
menu_height = $('#context-menu').height(); |
116 | 119 |
max_width = mouse_x + 2*menu_width; |
117 | 120 |
max_height = mouse_y_c + menu_height; |
118 | ||
121 |
|
|
119 | 122 |
var ws = window_size(); |
120 | 123 |
window_width = ws.width; |
121 | 124 |
window_height = ws.height; |
122 | ||
125 |
|
|
126 |
if (window_height > wrapper_height){ |
|
127 |
window_height = wrapper_height |
|
128 |
} |
|
123 | 129 |
/* display the menu above and/or to the left of the click if needed */ |
124 | 130 |
if (max_width > window_width) { |
125 | 131 |
render_x -= menu_width; |
- « Previous
- 1
- 2
- Next »