Allow revoting without refreshing

This commit is contained in:
Calvin Montgomery 2021-08-19 21:03:15 -07:00
parent 1f10f0f09c
commit d179cd896f
2 changed files with 4 additions and 2 deletions

View File

@ -2,7 +2,7 @@
"author": "Calvin Montgomery", "author": "Calvin Montgomery",
"name": "CyTube", "name": "CyTube",
"description": "Online media synchronizer and chat", "description": "Online media synchronizer and chat",
"version": "3.82.2", "version": "3.82.3",
"repository": { "repository": {
"url": "http://github.com/calzoneman/sync" "url": "http://github.com/calzoneman/sync"
}, },

View File

@ -944,8 +944,10 @@ Callbacks = {
option: i option: i
}); });
poll.find(".option button").each(function() { poll.find(".option button").each(function() {
$(this).attr("disabled", "disabled"); $(this).removeClass("active");
$(this).parent().removeClass("option-selected");
}); });
$(this).addClass("active");
$(this).parent().addClass("option-selected"); $(this).parent().addClass("option-selected");
} }
$("<button/>").addClass("btn btn-default btn-sm").text(data.counts[i]) $("<button/>").addClass("btn btn-default btn-sm").text(data.counts[i])