Ticket #9642: patch.txt

File patch.txt, 1.5 KB (added by northtea, 7 years ago)
Line 
1Index: django/contrib/admin/media/js/admin/DateTimeShortcuts.js
2===================================================================
3--- django/contrib/admin/media/js/admin/DateTimeShortcuts.js    (revision 9506)
4+++ django/contrib/admin/media/js/admin/DateTimeShortcuts.js    (working copy)
5@@ -109,11 +109,11 @@
6     
7         // Show the clock box
8         clock_box.style.display = 'block';
9-        addEvent(window, 'click', function() { DateTimeShortcuts.dismissClock(num); return true; });
10+        addEvent(window.document, 'click', function() { DateTimeShortcuts.dismissClock(num); return true; });
11     },
12     dismissClock: function(num) {
13        document.getElementById(DateTimeShortcuts.clockDivName + num).style.display = 'none';
14-       window.onclick = null;
15+       window.document.onclick = null;
16     },
17     handleClockQuicklink: function(num, val) {
18        DateTimeShortcuts.clockInputs[num].value = val;
19@@ -224,10 +224,11 @@
20         cal_box.style.top = findPosY(cal_link) - 75 + 'px';
21     
22         cal_box.style.display = 'block';
23-        addEvent(window, 'click', function() { DateTimeShortcuts.dismissCalendar(num); return true; });
24+        addEvent(window.document, 'click', function() { DateTimeShortcuts.dismissCalendar(num); return true; });
25     },
26     dismissCalendar: function(num) {
27         document.getElementById(DateTimeShortcuts.calendarDivName1+num).style.display = 'none';
28+        window.document.onclick = null;
29     },
30     drawPrev: function(num) {
31         DateTimeShortcuts.calendars[num].drawPreviousMonth();
Back to Top