fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-04-28 04:30 am

[dw-free] canceling filter rename changes name to 'null'

[commit: http://hg.dwscoalition.org/dw-free/rev/8389c2912ff2]

http://bugs.dwscoalition.org/show_bug.cgi?id=3640

Don't do anything if we cancel the rename.

Patch by [personal profile] yvi.

Files modified:
  • htdocs/js/subfilters.js
--------------------------------------------------------------------------------
diff -r 7c52a3a4c8e2 -r 8389c2912ff2 htdocs/js/subfilters.js
--- a/htdocs/js/subfilters.js	Thu Apr 28 12:25:43 2011 +0800
+++ b/htdocs/js/subfilters.js	Thu Apr 28 12:30:01 2011 +0800
@@ -530,7 +530,8 @@ function cfRenameFilter() {
 
     // FIXME: don't think dialogs are accessible at all
     var renamed = prompt( 'Rename filter to:', filt.name );
-    filt.name = renamed;
+    if ( renamed != null )
+        filt.name = renamed;
 
     // and now update the select dialog
     cfUpdateFilterSelect();
--------------------------------------------------------------------------------