Cleaned up some code

This commit is contained in:
Kasper Rynning-Tønnesen
2015-07-03 22:16:58 +02:00
parent 58c037feb7
commit 3bc8674149
5 changed files with 20 additions and 17 deletions

View File

@@ -100,7 +100,7 @@
</ul> </ul>
</li> </li>
<li class="no-padding"> <li class="no-padding remote-panel">
<ul class="collapsible collapsible-accordion"> <ul class="collapsible collapsible-accordion">
<li> <li>
<a class="collapsible-header bold waves-effect">Remote Control <a class="collapsible-header bold waves-effect">Remote Control

View File

@@ -763,6 +763,10 @@ ul #chat-log{
height:auto; height:auto;
} }
.remote-panel {
display:none;
}
.navbar-fixed, #nav{ .navbar-fixed, #nav{
position: relative; position: relative;
} }

File diff suppressed because one or more lines are too long

View File

@@ -21,8 +21,8 @@ var List = {
{ {
full_playlist.push(msg[1]); full_playlist.push(msg[1]);
full_playlist.sort(Helper.predicate({ full_playlist.sort(Helper.predicate({
name: 'votes', name: 'votes',
reverse: true reverse: true
}, 'added')); }, 'added'));
List.insertAtIndex(List.getIndexOfSong(msg[1].id), msg[1], true); List.insertAtIndex(List.getIndexOfSong(msg[1].id), msg[1], true);

View File

@@ -59,26 +59,30 @@ $(document).ready(function()
} }
Youtube.setup_youtube_listener(chan); Youtube.setup_youtube_listener(chan);
Admin.admin_listener(); Admin.admin_listener();
Chat.setup_chat_listener(chan);
Chat.allchat_listener();
List.channel_listener(); List.channel_listener();
List.skipping_listener(); List.skipping_listener();
Hostcontroller.host_listener();
//Materialize.toast("Passwords have been reset. If anything is not right, please send us a mail @ contact@zoff.no", 10000);
$("#settings").sideNav({ $("#settings").sideNav({
menuWidth: 300, // Default is 240 menuWidth: 300, // Default is 240
edge: 'right', // Choose the horizontal origin edge: 'right', // Choose the horizontal origin
closeOnClick: false // Closes side-nav on <a> clicks, useful for Angular/Meteor closeOnClick: false // Closes side-nav on <a> clicks, useful for Angular/Meteor
}); });
$("#chat-btn").sideNav({ if(!window.mobilecheck())
{
Chat.setup_chat_listener(chan);
Chat.allchat_listener();
Hostcontroller.host_listener();
$("#chat-btn").sideNav({
menuWidth: 272, // Default is 240 menuWidth: 272, // Default is 240
edge: 'left', // Choose the horizontal origin edge: 'left', // Choose the horizontal origin
closeOnClick: false // Closes side-nav on <a> clicks, useful for Angular/Meteor closeOnClick: false // Closes side-nav on <a> clicks, useful for Angular/Meteor
}); });
$(".drag-target")[1].remove(); $(".drag-target")[1].remove();
}
//Materialize.toast("Passwords have been reset. If anything is not right, please send us a mail @ contact@zoff.no", 10000);
//$('#settings-close').sideNav('hide'); //$('#settings-close').sideNav('hide');
@@ -103,11 +107,6 @@ $(document).ready(function()
socket.emit("password", [localStorage[chan.toLowerCase()], chan.toLowerCase()]); socket.emit("password", [localStorage[chan.toLowerCase()], chan.toLowerCase()]);
} }
if($("#chan").html().toLowerCase() == "jazz")
{
//loadjsfile("static/js/jazzscript.js");
//peis = true;
}
if(navigator.userAgent.toLowerCase().indexOf("firefox") > -1) //quickdickfix for firefoxs weird percent handling if(navigator.userAgent.toLowerCase().indexOf("firefox") > -1) //quickdickfix for firefoxs weird percent handling
$(".main").height(window.innerHeight-64); $(".main").height(window.innerHeight-64);
@@ -127,7 +126,7 @@ $(document).ready(function()
Helper.sample(); Helper.sample();
} }
$( "#results" ).hover( function() { $("div.result").removeClass("hoverResults"); i = 0; }, function() { }); $( "#results" ).hover( function() { $("div.result").removeClass("hoverResults"); i = 0; }, function() { });
$("#search").focus(); $("#search").focus();
$('#base').bind("keyup keypress", function(e) { $('#base').bind("keyup keypress", function(e) {