#2680: Small correction in DateTimeShortcuts.js
--------------------------------+-------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: adrian
Type: defect | Status: new
Priority: normal | Milestone:
Component: Admin interface | Version:
Severity: normal | Keywords:
--------------------------------+-------------------------------------------
The last Mozilla security update for Debian Sarge
(Debian/1.7.8-1sarge7.2.1) crashes when executing this Javascript code;
the problem is that 'cal_nav' is wrongly added a second time to 'cal_box'
(the first time is in 'quickElement()').
Of course, this is clearly a Mozilla bug introduced with the update (old
version did not choke on that line); nonetheless, the code in question is
incorrect... since you are not the only perfectionists out there, here's a
patch :-)
{{{
--- django/contrib/admin/media/js/admin/DateTimeShortcuts.js (revision
3738)
+++ django/contrib/admin/media/js/admin/DateTimeShortcuts.js (working
copy)
@@ -171,7 +171,6 @@
cal_nav_prev.className = 'calendarnav-previous';
var cal_nav_next = quickElement('a', cal_nav, '>', 'href',
'javascript:DateTimeShortcuts.drawNext('+num+');');
cal_nav_next.className = 'calendarnav-next';
- cal_box.appendChild(cal_nav);
// main box
var cal_main = quickElement('div', cal_box, '', 'id',
DateTimeShortcuts.calendarDivName2 + num);
}}}
Happy hacking,
Ant9000
--
Ticket URL: <http://code.djangoproject.com/ticket/2680>
Django <http://code.djangoproject.org/>
The web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---