Slight improvements

This commit is contained in:
calzoneman 2013-06-06 19:38:47 -04:00
parent a0768316a4
commit c7b3adbed1
3 changed files with 23 additions and 60 deletions

View File

@ -95,8 +95,8 @@ html, body {
cursor: pointer;
}
#leftpane-inner *, #rightpane-inner * {
margin-left: 0;
#leftpane-inner div.span12, #rightpane-inner div.span12 {
margin-left: 0;
}
#plmeta {

View File

@ -1,58 +1,21 @@
/* Usercount show/hide */
$("#userlisttoggle").click(function() {
if($("#userlist").css("display") == "none") {
$("#userlist").show();
$("#userlisttoggle").removeClass("icon-chevron-down")
.addClass("icon-chevron-up");
}
else {
$("#userlist").hide();
$("#userlisttoggle").removeClass("icon-chevron-up")
.addClass("icon-chevron-down");
}
});
/* Generalized show/hide function */
function generateToggle(chevron, div) {
$(chevron).click(function() {
if($(div).css("display") == "none") {
$(div).show();
$(chevron+" i").removeClass("icon-chevron-down")
.addClass("icon-chevron-up");
}
else {
$(div).hide();
$(chevron+" i").removeClass("icon-chevron-up")
.addClass("icon-chevron-down");
}
});
}
/* Library search show/hide */
$("#librarytoggle").click(function() {
if($("#librarywrap").css("display") == "none") {
$("#librarywrap").show();
$("#librarytoggle i").removeClass("icon-chevron-down")
.addClass("icon-chevron-up");
}
else {
$("#librarywrap").hide();
$("#librarytoggle i").removeClass("icon-chevron-up")
.addClass("icon-chevron-down");
}
});
/* User playlist show/hide */
$("#userpltoggle").click(function() {
if($("#userplaylistwrap").css("display") == "none") {
$("#userplaylistwrap").show();
$("#userpltoggle i").removeClass("icon-chevron-down")
.addClass("icon-chevron-up");
}
else {
$("#userplaylistwrap").hide();
$("#userpltoggle i").removeClass("icon-chevron-up")
.addClass("icon-chevron-down");
}
});
/* Playlist controls show/hide */
$("#playlisttoggle").click(function() {
if($("#playlist_controls").css("display") == "none") {
$("#playlist_controls").show();
$("#playlisttoggle i").removeClass("icon-chevron-down")
.addClass("icon-chevron-up");
}
else {
$("#playlist_controls").hide();
$("#playlisttoggle i").removeClass("icon-chevron-up")
.addClass("icon-chevron-down");
}
});
generateToggle("#usercountwrap", "#userlist");
generateToggle("#librarytoggle", "#librarywrap");
generateToggle("#userpltoggle", "#userplaylistwrap");
generateToggle("#playlisttoggle", "#playlist_controls");

View File

@ -60,8 +60,8 @@
<!-- chat container -->
<div class="span5" id="chatwrap">
<!-- user count -->
<div id="usercountwrap">
<i class="icon-chevron-up pull-left pointer" id="userlisttoggle" title="Show/Hide Userlist"></i>
<div id="usercountwrap" class="pointer">
<i class="icon-chevron-up pull-left" id="userlisttoggle" title="Show/Hide Userlist"></i>
<p id="usercount">Not connected</p>
</div>
<!-- userlist -->