Skip to content

Commit

Permalink
Added activate playlist button
Browse files Browse the repository at this point in the history
  • Loading branch information
explodingcamera committed May 1, 2016
1 parent f860df7 commit 0d53c65
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webserver/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,8 @@
<div class="lib-fdr" data-ng-repeat="x in playlists | orderByPlaylist:'name'" data-pid="{{x.id}}" ng-class="{selected: x.id == viewedPl}">
<div class="text" title="{{x.name}}" data-ng-bind="x.name"></div>
<div class="nav"><span class="icon-info" data-ng-bind="x.num"></span></div>
<div class="nav"><div ng-if="activepl == x.id" class="mdi mdi-checkbox-marked-circle small green"></div></div>
<div ng-if="activepl == x.id" class="nav"><div class="mdi mdi-checkbox-marked-circle small green"></div></div>
<div ng-if="activepl != x.id" class="nav"><div class="btn-activate-playlist mdi mdi-checkbox-blank-circle-outline small"></div></div>
</div>
</div>
<div class="lib-fdr-search btn-import">
Expand Down
7 changes: 7 additions & 0 deletions webserver/public/lib/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5730,6 +5730,13 @@
MP.playlistActivate(pid);
}
})
.on('click', '.btn-activate-playlist', function(){
var pid = $(this).parent().parent().data('pid')

if (MP.user.playlists[pid]){
MP.playlistActivate(pid);
}
})

// Deleting playlist
.on('click', '.btn-delete-playlist', function(e){
Expand Down

0 comments on commit 0d53c65

Please sign in to comment.