Project

General

Profile

Defect #27779 » context_menu.js.patch

Амир Мусин, 2017-12-11 17:39

View differences:

redmine_new/public/javascripts/context_menu.js 2017-11-29 15:56:31.674827000 +0500
}
function contextMenuShow(event) {
var $wrapper = $("div#main");
var wrapper_height = $wrapper.height();
var mouse_x = event.pageX;
var mouse_y = event.pageY;
var mouse_y_c = event.clientY;
......
menu_height = $('#context-menu').height();
max_width = mouse_x + 2*menu_width;
max_height = mouse_y_c + menu_height;
var ws = window_size();
window_width = ws.width;
window_height = ws.height;
if (window_height > wrapper_height){
window_height = wrapper_height
}
/* display the menu above and/or to the left of the click if needed */
if (max_width > window_width) {
render_x -= menu_width;
(2-2/2)