diff --git a/README b/README index 909bdaf..96a16c7 100644 --- a/README +++ b/README @@ -19,6 +19,7 @@ External Subsonic Music Player 1/5/2012 .017 added FancyBox to CoverArt, improved current playlist functions 1/9/2012 .018 added media keyboard bindings from @itchy 1/18/2012 .019 rating support, random playlist, new preferences added +1/25/2012 .020 table layout for songs, bug fixes, display tweaks TO DO: (In no particular order...) - Jukebox Control diff --git a/images/albumdefault_56.jpg b/images/albumdefault_56.jpg new file mode 100644 index 0000000..fd41c87 Binary files /dev/null and b/images/albumdefault_56.jpg differ diff --git a/images/asc.gif b/images/asc.gif new file mode 100644 index 0000000..7415786 Binary files /dev/null and b/images/asc.gif differ diff --git a/images/bg.gif b/images/bg.gif new file mode 100644 index 0000000..fac668f Binary files /dev/null and b/images/bg.gif differ diff --git a/images/desc.gif b/images/desc.gif new file mode 100644 index 0000000..3b30b3c Binary files /dev/null and b/images/desc.gif differ diff --git a/images/star_wo_12x12.png b/images/star_wo_12x12.png new file mode 100644 index 0000000..04cd563 Binary files /dev/null and b/images/star_wo_12x12.png differ diff --git a/images/star_y_12x12.png b/images/star_y_12x12.png new file mode 100644 index 0000000..5dd2695 Binary files /dev/null and b/images/star_y_12x12.png differ diff --git a/images/star_yo_12x12.png b/images/star_yo_12x12.png new file mode 100644 index 0000000..a172014 Binary files /dev/null and b/images/star_yo_12x12.png differ diff --git a/index.html b/index.html index a8cf6bf..30e7f8d 100644 --- a/index.html +++ b/index.html @@ -72,11 +72,11 @@ var source = e.target.id; if (source != 'Search' && source != 'ChatMsg') { var unicode = e.charCode ? e.charCode : e.keyCode; - // a-z + // a-z if (unicode >= 65 && unicode <= 90) { var key = findKeyForCode(unicode); var el = '#index_' + key.toUpperCase(); - $('#Artists').stop().scrollTo(el, 800); + $('#Artists').stop().scrollTo(el, 400); // right arrow } else if (unicode == 39 || unicode == 176) { var next = $('ul.songlist li.playing').next(); @@ -96,61 +96,61 @@ // Main Click Events // Albums Click Event - $('ul#ArtistContainer li.item').live('click', function () { - $('ul#AutoAlbumContainer li').removeClass('selected'); - $('ul#ArtistContainer li').removeClass('selected'); + $('#ArtistContainer li.item').live('click', function () { + $('#AutoAlbumContainer li').removeClass('selected'); + $('#ArtistContainer li').removeClass('selected'); $(this).addClass('selected'); - getAlbums($(this).attr("id"), '', '', '#AlbumContainer'); + getAlbums($(this).attr("id"), '#AlbumRows'); }); $('#BottomIndex li a').live('click', function () { var el = '#index_' + $(this).text(); - $('#Artists').stop().scrollTo(el, 800); + $('#Artists').stop().scrollTo(el, 400); return false; }); - $('ul#AutoAlbumContainer li.item').live('click', function () { - $('ul#AutoAlbumContainer li').removeClass('selected'); - $('ul#ArtistContainer li').removeClass('selected'); + $('#AutoAlbumContainer li.item').live('click', function () { + $('#AutoAlbumContainer li').removeClass('selected'); + $('#ArtistContainer li').removeClass('selected'); $(this).addClass('selected'); getAlbumListBy($(this).attr("id")); }); - $('li.album a.play').live('click', function (e) { + $('tr.album a.play').live('click', function (e) { var albumid = $(this).parent().parent().attr('childid'); var artistid = $(this).parent().parent().attr('parentid'); - getAlbums(albumid, artistid, 'autoplay', '#CurrentPlaylistContainer'); + getSongs(albumid, artistid, 'autoplay', '#CurrentPlaylistContainer'); return false; }); - $('li.album a.add').live('click', function (e) { + $('tr.album a.add').live('click', function (e) { var albumid = $(this).parent().parent().attr('childid'); var artistid = $(this).parent().parent().attr('parentid'); - getAlbums(albumid, artistid, 'add', '#CurrentPlaylistContainer'); + getSongs(albumid, artistid, 'add', '#CurrentPlaylistContainer'); return false; }); - $('li.album a.rate').live('click', function (event) { + $('tr.album a.rate').live('click', function (event) { var itemid = $(this).parent().parent().attr('childid'); rateSong(itemid, 5); return false; }); - $('li.album a.favorite').live('click', function (event) { + $('tr.album a.favorite').live('click', function (event) { var itemid = $(this).parent().parent().attr('childid'); rateSong(itemid, 0); return false; }); - $('li.album').live('click', function (e) { + $('tr.album').live('click', function (e) { var albumid = $(this).attr('childid'); var artistid = $(this).attr('parentid'); - getAlbums(albumid, artistid, '', '#AlbumContainer'); + getSongs(albumid, artistid, '', '#AlbumRows'); return false; }); // Track - Click Events // Multiple Select $('.noselect').disableTextSelect(); var lastChecked = null; - $('ul.songlist li.song').live('click', function (event) { - var checkboxclass = 'ul.songlist li.song'; + $('table.songlist tr.song').live('click', function (event) { + var checkboxclass = 'table.songlist tr.song'; var songid = $(this).attr('childid'); var albumid = $(this).attr('parentid'); if (!event.ctrlKey) { - $('ul.songlist li.song').removeClass('selected'); + $(checkboxclass).removeClass('selected'); } if ($(this).hasClass('selected')) { $(this).removeClass('selected'); @@ -171,42 +171,42 @@ lastChecked = this; }); // Double Click - $('ul.songlist li.song').live('dblclick', function (e) { + $('table.songlist tr.song').live('dblclick', function (e) { e.preventDefault(); //$(this).addClass('playing').siblings().removeClass('playing'); var songid = $(this).attr('childid'); var albumid = $(this).attr('parentid'); playSong('', this, songid, albumid); }); - $('ul.songlist li.song a.play').live('click', function (event) { + $('table.songlist tr.song a.play').live('click', function (event) { var songid = $(this).parent().parent().attr('childid'); var albumid = $(this).parent().parent().attr('parentid'); playSong($(this).parent().parent(), songid, albumid); return false; }); - $('ul.songlist li.song a.add').live('click', function (event) { + $('table.songlist tr.song a.add').live('click', function (event) { var track = $(this).parent().parent(); - $(track).clone().appendTo('ul#CurrentPlaylistContainer'); + $(track).clone().appendTo('#CurrentPlaylistContainer'); return false; }); - $('ul.songlist li.song a.remove').live('click', function (event) { + $('table.songlist tr.song a.remove').live('click', function (event) { var track = $(this).parent().parent(); $(track).remove(); refreshRowColor(); return false; }); - $('ul.songlist li.song a.rate').live('click', function (event) { + $('table.songlist tr.song a.rate').live('click', function (event) { var songid = $(this).parent().parent().attr('childid'); rateSong(songid, 5); return false; }); - $('ul.songlist li.song a.favorite').live('click', function (event) { + $('table.songlist tr.song a.favorite').live('click', function (event) { var songid = $(this).parent().parent().attr('childid'); rateSong(songid, 0); return false; }); $('li.index').live('click', function (e) { - $('#Artists').stop().scrollTo('#auto', 800); + $('#Artists').stop().scrollTo('#auto', 400); return false; }); @@ -249,13 +249,13 @@ return false; }); $('#action_SelectAll').click(function () { - $('#Albums li.song').each(function () { + $('#Albums tr.song').each(function () { $(this).addClass('selected'); }); return false; }); $('#action_SelectNone').click(function () { - $('#Albums li.song').each(function () { + $('#Albums tr.song').each(function () { $(this).removeClass('selected'); }); return false; @@ -274,12 +274,12 @@ }); // Current Playlist Click Events $('#action_Shuffle').live('click', function () { - $('#CurrentPlaylistContainer li.song').shuffle(); + $('#CurrentPlaylistContainer tr.song').shuffle(); refreshRowColor(); return false; }); $('#action_Empty').live('click', function () { - $('#CurrentPlaylistContainer').empty(); + $('#CurrentPlaylistContainer tbody').empty(); return false; }); $('a#action_AddCurrentToPlaylist').click(function () { @@ -297,48 +297,50 @@ } }); $('#action_CurrentSelectAll').click(function () { - $('#CurrentPlaylist li.song').each(function () { + $('#CurrentPlaylist tr.song').each(function () { $(this).addClass('selected'); }); return false; }); $('#action_CurrentSelectNone').click(function () { - $('#CurrentPlaylist li.song').each(function () { + $('#CurrentPlaylist tr.song').each(function () { $(this).removeClass('selected'); }); return false; }); // Playlist Click Events - $('ul#AutoPlaylistContainer li.item').live('click', function () { - $('ul#AutoPlaylistContainer li').removeClass('selected'); + $('#AutoPlaylistContainer li.item').live('click', function () { + $('#AutoPlaylistContainer li').removeClass('selected'); + $('#PlaylistContainer li').removeClass('selected'); $(this).addClass('selected'); getRandomSongList('', '#TrackContainer'); }); - $('ul#AutoPlaylistContainer li.item a.play').live('click', function () { + $('#AutoPlaylistContainer li.item a.play').live('click', function () { getRandomSongList('autoplay', '#CurrentPlaylistContainer'); return false; }); - $('ul#AutoPlaylistContainer li.item a.add').live('click', function () { + $('#AutoPlaylistContainer li.item a.add').live('click', function () { getRandomSongList('', '#CurrentPlaylistContainer'); return false; }); - $('ul#PlaylistContainer li.item').live('click', function () { - $('ul#PlaylistContainer li').removeClass('selected'); + $('#PlaylistContainer li.item').live('click', function () { + $('#AutoPlaylistContainer li').removeClass('selected'); + $('#PlaylistContainer li').removeClass('selected'); $(this).addClass('selected'); - getPlaylist($(this).attr("id"), '', '#TrackContainer'); + getPlaylist($(this).attr("id"), '', '#TrackContainer tbody'); }); - $('ul#PlaylistContainer li.item a.play').live('click', function () { - getPlaylist($(this).parent().parent().attr("id"), 'autoplay', '#CurrentPlaylistContainer'); + $('#PlaylistContainer li.item a.play').live('click', function () { + getPlaylist($(this).parent().parent().attr("id"), 'autoplay', '#CurrentPlaylistContainer tbody'); return false; }); - $('ul#PlaylistContainer li.item a.add').live('click', function () { - getPlaylist($(this).parent().parent().attr("id"), '', '#CurrentPlaylistContainer'); + $('#PlaylistContainer li.item a.add').live('click', function () { + getPlaylist($(this).parent().parent().attr("id"), '', '#CurrentPlaylistContainer tbody'); return false; }); $('#action_DeletePlaylist').click(function () { - if ($('ul#PlaylistContainer li.selected').length > 0) { + if ($('#PlaylistContainer li.selected').length > 0) { if (confirmDelete()) { - $('ul#PlaylistContainer li.selected').each(function () { + $('#PlaylistContainer li.selected').each(function () { deletePlaylist($(this).attr("id")); }); } @@ -346,16 +348,16 @@ return false; }); $('#action_SavePlaylist').click(function () { - if ($('ul#PlaylistContainer li.selected').length > 0) { - $('ul#PlaylistContainer li.selected').each(function () { + if ($('#PlaylistContainer li.selected').length > 0) { + $('#PlaylistContainer li.selected').each(function () { savePlaylist($(this).attr("id")); }); } return false; }); $('#action_RemoveSongs').click(function () { - if ($('ul#TrackContainer li.selected').length > 0) { - $('ul#TrackContainer li.selected').each(function () { + if ($('#TrackContainer tr.selected').length > 0) { + $('#TrackContainer tr.selected').each(function () { $(this).remove(); }); } @@ -368,12 +370,12 @@ return false; }); $('#NextTrack').live('click', function () { - var next = $('#CurrentPlaylistContainer li.playing').next(); + var next = $('#CurrentPlaylistContainer tr.playing').next(); changeTrack(next); return false; }); $('#PreviousTrack').live('click', function () { - var prev = $('#CurrentPlaylistContainer li.playing').prev(); + var prev = $('#CurrentPlaylistContainer tr.playing').prev(); changeTrack(prev); return false; }); @@ -459,12 +461,13 @@ $.cookie('css', style, { expires: 365, path: '/' }); location.reload(true); }); - }); // End document.ready + }); // End document.ready $(window).load(function () { if ($.cookie('defaultsmwidth')) { var width = $.cookie('defaultsmwidth'); $('.smsection').css({ 'width': width + 'px' }); + $('#MainActions').css({ 'width': (width - 5) + 'px' }); $('#BottomContainer').css({ 'width': (width - 16) + 'px' }); var ulwidth = parseInt(width) + 6; $('#AlbumContainer').css({ 'margin-left': ulwidth + 'px' }); @@ -477,15 +480,21 @@ }); function resizeContent() { $('.tabcontent').css({ 'height': (($(window).height() - 160)) + 'px' }); - $('.smsection').css({ 'height': (($(window).height() - 160)) + 'px' }); + $('.smsection').css({ 'height': (($(window).height() - 200)) + 'px' }); var smheight = $('.smsection').height(); - $('#BottomContainer').css({ 'top': smheight + 35 + 'px' }); + var smwidth = $('.smsection').width(); + $('#BottomContainer').css({ 'top': smheight + 75 + 'px' }); + var screenwidth = $(window).width(); + $('#AlbumContainer').css({ 'width': (screenwidth - smwidth - 35) + 'px' }); + $('#TrackContainer').css({ 'width': (screenwidth - smwidth - 35) + 'px' }); + $('#CurrentPlaylistContainer').css({ 'width': (screenwidth - 35) + 'px' }); } function resizeSMSection(x) { var smwidth = $('.smsection').width(); var newsmwidth = smwidth + x; if (newsmwidth > 150 && newsmwidth < 500) { $('.smsection').css({ 'width': (newsmwidth) + 'px' }); + $('#MainActions').css({ 'width': (newsmwidth - 5) + 'px' }); $('#BottomContainer').css({ 'width': (newsmwidth - 16) + 'px' }); $.cookie('defaultsmwidth', newsmwidth, { expires: 365, path: '/' }); var ulwidth = newsmwidth + 6; @@ -499,7 +508,7 @@ audiojs.events.ready(function () { a = audiojs.createAll({ trackEnded: function () { - var next = $('#CurrentPlaylistContainer li.playing').next(); + var next = $('#CurrentPlaylistContainer tr.playing').next(); changeTrack(next); }, updatePlayhead: function (percent) { @@ -550,12 +559,12 @@
-
+
-
+
+ Playlist + Current @@ -569,17 +578,20 @@
  • Auto Albums
  • -
  • Random
  • -
  • Recently Played
  • Recently Added
  • +
  • Random
  • Top Rated
  • +
  • Recently Played
  • Most Played
      -
        + + + +
        @@ -592,7 +604,10 @@
        -
          + + + +
          @@ -609,13 +624,16 @@
          • Auto Playlists
          • -
          • Random
          • +
          • Random
          • Saved Playlists
            - + + + +
            @@ -673,7 +691,7 @@
            -
            +