Mercurial > hg > fapweb
diff admajax.js.php @ 1092:95b74632cfe2
Rename votekeys table to userkeys, and all related variables and settings.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 26 Jan 2017 13:38:19 +0200 |
parents | 01783161eeb2 |
children | 0a2117349f46 |
line wrap: on
line diff
--- a/admajax.js.php Thu Jan 26 01:59:33 2017 +0200 +++ b/admajax.js.php Thu Jan 26 13:38:19 2017 +0200 @@ -619,22 +619,22 @@ // -// Votekey management +// Userkey management // -function voteKeyInfoRefresh() +function userKeyInfoRefresh() { - jsRefreshItems("vkeyInfo", "votekey", "info"); + jsRefreshItems("vkeyInfo", "userkey", "info"); } -function voteKeyRefresh(id) +function userKeyRefresh(id) { var msuccess2 = function(txt) { var nitem = document.getElementById("vkey"+id); if (nitem) nitem.className = txt; - voteKeyInfoRefresh(); + userKeyInfoRefresh(); } var msuccess1 = function(txt) @@ -642,38 +642,38 @@ var nitem = document.getElementById("vkey"+id); if (nitem) nitem.innerHTML = txt; - voteKeyInfoRefresh(); + userKeyInfoRefresh(); } - jsSendPOSTRequest("action=get&type=votekey&id="+id, msuccess1); - jsSendPOSTRequest("action=get&type=votekeyclass&id="+id, msuccess2); + jsSendPOSTRequest("action=get&type=userkey&id="+id, msuccess1); + jsSendPOSTRequest("action=get&type=userkeyclass&id="+id, msuccess2); } -function voteKeyUpdate(id, type, args) +function userKeyUpdate(id, type, args) { var msuccess = function(txt) { - voteKeyRefresh(id); - voteKeyInfoRefresh(); + userKeyRefresh(id); + userKeyInfoRefresh(); } - jsSendPOSTRequest("action=votekey&type="+type+"&id="+id+"&"+args, msuccess); + jsSendPOSTRequest("action=userkey&type="+type+"&id="+id+"&"+args, msuccess); } -function voteKeySetActive(id) +function userKeySetActive(id) { var args = jsMakePostArgs({"active":3}, "vk", id); var mcb_ok = function (data) { - voteKeyUpdate(id, "active", args); + userKeyUpdate(id, "active", args); } var mcb_cancel = function (data) { - voteKeyRefresh(id); + userKeyRefresh(id); } if (lastPostArgs["active"] == 0) @@ -683,13 +683,13 @@ } -function voteKeyAssign(id, mode) +function userKeyAssign(id, mode) { var args = jsMakePostArgs({"key_id":2}, "vk", id); var mcb_ok = function (data) { - voteKeyUpdate(id, (mode ? "assign" : "clear"), args); + userKeyUpdate(id, (mode ? "assign" : "clear"), args); } if (mode == 0)