Align series popup with selected row when in list view

This commit is contained in:
Nathan Gray 2012-10-29 17:09:12 +00:00
parent 9c73af1aca
commit a2744f82f0

View File

@ -1040,6 +1040,7 @@ function edit_series(event,id,date)
calendar_edit_date = date;
var popup = jQuery("#edit_series").show();
var row = null;
if(event)
{
@ -1049,6 +1050,13 @@ function edit_series(event,id,date)
top: event.pageY,
left: (event.pageX + popup.width() > $j(window).width() ? $j(window).width() - popup.width() : event.pageX)
});
} else if (row = jQuery("#"+id+"\\\:"+date)) {
// Open at row
popup.css({
position: "absolute",
top: row.position().top + row.height() -popup.height()/2,
left: $j(window).width()/2-popup.width()/2
});
} else {
// Open popup in the middle
popup.css({