Defect #22059 » fix_22059.patch
public/javascripts/context_menu.js | ||
---|---|---|
87 | 87 | |
88 | 88 |
function contextMenuShow(event) { |
89 | 89 |
var mouse_x = event.pageX; |
90 |
var mouse_y = event.pageY; |
|
90 |
var mouse_y = event.pageY; |
|
91 |
var mouse_y_c = event.clientY; |
|
91 | 92 |
var render_x = mouse_x; |
92 | 93 |
var render_y = mouse_y; |
93 | 94 |
var dims; |
... | ... | |
110 | 111 |
menu_width = $('#context-menu').width(); |
111 | 112 |
menu_height = $('#context-menu').height(); |
112 | 113 |
max_width = mouse_x + 2*menu_width; |
113 |
max_height = mouse_y + menu_height; |
|
114 |
max_height = mouse_y_c + menu_height;
|
|
114 | 115 | |
115 | 116 |
var ws = window_size(); |
116 | 117 |
window_width = ws.width; |
... | ... | |
123 | 124 |
} else { |
124 | 125 |
$('#context-menu').removeClass('reverse-x'); |
125 | 126 |
} |
127 | ||
126 | 128 |
if (max_height > window_height) { |
127 | 129 |
render_y -= menu_height; |
128 | 130 |
$('#context-menu').addClass('reverse-y'); |
131 |
// adding class for submenu |
|
132 |
if (mouse_y_c < 325) { |
|
133 |
$('#context-menu .folder').addClass('down'); |
|
134 |
} |
|
129 | 135 |
} else { |
130 |
$('#context-menu').removeClass('reverse-y'); |
|
136 |
// adding class for submenu |
|
137 |
if (window_height - mouse_y_c < 345) { |
|
138 |
$('#context-menu .folder').addClass('up'); |
|
139 |
} |
|
140 |
$('#context-menu').removeClass('reverse-y'); |
|
131 | 141 |
} |
142 | ||
132 | 143 |
if (render_x <= 0) render_x = 1; |
133 | 144 |
if (render_y <= 0) render_y = 1; |
134 | 145 |
$('#context-menu').css('left', (render_x + 'px')); |
... | ... | |
136 | 147 |
$('#context-menu').show(); |
137 | 148 | |
138 | 149 |
//if (window.parseStylesheets) { window.parseStylesheets(); } // IE |
139 | ||
140 | 150 |
} |
141 | 151 |
}); |
142 | 152 |
} |
public/stylesheets/context_menu.css | ||
---|---|---|
25 | 25 |
#context-menu li.folder ul { position:absolute; left:168px; /* IE6 */ top:-2px; max-height:300px; overflow:hidden; overflow-y: auto; } |
26 | 26 |
#context-menu li.folder>ul { left:148px; } |
27 | 27 | |
28 |
#context-menu.reverse-y li.folder>ul { top:auto; bottom:0; } |
|
28 |
#context-menu.reverse-y li.folder>ul, #context-menu li.folder.up>ul { top:auto; bottom:0; }
|
|
29 | 29 |
#context-menu.reverse-x li.folder ul { left:auto; right:168px; /* IE6 */ } |
30 | 30 |
#context-menu.reverse-x li.folder>ul { right:148px; } |
31 | 31 | |
32 |
#context-menu.reverse-y li.folder.down>ul { |
|
33 |
position:absolute; top:-2px; bottom: auto; max-height:300px; overflow:hidden; overflow-y: auto; |
|
34 |
} |
|
35 | ||
32 | 36 |
#context-menu a { |
33 | 37 |
text-decoration:none !important; |
34 | 38 |
background-repeat: no-repeat; |
- « Previous
- 1
- 2
- Next »