diff --git a/webclient/css/ws.css b/webclient/css/ws.css index 1f2740f..f956782 100755 --- a/webclient/css/ws.css +++ b/webclient/css/ws.css @@ -274,6 +274,58 @@ /********************* * listviews ********************/ +.table li a { + color: #555 !important; + font-size: 80% !important; + display: block; + padding: 5px; +} + +.table li { + background-color: #f0f0f0; + border: 1px solid #999; + border-bottom: 0; +} + +.table { + list-style-type:none; +} + +.table li:first-child { + -moz-border-radius-topleft: 7px; + -moz-border-radius-topright: 7px; + -webkit-border-top-left-radius: 7px; + -webkit-border-top-right-radius: 7px; + border-top-right-radius: 7px; + border-top-left-radius: 7px; +} + +.table li:last-child { + -moz-border-radius-bottomleft: 7px; + -moz-border-radius-bottomright: 7px; + -webkit-border-bottom-left-radius: 7px; + -webkit-border-bottom-right-radius: 7px; + border-bottom-left-radius: 7px; + border-bottom-right-radius: 7px; + border-bottom: 1px solid #999; +} + +.table li h1 { + font-size: 100% !important; +} + +.albumdivider { + background-color: #ddd !important; +} + +.smalldivider { + heigth: 10px !important; + background-color: #ddd !important; +} + +#playlistslist li a { + padding: 5px; +} #playlistslist, #playlisttracks { margin: 0 !important; @@ -281,21 +333,6 @@ /* border: 1px solid blue; */ } -.ui-li-divider { - padding: 2px; - padding-top: 10px; - padding-left: 5px; -} - -.ui-li-divider a { - height: 30px !important; -} - -.ui-li-divider a p { - color: #555 !important; - font-size: 100% !important; -} - .albumli { padding-left: 5px; } @@ -304,10 +341,6 @@ background-color: #ccc; } -.smalldivider { - heigth: 5px !important; -} - .artistcover { float: right; width: 30px; @@ -362,6 +395,12 @@ margin-bottom: 5px; } +/*dont hide clear buttons in text input */ +.ui-input-clear-hidden { + display:block !important; +} + + /*************** * common use ***************/ diff --git a/webclient/index.html b/webclient/index.html index fd53982..d56f856 100755 --- a/webclient/index.html +++ b/webclient/index.html @@ -120,39 +120,46 @@
'; @@ -184,9 +187,9 @@ function resultsToTables(results, target, uri) { newalbum = []; } else { - html += '
' + results[i].album.name + '
'; + html += '
' + results[i].album.name + '
'; for ( j = 0; j < results[i].album.artists.length; j++) { html += results[i].album.artists[j].name; html += (j == results[i].album.artists.length - 1) ? '' : ' / '; @@ -212,8 +215,9 @@ function resultsToTables(results, target, uri) { } tableid = "#" + tableid; $(target).html(html); + $(target).attr('data', uri); - $(target).listview('refresh'); +// $(target).listview('refresh'); } //process updated playlist to gui @@ -250,7 +254,7 @@ function playlisttotable(pl, target, uri) { $(target).attr('data', uri); //refresh - $(target).listview('refresh'); +// $(target).listview('refresh'); } function getPlaylistFromUri(uri) { diff --git a/webclient/js/gui.js b/webclient/js/gui.js index 1f00111..ba4fed7 100755 --- a/webclient/js/gui.js +++ b/webclient/js/gui.js @@ -20,9 +20,6 @@ function resetSong() { } } -function expandSonginfo() { -} - function resizeMb() { $("#infoname").html(songdata.name); $("#infoartist").html(artiststext); @@ -48,25 +45,23 @@ function resizeMb() { if (!playlistslistScroll) { playlistslistScroll = new iScroll('playlistslistdiv'); playlisttracksScroll = new iScroll('playlisttracksdiv'); - } + } } else { if (playlistslistScroll) { playlistslistScroll.destroy(); playlistslistScroll = null; playlisttracksScroll.destroy(); playlisttracksScroll = null; - } + } } } - - //set height of playlist scrollers - + if ($(window).width() > 480) { $('.scroll').height($(window).height() - 104); //jqm added something which it shouldnt (at least in this case) I guess -// $('#playlistspane').removeClass('height').height($(window).height() - 110); + // $('#playlistspane').removeClass('height').height($(window).height() - 110); $('.scroll').removeClass('height').removeClass('width'); $('#playlistspane').removeClass('height').removeClass('width'); } else { @@ -74,7 +69,7 @@ function resizeMb() { $('#playlistspane').addClass('height', '100%').addClass('width', '100%'); } - if (isMobileWebkit && ($(window).width() > 480) ) { + if (isMobileWebkit && ($(window).width() > 480)) { playlistslistScroll.refresh(); playlisttracksScroll.refresh(); } @@ -155,10 +150,12 @@ function setSongInfo(data) { } /*************** - * display popup - * @param {Object} listuri - * @param {Object} trackuri + * display popups */ +function coverPopup() { + +} + function popupTracks(e, listuri, trackuri) { if (!e) var e = window.event; @@ -221,12 +218,14 @@ function showAlbumPopup() { *****************/ function showLoading(on) { if (on) { + $("body").css("cursor", "progress"); $.mobile.loading('show', { text : 'Loading data from ' + PROGRAM_NAME + '. Please wait...', textVisible : true, theme : 'a' }); } else { + $("body").css("cursor", "default"); $.mobile.loading('hide'); } } @@ -316,7 +315,8 @@ $(document).ready(function() { //check for websockets if (!window.WebSocket) { switchContent("playlists"); - $('#playlistspane').html('
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; + $('#playlistspane').html('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(); @@ -397,7 +397,9 @@ function locationHashChanged() { $('#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'); - // alert(divid); + $('.pane').hide(); + $('#' + divid + 'pane').show(); + switch(divid) { case 'current': $('#navcurrent a').addClass('ui-state-active ui-state-persist ui-btn-active'); @@ -425,7 +427,5 @@ function locationHashChanged() { } // Set the page title based on the hash. document.title = PROGRAM_NAME; - $('.pane').hide(); - $('#' + divid + 'pane').show(); return false; } diff --git a/webclient/js/library.js b/webclient/js/library.js index bc16365..e6cc205 100644 --- a/webclient/js/library.js +++ b/webclient/js/library.js @@ -18,6 +18,10 @@ function initSearch() { if ((value.length < 100) && (value.length > 0)) { showLoading(true); + //hide ios/android keyboard + document.activeElement.blur(); + $("input").blur(); + $('#artistresulttable').empty(); $('#albumresulttable').empty(); $('#trackresulttable').empty(); @@ -26,6 +30,7 @@ function initSearch() { delete customTracklists['albumresultscache']; delete customTracklists['trackresultscache']; $("#searchresults").hide(); + mopidy.library.search({ any : value }).then(processSearchResults, console.error); @@ -63,7 +68,7 @@ function processSearchResults(resultArr) { child += '">' + artists[i].name + "