#2: Fixed up the album editor in its new home.

This commit is contained in:
Peter Deltchev 2016-03-19 01:10:24 -07:00
parent d8933374ab
commit 61ca938877
5 changed files with 7 additions and 5 deletions

View file

@ -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,

View file

@ -22,7 +22,7 @@
</div>
<div class="form-row" ng-class="{'has-error': errors.cover != null}">
<label class="strong">Album Cover: </label>
<pfm-image-upload set-image="setCover" image="album.cover" />
<pfm-image-upload set-image="setCover" image="album.cover" user-id="album.user_id"></pfm-image-upload>
</div>
<div class="form-row track-selector">
<a pfm-popup="track-selector,right" pfm-popup-close-on-click href="#" class="btn btn-small pull-right btn-info">Add Tracks</a>

View file

@ -27,7 +27,7 @@
<input ng-change="touchModel()" ng-disabled="isLoading" id="uses_gravatar" type="checkbox" ng-model="settings.uses_gravatar" /> Use Gravatar
</label>
<div ng-show="!settings.uses_gravatar">
<pfm-image-upload set-image="setAvatar" image="settings.avatar_url" />
<pfm-image-upload set-image="setAvatar" image="settings.avatar_url" user-id="settings.id"></pfm-image-upload>
</div>
<input type="text" ng-disabled="isSaving" ng-change="touchModel()" ng-show="settings.uses_gravatar" placeholder="Gravatar Email" ng-model="settings.gravatar" />
<div class="error" ng-show="errors.avatar != null">{{errors.avatar}}</div>

View file

@ -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

View file

@ -15,9 +15,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
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", [