Defect #22059 » fix_22059.patch
| public/javascripts/context_menu.js | ||
|---|---|---|
|
function contextMenuShow(event) {
|
||
|
var mouse_x = event.pageX;
|
||
|
var mouse_y = event.pageY;
|
||
|
var mouse_y = event.pageY;
|
||
|
var mouse_y_c = event.clientY;
|
||
|
var render_x = mouse_x;
|
||
|
var render_y = mouse_y;
|
||
|
var dims;
|
||
| ... | ... | |
|
menu_width = $('#context-menu').width();
|
||
|
menu_height = $('#context-menu').height();
|
||
|
max_width = mouse_x + 2*menu_width;
|
||
|
max_height = mouse_y + menu_height;
|
||
|
max_height = mouse_y_c + menu_height;
|
||
|
var ws = window_size();
|
||
|
window_width = ws.width;
|
||
| ... | ... | |
|
} else {
|
||
|
$('#context-menu').removeClass('reverse-x');
|
||
|
}
|
||
|
if (max_height > window_height) {
|
||
|
render_y -= menu_height;
|
||
|
$('#context-menu').addClass('reverse-y');
|
||
|
// adding class for submenu
|
||
|
if (mouse_y_c < 325) {
|
||
|
$('#context-menu .folder').addClass('down');
|
||
|
}
|
||
|
} else {
|
||
|
$('#context-menu').removeClass('reverse-y');
|
||
|
// adding class for submenu
|
||
|
if (window_height - mouse_y_c < 345) {
|
||
|
$('#context-menu .folder').addClass('up');
|
||
|
}
|
||
|
$('#context-menu').removeClass('reverse-y');
|
||
|
}
|
||
|
if (render_x <= 0) render_x = 1;
|
||
|
if (render_y <= 0) render_y = 1;
|
||
|
$('#context-menu').css('left', (render_x + 'px'));
|
||
| ... | ... | |
|
$('#context-menu').show();
|
||
|
//if (window.parseStylesheets) { window.parseStylesheets(); } // IE
|
||
|
}
|
||
|
});
|
||
|
}
|
||
| public/stylesheets/context_menu.css | ||
|---|---|---|
|
#context-menu li.folder ul { position:absolute; left:168px; /* IE6 */ top:-2px; max-height:300px; overflow:hidden; overflow-y: auto; }
|
||
|
#context-menu li.folder>ul { left:148px; }
|
||
|
#context-menu.reverse-y li.folder>ul { top:auto; bottom:0; }
|
||
|
#context-menu.reverse-y li.folder>ul, #context-menu li.folder.up>ul { top:auto; bottom:0; }
|
||
|
#context-menu.reverse-x li.folder ul { left:auto; right:168px; /* IE6 */ }
|
||
|
#context-menu.reverse-x li.folder>ul { right:148px; }
|
||
|
#context-menu.reverse-y li.folder.down>ul {
|
||
|
position:absolute; top:-2px; bottom: auto; max-height:300px; overflow:hidden; overflow-y: auto;
|
||
|
}
|
||
|
#context-menu a {
|
||
|
text-decoration:none !important;
|
||
|
background-repeat: no-repeat;
|
||
- « Previous
- 1
- 2
- Next »