From a9c998c8a5989a9877f63aafbc7ba7a24c9a16c6 Mon Sep 17 00:00:00 2001 From: jcass Date: Sun, 11 Dec 2016 14:26:33 +0200 Subject: [PATCH] Add feature to allow insertion of track URI at any point in the queue. Fixes #75. --- README.rst | 5 + .../static/css/webclient.css | 35 ++- mopidy_musicbox_webclient/static/index.html | 111 +++++++-- .../static/js/controls.js | 233 +++++++++++++++--- .../static/js/functionsvars.js | 1 + mopidy_musicbox_webclient/static/js/gui.js | 25 +- mopidy_musicbox_webclient/static/mb.appcache | 2 +- tests/js/dummy_tracklist.js | 47 +++- tests/js/test_controls.js | 162 +++++++++--- 9 files changed, 517 insertions(+), 104 deletions(-) diff --git a/README.rst b/README.rst index 81ffcf34..ca70e6d0 100644 --- a/README.rst +++ b/README.rst @@ -106,12 +106,17 @@ Changelog v2.4.0 (UNRELEASED) ------------------- +- Add ability to insert a track anywhere in the current queue. (Addresses: `#75 `_). +- Add 'Show Track Info' popup which can be activated from any context menu. The popup includes the URI of the track, + which can be inserted into various lists elsewhere in the player. + **Fixes** - Only show 'Show Album' or 'Show Artist' options in popup menus if URI's for those resources are available. (Fixes: `#213 `_). - Now shows correct hostname information in loader popup. (Fixes: `#209 `_). - Now shows server name/IP address and port number at the bottom of the navigation pane. (Fixes: `#67 `_). +- Reset 'Now Playing' info when the last track in the tracklist is deleted. Fixes an issue where info of the last song played would be displayed even after the queue had been cleared. - Use correct icons for folders, audio, and other files when browsing local files. v2.3.0 (2016-05-15) diff --git a/mopidy_musicbox_webclient/static/css/webclient.css b/mopidy_musicbox_webclient/static/css/webclient.css index 879b0773..5cbbe85c 100644 --- a/mopidy_musicbox_webclient/static/css/webclient.css +++ b/mopidy_musicbox_webclient/static/css/webclient.css @@ -221,6 +221,17 @@ span.hostInfo { #homerows div i { font-size: 28px; } + +.ui-block-a-min { + float: left !important; + width: initial !important; +} + +.ui-block-b-min { + float:right !important; + width: initial !important; +} + /*************** * listviews * ***************/ @@ -249,6 +260,21 @@ span.hostInfo { border-bottom: 1px solid #CECECE; } +.info-table td { + color: #555 !important; + padding: 2px; + padding-right: 4px; + padding-left: 4px; +} + +.info-table td.label { + font-weight: bold; +} + +.info-table td.label-center { + vertical-align: middle; +} + .albumdivider h1, .table li h1 { font-size: 120% !important; } @@ -327,7 +353,6 @@ span.hostInfo { /********************** * Now Playing area * **********************/ - #nowPlayingFooter { height: 50px; line-height: 48px; @@ -406,6 +431,7 @@ span.hostInfo { .ui-icon-playAll:after, .ui-icon-play:after, .ui-icon-playNext:after, +.ui-icon-insert:after, .ui-icon-add:after, .ui-icon-addAll:after, .ui-icon-remove:after { @@ -425,6 +451,10 @@ span.hostInfo { content: '\f149'; } +.ui-icon-insert:after { + content: '\f177'; +} + .ui-icon-add:after { content: '\f196'; } @@ -461,7 +491,6 @@ span.hostInfo { /**************** * Common use * ****************/ - #playlistspane { margin: 0 !important; } @@ -545,7 +574,6 @@ a { } /*helper*/ - .ui-loader h1 { color: #efefef; } @@ -570,6 +598,7 @@ a { display: none; } } + /*smartphones*/ @media (max-width: 35em) { #nowPlayingpane { diff --git a/mopidy_musicbox_webclient/static/index.html b/mopidy_musicbox_webclient/static/index.html index eee32484..9c94983d 100644 --- a/mopidy_musicbox_webclient/static/index.html +++ b/mopidy_musicbox_webclient/static/index.html @@ -111,14 +111,14 @@

- Album cover + Album cover
Close

 

- Album artist + Album artist
@@ -150,6 +150,9 @@

 

Artists

    +
  • + Show Track Info... +
  • @@ -160,8 +163,11 @@

    Artists

  • Play
  • +
  • + Add a Track Below +
  • - Remove from Queue + Remove from Queue
  • Show Album @@ -174,26 +180,50 @@

    Artists

    Artists

      +
    • + Show Track Info... +
    • +
      +
      +

      Add a Track to the Queue + + +

      + +
      +
      + + +
      +
      +
      +

      Save Current Queue to a Playlist + onkeypress="return controls.checkDefaultButtonClick(event.keyCode, '#popupSave');" type="text"/>

      -
      -
      - +
      @@ -223,6 +253,50 @@

      Artists

      +
      + Close +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Name:
      Album:
      Artist(s):
      Track #:
      Length:
      Bitrate:
      URI:
      +
      +
      +