add option to show queue butts by default

This commit is contained in:
calzoneman 2013-06-19 22:49:49 -04:00
parent 55e6734bd1
commit 6353638115
2 changed files with 11 additions and 2 deletions

View File

@ -88,7 +88,8 @@ var USEROPTS = {
sync_accuracy : getOrDefault("sync_accuracy", 2),
chatbtn : getOrDefault("chatbtn", false),
altsocket : getOrDefault("altsocket", false),
joinmessage : getOrDefault("joinmessage", true)
joinmessage : getOrDefault("joinmessage", true),
qbtn_always : getOrDefault("qbtn_always", false)
};
var Rank = {

View File

@ -261,7 +261,8 @@ function addQueueButtons(li) {
.appendTo(menu);
}
menu.hide();
if(!USEROPTS.qbtn_always)
menu.hide();
li.contextmenu(function(ev) {
ev.preventDefault();
@ -329,6 +330,12 @@ function showOptionsMenu() {
addOption("", warn);
$("<hr>").appendTo(form);
var qbtncontainer = $("<label/>").addClass("checkbox")
.text("Show playlist buttons by default");
var qbtn = $("<input/>").attr("type", "checkbox").appendTo(qbtncontainer);
qbtn.prop("checked", USEROPTS.qbtn_always);
addOption("Playlist Buttons", qbtncontainer);
var synchcontainer = $("<label/>").addClass("checkbox")
.text("Synchronize Media");
var synch = $("<input/>").attr("type", "checkbox").appendTo(synchcontainer);
@ -409,6 +416,7 @@ function showOptionsMenu() {
USEROPTS.blink_title = blink.prop("checked");
USEROPTS.chatbtn = sendbtn.prop("checked");
USEROPTS.altsocket = altsocket.prop("checked");
USEROPTS.qbtn_always = qbtn.prop("checked");
if(CLIENT.rank >= Rank.Moderator) {
USEROPTS.modhat = modhat.prop("checked");
USEROPTS.joinmessage = join.prop("checked");