From 0eaba322f08032b8902c219d64baf95e9be87b7a Mon Sep 17 00:00:00 2001 From: Wouter van Wijk Date: Thu, 21 Feb 2013 11:21:54 +0100 Subject: [PATCH] warning message for older browsers, fixed playlist bug --- webclient/index.html | 4 ++-- webclient/js/gui.js | 12 +++++++++--- webclient/js/library.js | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/webclient/index.html b/webclient/index.html index e1715c7..20c3c22 100755 --- a/webclient/index.html +++ b/webclient/index.html @@ -40,8 +40,8 @@
Close -

aaa

-

bbb

+

+

diff --git a/webclient/js/gui.js b/webclient/js/gui.js index c7cbd77..1618351 100755 --- a/webclient/js/gui.js +++ b/webclient/js/gui.js @@ -247,7 +247,13 @@ function initSocketevents() { **********************/ $(document).ready(function() { //$(document).bind("pageinit", function() { - + //check for websockets + if(!window.WebSocket) { + switchContent("playlists"); + $('#playlistspane').html('

Old Browser

Sorry. Your browser isn\'t modern enough for this webapp. Modern versions of Chrome, Firefox, Safari all will do. Maybe Opera and Internet Explorer 10 also work, but it\'s not tested.

'); + exit; + } + $(window).hashchange(); // Connect to server @@ -265,8 +271,8 @@ $(document).ready(function() { initgui = false; window.onhashchange = locationHashChanged; // Log all events - mopidy.on(function() { - }); + //mopidy.on(function() { + //}); //update gui status every x seconds from mopdidy setInterval(updateTimer, STATUS_TIMER); diff --git a/webclient/js/library.js b/webclient/js/library.js index 6ef6e89..ffa89c4 100644 --- a/webclient/js/library.js +++ b/webclient/js/library.js @@ -117,7 +117,7 @@ function showTracklist(uri) { var pl = getPlaylistFromUri(uri); //load from cache if (pl) { - playlisttotable(pl.tracks, PLAYLIST_TABLE, uri); + resultsToTables(pl.tracks, PLAYLIST_TABLE, uri); } $('#playlistslist li a').each(function() {