diff --git a/mopidy_musicbox_webclient/static/css/webclient.css b/mopidy_musicbox_webclient/static/css/webclient.css index 77c9580..4e6771d 100644 --- a/mopidy_musicbox_webclient/static/css/webclient.css +++ b/mopidy_musicbox_webclient/static/css/webclient.css @@ -205,7 +205,15 @@ background-color: #fff; } -#searchresults { +#searchartists { + display: none; +} + +#searchalbums { + display: none; +} + +#searchtracks { display: none; } diff --git a/mopidy_musicbox_webclient/static/index.html b/mopidy_musicbox_webclient/static/index.html index 29a7877..2798776 100644 --- a/mopidy_musicbox_webclient/static/index.html +++ b/mopidy_musicbox_webclient/static/index.html @@ -357,98 +357,98 @@
-
-
- - - -
+

Search

+ +
+
+
+

Search for artists, albums, or specific tracks. + + + +

+
- -
-
-
-
-
-

Artists

-
-
-
    -
    +
    +
    +
    +
    +

    Artists

    -
    -
    -
    -
    -

    Albums

    -
    -
    -
      -
      +
      +
        - -
        -

        Tracks

        -
          +
          +
          +
          +

          Albums

          +
          +
          +
            +
            +
            + +
            +

            Tracks

            +
              +

              Streams

              -
              -
              +
              -
              -

              Play a specific stream/track and optionally save it to your favourites. - - - + +

              Play a specific stream/track and optionally save it to your favourites. + + + - - -
              -

              + + +
              +
                -
                -
                -
                -
                -
                -
                -
                -
                -
                -
                - +
                +
                +
                +
                +
                +
                +
                + +
                +
                diff --git a/mopidy_musicbox_webclient/static/js/library.js b/mopidy_musicbox_webclient/static/js/library.js index 4ff0caf..3a62e05 100644 --- a/mopidy_musicbox_webclient/static/js/library.js +++ b/mopidy_musicbox_webclient/static/js/library.js @@ -27,7 +27,9 @@ function initSearch() { delete customTracklists[URI_SCHEME+':artistresultscache']; delete customTracklists[URI_SCHEME+':albumresultscache']; delete customTracklists[URI_SCHEME+':trackresultscache']; - $("#searchresults").hide(); + $("#searchartists").hide(); + $("#searchalbums").hide(); + $("#searchtracks").hide(); if (searchService != 'all') { mopidy.library.search({'query': {any:[value]}, 'uris': [searchService + ':']}).then(processSearchResults, console.error); @@ -108,7 +110,17 @@ function processSearchResults(resultArr) { return false; } - $("#searchresults").show(); + if (results.artists.length > 0) { + $("#searchartists").show(); + } + + if (results.albums.length > 0) { + $("#searchalbums").show(); + } + + if (results.tracks.length > 0) { + $("#searchtracks").show(); + } // Returns a string where {x} in template is replaced by tokens[x]. function theme(template, tokens) { diff --git a/mopidy_musicbox_webclient/static/mb.manifest b/mopidy_musicbox_webclient/static/mb.manifest index 612636c..779e318 100644 --- a/mopidy_musicbox_webclient/static/mb.manifest +++ b/mopidy_musicbox_webclient/static/mb.manifest @@ -1,6 +1,6 @@ CACHE MANIFEST -# 2016-01-31:v3 +# 2016-02-4:v1 NETWORK: *