# HG changeset patch # User Matti Hamalainen # Date 1447998888 -7200 # Node ID df54d73bc5a0295acad4cdda53ade94a1fc71bf6 # Parent b67fa444099e96ab4328e397174d37d30c7d2e8e Refresh entry status in entry compo listing when adding/deleting/updating. diff -r b67fa444099e -r df54d73bc5a0 admin.js --- 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"); }