Alexander Nazarov (nfokz) wrote in changelog,
Alexander Nazarov
nfokz
changelog

[livejournal] r22294: LJSUP-12425: Log mass deletion of inbox ...

Committer: anazarov
LJSUP-12425: Log mass deletion of inbox messages to userlog
U   trunk/htdocs/js/esn_inbox.js
Modified: trunk/htdocs/js/esn_inbox.js
===================================================================
--- trunk/htdocs/js/esn_inbox.js	2012-06-20 13:26:35 UTC (rev 22293)
+++ trunk/htdocs/js/esn_inbox.js	2012-06-20 14:29:25 UTC (rev 22294)
@@ -172,7 +172,7 @@
         //we use bind because DOM.addEventListener doesn't handle differences in the this value in different browsers
         delItem = $(folder + "_Delete_" + i);
         if( delItem ) {
-            DOM.addEventListener(delItem, "click", (function(e) { ESN_Inbox.deleteItems(e, this, folder) }).bind(delItem));
+            DOM.addEventListener(delItem, "click", (function(e) { ESN_Inbox.deleteItems(e, this, folder, cur_folder) }).bind(delItem));
         }
         if( $(folder + "_UnSpam_" + i) ) {
             DOM.addEventListener($(folder + "_UnSpam_" + i), "click", function(e) { ESN_Inbox.markRead(e, folder) });
@@ -259,15 +259,15 @@
     return false;
 };
 
-ESN_Inbox.deleteItems = function (evt, element, folder) {
+ESN_Inbox.deleteItems = function (evt, element, folder, cur_folder) {
     Event.stop(evt);
 
     if( cur_folder === 'spam' ) {
         ESN_Inbox.confirmSpam( element, function( banUser ) {
             if( banUser ) {
-                ESN_Inbox.updateItems('deleteban', evt, folder, '');
+                ESN_Inbox.updateItems('deleteban', evt, folder, '', cur_folder);
             } else {
-                ESN_Inbox.updateItems('delete', evt, folder, '');
+                ESN_Inbox.updateItems('delete', evt, folder, '', cur_folder);
             }
         }, true );
     } else {
@@ -278,7 +278,7 @@
         var msg = ESN_Inbox.confirmDelete;
         if (has_bookmark && msg && !confirm(msg)) return false;
 
-        ESN_Inbox.updateItems('delete', evt, folder, '');
+        ESN_Inbox.updateItems('delete', evt, folder, '', cur_folder);
     }
     return false;
 };

Tags: anazarov, js, livejournal, nfokz
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments