mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2025-02-17 10:34:23 +01:00
19 lines
No EOL
505 B
CoffeeScript
19 lines
No EOL
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
|
|
] |