From 83c6fff22acfe3a7994105b798403f6a16208cfc Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 7 Jul 2006 04:11:10 +0000 Subject: [PATCH] Fixed #2142 -- Fixed JavaScript warnings in admin JS. Thanks, mike.capp@gmail.com git-svn-id: http://code.djangoproject.com/svn/django/trunk@3287 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admin/media/js/admin/DateTimeShortcuts.js | 2 +- django/contrib/admin/media/js/core.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/django/contrib/admin/media/js/admin/DateTimeShortcuts.js b/django/contrib/admin/media/js/admin/DateTimeShortcuts.js index ed99c6103d0..35199baf843 100644 --- a/django/contrib/admin/media/js/admin/DateTimeShortcuts.js +++ b/django/contrib/admin/media/js/admin/DateTimeShortcuts.js @@ -217,7 +217,7 @@ var DateTimeShortcuts = { DateTimeShortcuts.dismissCalendar(num); }, cancelEventPropagation: function(e) { - if (!e) var e = window.event; + if (!e) e = window.event; e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); } diff --git a/django/contrib/admin/media/js/core.js b/django/contrib/admin/media/js/core.js index 8eba69c9bba..d35bd29c1c5 100644 --- a/django/contrib/admin/media/js/core.js +++ b/django/contrib/admin/media/js/core.js @@ -19,6 +19,7 @@ function removeEvent(obj, evType, fn) { return true; } else if (obj.detachEvent) { obj.detachEvent("on" + evType, fn); + return true; } else { return false; }