mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-23 21:47:59 +01:00
19 lines
505 B
CoffeeScript
19 lines
505 B
CoffeeScript
|
angular.module('ponyfm').controller "account-albums", [
|
||
|
'$scope', '$state', 'taxonomies', '$dialog', 'lightbox'
|
||
|
($scope, $state, taxonomies, $dialog, lightbox) ->
|
||
|
refreshList = () ->
|
||
|
$.getJSON('/api/web/albums/owned')
|
||
|
.done (albums) ->
|
||
|
$scope.albums = albums
|
||
|
|
||
|
refreshList()
|
||
|
$scope.data =
|
||
|
isEditorOpen: false
|
||
|
selectedAlbum: null
|
||
|
|
||
|
$scope.$on '$stateChangeSuccess', () ->
|
||
|
if $state.params.album_id
|
||
|
selectAlbum albumsDb[$state.params.album_id]
|
||
|
else
|
||
|
selectAlbum null
|
||
|
]
|