Gazelle/static/functions/voting.js

40 lines
1.2 KiB
JavaScript
Raw Normal View History

2012-11-02 08:00:18 +00:00
var voteLock = false;
function DownVoteGroup(groupid, authkey) {
if (voteLock) {
return;
}
voteLock = true;
2013-10-05 08:01:00 +00:00
ajax.get('ajax.php?action=votefavorite&do=vote&groupid=' + groupid + '&vote=down' + '&auth=' + authkey, function (response) { return });
$('.vote_link_' + groupid).ghide();
$('.vote_clear_' + groupid).gshow();
$('.voted_down_' + groupid).gshow();
$('.voted_up_' + groupid).ghide();
2012-11-02 08:00:18 +00:00
voteLock = false;
}
function UpVoteGroup(groupid, authkey) {
if (voteLock) {
return;
}
voteLock = true;
2013-10-05 08:01:00 +00:00
ajax.get('ajax.php?action=votefavorite&do=vote&groupid=' + groupid + '&vote=up' + '&auth=' + authkey, function (response) { return });
$('.vote_link_' + groupid).ghide();
$('.vote_clear_' + groupid).gshow();
$('.voted_down_' + groupid).ghide();
$('.voted_up_' + groupid).gshow();
2012-11-02 08:00:18 +00:00
voteLock = false;
}
function UnvoteGroup(groupid, authkey) {
if (voteLock) {
return;
}
voteLock = true;
2013-10-05 08:01:00 +00:00
ajax.get('ajax.php?action=votefavorite&do=unvote&groupid=' + groupid + '&auth=' + authkey, function (response) { return });
$('.vote_link_' + groupid).gshow();
$('.vote_clear_' + groupid).ghide();
$('.voted_down_' + groupid).ghide();
$('.voted_up_' + groupid).ghide();
2012-11-02 08:00:18 +00:00
voteLock = false;
2013-06-17 08:01:02 +00:00
}