Add voteskip button, fix bugs

This commit is contained in:
calzoneman 2013-06-18 16:18:41 -04:00
parent b60981c8d8
commit dc5c6801ed
6 changed files with 37 additions and 18 deletions

View File

@ -318,3 +318,7 @@ html, body {
border: 1px solid #aaaaaa; border: 1px solid #aaaaaa;
border-radius: 5px; border-radius: 5px;
} }
#channelsettingswrap3 {
margin-top: 20px;
}

View File

@ -14,6 +14,13 @@
}); });
} }
$("#hide_settings").click(function() {
$("#csdropdown_title").text("Moderation Menu");
$("#channelsettingswrap div.span12").each(function() {
$(this).hide();
});
});
clickHandler("#show_optedit", "#optedit"); clickHandler("#show_optedit", "#optedit");
clickHandler("#show_permedit", "#permedit"); clickHandler("#show_permedit", "#permedit");
clickHandler("#show_motdedit", "#motdedit"); clickHandler("#show_motdedit", "#motdedit");

View File

@ -215,6 +215,10 @@ $("#qlockbtn").click(function() {
socket.emit("togglePlaylistLock"); socket.emit("togglePlaylistLock");
}); });
$("#voteskip").click(function() {
socket.emit("voteskip");
});
$("#getplaylist").click(function() { $("#getplaylist").click(function() {
var callback = function(data) { var callback = function(data) {
PLAYER.hide(); PLAYER.hide();

View File

@ -661,24 +661,26 @@ function handlePermissionChange() {
if(CLIENT.rank >= 2) { if(CLIENT.rank >= 2) {
$("#channelsettingswrap3").show(); $("#channelsettingswrap3").show();
if($("#channelsettingswrap").html() == "") if($("#channelsettingswrap").html() == "") {
$("#channelsettingswrap").load("channeloptions.html"); $("#channelsettingswrap").load("channeloptions.html", function() {
/* update channel controls */ /* update channel controls */
$("#opt_pagetitle").val(CHANNEL.opts.pagetitle); $("#opt_pagetitle").val(CHANNEL.opts.pagetitle);
$("#opt_externalcss").val(CHANNEL.opts.externalcss); $("#opt_externalcss").val(CHANNEL.opts.externalcss);
$("#opt_externaljs").val(CHANNEL.opts.externaljs); $("#opt_externaljs").val(CHANNEL.opts.externaljs);
$("#opt_chat_antiflood").prop("checked", CHANNEL.opts.chat_antiflood); $("#opt_chat_antiflood").prop("checked", CHANNEL.opts.chat_antiflood);
$("#opt_show_public").prop("checked", CHANNEL.opts.show_public); $("#opt_show_public").prop("checked", CHANNEL.opts.show_public);
$("#opt_enable_link_regex").prop("checked", CHANNEL.opts.enable_link_regex); $("#opt_enable_link_regex").prop("checked", CHANNEL.opts.enable_link_regex);
$("#opt_allow_voteskip").prop("checked", CHANNEL.opts.allow_voteskip); $("#opt_allow_voteskip").prop("checked", CHANNEL.opts.allow_voteskip);
$("#opt_voteskip_ratio").val(CHANNEL.opts.voteskip_ratio); $("#opt_voteskip_ratio").val(CHANNEL.opts.voteskip_ratio);
setVisible("#permedit_tab", CLIENT.rank >= 3); setVisible("#permedit_tab", CLIENT.rank >= 3);
setVisible("#banlist_tab", hasPermission("ban")); setVisible("#banlist_tab", hasPermission("ban"));
setVisible("#motdedit_tab", hasPermission("motdedit")); setVisible("#motdedit_tab", hasPermission("motdedit"));
setVisible("#cssedit_tab", CLIENT.rank >= 3); setVisible("#cssedit_tab", CLIENT.rank >= 3);
setVisible("#jsedit_tab", CLIENT.rank >= 3); setVisible("#jsedit_tab", CLIENT.rank >= 3);
setVisible("#filteredit_tab", hasPermission("filteredit")); setVisible("#filteredit_tab", hasPermission("filteredit"));
setVisible("#channelranks_tab", CLIENT.rank >= 3); setVisible("#channelranks_tab", CLIENT.rank >= 3);
});
}
} }
else { else {
$("#channelsettingswrap").html(""); $("#channelsettingswrap").html("");

View File

@ -162,6 +162,7 @@
</div> </div>
</div> </div>
</div> </div>
<button class="btn btn-block" id="voteskip">Voteskip</button>
<!-- video queue --> <!-- video queue -->
<ul class="span12 videolist" id="queue"> <ul class="span12 videolist" id="queue">
</ul> </ul>

View File

@ -14,6 +14,7 @@
<li id="banlist_tab"><a href="javascript:void(0);" id="show_banlist">Ban List</a></li> <li id="banlist_tab"><a href="javascript:void(0);" id="show_banlist">Ban List</a></li>
<li id="channelranks_tab"><a href="javascript:void(0);" id="show_channelranks">Channel Ranks</a></li> <li id="channelranks_tab"><a href="javascript:void(0);" id="show_channelranks">Channel Ranks</a></li>
<li id="loginhistory_tab"><a href="javascript:void(0);" id="show_loginhistory">Recent Connections</a></li> <li id="loginhistory_tab"><a href="javascript:void(0);" id="show_loginhistory">Recent Connections</a></li>
<li id="hidesettings_tab"><a href="javascript:void(0);" id="hide_settings">Hide Menu</a></li>
</ul> </ul>
</div> </div>
<hr> <hr>