diff --git a/flatclient/css/webclient.css b/flatclient/css/webclient.css index 968c88e..9219c0b 100755 --- a/flatclient/css/webclient.css +++ b/flatclient/css/webclient.css @@ -165,10 +165,6 @@ font-size: 15px; } -.pane { - min-height: 125px; -} - /*********************** * Track Slider ***********************/ @@ -377,16 +373,16 @@ } #controlspopup, #artistpopup, #coverpopup { - max-width: 460px; + max-width: 550px; background: white; padding: 5px; - max-width: 80%; } #h_artistname { margin-bottom: 65px; margin-top: 10px; } + #buttons, #controlspopupimage, #coverpopupimage, #artistpopupimage { display: block; margin-left: auto; @@ -394,6 +390,14 @@ margin-bottom: 5px; } +#popupTracksLv li, #popupQueueLv li { + border-bottom: 1px solid #aaa; +} + +#popupTracksLv, #popupQueueLv { + border: 1px solid #aaa; +} + /*dont hide clear buttons in text input */ .ui-input-clear-hidden { display:block !important; diff --git a/flatclient/index.html b/flatclient/index.html index 5124988..4fae49f 100755 --- a/flatclient/index.html +++ b/flatclient/index.html @@ -192,8 +192,6 @@ - -
"; -/* '' + timeFromSeconds(newalbum[0].length / 1000) + ''; */ +/* '' + timeFromSeconds(newalbum[0].length / 1000) + ''; */ for ( j = 0; j < newalbum[0].artists.length; j++) { html += newalbum[0].artists[j].name; html += (j == newalbum[0].artists.length - 1) ? '' : ' / '; @@ -325,6 +328,7 @@ function getTracksFromUri(uri) { } else if (customTracklists[uri]) { return customTracklists[uri]; } + return []; } //convert time to human readable format @@ -389,4 +393,41 @@ function showOffline(on) { function validUri(str) { var regexp = /(mms|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/ return regexp.test(str); -} \ No newline at end of file +} + + +$.event.special.swipe = $.extend($.event.special.swipe, { + start: function( event ) { + var data = event.originalEvent.touches ? + event.originalEvent.touches[ 0 ] : event; + return { + time: ( new Date() ).getTime(), + coords: [ data.pageX, data.pageY ], + origin: $( event.target ), + offset: $('body').scrollTop() + }; + }, + + stop: function( event ) { + var data = event.originalEvent.touches ? + event.originalEvent.touches[ 0 ] : event; + return { + time: ( new Date() ).getTime(), + coords: [ data.pageX, data.pageY ], + offset: $('body').scrollTop() + }; + }, + + handleSwipe: function( start, stop ) { + var swipe = $.event.special.swipe, + x = Math.abs( start.coords[ 0 ] - stop.coords[ 0 ] ), + y = Math.abs( start.coords[ 1 ] - stop.coords[ 1 ] ), + offset = Math.abs( start.offset - stop.offset ), + time = stop.time - start.time; + if ( time < swipe.durationThreshold && x > swipe.horizontalDistanceThreshold && ( y + offset ) + < swipe.verticalDistanceThreshold ) { + + start.origin.trigger( "swipe" ).trigger( ( start.coords[ 0 ] - stop.coords[ 0 ] ) ? "swipeleft" : "swiperight" ); + } + } +}); diff --git a/flatclient/js/gui.js b/flatclient/js/gui.js index ea7aa50..828aefc 100755 --- a/flatclient/js/gui.js +++ b/flatclient/js/gui.js @@ -392,19 +392,12 @@ $(document).ready(function() { }); initRadio(); - if ($(window).width() < 560) { + if ($(window).width() <= 1024) { $("#panel").panel("close"); }else{ $("#panel").panel("open"); } -/* //hide fs button if mobile browser - if(isMobileSafari) { - alert(ua); - $('#navExitFullscreen').hide(); - } -*/ - //hide fullscreen button if in UIWebview if (window.navigator.standalone) { $('#navExitFullscreen').hide(); @@ -413,9 +406,10 @@ $(document).ready(function() { // swipe songinfo and panel $( "#normalFooter" ).on( "swiperight", doPrevious ); $( "#normalFooter" ).on( "swipeleft", doNext ); + $( "#panel, .pane" ).on( "swiperight", function() { $("#panel").panel("open") } ); + $( "#panel, .pane" ).on( "swipeleft", function() { $("#panel").panel("close") }); $( "#header" ).on( "swiperight", function() { $("#panel").panel("open") } ); $( "#header" ).on( "swipeleft", function() { $("#panel").panel("close") }); - $( ".pane" ).on( "swiperight", function() { $("#panel").panel("open") } ); }); $(document).bind("pageinit", function() { @@ -569,6 +563,9 @@ function locationHashChanged() { } $(document).bind("mobileinit", function(){ - $.event.special.swipe.horizontalDistanceThreshold = 100; // (default: 30px) – Swipe horizontal displacement must be more than this. - $.event.special.swipe.verticalDistanceThreshold = 100; // (default: 75px) – Swipe vertical displacement must be less than this. -}); \ No newline at end of file + $.event.special.swipe.horizontalDistanceThreshold = 30; // (default: 30px) Swipe horizontal displacement must be more than this. + $.event.special.swipe.verticalDistanceThreshold = 75; // (default: 75px) Swipe vertical displacement must be less than this. + $.event.special.swipe.scrollSupressionThreshold = 30; + $.event.special.swipe.durationThreshold = 500; + +});