changeset 1037:df54d73bc5a0

Refresh entry status in entry compo listing when adding/deleting/updating.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 20 Nov 2015 07:54:48 +0200
parents b67fa444099e
children 2e1a9b564674
files admin.js
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/admin.js	Fri Nov 20 07:37:30 2015 +0200
+++ b/admin.js	Fri Nov 20 07:54:48 2015 +0200
@@ -410,6 +410,12 @@
 //
 // Entry management
 //
+function refreshEntryCompos()
+{
+  setTimeout("refreshDispatchCC('Entries');", 50);
+}
+
+
 function activateEntry(id, force)
 {
   var msuccess1 = function(txt)
@@ -459,6 +465,7 @@
   var msuccess = function(txt)
   {
     setTimeout("refreshDispatchCM("+ id +");", 50);
+    refreshEntryCompos();
   }
 
   if (args != "")
@@ -492,11 +499,13 @@
     }
     else
       activateEntry(edit ? id : -1, true);
+    refreshEntryCompos();
   }
 
   var mcb_ok = function(data)
   {
     jsSendPOSTRequest("action=update&type=entry&id="+id+"&edit="+edit+"&"+args, msuccess);
+    refreshEntryCompos();
   }
 
   var mcb_cancel = function(data)
@@ -520,7 +529,7 @@
 function deleteEntry(cid, id)
 {
   jsCancelUploadCBS();
-  jsDeleteItem(id, "entry", "entries", "refreshDispatchCM("+ cid +");", "entry");
+  jsDeleteItem(id, "entry", "entries", "refreshDispatchCM("+ cid +");refreshEntryCompos();", "entry");
 }