Commit 9846fee7 authored by Ramiro Morales's avatar Ramiro Morales
Browse files

[1.2.X] Fixed #11414 -- Made sure the calendar and clock popup windows in the...

[1.2.X] Fixed #11414 -- Made sure the calendar and clock popup windows in the admin don't have a negative vertical position. Thanks uipko for the report and fix.

Backport of [15143] from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 10ca44ba
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ var DateTimeShortcuts = {
            //       (it returns as it was left aligned), needs to be fixed.
            clock_box.style.left = findPosX(clock_link) - 110 + 'px';
        }
        clock_box.style.top = findPosY(clock_link) - 30 + 'px';
        clock_box.style.top = Math.max(0, findPosY(clock_link) - 30) + 'px';

        // Show the clock box
        clock_box.style.display = 'block';
@@ -224,7 +224,7 @@ var DateTimeShortcuts = {
            //       (it returns as it was left aligned), needs to be fixed.
            cal_box.style.left = findPosX(cal_link) - 180 + 'px';
        }
        cal_box.style.top = findPosY(cal_link) - 75 + 'px';
        cal_box.style.top = Math.max(0, findPosY(cal_link) - 75) + 'px';

        cal_box.style.display = 'block';
        addEvent(window.document, 'click', function() { DateTimeShortcuts.dismissCalendar(num); return true; });