From 406ad7eaa6684e48f433369287eb56e6f0e46a85 Mon Sep 17 00:00:00 2001 From: Trevor Squillario Date: Mon, 15 Aug 2011 09:39:34 -0400 Subject: [PATCH] Beta Release v.002 --- Style.css | 20 +++++++++++++++----- index.html | 24 +++++++++++++++--------- js/app.js | 10 ++-------- 3 files changed, 32 insertions(+), 22 deletions(-) diff --git a/Style.css b/Style.css index 4619405..35cf116 100644 --- a/Style.css +++ b/Style.css @@ -188,6 +188,13 @@ ul.songlist li.song span text-align: right; width: 30px; } +ul.songlist li small +{ + color: #B6B6B6; + font-size: 10px; + margin: 1px 0 0; + float: right; +} ul.songlist li.playing { background: url('images/play_6x8.png') 9px 7px no-repeat; @@ -199,10 +206,7 @@ ul.songlist li.selected background-color: #4B95E5; border-bottom: 1px solid #73ABE7; } -ul.songlist li small -{ - font-size: 10px; -} + .actions { margin: 5px; @@ -262,6 +266,7 @@ div#submenu a:hover { margin: 0 8px; float: left; + width: 460px; } #songdetails ul { @@ -275,7 +280,12 @@ div#submenu a:hover } #songdetails li span.label { - font-variant: small-caps; + color: #B6B6B6; + display: block; + float: left; + margin: 0 4px 0 0; + text-align: right; + width: 37px; } ul.preferences { diff --git a/index.html b/index.html index adf46fa..7a6cdba 100644 --- a/index.html +++ b/index.html @@ -63,18 +63,14 @@ }); // Keyboard shortcuts - $('#Artists').keydown(function (e) { + $(document).keydown(function (e) { var unicode = e.charCode ? e.charCode : e.keyCode; + // right arrow if (unicode >= 65 && unicode <= 90) { var key = findKeyForCode(unicode); var el = '#index_' + key.toUpperCase(); $('#Artists').stop().scrollTo(el); - } - }); - $(document).keydown(function (e) { - var unicode = e.charCode ? e.charCode : e.keyCode; - // right arrow - if (unicode == 39) { + } else if (unicode == 39) { var next = $('ul.songlist li.playing').next(); if (!next.length) next = $('ul.songlist li').first(); changeTrack(next); @@ -113,7 +109,17 @@ lastChecked = this; }); - // Action Menu - Click Events + // Main Click Events + // Load in a track on click + $('ul.songlist li.song').live('dblclick', function (e) { + e.preventDefault(); + $(this).addClass('playing').siblings().removeClass('playing'); + var songid = $(this).attr('childid'); + var albumid = $(this).attr('parentid'); + playSong(songid, albumid); + }); + + // Action Menu Click Events $('a#action_AddToPlaylist').click(function () { var submenu = $('div#submenu'); if (submenu.is(":visible")) { @@ -211,7 +217,7 @@ $.cookie('password', null); }); - }); // End document.ready + }); // End document.ready var a; var audio; diff --git a/js/app.js b/js/app.js index e529d39..7b922c1 100644 --- a/js/app.js +++ b/js/app.js @@ -15,14 +15,6 @@ function loadTabContent(tab) { $(this).addClass('selected'); getAlbums($(this).attr("id")); }); - // Load in a track on click - $('#Albums li.song').live('dblclick', function (e) { - e.preventDefault(); - $(this).addClass('playing').siblings().removeClass('playing'); - var songid = $(this).attr('childid'); - var albumid = $(this).attr('parentid'); - playSong(songid, albumid); - }); break; case '#tabPlaylists': loadPlaylists(); @@ -387,9 +379,11 @@ function getPlaylist(id) { } var track; if (child.track === undefined) { track = " "; } else { track = child.track; } + var time = secondsToTime(child.duration); html = '
  • '; html += '' + track + ' '; html += child.title; + html += ' ' + time['m'] + ':' + time['s'] + ''; html += '
  • '; $(html).appendTo("#TrackContainer"); });