ZoneMinder 1.24.1 deleteFilter patch to fix Javascript error

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
Post Reply
nngodinh
Posts: 1
Joined: Wed May 20, 2009 8:01 am

ZoneMinder 1.24.1 deleteFilter patch to fix Javascript error

Post by nngodinh »

Please find the following patch to fix Javascript error on ZoneMinder 1.24.1, file web/skins/classic/views/js/filter.js, function deleteFilter, that prevents deleting filters.

Put the patch code below in a file, then use it against sources and/or production:

Sources:
cd /usr/src/ZoneMinder-1.24.1
patch -p1 < patchfile

Production:
cd /var/www/zm
patch -p2 < patchfile

Regards,

Code: Select all

--- ZoneMinder-1.24.1.orig/web/skins/classic/views/js/filter.js	2009-05-20 10:04:14.000000000 +0200
+++ ZoneMinder-1.24.1/web/skins/classic/views/js/filter.js	2009-05-20 10:04:32.000000000 +0200
@@ -56,7 +56,7 @@ function deleteFilter( element, name )
 {
     if ( confirm( deleteSavedFilterString+" '"+name+"'" ) )
     {
-        var form = element.name;
+        var form = element.form;
         form.action.value = 'delete';
         form.fid.value = name;
         submitToFilter( element, 1 );
Post Reply