diff admin.js @ 1052:fb5a468e647d

Implement compo voting enable/disable in entry pages.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 21 Nov 2015 17:01:59 +0200
parents 178ed843b6c2
children 82ecea33c477
line wrap: on
line diff
--- a/admin.js	Sat Nov 21 16:23:35 2015 +0200
+++ b/admin.js	Sat Nov 21 17:01:59 2015 +0200
@@ -385,6 +385,17 @@
 }
 
 
+function updateCompoVoting(id)
+{
+  var msuccess = function(txt)
+  {
+    jsRefreshItems("covoting"+id, "compovoting", "&id="+id);
+  }
+
+  jsSendPOSTRequest("action=update&type=compovoting&id="+id+"&voting="+jsGetValue("covotingbutton"+id, 3), msuccess);
+}
+
+
 function updateCompo(id)
 {
   var args = jsMakePostArgs({"name":1, "description":1, "notes":1, "visible":3, "voting":3, "show_authors":3, "cpath":1, "preview_type":4}, "co", id, true);