mirror of
https://github.com/hargata/lubelog.git
synced 2025-12-10 00:46:08 -06:00
fixes positioning of the context menu
This commit is contained in:
parent
a13cf0733b
commit
99a34a888e
@ -261,17 +261,17 @@ function showGarageContextMenu(e) {
|
||||
if (getDeviceIsTouchOnly()) {
|
||||
return;
|
||||
}
|
||||
$(".garage-context-menu").fadeIn("fast");
|
||||
$(".garage-context-menu").css({
|
||||
left: getGarageMenuPosition(event.clientX, 'width', 'scrollLeft'),
|
||||
top: getGarageMenuPosition(event.clientY, 'height', 'scrollTop')
|
||||
});
|
||||
if (!$(e).hasClass('garage-active')) {
|
||||
clearSelectedVehicles();
|
||||
addToSelectedVehicles($(e).attr('data-rowId'));
|
||||
$(e).addClass('garage-active');
|
||||
}
|
||||
$(".garage-context-menu").fadeIn("fast");
|
||||
determineGarageContextMenu();
|
||||
$(".garage-context-menu").css({
|
||||
left: getGarageMenuPosition(event.clientX, 'width', 'scrollLeft'),
|
||||
top: getGarageMenuPosition(event.clientY, 'height', 'scrollTop')
|
||||
});
|
||||
}
|
||||
function showGarageContextMenuForMobile(e, xPosition, yPosition) {
|
||||
if (!$(e).hasClass('garage-active')) {
|
||||
@ -279,11 +279,11 @@ function showGarageContextMenuForMobile(e, xPosition, yPosition) {
|
||||
$(e).addClass('garage-active');
|
||||
} else {
|
||||
$(".garage-context-menu").fadeIn("fast");
|
||||
determineGarageContextMenu();
|
||||
$(".garage-context-menu").css({
|
||||
left: getGarageMenuPosition(xPosition, 'width', 'scrollLeft'),
|
||||
top: getGarageMenuPosition(yPosition, 'height', 'scrollTop')
|
||||
});
|
||||
determineGarageContextMenu();
|
||||
}
|
||||
}
|
||||
function determineGarageContextMenu() {
|
||||
|
||||
@ -1262,17 +1262,17 @@ function showTableContextMenu(e) {
|
||||
if (getDeviceIsTouchOnly()) {
|
||||
return;
|
||||
}
|
||||
$(".table-context-menu").fadeIn("fast");
|
||||
$(".table-context-menu").css({
|
||||
left: getMenuPosition(event.clientX, 'width', 'scrollLeft'),
|
||||
top: getMenuPosition(event.clientY, 'height', 'scrollTop')
|
||||
});
|
||||
if (!$(e).hasClass('table-active')) {
|
||||
clearSelectedRows();
|
||||
addToSelectedRows($(e).attr('data-rowId'));
|
||||
$(e).addClass('table-active');
|
||||
}
|
||||
$(".table-context-menu").fadeIn("fast");
|
||||
determineContextMenuItems();
|
||||
$(".table-context-menu").css({
|
||||
left: getMenuPosition(event.clientX, 'width', 'scrollLeft'),
|
||||
top: getMenuPosition(event.clientY, 'height', 'scrollTop')
|
||||
});
|
||||
}
|
||||
function determineContextMenuItems() {
|
||||
var tableRows = $('.table tbody tr:visible');
|
||||
@ -1352,11 +1352,11 @@ function showTableContextMenuForMobile(e, xPosition, yPosition) {
|
||||
shakeTableRow(e);
|
||||
} else {
|
||||
$(".table-context-menu").fadeIn("fast");
|
||||
determineContextMenuItems();
|
||||
$(".table-context-menu").css({
|
||||
left: getMenuPosition(xPosition, 'width', 'scrollLeft'),
|
||||
top: getMenuPosition(yPosition, 'height', 'scrollTop')
|
||||
});
|
||||
determineContextMenuItems();
|
||||
}
|
||||
}
|
||||
function shakeTableRow(e) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user