Merge remote-tracking branch 'upstream/develop' into develop

This commit is contained in:
jcass 2016-01-27 00:23:19 +02:00
commit 3d3451dbaf
5 changed files with 22 additions and 24 deletions

View File

@ -63,6 +63,7 @@ v2.0.1 (UNRELEASED)
- Increase volume slider handle by 30% to make it easier to grab on mobile devices - Increase volume slider handle by 30% to make it easier to grab on mobile devices
- Add application cache manifest file for quicker loads and to allow client devices to detect when local caches should be invalidated. - Add application cache manifest file for quicker loads and to allow client devices to detect when local caches should be invalidated.
- Fix vertical alignment of playback control buttons in footer. - Fix vertical alignment of playback control buttons in footer.
- Use standard Mopidy mixer methods to mute / un-mute playback.
v2.0.0 (26-3-2015) v2.0.0 (26-3-2015)
------------------ ------------------

View File

@ -174,6 +174,7 @@
* Volume Slider * Volume Slider
***********************/ ***********************/
#mutebt { #mutebt {
color: white;
float: left; float: left;
margin-left: 8px; margin-left: 8px;
margin-top: 8px; margin-top: 8px;
@ -551,7 +552,7 @@ a {
max-height:90%; max-height:90%;
} }
.nowPlaying-artistInfo { .nowPlaying-artistInfo {
font-size: 12px; font-size: 12px;
} }
.nowPlaying-artistInfo h4{ .nowPlaying-artistInfo h4{
margin: 0px; margin: 0px;

View File

@ -117,7 +117,7 @@
</li> </li>
<li id="" data-icon="false"> <li id="" data-icon="false">
<div><!-- slider for volume --> <div><!-- slider for volume -->
<a href="#" onclick="doMute(); return false;"><i class="fa fa-volume-up" id="mutebt"></i></a> <a href="#" onclick="toggleMute(); return false;"><span title="Toggle mute"><i id="mutebt" class="fa fa-volume-up"></i></span></a>
<label for="volumeslider" class="ui-hidden-accessible">Volume</label> <label for="volumeslider" class="ui-hidden-accessible">Volume</label>
<input id="volumeslider" data-highlight="true" name="volumeslider" data-mini="true" type="range" min="0" <input id="volumeslider" data-highlight="true" name="volumeslider" data-mini="true" type="range" min="0"
value="0" max="100" onchange="doVolume(this.value);"/> value="0" max="100" onchange="doVolume(this.value);"/>

View File

@ -408,18 +408,15 @@ function setPosition(pos) {
*/ */
function setVolume(value) { function setVolume(value) {
var oldval = initgui; if ($("#volumeslider").val() != value) {
initgui = true; $("#volumeslider").val(value).slider('refresh');
$("#volumeslider").val(value).slider('refresh'); }
initgui = oldval;
} }
function doVolume(value) { function doVolume(value) {
if (!initgui) { volumeChanging = value;
volumeChanging = value; clearInterval(volumeTimer);
clearInterval(volumeTimer); volumeTimer = setTimeout(triggerVolume, 500);
volumeTimer = setTimeout(triggerVolume, 500);
}
} }
function triggerVolume() { function triggerVolume() {
@ -427,18 +424,15 @@ function triggerVolume() {
volumeChanging = 0; volumeChanging = 0;
} }
function doMute() { function toggleMute() {
//only emit the event, not the status mopidy.mixer.getMute().then(function(mute) {
if (muteVolume == -1) { mopidy.mixer.setMute(!mute);
$("#mutebt").attr('src', 'images/icons/volume_mute_24x18.png'); if (mute) {
muteVolume = currentVolume; $("#mutebt").attr('class', 'fa fa-volume-up');
mopidy.playback.setVolume(0).then(); } else {
} else { $("#mutebt").attr('class', 'fa fa-volume-off');
$("#mutebt").attr('src', 'images/icons/volume_24x18.png'); }
mopidy.playback.setVolume(muteVolume).then(); });
muteVolume = -1;
}
} }
/******* /*******

View File

@ -1,6 +1,6 @@
CACHE MANIFEST CACHE MANIFEST
# 2016-01-24:v1 # 2016-01-26:v1
CACHE: CACHE:
index.html index.html
@ -41,6 +41,8 @@ images/icons/musicbox32.png
images/icons/musicbox57.png images/icons/musicbox57.png
images/icons/musicbox72.png images/icons/musicbox72.png
images/icons/musicbox114.png images/icons/musicbox114.png
images/icons/play_alt_12x12.png
images/icons/play_alt_16x16.png
images/default_cover.png images/default_cover.png
images/empty.png images/empty.png