Skip to content

Commit

Permalink
Closing tracklist on album jumps to top #351
Browse files Browse the repository at this point in the history
  • Loading branch information
Rello committed Dec 9, 2018
1 parent 2ae20c8 commit eb36a6d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
18 changes: 17 additions & 1 deletion js/app-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 3 additions & 10 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,9 @@ Audios.prototype.loadIndividualAlbums = function (evt) {
var eventTarget = $(evt.target).parent();
var AlbumId = eventTarget.attr('data-album');
var activeAlbum = $('.album[data-album="' + AlbumId + '"]');
var activeAlbumContainer = '.songcontainer';
var iSlideUp = 200;

if (activeAlbum.hasClass('is-active')) {
$(activeAlbumContainer).slideUp(iSlideUp, function () {
$('.songcontainer').slideUp(200, function () {
$('.album').removeClass('is-active').find('.artist').show();
});
} else {
Expand Down Expand Up @@ -232,13 +230,8 @@ Audios.prototype.buildSongContainer = function (eventTarget, directPlay) {
}

var br = $('<br />').css('clear', 'both');
var aClose = $('<a />').attr('href', '#').addClass('close ioc ioc-close').click(function () {
var activeAlbum = $(this).parent('.songcontainer');
$(activeAlbum).slideUp(200, function () {
$('.album').removeClass('is-active').find('.artist').show();
$('.coverrow').css('margin-bottom', 0);
return false;
});
var aClose = $('<a />').addClass('close ioc ioc-close').click(function () {
$('.is-active').click();
});

divSongList.append(listAlbumWrapper);
Expand Down

0 comments on commit eb36a6d

Please sign in to comment.