Version near the logo
This commit is contained in:
parent
86863e4323
commit
67888f5fe6
|
@ -62,7 +62,7 @@
|
||||||
<div class="settings"></div>
|
<div class="settings"></div>
|
||||||
</div>
|
</div>
|
||||||
<ul class="navigation">
|
<ul class="navigation">
|
||||||
<li class="logo search">BeatHaven</li>
|
<li class="logo search">BeatHaven<div class="version">0.4</div></li>
|
||||||
<li class="search">Search</li>
|
<li class="search">Search</li>
|
||||||
<li><a href="https://twitter.com/#!/beat_haven" target="_blank">News</a></li>
|
<li><a href="https://twitter.com/#!/beat_haven" target="_blank">News</a></li>
|
||||||
<li class="vk_auth" id="vk_login">Login</li>
|
<li class="vk_auth" id="vk_login">Login</li>
|
||||||
|
|
|
@ -81,10 +81,11 @@ Player = (function() {
|
||||||
handle: '.dragbox'
|
handle: '.dragbox'
|
||||||
});
|
});
|
||||||
if (autoplay) {
|
if (autoplay) {
|
||||||
return _player.setTrack($('.playlist-tracks li').last().attr('id').split('i')[1]);
|
_player.setTrack($('.playlist-tracks li').last().attr('id').split('i')[1]);
|
||||||
} else if (initial_count === 0 && !_player.hasTrack()) {
|
} else if (initial_count === 0 && !_player.hasTrack()) {
|
||||||
return _player.setTrack($('.playlist-tracks li').first().attr('id').split('i')[1]);
|
_player.setTrack($('.playlist-tracks li').first().attr('id').split('i')[1]);
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
};
|
};
|
||||||
Player.prototype.getDataFromLi = function(obj) {
|
Player.prototype.getDataFromLi = function(obj) {
|
||||||
var id, length, track_name;
|
var id, length, track_name;
|
||||||
|
@ -110,7 +111,8 @@ Player = (function() {
|
||||||
_vkontakte.loadTracksData($obj.attr('data-artist'), $obj.attr('data-track'), $obj.attr('data-length'), function(url) {
|
_vkontakte.loadTracksData($obj.attr('data-artist'), $obj.attr('data-track'), $obj.attr('data-length'), function(url) {
|
||||||
return _player.playSource(url);
|
return _player.playSource(url);
|
||||||
});
|
});
|
||||||
return this.updateNowListening($obj.attr('data-artist'), $obj.attr('data-album'), $obj.attr('data-track'));
|
this.updateNowListening($obj.attr('data-artist'), $obj.attr('data-album'), $obj.attr('data-track'));
|
||||||
|
return false;
|
||||||
};
|
};
|
||||||
Player.prototype.hasTrack = function() {
|
Player.prototype.hasTrack = function() {
|
||||||
if ($('#jplayer audio').length > 0) {
|
if ($('#jplayer audio').length > 0) {
|
||||||
|
@ -122,11 +124,12 @@ Player = (function() {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
Player.prototype.playSource = function(url) {
|
Player.prototype.playSource = function(url) {
|
||||||
|
this.scrobbled = false;
|
||||||
$('#jplayer').jPlayer('setMedia', {
|
$('#jplayer').jPlayer('setMedia', {
|
||||||
mp3: url
|
mp3: url
|
||||||
});
|
});
|
||||||
$('#jplayer').jPlayer('play');
|
$('#jplayer').jPlayer('play');
|
||||||
return this.scrobbled = false;
|
return false;
|
||||||
};
|
};
|
||||||
Player.prototype.nextTrack = function(manual) {
|
Player.prototype.nextTrack = function(manual) {
|
||||||
var $li, cnt, rnd;
|
var $li, cnt, rnd;
|
||||||
|
@ -185,21 +188,23 @@ Player = (function() {
|
||||||
};
|
};
|
||||||
Player.prototype.updateNowListening = function(artist, album, track) {
|
Player.prototype.updateNowListening = function(artist, album, track) {
|
||||||
if (_session.getUser().lastfm_username) {
|
if (_session.getUser().lastfm_username) {
|
||||||
return _session.query('/lastfm/listening?r=' + Math.random(), {
|
_session.query('/lastfm/listening?r=' + Math.random(), {
|
||||||
artist: artist,
|
artist: artist,
|
||||||
album: album,
|
album: album,
|
||||||
track: track
|
track: track
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
};
|
};
|
||||||
Player.prototype.scrobble = function(artist, album, track) {
|
Player.prototype.scrobble = function(artist, album, track) {
|
||||||
if (_session.getUser().lastfm_username) {
|
if (_session.getUser().lastfm_username) {
|
||||||
return _session.query('/lastfm/scrobble?r=' + Math.random(), {
|
_session.query('/lastfm/scrobble?r=' + Math.random(), {
|
||||||
artist: artist,
|
artist: artist,
|
||||||
album: album,
|
album: album,
|
||||||
track: track
|
track: track
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
};
|
};
|
||||||
return Player;
|
return Player;
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -44,7 +44,14 @@
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-right: 12px;
|
margin: -3px 1px 0 10px;
|
||||||
|
|
||||||
|
.version {
|
||||||
|
float: right;
|
||||||
|
font-size: 9px;
|
||||||
|
font-weight: normal;
|
||||||
|
margin: 10px 0 0 4px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.vk_auth {
|
.vk_auth {
|
||||||
|
|
|
@ -33,7 +33,12 @@
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-right: 12px; }
|
margin: -3px 1px 0 10px; }
|
||||||
|
.header-container .navigation li.logo .version {
|
||||||
|
float: right;
|
||||||
|
font-size: 9px;
|
||||||
|
font-weight: normal;
|
||||||
|
margin: 10px 0 0 4px; }
|
||||||
.header-container .navigation li .vk_auth {
|
.header-container .navigation li .vk_auth {
|
||||||
display: none; }
|
display: none; }
|
||||||
.header-container .navigation li a {
|
.header-container .navigation li a {
|
||||||
|
|
Loading…
Reference in New Issue