diff --git a/webclient/index.html b/webclient/index.html index a272942..b13b2d7 100755 --- a/webclient/index.html +++ b/webclient/index.html @@ -73,20 +73,20 @@
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; } @@ -330,7 +334,7 @@ $(document).ready(function() { resetSong(); if (location.hash.length < 2) { - switchContent("current"); + switchContent("playlists"); } initgui = false; @@ -371,7 +375,7 @@ function switchContent(divid, uri) { } //update timer -function updateStatusOfAll() { +function updateTimer() { mopidy.playback.getCurrentTrack().then(processCurrenttrack, console.error); mopidy.playback.getTimePosition().then(processCurrentposition, console.error); //TODO check offline? @@ -391,15 +395,16 @@ function updateStatusOfAll() { function locationHashChanged() { var hash = document.location.hash.split('?'); + //remove # + var divid = hash[0].substr(1); var uri = hash[1]; - $('#navcurrent a').removeClass('ui-state-active ui-state-persist ui-btn-active'); $('#navplaylists a').removeClass('ui-state-active ui-state-persist ui-btn-active'); $('#navsearch a').removeClass('ui-state-active ui-state-persist ui-btn-active'); $('.pane').hide(); - $('#' + getHash() + 'pane').show(); + $('#' + divid + 'pane').show(); - switch(hash) { + switch(divid) { case 'current': $('#navcurrent a').addClass('ui-state-active ui-state-persist ui-btn-active'); break; diff --git a/webclient/js/process_ws.js b/webclient/js/process_ws.js index 7bcf8b9..4bf3578 100755 --- a/webclient/js/process_ws.js +++ b/webclient/js/process_ws.js @@ -72,13 +72,7 @@ function processGetPlaylists(resultArr) { }; $('#playlistslist').empty(); $('#playlistslist').html(tmp); - // $('#playlistslist').listview('refresh'); scrollToTracklist(); -/* if (isMobileWebkit) { - playlistslistScroll.refresh(); - } -*/ - console.log('pl'); showLoading(false); }