From 61ca938877d783850111df0cce4fa29ba1c8c0ba Mon Sep 17 00:00:00 2001 From: Peter Deltchev Date: Sat, 19 Mar 2016 01:10:24 -0700 Subject: [PATCH] #2: Fixed up the album editor in its new home. --- app/Http/Controllers/Api/Web/AccountController.php | 1 + public/templates/account/album.html | 2 +- public/templates/account/settings.html | 2 +- .../scripts/app/controllers/account-albums-edit.coffee | 1 + .../assets/scripts/app/controllers/account-albums.coffee | 6 +++--- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/Api/Web/AccountController.php b/app/Http/Controllers/Api/Web/AccountController.php index 53739d9a..70173f57 100644 --- a/app/Http/Controllers/Api/Web/AccountController.php +++ b/app/Http/Controllers/Api/Web/AccountController.php @@ -34,6 +34,7 @@ class AccountController extends ApiControllerBase $user = Auth::user(); return Response::json([ + 'id' => $user->id, 'bio' => $user->bio, 'can_see_explicit_content' => $user->can_see_explicit_content == 1, 'display_name' => $user->display_name, diff --git a/public/templates/account/album.html b/public/templates/account/album.html index f5867312..d2836506 100644 --- a/public/templates/account/album.html +++ b/public/templates/account/album.html @@ -22,7 +22,7 @@
- +
Add Tracks diff --git a/public/templates/account/settings.html b/public/templates/account/settings.html index ca8269c4..6f5ad35d 100644 --- a/public/templates/account/settings.html +++ b/public/templates/account/settings.html @@ -27,7 +27,7 @@ Use Gravatar
- +
{{errors.avatar}}
diff --git a/resources/assets/scripts/app/controllers/account-albums-edit.coffee b/resources/assets/scripts/app/controllers/account-albums-edit.coffee index b8dd052b..346c0c47 100644 --- a/resources/assets/scripts/app/controllers/account-albums-edit.coffee +++ b/resources/assets/scripts/app/controllers/account-albums-edit.coffee @@ -139,6 +139,7 @@ module.exports = angular.module('ponyfm').controller "account-albums-edit", [ albums.getEdit($state.params.album_id).done (album) -> $scope.album = id: album.id + user_id: album.user_id title: album.title description: album.description remove_cover: false diff --git a/resources/assets/scripts/app/controllers/account-albums.coffee b/resources/assets/scripts/app/controllers/account-albums.coffee index 877f14b1..d811dad4 100644 --- a/resources/assets/scripts/app/controllers/account-albums.coffee +++ b/resources/assets/scripts/app/controllers/account-albums.coffee @@ -15,9 +15,9 @@ # along with this program. If not, see . window.pfm.preloaders['account-albums'] = [ - 'account-tracks', 'account-albums' - (tracks, albums) -> - $.when.all [tracks.refresh('published=true&in_album=false', true), albums.refresh(true)] + 'account-tracks' + (tracks) -> + tracks.refresh('published=true&in_album=false', true) ] module.exports = angular.module('ponyfm').controller "account-albums", [