Converted a bunch of tabs to spaces.

This commit is contained in:
Peter Deltchev 2015-10-24 19:35:37 -07:00
parent e1c6a175b0
commit b00982cd61
177 changed files with 5958 additions and 5958 deletions

View file

@ -78,25 +78,25 @@ class CreateCommentCommand extends CommandBase
$comment->$column = $this->_id; $comment->$column = $this->_id;
$comment->save(); $comment->save();
// Recount the track's comments, if this is a track comment // Recount the track's comments, if this is a track comment
if ($this->_type === 'track') { if ($this->_type === 'track') {
$entity = Track::find($this->_id); $entity = Track::find($this->_id);
} elseif ($this->_type === 'album') { } elseif ($this->_type === 'album') {
$entity = Album::find($this->_id); $entity = Album::find($this->_id);
} elseif ($this->_type === 'playlist') { } elseif ($this->_type === 'playlist') {
$entity = Playlist::find($this->_id); $entity = Playlist::find($this->_id);
} elseif ($this->_type === 'user') { } elseif ($this->_type === 'user') {
$entity = User::find($this->_id); $entity = User::find($this->_id);
} else { } else {
App::abort(400, 'This comment is being added to an invalid entity!'); App::abort(400, 'This comment is being added to an invalid entity!');
} }
$entity->comment_count = Comment::where($column, $this->_id)->count(); $entity->comment_count = Comment::where($column, $this->_id)->count();
$entity->save(); $entity->save();
return CommandResponse::succeed(Comment::mapPublic($comment)); return CommandResponse::succeed(Comment::mapPublic($comment));
} }

View file

@ -62,14 +62,14 @@ class ToggleFavouriteCommand extends CommandBase
DB::table($resourceTable)->whereId($this->_resourceId)->update([ DB::table($resourceTable)->whereId($this->_resourceId)->update([
'favourite_count' => 'favourite_count' =>
DB::raw('( DB::raw('(
SELECT SELECT
COUNT(id) COUNT(id)
FROM FROM
favourites favourites
WHERE ' . WHERE ' .
$typeId . ' = ' . $this->_resourceId . ')') $typeId . ' = ' . $this->_resourceId . ')')
]); ]);
return CommandResponse::succeed(['is_favourited' => $isFavourited]); return CommandResponse::succeed(['is_favourited' => $isFavourited]);
} }
} }

View file

@ -80,7 +80,7 @@ class ClassifyMLPMA extends Command
$queriedTitle = DB::connection()->getPdo()->quote($sanitizedTrackTitle); $queriedTitle = DB::connection()->getPdo()->quote($sanitizedTrackTitle);
$officialSongs = ShowSong::select(['id', 'title']) $officialSongs = ShowSong::select(['id', 'title'])
->whereRaw(" ->whereRaw("
MATCH (title) MATCH (title)
AGAINST ($queriedTitle IN BOOLEAN MODE) AGAINST ($queriedTitle IN BOOLEAN MODE)
") ")
->get(); ->get();

View file

@ -167,12 +167,12 @@ class ImportMLPMA extends Command
list($parsedTags, $rawTags) = $this->getVorbisTags($allTags); list($parsedTags, $rawTags) = $this->getVorbisTags($allTags);
} elseif (Str::lower($file->getExtension()) === 'wav') { } elseif (Str::lower($file->getExtension()) === 'wav') {
list($parsedTags, $rawTags) = $this->getAtomTags($allTags); list($parsedTags, $rawTags) = $this->getAtomTags($allTags);
} }
//========================================================================================================== //==========================================================================================================
// Determine the release date. // Determine the release date.
//========================================================================================================== //==========================================================================================================
$modifiedDate = Carbon::createFromTimeStampUTC(File::lastModified($file->getPathname())); $modifiedDate = Carbon::createFromTimeStampUTC(File::lastModified($file->getPathname()));

View file

@ -42,15 +42,15 @@ class PoniverseApiSetup extends Command
{ {
$this->output->getFormatter()->setStyle('bold', new OutputFormatterStyle(null, null, ['bold'])); $this->output->getFormatter()->setStyle('bold', new OutputFormatterStyle(null, null, ['bold']));
$this->comment('Sign in with your Poniverse account! Your password won\'t be stored locally.'); $this->comment('Sign in with your Poniverse account! Your password won\'t be stored locally.');
$this->line(''); $this->line('');
$this->comment('This sets up your Poniverse API credentials, which are necessary for Pony.fm\'s integration with Poniverse to work.'); $this->comment('This sets up your Poniverse API credentials, which are necessary for Pony.fm\'s integration with Poniverse to work.');
$this->line(''); $this->line('');
$this->comment('If you don\'t have a Poniverse account, create one at: <bold>https://poniverse.net/register</bold>'); $this->comment('If you don\'t have a Poniverse account, create one at: <bold>https://poniverse.net/register</bold>');
$username = $this->ask('Your Poniverse username'); $username = $this->ask('Your Poniverse username');
$password = $this->secret('Your Poniverse password'); $password = $this->secret('Your Poniverse password');
// log in // log in
$client = new Client(['base_uri' => 'https://api.poniverse.net/v1/dev/']); $client = new Client(['base_uri' => 'https://api.poniverse.net/v1/dev/']);
try { try {
@ -75,7 +75,7 @@ class PoniverseApiSetup extends Command
$clientId = $json->id; $clientId = $json->id;
$clientSecret = $json->secret; $clientSecret = $json->secret;
// save new key to .env // save new key to .env
$this->setEnvironmentVariable('PONI_CLIENT_ID', $this->laravel['config']['poniverse.client_id'], $clientId); $this->setEnvironmentVariable('PONI_CLIENT_ID', $this->laravel['config']['poniverse.client_id'], $clientId);
$this->setEnvironmentVariable('PONI_CLIENT_SECRET', $this->laravel['config']['poniverse.secret'], $clientSecret); $this->setEnvironmentVariable('PONI_CLIENT_SECRET', $this->laravel['config']['poniverse.secret'], $clientSecret);

View file

@ -11,7 +11,7 @@ class Poniverse {
protected $clientSecret; protected $clientSecret;
protected $accessToken; protected $accessToken;
protected $redirectUri; protected $redirectUri;
protected $urls; protected $urls;
/** /**
* @var OAuth2\Client * @var OAuth2\Client
@ -27,7 +27,7 @@ class Poniverse {
*/ */
public function __construct($clientId, $clientSecret, $accessToken = '') public function __construct($clientId, $clientSecret, $accessToken = '')
{ {
$this->urls = Config::get('poniverse.urls'); $this->urls = Config::get('poniverse.urls');
$this->clientId = $clientId; $this->clientId = $clientId;
$this->clientSecret = $clientSecret; $this->clientSecret = $clientSecret;
@ -92,4 +92,4 @@ class Poniverse {
return json_decode($result, true); return json_decode($result, true);
} }
} }

View file

@ -403,7 +403,7 @@ class Client
$curl_options[CURLOPT_POST] = true; $curl_options[CURLOPT_POST] = true;
/* No break */ /* No break */
case self::HTTP_METHOD_PUT: case self::HTTP_METHOD_PUT:
case self::HTTP_METHOD_PATCH: case self::HTTP_METHOD_PATCH:
/** /**
* Passing an array to CURLOPT_POSTFIELDS will encode the data as multipart/form-data, * Passing an array to CURLOPT_POSTFIELDS will encode the data as multipart/form-data,

File diff suppressed because it is too large Load diff

View file

@ -57,13 +57,13 @@ class ResourceLogItem extends Model
DB::table($resourceTable)->whereId($resourceId)->update([ DB::table($resourceTable)->whereId($resourceId)->update([
$countColumn => $countColumn =>
DB::raw('(SELECT DB::raw('(SELECT
COUNT(id) COUNT(id)
FROM FROM
resource_log_items resource_log_items
WHERE ' . WHERE ' .
$resourceIdColumn . ' = ' . $resourceId . ' $resourceIdColumn . ' = ' . $resourceId . '
AND AND
log_type = ' . $logType . ')') log_type = ' . $logType . ')')
]); ]);
if (Auth::check()) { if (Auth::check()) {
@ -71,15 +71,15 @@ class ResourceLogItem extends Model
DB::table('resource_users')->whereId($resourceUserId)->update([ DB::table('resource_users')->whereId($resourceUserId)->update([
$countColumn => $countColumn =>
DB::raw('(SELECT DB::raw('(SELECT
COUNT(id) COUNT(id)
FROM FROM
resource_log_items resource_log_items
WHERE WHERE
user_id = ' . Auth::user()->id . ' user_id = ' . Auth::user()->id . '
AND ' . AND ' .
$resourceIdColumn . ' = ' . $resourceId . ' $resourceIdColumn . ' = ' . $resourceId . '
AND AND
log_type = ' . $logType . ')') log_type = ' . $logType . ')')
]); ]);
} }
} }

View file

@ -127,10 +127,10 @@ class Track extends Model
::published() ::published()
->listed() ->listed()
->join(DB::raw(' ->join(DB::raw('
( SELECT `track_id`, `created_at` ( SELECT `track_id`, `created_at`
FROM `resource_log_items` FROM `resource_log_items`
WHERE track_id IS NOT NULL AND log_type = 3 AND `created_at` > now() - INTERVAL 1 DAY WHERE track_id IS NOT NULL AND log_type = 3 AND `created_at` > now() - INTERVAL 1 DAY
) AS ranged_plays'), ) AS ranged_plays'),
'tracks.id', '=', 'ranged_plays.track_id') 'tracks.id', '=', 'ranged_plays.track_id')
->groupBy('id') ->groupBy('id')
->orderBy('plays', 'desc') ->orderBy('plays', 'desc')
@ -598,9 +598,9 @@ class Track extends Model
'copyright' => ['© ' . $this->year . ' ' . $this->user->display_name], 'copyright' => ['© ' . $this->year . ' ' . $this->user->display_name],
'publisher' => ['Pony.fm - https://pony.fm/'], 'publisher' => ['Pony.fm - https://pony.fm/'],
'encoded_by' => ['https://pony.fm/'], 'encoded_by' => ['https://pony.fm/'],
// 'url_artist' => [$this->user->url], // 'url_artist' => [$this->user->url],
// 'url_source' => [$this->url], // 'url_source' => [$this->url],
// 'url_file' => [$this->url], // 'url_file' => [$this->url],
'url_publisher' => ['https://pony.fm/'] 'url_publisher' => ['https://pony.fm/']
]; ];

View file

@ -2,41 +2,41 @@
return array( return array(
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Default NewRelic Integration Settings | Default NewRelic Integration Settings
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
*/ */
/* /*
* Will automatically name transactions in NewRelic, * Will automatically name transactions in NewRelic,
* using the Laravel route name, action or request. * using the Laravel route name, action or request.
* *
* Set this to false to use the NewRelic default naming * Set this to false to use the NewRelic default naming
* scheme, or to set your own in your application. * scheme, or to set your own in your application.
*/ */
'auto_name_transactions' => true, 'auto_name_transactions' => true,
/* /*
* Define the name used when automatically naming transactions. * Define the name used when automatically naming transactions.
* a token string: * a token string:
* a pattern you define yourself, available tokens: * a pattern you define yourself, available tokens:
* {controller} = Controller@action or Closure@path * {controller} = Controller@action or Closure@path
* {method} = GET / POST / etc. * {method} = GET / POST / etc.
* {route} = route name if named, otherwise same as {controller} * {route} = route name if named, otherwise same as {controller}
* {path} = the registered route path (includes variable names) * {path} = the registered route path (includes variable names)
* {uri} = the actual URI requested * {uri} = the actual URI requested
* anything that is not a matched token will remain a string literal * anything that is not a matched token will remain a string literal
* example: * example:
* "GET /world" with pattern 'hello {path} you really {method} me' would return: * "GET /world" with pattern 'hello {path} you really {method} me' would return:
* 'hello /world you really GET me' * 'hello /world you really GET me'
*/ */
'name_provider' => '{uri} {route}', 'name_provider' => '{uri} {route}',
/* /*
* Will cause an exception to be thrown if the NewRelic * Will cause an exception to be thrown if the NewRelic
* PHP agent is not found / installed * PHP agent is not found / installed
*/ */
'throw_if_not_installed' => false, 'throw_if_not_installed' => false,
); );

View file

@ -1,12 +1,12 @@
<?php <?php
return [ return [
'version' => 1, 'version' => 1,
'urls' => [ 'urls' => [
'api' => env('PONI_API_URL', 'https://api.poniverse.net/v1/'), 'api' => env('PONI_API_URL', 'https://api.poniverse.net/v1/'),
'register' => env('PONI_REGISTER_URL', 'https://poniverse.net/register?site=pony.fm'), 'register' => env('PONI_REGISTER_URL', 'https://poniverse.net/register?site=pony.fm'),
'auth' => env('PONI_AUTH_URL', 'https://poniverse.net/oauth/authorize'), 'auth' => env('PONI_AUTH_URL', 'https://poniverse.net/oauth/authorize'),
'token' => env('PONI_TOKEN_URL', 'https://poniverse.net/oauth/access_token') 'token' => env('PONI_TOKEN_URL', 'https://poniverse.net/oauth/access_token')
], ],
'client_id' => env('PONI_CLIENT_ID'), 'client_id' => env('PONI_CLIENT_ID'),
'secret' => env('PONI_CLIENT_SECRET') 'secret' => env('PONI_CLIENT_SECRET')
]; ];

View file

@ -11,24 +11,24 @@ class CreateLatestColumn extends Migration
}); });
DB::update(' DB::update('
UPDATE UPDATE
tracks tracks
SET SET
is_latest = true is_latest = true
WHERE WHERE
( (
SELECT SELECT
t2.id t2.id
FROM FROM
(SELECT id, user_id FROM tracks WHERE published_at IS NOT NULL AND deleted_at IS NULL) AS t2 (SELECT id, user_id FROM tracks WHERE published_at IS NOT NULL AND deleted_at IS NULL) AS t2
WHERE WHERE
t2.user_id = tracks.user_id t2.user_id = tracks.user_id
ORDER BY ORDER BY
created_at DESC created_at DESC
LIMIT 1 LIMIT 1
) = tracks.id ) = tracks.id
AND AND
published_at IS NOT NULL'); published_at IS NOT NULL');
} }
public function down() public function down()
@ -37,4 +37,4 @@ class CreateLatestColumn extends Migration
$table->dropColumn('is_latest'); $table->dropColumn('is_latest');
}); });
} }
} }

View file

@ -11,10 +11,10 @@ class TrackIsListed extends Migration
}); });
DB::update(' DB::update('
UPDATE UPDATE
tracks tracks
SET SET
is_listed = true'); is_listed = true');
} }
public function down() public function down()
@ -23,4 +23,4 @@ class TrackIsListed extends Migration
$table->dropColumn('is_listed'); $table->dropColumn('is_listed');
}); });
} }
} }

View file

@ -14,10 +14,10 @@
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L] RewriteRule ^ index.php [L]
RewriteRule ^(.*\.(?:coffee))$ /asset.php?type=coffee&file=/$1 [L,QSA,NC] RewriteRule ^(.*\.(?:coffee))$ /asset.php?type=coffee&file=/$1 [L,QSA,NC]
RewriteRule ^(.*\.(?:less))$ /asset.php?type=less&file=/$1 [L,QSA,NC] RewriteRule ^(.*\.(?:less))$ /asset.php?type=less&file=/$1 [L,QSA,NC]
</IfModule> </IfModule>
<IfModule xsendfile_module> <IfModule xsendfile_module>
XSendFile On XSendFile On
</IfModule> </IfModule>

View file

@ -1,76 +1,76 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 16.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/"> <!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/"> <!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/"> <!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/"> <!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/"> <!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/"> <!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/"> <!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/"> <!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
]> ]>
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;" <svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="690px" height="137px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="690px" height="137px"
viewBox="0 0 690 137" enable-background="new 0 0 690 137" xml:space="preserve"> viewBox="0 0 690 137" enable-background="new 0 0 690 137" xml:space="preserve">
<switch> <switch>
<foreignObject requiredExtensions="&ns_ai;" x="0" y="0" width="1" height="1"> <foreignObject requiredExtensions="&ns_ai;" x="0" y="0" width="1" height="1">
<i:pgfRef xlink:href="#adobe_illustrator_pgf"> <i:pgfRef xlink:href="#adobe_illustrator_pgf">
</i:pgfRef> </i:pgfRef>
</foreignObject> </foreignObject>
<g i:extraneous="self"> <g i:extraneous="self">
<g> <g>
<title>background</title> <title>background</title>
<rect id="canvas_background" x="-1" y="-1" fill="none" width="692" height="139"/> <rect id="canvas_background" x="-1" y="-1" fill="none" width="692" height="139"/>
</g> </g>
<g> <g>
<title>Layer 1</title> <title>Layer 1</title>
<g id="Logo"> <g id="Logo">
<g id="svg_1"> <g id="svg_1">
<path id="svg_2" fill="#FFFFFF" d="M210.9,108.1c-10.4,0-19.5-4.899-25.6-13.3V130.4c0,3-2.7,5.6-6,5.6c-3.1,0-5.8-2.7-5.8-5.6 <path id="svg_2" fill="#FFFFFF" d="M210.9,108.1c-10.4,0-19.5-4.899-25.6-13.3V130.4c0,3-2.7,5.6-6,5.6c-3.1,0-5.8-2.7-5.8-5.6
V35.1c0-3,2.7-5.6,6.1-5.6c3,0,5.6,2.7,5.6,5.6v6.6c5.5-7.7,14.9-13.2,25.6-13.2c19.9,0,33.7,15.1,33.7,39.7 V35.1c0-3,2.7-5.6,6.1-5.6c3,0,5.6,2.7,5.6,5.6v6.6c5.5-7.7,14.9-13.2,25.6-13.2c19.9,0,33.7,15.1,33.7,39.7
C244.7,92.7,230.8,108.1,210.9,108.1z M207.9,39.1c-9.3,0-18.5,5.5-22.6,12.1v34.2C189.4,92,198.6,97.6,207.9,97.6 C244.7,92.7,230.8,108.1,210.9,108.1z M207.9,39.1c-9.3,0-18.5,5.5-22.6,12.1v34.2C189.4,92,198.6,97.6,207.9,97.6
c15.2,0,24.3-12.6,24.3-29.3C232.2,51.6,223.2,39.1,207.9,39.1z"/> c15.2,0,24.3-12.6,24.3-29.3C232.2,51.6,223.2,39.1,207.9,39.1z"/>
<path id="svg_3" fill="#FFFFFF" d="M296.4,108.1c-23.1,0-37.5-17.899-37.5-39.899s14.4-39.7,37.5-39.7s37.5,17.7,37.5,39.7 <path id="svg_3" fill="#FFFFFF" d="M296.4,108.1c-23.1,0-37.5-17.899-37.5-39.899s14.4-39.7,37.5-39.7s37.5,17.7,37.5,39.7
S319.5,108.1,296.4,108.1z M296.4,39.1c-16.2,0-25.3,13.8-25.3,29.2c0,15.5,9.1,29.3,25.3,29.3c16.2,0,25.1-13.8,25.1-29.3 S319.5,108.1,296.4,108.1z M296.4,39.1c-16.2,0-25.3,13.8-25.3,29.2c0,15.5,9.1,29.3,25.3,29.3c16.2,0,25.1-13.8,25.1-29.3
C321.6,52.9,312.6,39.1,296.4,39.1z"/> C321.6,52.9,312.6,39.1,296.4,39.1z"/>
<path id="svg_4" fill="#FFFFFF" d="M405.2,107.2c-3.101,0-5.8-2.7-5.8-5.8V56.7c0-13.3-6.7-17.6-16.9-17.6 <path id="svg_4" fill="#FFFFFF" d="M405.2,107.2c-3.101,0-5.8-2.7-5.8-5.8V56.7c0-13.3-6.7-17.6-16.9-17.6
c-9.3,0-18,5.6-22.4,11.8v50.5c0,3.1-2.699,5.8-6,5.8c-3.1,0-5.8-2.7-5.8-5.8V35.1c0-3,2.7-5.6,6.101-5.6c3,0,5.6,2.7,5.6,5.6 c-9.3,0-18,5.6-22.4,11.8v50.5c0,3.1-2.699,5.8-6,5.8c-3.1,0-5.8-2.7-5.8-5.8V35.1c0-3,2.7-5.6,6.101-5.6c3,0,5.6,2.7,5.6,5.6
v6.3c5.3-6.3,15.7-12.9,27-12.9c15.8,0,24.2,8,24.2,24.5v48.3C411.2,104.5,408.5,107.2,405.2,107.2z"/> v6.3c5.3-6.3,15.7-12.9,27-12.9c15.8,0,24.2,8,24.2,24.5v48.3C411.2,104.5,408.5,107.2,405.2,107.2z"/>
<path id="svg_5" fill="#FFFFFF" d="M493.2,37.3L458,121.6c-4.6,10.801-12.6,15.4-22.3,15.4c-4.101,0-9.3-0.3-9.3-5.3 <path id="svg_5" fill="#FFFFFF" d="M493.2,37.3L458,121.6c-4.6,10.801-12.6,15.4-22.3,15.4c-4.101,0-9.3-0.3-9.3-5.3
c0-3.101,2.5-5.3,5.199-5.3c1.4,0,2.7,0.199,3.9,0.199c4.7,0.2,8.3-1.699,11.1-8l5-11.5L422.7,37.4c-0.3-0.6-0.5-1.4-0.5-2 c0-3.101,2.5-5.3,5.199-5.3c1.4,0,2.7,0.199,3.9,0.199c4.7,0.2,8.3-1.699,11.1-8l5-11.5L422.7,37.4c-0.3-0.6-0.5-1.4-0.5-2
c0-3,2.5-5.8,6-5.8c2.399,0,4.6,1.3,5.5,3.6l24.2,59.5l24-59.5c0.899-2.2,3.1-3.6,5.5-3.6c3.5,0,6.1,2.7,6.1,5.8 c0-3,2.5-5.8,6-5.8c2.399,0,4.6,1.3,5.5,3.6l24.2,59.5l24-59.5c0.899-2.2,3.1-3.6,5.5-3.6c3.5,0,6.1,2.7,6.1,5.8
C493.7,35.9,493.5,36.7,493.2,37.3z"/> C493.7,35.9,493.5,36.7,493.2,37.3z"/>
<path id="svg_6" fill="#FFFFFF" d="M502,107.8c-4.7,0-8.6-3.899-8.6-8.6S497.3,90.6,502,90.6s8.6,3.9,8.6,8.601 <path id="svg_6" fill="#FFFFFF" d="M502,107.8c-4.7,0-8.6-3.899-8.6-8.6S497.3,90.6,502,90.6s8.6,3.9,8.6,8.601
C510.7,103.9,506.7,107.8,502,107.8z"/> C510.7,103.9,506.7,107.8,502,107.8z"/>
<path id="svg_7" fill="#FFFFFF" d="M567.3,14.9c-2.399,0-4.399-1.6-7.7-1.6c-6.399,0-10.399,4.4-10.399,12.4v4.7h9.1 <path id="svg_7" fill="#FFFFFF" d="M567.3,14.9c-2.399,0-4.399-1.6-7.7-1.6c-6.399,0-10.399,4.4-10.399,12.4v4.7h9.1
c3.9,0,7.2,3.3,7.2,7.5c0,3.9-3.3,7.2-7.2,7.2h-9.1v53.7c0,4.601-3.8,8.3-8.601,8.3c-4.6,0-8.3-3.8-8.3-8.3V45.1H526 c3.9,0,7.2,3.3,7.2,7.5c0,3.9-3.3,7.2-7.2,7.2h-9.1v53.7c0,4.601-3.8,8.3-8.601,8.3c-4.6,0-8.3-3.8-8.3-8.3V45.1H526
c-3.9,0-7.2-3.3-7.2-7.5c0-3.9,3.3-7.2,7.2-7.2h6.3v-4.7c0-16,9.601-25.7,24.2-25.7c8.6,0,16.8,3.1,16.8,8.5 c-3.9,0-7.2-3.3-7.2-7.5c0-3.9,3.3-7.2,7.2-7.2h6.3v-4.7c0-16,9.601-25.7,24.2-25.7c8.6,0,16.8,3.1,16.8,8.5
C573.3,12.5,570.1,14.9,567.3,14.9z"/> C573.3,12.5,570.1,14.9,567.3,14.9z"/>
<path id="svg_8" fill="#FFFFFF" d="M680.9,107.2c-4.601,0-8.301-3.8-8.301-8.3V57c0-8-3.5-13.5-12.199-13.5 <path id="svg_8" fill="#FFFFFF" d="M680.9,107.2c-4.601,0-8.301-3.8-8.301-8.3V57c0-8-3.5-13.5-12.199-13.5
c-7.4,0-14.101,5.2-17.4,9.9v45.5c0,4.6-3.8,8.3-8.5,8.3s-8.3-3.8-8.3-8.3V57c0-8-3.601-13.5-12.4-13.5c-7.2,0-14,5.2-17.3,10 c-7.4,0-14.101,5.2-17.4,9.9v45.5c0,4.6-3.8,8.3-8.5,8.3s-8.3-3.8-8.3-8.3V57c0-8-3.601-13.5-12.4-13.5c-7.2,0-14,5.2-17.3,10
v45.4c0,4.6-3.8,8.3-8.5,8.3s-8.3-3.8-8.3-8.3V37.7c0-4.4,3.6-8.2,8.6-8.2c4.4,0,8.2,3.8,8.2,8.2v3.1 v45.4c0,4.6-3.8,8.3-8.5,8.3s-8.3-3.8-8.3-8.3V37.7c0-4.4,3.6-8.2,8.6-8.2c4.4,0,8.2,3.8,8.2,8.2v3.1
c3.1-4.7,13.2-12.2,24.6-12.2c11.301,0,18.2,5.6,20.7,14c4.4-6.9,14.4-14,25.9-14c13.8,0,21.8,7.5,21.8,22.9v47.4 c3.1-4.7,13.2-12.2,24.6-12.2c11.301,0,18.2,5.6,20.7,14c4.4-6.9,14.4-14,25.9-14c13.8,0,21.8,7.5,21.8,22.9v47.4
C689.6,103.4,685.8,107.2,680.9,107.2z"/> C689.6,103.4,685.8,107.2,680.9,107.2z"/>
</g> </g>
<g id="svg_9"> <g id="svg_9">
<g id="svg_10"> <g id="svg_10">
<circle id="svg_11" fill="#FFFFFF" cx="62.8" cy="68.3" r="5.7"/> <circle id="svg_11" fill="#FFFFFF" cx="62.8" cy="68.3" r="5.7"/>
<path id="svg_12" fill="#FFFFFF" d="M62.8,5.5C28.1,5.5,0,33.6,0,68.3c0,34.7,28.1,62.8,62.8,62.8c34.7,0,62.8-28.1,62.8-62.8 <path id="svg_12" fill="#FFFFFF" d="M62.8,5.5C28.1,5.5,0,33.6,0,68.3c0,34.7,28.1,62.8,62.8,62.8c34.7,0,62.8-28.1,62.8-62.8
C125.6,33.6,97.5,5.5,62.8,5.5z M62.8,92.3c-13.3,0-24-10.7-24-24s10.7-24,24-24c13.3,0,24,10.7,24,24S76.1,92.3,62.8,92.3z C125.6,33.6,97.5,5.5,62.8,5.5z M62.8,92.3c-13.3,0-24-10.7-24-24s10.7-24,24-24c13.3,0,24,10.7,24,24S76.1,92.3,62.8,92.3z
M97.9,62.6c-1.9,0.5-3.8-0.6-4.3-2.5c-2.3-8.5-7.8-15.3-14.8-19.3c-1.7-1-2.2-3.1-1.3-4.8c1-1.6,3-2.2,4.7-1.3h0.1h0.1 M97.9,62.6c-1.9,0.5-3.8-0.6-4.3-2.5c-2.3-8.5-7.8-15.3-14.8-19.3c-1.7-1-2.2-3.1-1.3-4.8c1-1.6,3-2.2,4.7-1.3h0.1h0.1
c8.5,5,15.2,13.2,18,23.4v0.1v0.1C100.8,60.2,99.7,62.1,97.9,62.6z M111.4,59c-1.9,0.5-3.8-0.6-4.3-2.5 c8.5,5,15.2,13.2,18,23.4v0.1v0.1C100.8,60.2,99.7,62.1,97.9,62.6z M111.4,59c-1.9,0.5-3.8-0.6-4.3-2.5
c-3.3-12.2-11.2-22-21.4-27.8c-1.7-1-2.2-3.1-1.3-4.8c1-1.7,3.1-2.2,4.8-1.3c11.7,6.8,20.8,18,24.6,32.1 c-3.3-12.2-11.2-22-21.4-27.8c-1.7-1-2.2-3.1-1.3-4.8c1-1.7,3.1-2.2,4.8-1.3c11.7,6.8,20.8,18,24.6,32.1
C114.4,56.5,113.3,58.5,111.4,59z"/> C114.4,56.5,113.3,58.5,111.4,59z"/>
</g> </g>
</g> </g>
</g> </g>
</g> </g>
</g> </g>
</switch> </switch>
<i:pgf id="adobe_illustrator_pgf"> <i:pgf id="adobe_illustrator_pgf">
<![CDATA[ <![CDATA[
eJztvWd38rq2MHo/rzH4D5AKobnQ02khCUlISCONUJyEhBYDa691PtzfftVsy8ayZeA5d79jvGed eJztvWd38rq2MHo/rzH4D5AKobnQ02khCUlISCONUJyEhBYDa691PtzfftVsy8ayZeA5d79jvGed
nQfL8pzS1NRs0pQ2A7V69Lg7aitROSb4fX9tbhZUpTUdqTk/Kvaf9vuzyVSFRcGbkF9MxQRY6/g0 nQfL8pzS1NRs0pQ2A7V69Lg7aitROSb4fX9tbhZUpTUdqTk/Kvaf9vuzyVSFRcGbkF9MxQRY6/g0
0yQ17xV10hsNc+hdTIJvy/D74Gn1QpRSIX8wBMtue9O+Ako/Bs3+6HMUm/z9GdLxge+LrSl4nYqL 0yQ17xV10hsNc+hdTIJvy/D74Gn1QpRSIX8wBMtue9O+Ako/Bs3+6HMUm/z9GdLxge+LrSl4nYqL
ybgkiEm/KOQSgr92geq0hn+3JpPe/ygQi5yRYWF+NBt2e8PP/OifnD8qSSl/UvQnUmm/mEVNrPRu ybgkiEm/KOQSgr92geq0hn+3JpPe/ygQi5yRYWF+NBt2e8PP/OifnD8qSSl/UvQnUmm/mEVNrPRu
@ -142,9 +142,9 @@ dnSenRxkKnsPsfLoKXFfUl+ehOJTuXFb3j/e74g7x+khQSNveOscJBrun6omApH7t9NANBPNBMKd
WB32KwPLSoFIs5sMhHo//UBomu/BzoXoziUiN/BXHrTk5Rh15CBb2fg2ugTQoF5NAq/bRWn7YK1o WB32KwPLSoFIs5sMhHo//UBomu/BzoXoziUiN/BXHrTk5Rh15CBb2fg2ugTQoF5NAq/bRWn7YK1o
qRWLTzIn0uF65Q08nvSF7lajqHWkOlHV3cm9+tLPnAvxRB3T1SAV+HLzUT66DgYhmu6WiIhxZQye qRWLTzIn0uF65Q08nvSF7lajqHWkOlHV3cm9+tLPnAvxRB3T1SAV+HLzUT66DgYhmu6WiIhxZQye
+lrYOYrJ1cwsfHAS2DIGA2FNjG7qQxbWN/W1+VW3YNV7kznZf0/+7owFW6xvqacaCw== +lrYOYrJ1cwsfHAS2DIGA2FNjG7qQxbWN/W1+VW3YNV7kznZf0/+7owFW6xvqacaCw==
]]> ]]>
<![CDATA[ <![CDATA[
a2W9344/2WPdCzxP1u8bNYjGtrvX+9sHucLzmR3W8G4nscfAmlpfv3+6TFqwIjQIcaLxJJTzqStb a2W9344/2WPdCzxP1u8bNYjGtrvX+9sHucLzmR3W8G4nscfAmlpfv3+6TFqwIjQIcaLxJJTzqStb
rGvl78zGUN6t2WEVyh+dChPrlpRolPD0tOluotEVTk7Uhn1fy793UuG2Dcc1MZob1+1BjmCtbW8j rGvl78zGUN6t2WEVyh+dChPrlpRolPD0tOluotEVTk7Uhn1fy793UuG2Dcc1MZob1+1BjmCtbW8j
rBgNGVpZvY9/IayAM9sl89A+q6/F+xrEGppnqMRrYhq7i9pjHVfOABoLYgNr6lLYXWdh7ahvGfHR rBgNGVpZvY9/IayAM9sl89A+q6/F+xrEGppnqMRrYhq7i9pjHVfOABoLYgNr6lLYXWdh7ahvGfHR
HutlaWf9NzW7MLACNAbiyfo4X2ZhrRxKQ/HJHmsi1Ajv9u8ubbGulVvwpAALYnpoz6/zDKyp9c1k HutlaWf9NzW7MLACNAbiyfo4X2ZhrRxKQ/HJHmsi1Ajv9u8ubbGulVvwpAALYnpoz6/zDKyp9c1k
@ -216,9 +216,9 @@ HIE3WbChuWT48DYMe9L37CV4z910P8bACzT22sciRHPJ//FINHkZaOZ4MT4s07SJCqdguaTvcJm5
FWuo2CZpyZj2fKl7DnKDAQCNjZs/iOa56CqrPyt2/qDdnlsOf3B66JJ8YtjVBgB6TRrB2PIOwwTg FWuo2CZpyZj2fKl7DnKDAQCNjZs/iOa56CqrPyt2/qDdnlsOf3B66JJ8YtjVBgB6TRrB2PIOwwTg
YCLYnONicXH14WaRxS1ljzFKtHFbmVtYcXDUmGl/tvPWIgVcKcIdiGBG1d0S9ub0HcOegV1KWLo0 YCLYnONicXH14WaRxS1ljzFKtHFbmVtYcXDUmGl/tvPWIgVcKcIdiGBG1d0S9ub0HcOegV1KWLo0
v0vV7IA5pRAEi6o1U/d18jm1o7qPyvQyW5gMhgbK1FOAI0Sbgy65ei4CiJ2WNbc5aQ== v0vV7IA5pRAEi6o1U/d18jm1o7qPyvQyW5gMhgbK1FOAI0Sbgy65ei4CiJ2WNbc5aQ==
]]> ]]>
<![CDATA[ <![CDATA[
YTvt+5Q59405r0sBV1Jxz1u7LU4Up32feosFOWSwmVeBAB/M+Z6cfOCeo2dqk08/5NS2WZ6iNw5t YTvt+5Q59405r0sBV1Jxz1u7LU4Up32feosFOWSwmVeBAB/M+Z6cfOCeo2dqk08/5NS2WZ6iNw5t
QpssVsNVTtEbn37iGF+zvEVvrG6UOW68P7VGb2Ba1DLRG4rTBmdLR2/kjVxww87TMwkbTq/izHv0 QpssVsNVTtEbn37iGF+zvEVvrG6UOW68P7VGb2Ba1DLRG4rTBmdLR2/kjVxww87TMwkbTq/izHv0
hh0XGJwtHb0BnUsEHbaM8OfDcUZvfE7nQKF8uGWjNzAZTqaCkIvuSzrjiN6QeeOaK8iO3nBlB+mW hh0XGJwtHb0BnUsEHbaM8OfDcUZvfE7nQKF8uGWjNzAZTqaCkIvuSzrjiN6QeeOaK8iO3nBlB+mW
DSSQpwQhx40XcYsh7dMyvVxSY7kM6XPmnguflwzJ3LXLQDI9h/kdXfLhXZojmZXj2LNzY5cucwcx DSSQpwQhx40XcYsh7dMyvVxSY7kM6XPmnguflwzJ3LXLQDI9h/kdXfLhXZojmZXj2LNzY5cucwcx
@ -290,9 +290,9 @@ tAde44de91zqwkNn44fa/bDchYcGwe1Sg71GB5kXHnrPxV3owkNbKLoods5Y8XDh4eI7umwuPFw0
Vd9HMiSXvvDQNB/nbjvEaFZw4aGWVWd/2yGRactfeOi8iQobtyu48NDZu9eItrLEK/vbDj3EOs1E Vd9HMiSXvvDQNB/nbjvEaFZw4aGWVWd/2yGRactfeOi8iQobtyu48NDZu9eItrLEK/vbDj3EOs1E
s154uLjv6enCQ5Y8xLcdrmqLYsH5tkOf5Wj9hS88dL7tkJgcy1946Jyka6+kF7jw0Pm2Qzc7jT9J s154uLjv6enCQ5Y8xLcdrmqLYsH5tkOf5Wj9hS88dL7tkJgcy1946Jyka6+kF7jw0Pm2Qzc7jT9J
1/G2QzoIudSFh4tYNgtceMgcTbQAZF76doLmcuEh177O5S88dNYVKKRqVRfKdN52Aw== 1/G2QzoIudSFh4tYNgtceMgcTbQAZF76doLmcuEh177O5S88dNYVKKRqVRfKdN52Aw==
]]> ]]>
<![CDATA[ <![CDATA[
ZWxdQdTE3DYSPRysWTbCx10ubo0IgzIHee+839+cRIlTSSiuGltCXmCAagVDAJjWacNDmggoP0HP ZWxdQdTE3DYSPRysWTbCx10ubo0IgzIHee+839+cRIlTSSiuGltCXmCAagVDAJjWacNDmggoP0HP
w2qtDQuEpACUZXNSUymo6sFN7yg+3Ts7FjMPdWn7YK2IqsCsrkr4ttZSA5sv4a0AjBoFtt8qX4HY w2qtDQuEpACUZXNSUymo6sFN7yg+3Ts7FjMPdWn7YK2IqsCsrkr4ttZSA5sv4a0AjBoFtt8qX4HY
/vdxePfgNxve271phG97PyOhVPqOC6XvaE4on18fQ0VQHvWqwsl1NipUTy+bQnXw8Slc9ZUvoX4h /vdxePfgNxve271phG97PyOhVPqOC6XvaE4on18fQ0VQHvWqwsl1NipUTy+bQnXw8Slc9ZUvoX4h
Z4Xb0969cDf5+hDuhWlfuH/bnwkP0fug8BS5Cwmv7bUr4e3t8UNo3shT4V1+3BbeL4LXqqqW4urk Z4Xb0969cDf5+hDuhWlfuH/bnwkP0fug8BS5Cwmv7bUr4e3t8UNo3shT4V1+3BbeL4LXqqqW4urk
@ -364,9 +364,9 @@ knSKx8Yh73Q1Saeat8bMO11N0ikMQjrmnS6SdCpV0za77XCW534DSxcg1o+Rqb6jEbI+JlVgwstB
sgGzMRNBgCYIZ1BzqhGtsg2vV/mF4ilMxBOYN5ZU+cYohphS2j4KvMJmoUOaI0iOA9baO433Hqcx sgGzMRNBgCYIZ1BzqhGtsg2vV/mF4ilMxBOYN5ZU+cYohphS2j4KvMJmoUOaI0iOA9baO433Hqcx
zK29SC6M8mOB3Cid2Z0AKB/eX55ryaGxLbx3EJ7nF+zekeRTizhDESAgybRGnxMBELkTYW/O40Za zK29SC6M8mOB3Cid2Z0AKB/eX55ryaGxLbx3EJ7nF+zekeRTizhDESAgybRGnxMBELkTYW/O40Za
p0mSVQUh2T6Hs+ocmhyUJDnJ/6b0tM4dvYchfNsxHhEgv3BZa625hqUWElTAKvrGuQ== p0mSVQUh2T6Hs+ocmhyUJDnJ/6b0tM4dvYchfNsxHhEgv3BZa625hqUWElTAKvrGuQ==
]]> ]]>
<![CDATA[ <![CDATA[
pZVoGQqbS4ppoZI2RJd+0OH/e+D7KyOkRX9GFiV//GbWV9QrtffZG/qBitr1/RU/PhXFu2F3VFYV pZVoGQqbS4ppoZI2RJd+0OH/e+D7KyOkRX9GFiV//GbWV9QrtffZG/qBitr1/RU/PhXFu2F3VFYV
5Vb5Z1ocdWYDZTj15/zx43rh9DSTLCqdUVfxR/DAvBtsESUtJgFE+lwUU2QRy4viR/bkp7J+s98q 5Vb5Z1ocdWYDZTj15/zx43rh9DSTLCqdUVfxR/DAvBtsESUtJgFE+lwUU2QRy4viR/bkp7J+s98q
fgiNA+vOhpBc2Ucpoz6csbSH06EiX70vuIchFgjPcnWY8FQMRIULCTGh3flLVJz4KTV42ou+l0fp fgiNA+vOhpBc2Ucpoz6csbSH06EiX70vuIchFgjPcnWY8FQMRIULCTGh3flLVJz4KTV42ou+l0fp
B1no0jNR2215sN8+jowvz47Os5ODTGXvIVYePSXuS+rLk1B8Kjduy/vH+x3ECfNnu1SzrA6TLu28 B1no0jNR2215sN8+jowvz47Os5ODTGXvIVYePSXuS+rLk1B8Kjduy/vH+x3ECfNnu1SzrA6TLu28
@ -438,12 +438,12 @@ eZYeYAoK5s5lU7qzGQX2nf4cFTXTRRTSWtxRLzINqF4qwzrpJIp0ECB6C7Qi9AUQYySwplfUjTgE
RLYJWlKlRos0SEazrR3DvY5CPiKRM3qKYDWqRVgBCkFjzjR+IiTPGDFqUdZEnBE+lTNGNyXcjoQe RLYJWlKlRos0SEazrR3DvY5CPiKRM3qKYDWqRVgBCkFjzjR+IiTPGDFqUdZEnBE+lTNGNyXcjoQe
y8sYoXtosMlaqEyrmKYiHig0DoqQt4q/SCGxjNoOnrB/qH0qaQZeQtcTuBSL6YQRRIelOGpnKpVl y8sYoXtosMlaqEyrmKYiHig0DoqQt4q/SCGxjNoOnrB/qH0qaQZeQtcTuBSL6YQRRIelOGpnKpVl
I85LkEtazCdBDG5QlNBCgAJFB7o0rUM0lRJdFUURJTygRCWiiiRIpS0qzI9RgQyeKA== I85LkEtazCdBDG5QlNBCgAJFB7o0rUM0lRJdFUURJTygRCWiiiRIpS0qzI9RgQyeKA==
]]> ]]>
<![CDATA[ <![CDATA[
60DxuIk4DgWZXNTaCxASKokalWUJq5aozkgUy0nEvoUUSZJB1GJKFDVx+MkYGxEZwWTgwVvcsFRS 60DxuIk4DgWZXNTaCxASKokalWUJq5aozkgUy0nEvoUUSZJB1GJKFDVx+MkYGxEZwWTgwVvcsFRS
D+UBSFmtVFvtALzih5KPAJE1cyZldBQRiTQoq/cECRSNy8GzoE8Tqo2i1grUX/Csxc5kvEhCk89j D+UBSFmtVFvtALzih5KPAJE1cyZldBQRiTQoq/cECRSNy8GzoE8Tqo2i1grUX/Csxc5kvEhCk89j
bFZcIpLPjUNYSlPyosm6YVkAbnX0OVoVWNYHVXhaCtxnVBp20eJxFO6926y1PpVbtdXrw21Hn5PW bFZcIpLPjUNYSlPyosm6YVkAbnX0OVoVWNYHVXhaCtxnVBp20eJxFO6926y1PpVbtdXrw21Hn5PW
34q/NRyOpq2pMgav/J+qMpmOVMU/+Rr9B5bAj/QPNjdLV2XfX/8fDbPQ6A== 34q/NRyOpq2pMgav/J+qMpmOVMU/+Rr9B5bAj/QPNjdLV2XfX/8fDbPQ6A==
]]> ]]>
</i:pgf> </i:pgf>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View file

@ -1,3 +1,3 @@
<?php <?php
echo 'template!'; echo 'template!';

View file

@ -1,8 +1,8 @@
<ul class="tabs"> <ul class="tabs">
<li ng-class="{active: stateIncludes('account.tracks')}"><a href="/account/tracks">Tracks</a></li> <li ng-class="{active: stateIncludes('account.tracks')}"><a href="/account/tracks">Tracks</a></li>
<li ng-class="{active: stateIncludes('account.albums')}"><a href="/account/albums">Albums</a></li> <li ng-class="{active: stateIncludes('account.albums')}"><a href="/account/albums">Albums</a></li>
<li ng-class="{active: stateIncludes('account.playlists')}"><a href="/account/playlists">Playlists</a></li> <li ng-class="{active: stateIncludes('account.playlists')}"><a href="/account/playlists">Playlists</a></li>
<li ng-class="{active: stateIncludes('account.settings')}"><a href="/account">Settings</a></li> <li ng-class="{active: stateIncludes('account.settings')}"><a href="/account">Settings</a></li>
</ul> </ul>
<ui-view></ui-view> <ui-view></ui-view>

View file

@ -1,49 +1,49 @@
<form novalidate ng-submit="saveAlbum()"> <form novalidate ng-submit="saveAlbum()">
<ul class="toolbar"> <ul class="toolbar">
<li> <li>
<button type="submit" class="btn" ng-class="{disabled: (!isDirty && !isNew) || isSaving, 'btn-primary': isDirty || isNew}"> <button type="submit" class="btn" ng-class="{disabled: (!isDirty && !isNew) || isSaving, 'btn-primary': isDirty || isNew}">
<span ng-show="isNew">Create Album</span> <span ng-show="isNew">Create Album</span>
<span ng-hide="isNew">Save Changes</span> <span ng-hide="isNew">Save Changes</span>
<i ng-show="isSaving" class="icon-cog icon-spin icon-large"></i> <i ng-show="isSaving" class="icon-cog icon-spin icon-large"></i>
</button> </button>
</li> </li>
<li class="delete" ng-show="!isNew"><a ng-class="{disabled: isSaving}" class="btn btn-danger" href="#" ng-click="deleteAlbum()" pfm-eat-click>Delete Album</a></li> <li class="delete" ng-show="!isNew"><a ng-class="{disabled: isSaving}" class="btn btn-danger" href="#" ng-click="deleteAlbum()" pfm-eat-click>Delete Album</a></li>
</ul> </ul>
<div class="stretch-to-bottom"> <div class="stretch-to-bottom">
<div class="form-row" ng-class="{'has-error': errors.title != null}"> <div class="form-row" ng-class="{'has-error': errors.title != null}">
<label for="title" class="strong">Title:</label> <label for="title" class="strong">Title:</label>
<input ng-disabled="isSaving" ng-change="touchModel()" placeholder="Album Title" type="text" id="title" ng-model="album.title" /> <input ng-disabled="isSaving" ng-change="touchModel()" placeholder="Album Title" type="text" id="title" ng-model="album.title" />
<div class="error">{{errors.title}}</div> <div class="error">{{errors.title}}</div>
</div> </div>
<div class="form-row"> <div class="form-row">
<label for="description" class="strong">Description:</label> <label for="description" class="strong">Description:</label>
<textarea ng-disabled="isSaving" ng-change="touchModel()" placeholder="Description (optional)" id="description" ng-model="album.description"></textarea> <textarea ng-disabled="isSaving" ng-change="touchModel()" placeholder="Description (optional)" id="description" ng-model="album.description"></textarea>
<div class="error">{{errors.description}}</div> <div class="error">{{errors.description}}</div>
</div> </div>
<div class="form-row" ng-class="{'has-error': errors.cover != null}"> <div class="form-row" ng-class="{'has-error': errors.cover != null}">
<label class="strong">Album Cover: </label> <label class="strong">Album Cover: </label>
<pfm-image-upload set-image="setCover" image="album.cover" /> <pfm-image-upload set-image="setCover" image="album.cover" />
</div> </div>
<div class="form-row track-selector"> <div class="form-row track-selector">
<a pfm-popup="track-selector,right" href="#" class="btn btn-small pull-right btn-info">Add Tracks</a> <a pfm-popup="track-selector,right" href="#" class="btn btn-small pull-right btn-info">Add Tracks</a>
<label class="strong">Album Tracks</label> <label class="strong">Album Tracks</label>
<div id="track-selector" class="pfm-popup"> <div id="track-selector" class="pfm-popup">
<ul> <ul>
<li ng-repeat="track in data.tracksDb" ng-class="{selected: trackIds[track.id]}"> <li ng-repeat="track in data.tracksDb" ng-class="{selected: trackIds[track.id]}">
<a pfm-eat-click href="#" ng-click="toggleTrack(track); $event.stopPropagation();">{{track.title}}</a> <a pfm-eat-click href="#" ng-click="toggleTrack(track); $event.stopPropagation();">{{track.title}}</a>
</li> </li>
</ul> </ul>
</div> </div>
<ul class="album-track-listing" ui-sortable="{handle: '.handle', axis: 'y', forcePlaceholderSizeType: true, update: sortTracks}" ng-model="tracks"> <ul class="album-track-listing" ui-sortable="{handle: '.handle', axis: 'y', forcePlaceholderSizeType: true, update: sortTracks}" ng-model="tracks">
<li ng-repeat="track in tracks"> <li ng-repeat="track in tracks">
<div> <div>
<span class="btn btn-small pull-left handle"><i class="icon-sort"></i></span> <span class="btn btn-small pull-left handle"><i class="icon-sort"></i></span>
<a href="#" class="btn btn-small pull-right btn-danger" ng-click="toggleTrack(track)" pfm-eat-click><i class="icon-remove"></i></a> <a href="#" class="btn btn-small pull-right btn-danger" ng-click="toggleTrack(track)" pfm-eat-click><i class="icon-remove"></i></a>
<span>{{track.title}}</span> <span>{{track.title}}</span>
</div> </div>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
</form> </form>

View file

@ -1,28 +1,28 @@
<div> <div>
<ul class="dropdowns"> <ul class="dropdowns">
<li class="dropdown"> <li class="dropdown">
<a class="btn" href="/account/albums/create" ng-class="{'btn-primary': data.isEditorOpen && data.selectedAlbum == null}"> <a class="btn" href="/account/albums/create" ng-class="{'btn-primary': data.isEditorOpen && data.selectedAlbum == null}">
<i class="icon-plus"></i> Create Album <i class="icon-plus"></i> Create Album
</a> </a>
</li> </li>
</ul> </ul>
<div class="two-pane-view" ng-class="{open: data.isEditorOpen, closed: !data.isEditorOpen}"> <div class="two-pane-view" ng-class="{open: data.isEditorOpen, closed: !data.isEditorOpen}">
<div class="list"> <div class="list">
<ul class="account-albums-listing stretch-to-bottom"> <ul class="account-albums-listing stretch-to-bottom">
<li ng-repeat="album in albums" ng-class="{selected: album.id == data.selectedAlbum.id}"> <li ng-repeat="album in albums" ng-class="{selected: album.id == data.selectedAlbum.id}">
<a href="/account/albums/edit/{{album.id}}"> <a href="/account/albums/edit/{{album.id}}">
<img pfm-src-loader="album.covers.normal" pfm-src-size="normal" class="image" /> <img pfm-src-loader="album.covers.normal" pfm-src-size="normal" class="image" />
<span class="title">{{album.title}}</span> <span class="title">{{album.title}}</span>
<span class="published">{{album.created_at | pfmdate:'MM/dd/yyyy'}}</span> <span class="published">{{album.created_at | pfmdate:'MM/dd/yyyy'}}</span>
</a> </a>
</li> </li>
<li ng-show="!albums.length" class="empty"> <li ng-show="!albums.length" class="empty">
No albums found... No albums found...
</li> </li>
</ul> </ul>
</div> </div>
<ui-view class="editor"></ui-view> <ui-view class="editor"></ui-view>
</div> </div>
</div> </div>

View file

@ -1,22 +1,22 @@
<ul class="playlists stretch-to-bottom"> <ul class="playlists stretch-to-bottom">
<li ng-repeat="playlist in playlists"> <li ng-repeat="playlist in playlists">
<div class="btn-group"> <div class="btn-group">
<a href="#" pfm-eat-click class="btn btn-small" ng-click="togglePlaylistPin(playlist)" ng-class="{active: playlist.is_pinned, 'btn-primary': playlist.is_pinned}"> <a href="#" pfm-eat-click class="btn btn-small" ng-click="togglePlaylistPin(playlist)" ng-class="{active: playlist.is_pinned, 'btn-primary': playlist.is_pinned}">
<i class="icon-pushpin"></i> <i class="icon-pushpin"></i>
</a> </a>
<a href="#" pfm-eat-click class="btn btn-small" ng-click="editPlaylist(playlist)">Edit</a> <a href="#" pfm-eat-click class="btn btn-small" ng-click="editPlaylist(playlist)">Edit</a>
<a href="#" pfm-eat-click class="btn btn-small btn-danger" ng-click="deletePlaylist(playlist)">Delete</a> <a href="#" pfm-eat-click class="btn btn-small btn-danger" ng-click="deletePlaylist(playlist)">Delete</a>
</div> </div>
<a href="{{playlist.url}}" class="main"> <a href="{{playlist.url}}" class="main">
<span class="is-public"> <span class="is-public">
<span ng-show="playlist.is_public">Is Public</span> <span ng-show="playlist.is_public">Is Public</span>
<span ng-hide="playlist.is_public">Is Private</span> <span ng-hide="playlist.is_public">Is Private</span>
</span> </span>
<img ng-src="{{playlist.covers.small}}" /> <img ng-src="{{playlist.covers.small}}" />
<span class="title"> <span class="title">
{{playlist.title}} {{playlist.title}}
</span> </span>
</a> </a>
</li> </li>
</ul> </ul>

View file

@ -1,36 +1,36 @@
<form ng-submit="updateAccount()" class="pfm-form account-settings-form"> <form ng-submit="updateAccount()" class="pfm-form account-settings-form">
<ul class="toolbar"> <ul class="toolbar">
<li> <li>
<button type="submit" class="btn" ng-class="{disabled: !isDirty || isSaving, 'btn-primary': isDirty}"> <button type="submit" class="btn" ng-class="{disabled: !isDirty || isSaving, 'btn-primary': isDirty}">
Save Changes Save Changes
<i ng-show="isSaving" class="icon-cog icon-spin icon-large"></i> <i ng-show="isSaving" class="icon-cog icon-spin icon-large"></i>
</button> </button>
</li> </li>
</ul> </ul>
<div class="stretch-to-bottom"> <div class="stretch-to-bottom">
<div class="form-row" ng-class="{'has-error': errors.display_name != null}"> <div class="form-row" ng-class="{'has-error': errors.display_name != null}">
<label for="sync_names" class="strong"><input ng-disabled="isSaving" ng-change="touchModel();" id="sync_names" type="checkbox" ng-model="settings.sync_names" /> Sync my MLP Forums display name with Pony.fm</label> <label for="sync_names" class="strong"><input ng-disabled="isSaving" ng-change="touchModel();" id="sync_names" type="checkbox" ng-model="settings.sync_names" /> Sync my MLP Forums display name with Pony.fm</label>
<input type="text" ng-disabled="isSaving" ng-change="touchModel()" ng-show="!settings.sync_names" placeholder="Display Name" id="display_name" ng-model="settings.display_name" /> <input type="text" ng-disabled="isSaving" ng-change="touchModel()" ng-show="!settings.sync_names" placeholder="Display Name" id="display_name" ng-model="settings.display_name" />
<div ng-show="settings.sync_names" class="alert alert-info">Your current MLP Forums display name is <strong>{{settings.mlpforums_name}}</strong></div> <div ng-show="settings.sync_names" class="alert alert-info">Your current MLP Forums display name is <strong>{{settings.mlpforums_name}}</strong></div>
<div class="error">{{errors.display_name}}</div> <div class="error">{{errors.display_name}}</div>
</div> </div>
<div class="form-row"> <div class="form-row">
<label for="can_see_explicit_content" class="strong"><input ng-change="touchModel()" ng-disabled="isLoading" id="can_see_explicit_content" type="checkbox" ng-model="settings.can_see_explicit_content" /> Can See Explicit Content</label> <label for="can_see_explicit_content" class="strong"><input ng-change="touchModel()" ng-disabled="isLoading" id="can_see_explicit_content" type="checkbox" ng-model="settings.can_see_explicit_content" /> Can See Explicit Content</label>
</div> </div>
<div class="form-row" ng-class="{'has-error': errors.bio != null}"> <div class="form-row" ng-class="{'has-error': errors.bio != null}">
<label class="strong" for="bio">Bio</label> <label class="strong" for="bio">Bio</label>
<textarea id="bio" placeholder="bio (optional)" ng-model="settings.bio" ng-disabled="isLoading" ng-change="touchModel()"></textarea> <textarea id="bio" placeholder="bio (optional)" ng-model="settings.bio" ng-disabled="isLoading" ng-change="touchModel()"></textarea>
<div class="error">{{errors.description}}</div> <div class="error">{{errors.description}}</div>
</div> </div>
<div class="form-row" ng-class="{'has-error': errors.avatar != null || errors.gravatar != null}"> <div class="form-row" ng-class="{'has-error': errors.avatar != null || errors.gravatar != null}">
<label for="uses_gravatar" class="strong"> <label for="uses_gravatar" class="strong">
<input ng-change="touchModel()" ng-disabled="isLoading" id="uses_gravatar" type="checkbox" ng-model="settings.uses_gravatar" /> Use Gravatar <input ng-change="touchModel()" ng-disabled="isLoading" id="uses_gravatar" type="checkbox" ng-model="settings.uses_gravatar" /> Use Gravatar
</label> </label>
<div ng-show="!settings.uses_gravatar"> <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" />
</div> </div>
<input type="text" ng-disabled="isSaving" ng-change="touchModel()" ng-show="settings.uses_gravatar" placeholder="Gravatar Email" ng-model="settings.gravatar" /> <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> <div class="error" ng-show="errors.avatar != null">{{errors.avatar}}</div>
<div class="error" ng-show="errors.gravatar != null">{{errors.gravatar}}</div> <div class="error" ng-show="errors.gravatar != null">{{errors.gravatar}}</div>
</div> </div>
</form> </form>

View file

@ -1,120 +1,120 @@
<form novalidate ng-submit="updateTrack(edit)"> <form novalidate ng-submit="updateTrack(edit)">
<ul class="toolbar"> <ul class="toolbar">
<li> <li>
<button type="submit" class="btn" ng-class="{disabled: (data.selectedTrack.is_published && !isDirty) || isSaving, 'btn-primary': !data.selectedTrack.is_published || isDirty}"> <button type="submit" class="btn" ng-class="{disabled: (data.selectedTrack.is_published && !isDirty) || isSaving, 'btn-primary': !data.selectedTrack.is_published || isDirty}">
<span ng-show="edit.is_published"> <span ng-show="edit.is_published">
Save Changes Save Changes
</span> </span>
<span ng-hide="edit.is_published"> <span ng-hide="edit.is_published">
Publish Track Publish Track
</span> </span>
<i ng-show="isSaving" class="icon-cog icon-spin icon-large"></i> <i ng-show="isSaving" class="icon-cog icon-spin icon-large"></i>
</button> </button>
</li> </li>
<li class="delete"><a ng-class="{disabled: isSaving}" class="btn btn-danger" href="#" ng-click="deleteTrack(data.selectedTrack)" pfm-eat-click>Delete Track</a></li> <li class="delete"><a ng-class="{disabled: isSaving}" class="btn btn-danger" href="#" ng-click="deleteTrack(data.selectedTrack)" pfm-eat-click>Delete Track</a></li>
</ul> </ul>
<div class="stretch-to-bottom"> <div class="stretch-to-bottom">
<div class="form-row" ng-class="{'has-error': errors.title != null}"> <div class="form-row" ng-class="{'has-error': errors.title != null}">
<label for="title" class="strong">Title:</label> <label for="title" class="strong">Title:</label>
<input ng-disabled="isSaving" ng-change="touchModel()" placeholder="Track Title" type="text" id="title" ng-model="edit.title" /> <input ng-disabled="isSaving" ng-change="touchModel()" placeholder="Track Title" type="text" id="title" ng-model="edit.title" />
<div class="error">{{errors.title}}</div> <div class="error">{{errors.title}}</div>
</div> </div>
<div class="row-fluid"> <div class="row-fluid">
<div class="span6 form-row" ng-class="{'has-error': errors.description != null}"> <div class="span6 form-row" ng-class="{'has-error': errors.description != null}">
<label for="description" class="strong">Description:</label> <label for="description" class="strong">Description:</label>
<textarea ng-disabled="isSaving" ng-change="touchModel()" placeholder="Description (optional)" id="description" ng-model="edit.description"></textarea> <textarea ng-disabled="isSaving" ng-change="touchModel()" placeholder="Description (optional)" id="description" ng-model="edit.description"></textarea>
<div class="error">{{errors.description}}</div> <div class="error">{{errors.description}}</div>
</div> </div>
<div class="span6 form-row" ng-class="{'has-error': errors.lyrics != null}"> <div class="span6 form-row" ng-class="{'has-error': errors.lyrics != null}">
<label for="is_vocal" class="strong"><input ng-disabled="isSaving" ng-change="touchModel(); updateIsVocal()" id="is_vocal" type="checkbox" ng-model="edit.is_vocal" /> Is Vocal</label> <label for="is_vocal" class="strong"><input ng-disabled="isSaving" ng-change="touchModel(); updateIsVocal()" id="is_vocal" type="checkbox" ng-model="edit.is_vocal" /> Is Vocal</label>
<textarea ng-disabled="isSaving" ng-change="touchModel()" ng-show="edit.is_vocal" ng-animate="'fade'" placeholder="Lyrics (required)" id="lyrics" ng-model="edit.lyrics"></textarea> <textarea ng-disabled="isSaving" ng-change="touchModel()" ng-show="edit.is_vocal" ng-animate="'fade'" placeholder="Lyrics (required)" id="lyrics" ng-model="edit.lyrics"></textarea>
<div class="error">{{errors.lyrics}}</div> <div class="error">{{errors.lyrics}}</div>
<div class="error">{{errors.lyrics}}</div> <div class="error">{{errors.lyrics}}</div>
</div> </div>
</div> </div>
<div class="row-fluid"> <div class="row-fluid">
<div class="form-row span6" ng-class="{'has-error': errors.genre_id != null}"> <div class="form-row span6" ng-class="{'has-error': errors.genre_id != null}">
<label for="genre" class="strong">Genre:</label> <label for="genre" class="strong">Genre:</label>
<select ng-disabled="isSaving" id="genre" ng-change="touchModel()" ng-model="edit.genre_id" ng-options="genre.id as genre.name for genre in taxonomies.genres"> <select ng-disabled="isSaving" id="genre" ng-change="touchModel()" ng-model="edit.genre_id" ng-options="genre.id as genre.name for genre in taxonomies.genres">
<option value="">Please select a genre...</option> <option value="">Please select a genre...</option>
</select> </select>
<div class="error">{{errors.genre_id}}</div> <div class="error">{{errors.genre_id}}</div>
</div> </div>
<div class="form-row span6" ng-class="{'has-error': errors.track_type_id != null}"> <div class="form-row span6" ng-class="{'has-error': errors.track_type_id != null}">
<label for="track_type" class="strong">This track is...</label> <label for="track_type" class="strong">This track is...</label>
<select ng-disabled="isSaving" id="track_type" ng-change="touchModel()" ng-model="edit.track_type_id" ng-options="type.id as type.editor_title for type in taxonomies.trackTypes"> <select ng-disabled="isSaving" id="track_type" ng-change="touchModel()" ng-model="edit.track_type_id" ng-options="type.id as type.editor_title for type in taxonomies.trackTypes">
<option value="">Please select a type...</option> <option value="">Please select a type...</option>
</select> </select>
<div class="error">{{errors.track_type_id}}</div> <div class="error">{{errors.track_type_id}}</div>
</div> </div>
</div> </div>
<div class="row-fluid"> <div class="row-fluid">
<div class="form-row album span6" ng-class="{'has-error': errors.album_id != null}"> <div class="form-row album span6" ng-class="{'has-error': errors.album_id != null}">
<a pfm-popup="album-selector" href="#" class="btn btn-small"> <a pfm-popup="album-selector" href="#" class="btn btn-small">
Album: Album:
<strong ng-show="selectedAlbum">{{selectedAlbum.title}}</strong> <strong ng-show="selectedAlbum">{{selectedAlbum.title}}</strong>
<strong ng-hide="selectedAlbum">None</strong> <strong ng-hide="selectedAlbum">None</strong>
</a> </a>
<div id="album-selector" class="pfm-popup"> <div id="album-selector" class="pfm-popup">
<ul> <ul>
<li ng-class="{selected: selectedAlbum == null}"> <li ng-class="{selected: selectedAlbum == null}">
<a pfm-eat-click href="#" ng-click="selectAlbum(null);">None</a> <a pfm-eat-click href="#" ng-click="selectAlbum(null);">None</a>
</li> </li>
<li ng-repeat="album in albums" ng-class="{selected: selectedAlbum.id == album.id}"> <li ng-repeat="album in albums" ng-class="{selected: selectedAlbum.id == album.id}">
<a pfm-eat-click href="#" ng-click="selectAlbum(album);">{{album.title}}</a> <a pfm-eat-click href="#" ng-click="selectAlbum(album);">{{album.title}}</a>
</li> </li>
</ul> </ul>
</div> </div>
<div class="error">{{errors.album_id}}</div> <div class="error">{{errors.album_id}}</div>
</div> </div>
<div class="form-row show-songs span6" ng-show="edit.track_type_id == 2" ng-class="{'has-error': errors.show_song_ids != null}"> <div class="form-row show-songs span6" ng-show="edit.track_type_id == 2" ng-class="{'has-error': errors.show_song_ids != null}">
<a pfm-popup="song-selector" href="#" class="btn btn-small">Show Songs: <strong>{{selectedSongsTitle}}</strong></a> <a pfm-popup="song-selector" href="#" class="btn btn-small">Show Songs: <strong>{{selectedSongsTitle}}</strong></a>
<div id="song-selector" class="pfm-popup"> <div id="song-selector" class="pfm-popup">
<ul> <ul>
<li ng-repeat="song in taxonomies.showSongs" ng-class="{selected: selectedSongs[song.id]}"> <li ng-repeat="song in taxonomies.showSongs" ng-class="{selected: selectedSongs[song.id]}">
<a pfm-eat-click href="#" ng-click="toggleSong(song); $event.stopPropagation();">{{song.title}}</a> <a pfm-eat-click href="#" ng-click="toggleSong(song); $event.stopPropagation();">{{song.title}}</a>
</li> </li>
</ul> </ul>
</div> </div>
<div class="error">{{errors.show_song_ids}}</div> <div class="error">{{errors.show_song_ids}}</div>
</div> </div>
</div> </div>
<div class="row-fluid"> <div class="row-fluid">
<div class="form-row span6" ng-class="{'has-error': errors.cover != null}"> <div class="form-row span6" ng-class="{'has-error': errors.cover != null}">
<label class="strong">Track Cover: </label> <label class="strong">Track Cover: </label>
<pfm-image-upload set-image="setCover" image="edit.cover" /> <pfm-image-upload set-image="setCover" image="edit.cover" />
</div> </div>
<div class="form-row span6" ng-class="{'has-error': errors.released_at != null}"> <div class="form-row span6" ng-class="{'has-error': errors.released_at != null}">
<label for="released_at" class="strong">Release Date:</label> <label for="released_at" class="strong">Release Date:</label>
<input ng-disabled="isSaving" type="text" id="released_at" ui-date ng-model="edit.released_at" ng-change="touchModel()" ui-date-format="yy-mm-dd" /> <input ng-disabled="isSaving" type="text" id="released_at" ui-date ng-model="edit.released_at" ng-change="touchModel()" ui-date-format="yy-mm-dd" />
<div class="error">{{errors.released_at}}</div> <div class="error">{{errors.released_at}}</div>
</div> </div>
</div> </div>
<div class="row-fluid"> <div class="row-fluid">
<div class="span4 form-row"> <div class="span4 form-row">
<label for="is_explicit"><input ng-disabled="isSaving" ng-change="touchModel()" id="is_explicit" type="checkbox" ng-model="edit.is_explicit" /> Contains Explicit Content</label> <label for="is_explicit"><input ng-disabled="isSaving" ng-change="touchModel()" id="is_explicit" type="checkbox" ng-model="edit.is_explicit" /> Contains Explicit Content</label>
</div> </div>
<div class="span4 form-row"> <div class="span4 form-row">
<label for="is_downloadable"><input ng-disabled="isSaving" ng-change="touchModel()" id="is_downloadable" type="checkbox" ng-model="edit.is_downloadable" /> Is Downloadable</label> <label for="is_downloadable"><input ng-disabled="isSaving" ng-change="touchModel()" id="is_downloadable" type="checkbox" ng-model="edit.is_downloadable" /> Is Downloadable</label>
</div> </div>
<div class="span4 form-row"> <div class="span4 form-row">
<label for="is_listed"><input ng-disabled="isSaving" ng-change="touchModel()" id="is_listed" type="checkbox" ng-model="edit.is_listed" /> Is Listed</label> <label for="is_listed"><input ng-disabled="isSaving" ng-change="touchModel()" id="is_listed" type="checkbox" ng-model="edit.is_listed" /> Is Listed</label>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<label class="strong">Choose a License:</label> <label class="strong">Choose a License:</label>
<ul class="license-grid"> <ul class="license-grid">
<li ng-repeat="license in taxonomies.licenses" ng-class="{selected: edit.license_id == license.id}"> <li ng-repeat="license in taxonomies.licenses" ng-class="{selected: edit.license_id == license.id}">
<div ng-click="edit.license_id = license.id; touchModel()"> <div ng-click="edit.license_id = license.id; touchModel()">
<strong>{{license.title}}</strong> <strong>{{license.title}}</strong>
<p>{{license.description}}</p> <p>{{license.description}}</p>
<a href="#" pfm-eat-click class="btn" ng-class="{'btn-primary': edit.license_id == license.id, 'disabled': isSaving}"> <a href="#" pfm-eat-click class="btn" ng-class="{'btn-primary': edit.license_id == license.id, 'disabled': isSaving}">
<span ng-hide="edit.license_id == license.id">Select</span> <span ng-hide="edit.license_id == license.id">Select</span>
<span ng-show="edit.license_id == license.id">Selected</span> <span ng-show="edit.license_id == license.id">Selected</span>
</a> </a>
</div> </div>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
</form> </form>

View file

@ -1,15 +1,15 @@
<div class="two-pane-view" ng-class="{open: data.selectedTrack != null, closed: data.selectedTrack == null}"> <div class="two-pane-view" ng-class="{open: data.selectedTrack != null, closed: data.selectedTrack == null}">
<div class="list"> <div class="list">
<ul class="account-tracks-listing stretch-to-bottom"> <ul class="account-tracks-listing stretch-to-bottom">
<li ng-repeat="track in tracks" ng-class="{selected: track.id == data.selectedTrack.id, 'is-not-published': !track.is_published}"> <li ng-repeat="track in tracks" ng-class="{selected: track.id == data.selectedTrack.id, 'is-not-published': !track.is_published}">
<a href="/account/tracks/edit/{{track.id}}" ng-click="selectTrack(track)"> <a href="/account/tracks/edit/{{track.id}}" ng-click="selectTrack(track)">
<img class="image" ng-src="{{track.cover_url}}" /> <img class="image" ng-src="{{track.cover_url}}" />
<span class="title">{{track.title}}</span> <span class="title">{{track.title}}</span>
<span class="published">{{track.created_at | pfmdate:'MM/dd/yyyy'}}</span> <span class="published">{{track.created_at | pfmdate:'MM/dd/yyyy'}}</span>
</a> </a>
</li> </li>
</ul> </ul>
</div> </div>
<ui-view class="editor"></ui-view> <ui-view class="editor"></ui-view>
</div> </div>

View file

@ -1,11 +1,11 @@
<div class="pagination" ng-show="totalPages > 1"> <div class="pagination" ng-show="totalPages > 1">
<ul> <ul>
<li ng-class="{disabled: !prevPage}"><a href="#" ng-click="gotoPage(prevPage);" pfm-eat-click>Prev</a></li> <li ng-class="{disabled: !prevPage}"><a href="#" ng-click="gotoPage(prevPage);" pfm-eat-click>Prev</a></li>
<li ng-repeat="page in pages" ng-class="{active: page == currentPage}"> <li ng-repeat="page in pages" ng-class="{active: page == currentPage}">
<a href="#" ng-click="gotoPage(page);" pfm-eat-click>{{page}}</a> <a href="#" ng-click="gotoPage(page);" pfm-eat-click>{{page}}</a>
</li> </li>
<li ng-class="{disabled: !nextPage}"><a href="#" ng-click="gotoPage(nextPage);" pfm-eat-click>Next</a></li> <li ng-class="{disabled: !nextPage}"><a href="#" ng-click="gotoPage(nextPage);" pfm-eat-click>Next</a></li>
</ul> </ul>
</div> </div>
<ui-view></ui-view> <ui-view></ui-view>

View file

@ -1,3 +1,3 @@
<div class="stretch-to-bottom"> <div class="stretch-to-bottom">
<pfm-albums-list albums="albums"></pfm-albums-list> <pfm-albums-list albums="albums"></pfm-albums-list>
</div> </div>

View file

@ -1,53 +1,53 @@
<div class="resource-details album-details" bindonce="album"> <div class="resource-details album-details" bindonce="album">
<ul class="dropdowns"> <ul class="dropdowns">
<li class="dropdown"> <li class="dropdown">
<a href="#" class="btn btn-small btn-info dropdown-toggle" ng-disabled="album.is_downloadable == 0"> <a href="#" class="btn btn-small btn-info dropdown-toggle" ng-disabled="album.is_downloadable == 0">
Downloads Downloads
</a> </a>
<ul class="dropdown-menu" ng-show="album.is_downloadable == 1"> <ul class="dropdown-menu" ng-show="album.is_downloadable == 1">
<li bindonce ng-repeat="format in album.formats"><a target="_blank" bo-href="format.url"><span bo-text="format.name"></span> <small bo-text="'(' + format.size + ')'"></small></a></li> <li bindonce ng-repeat="format in album.formats"><a target="_blank" bo-href="format.url"><span bo-text="format.name"></span> <small bo-text="'(' + format.size + ')'"></small></a></li>
</ul> </ul>
</li> </li>
<li><a href="#" class="btn" pfm-eat-click ng-click="share()">Share</a></li> <li><a href="#" class="btn" pfm-eat-click ng-click="share()">Share</a></li>
<li><pfm-favourite-button resource="album" type="album"></pfm-favourite-button></li> <li><pfm-favourite-button resource="album" type="album"></pfm-favourite-button></li>
<li bo-show="album.permissions.edit"><a class="btn btn-small" bo-href="'/account/albums/edit/' + album.id">Edit</a></li> <li bo-show="album.permissions.edit"><a class="btn btn-small" bo-href="'/account/albums/edit/' + album.id">Edit</a></li>
</ul> </ul>
<header> <header>
<h1 bo-text="album.title"></h1> <h1 bo-text="album.title"></h1>
<h2> <h2>
by: <a bo-href="album.user.url" bo-text="album.user.name"></a> by: <a bo-href="album.user.url" bo-text="album.user.name"></a>
</h2> </h2>
</header> </header>
<div class="stretch-to-bottom details-columns"> <div class="stretch-to-bottom details-columns">
<div class="right"> <div class="right">
<img class="cover" pfm-src-loader="album.covers.normal" pfm-src-size="normal" /> <img class="cover" pfm-src-loader="album.covers.normal" pfm-src-size="normal" />
<div class="share-buttons" pfm-share-buttons> <div class="share-buttons" pfm-share-buttons>
<a class="tumblr" bo-href="album.share.tumblrUrl" title="Share on Tumblr" style="display:inline-block; overflow:hidden; width:20px; height:20px; background:url('/images/tumblr-share.png') top left no-repeat transparent;"></a> <a class="tumblr" bo-href="album.share.tumblrUrl" title="Share on Tumblr" style="display:inline-block; overflow:hidden; width:20px; height:20px; background:url('/images/tumblr-share.png') top left no-repeat transparent;"></a>
<div class="facebook fb-like" data-href="{{album.url}}" data-width="450" data-layout="button_count" data-show-faces="true" data-send="false"></div> <div class="facebook fb-like" data-href="{{album.url}}" data-width="450" data-layout="button_count" data-show-faces="true" data-send="false"></div>
<iframe class="twitter" allowtransparency="true" frameborder="0" scrolling="no" bo-src="album.share.twitterUrl" style="width:130px; height:20px;"></iframe> <iframe class="twitter" allowtransparency="true" frameborder="0" scrolling="no" bo-src="album.share.twitterUrl" style="width:130px; height:20px;"></iframe>
</div> </div>
<ul class="stats"> <ul class="stats">
<li>Published: <strong bo-text="album.created_at | pfmdate:'medium'"></strong></li> <li>Published: <strong bo-text="album.created_at | pfmdate:'medium'"></strong></li>
<li>Views: <strong bo-text="album.stats.views"></strong></li> <li>Views: <strong bo-text="album.stats.views"></strong></li>
<li>Downloads: <strong bo-text="album.stats.downloads"></strong></li> <li>Downloads: <strong bo-text="album.stats.downloads"></strong></li>
<li>Favourites: <strong bo-text="album.stats.favourites"></strong></li> <li>Favourites: <strong bo-text="album.stats.favourites"></strong></li>
</ul> </ul>
</div> </div>
<div class="left"> <div class="left">
<div class="description" bo-show="album.description.length"> <div class="description" bo-show="album.description.length">
<h2>Description</h2> <h2>Description</h2>
<p bo-html="album.description | noHTML | newlines"></p> <p bo-html="album.description | noHTML | newlines"></p>
</div> </div>
<h2>Tracks</h2> <h2>Tracks</h2>
<pfm-tracks-list tracks="album.tracks" class="condensed no-artist"></pfm-tracks-list> <pfm-tracks-list tracks="album.tracks" class="condensed no-artist"></pfm-tracks-list>
<pfm-comments type="album" resource="album"></pfm-comments> <pfm-comments type="album" resource="album"></pfm-comments>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,21 +1,21 @@
<div class="resource-details artist-details" ng-class="{'x-archived': artist.is_archived}" bindonce="artist"> <div class="resource-details artist-details" ng-class="{'x-archived': artist.is_archived}" bindonce="artist">
<ul class="dropdowns"> <ul class="dropdowns">
<li class="dropdown"> <li class="dropdown">
<a href="#" class="btn btn-small" ng-class="{'btn-primary': !artist.user_data.is_following}" ng-show="auth.isLogged && auth.user.id != artist.id" pfm-eat-click ng-click="toggleFollow()"> <a href="#" class="btn btn-small" ng-class="{'btn-primary': !artist.user_data.is_following}" ng-show="auth.isLogged && auth.user.id != artist.id" pfm-eat-click ng-click="toggleFollow()">
<span ng-hide="artist.user_data.is_following">Follow</span> <span ng-hide="artist.user_data.is_following">Follow</span>
<span ng-show="artist.user_data.is_following">Following!</span> <span ng-show="artist.user_data.is_following">Following!</span>
</a> </a>
</li> </li>
</ul> </ul>
<header> <header>
<h1 bo-text="artist.name"></h1> <h1 bo-text="artist.name"></h1>
<ul class="tabs"> <ul class="tabs">
<li ng-class="{active: stateIncludes('content.artist.profile')}"><a href="{{artist.slug}}">Profile</a></li> <li ng-class="{active: stateIncludes('content.artist.profile')}"><a href="{{artist.slug}}">Profile</a></li>
<li ng-class="{active: stateIncludes('content.artist.content')}"><a href="{{artist.slug}}/content">Content</a></li> <li ng-class="{active: stateIncludes('content.artist.content')}"><a href="{{artist.slug}}/content">Content</a></li>
<li ng-hide="artist.is_archived" ng-class="{active: stateIncludes('content.artist.favourites')}"><a href="{{artist.slug}}/favourites">Favourites</a></li> <li ng-hide="artist.is_archived" ng-class="{active: stateIncludes('content.artist.favourites')}"><a href="{{artist.slug}}/favourites">Favourites</a></li>
</ul> </ul>
</header> </header>
<div class="stretch-to-bottom"> <div class="stretch-to-bottom">
<ui-view></ui-view> <ui-view></ui-view>
</div> </div>
</div> </div>

View file

@ -1,14 +1,14 @@
<div ng-show="content.albums.length"> <div ng-show="content.albums.length">
<h2>Albums</h2> <h2>Albums</h2>
<pfm-albums-list albums="content.albums"></pfm-albums-list> <pfm-albums-list albums="content.albums"></pfm-albums-list>
</div> </div>
<div ng-show="content.singles.length"> <div ng-show="content.singles.length">
<h2>Singles</h2> <h2>Singles</h2>
<pfm-tracks-list tracks="content.singles" class="four-columns no-artist"></pfm-tracks-list> <pfm-tracks-list tracks="content.singles" class="four-columns no-artist"></pfm-tracks-list>
</div> </div>
<div ng-show="content.albumTracks.length"> <div ng-show="content.albumTracks.length">
<h2>Part of an Album</h2> <h2>Part of an Album</h2>
<pfm-tracks-list tracks="content.albumTracks" class="four-columns no-artist"></pfm-tracks-list> <pfm-tracks-list tracks="content.albumTracks" class="four-columns no-artist"></pfm-tracks-list>
</div> </div>

View file

@ -1,10 +1,10 @@
<div class="row-fluid"> <div class="row-fluid">
<div class="span6"> <div class="span6">
<h2>Tracks</h2> <h2>Tracks</h2>
<pfm-tracks-list tracks="favourites.tracks"></pfm-tracks-list> <pfm-tracks-list tracks="favourites.tracks"></pfm-tracks-list>
</div> </div>
<div class="span6"> <div class="span6">
<h2>Albums</h2> <h2>Albums</h2>
<pfm-albums-list albums="favourites.albums" class="two-columns"></pfm-albums-list> <pfm-albums-list albums="favourites.albums" class="two-columns"></pfm-albums-list>
</div> </div>
</div> </div>

View file

@ -1,11 +1,11 @@
<div class="pagination" ng-show="totalPages > 1"> <div class="pagination" ng-show="totalPages > 1">
<ul> <ul>
<li ng-class="{disabled: !prevPage}"><a href="#" ng-click="gotoPage(prevPage);" pfm-eat-click>Prev</a></li> <li ng-class="{disabled: !prevPage}"><a href="#" ng-click="gotoPage(prevPage);" pfm-eat-click>Prev</a></li>
<li ng-repeat="page in pages" ng-class="{active: page == currentPage}"> <li ng-repeat="page in pages" ng-class="{active: page == currentPage}">
<a href="#" ng-click="gotoPage(page);" pfm-eat-click>{{page}}</a> <a href="#" ng-click="gotoPage(page);" pfm-eat-click>{{page}}</a>
</li> </li>
<li ng-class="{disabled: !nextPage}"><a href="#" ng-click="gotoPage(nextPage);" pfm-eat-click>Next</a></li> <li ng-class="{disabled: !nextPage}"><a href="#" ng-click="gotoPage(nextPage);" pfm-eat-click>Next</a></li>
</ul> </ul>
</div> </div>
<ui-view></ui-view> <ui-view></ui-view>

View file

@ -1,21 +1,21 @@
<div class="stretch-to-bottom"> <div class="stretch-to-bottom">
<ul class="artist-listing"> <ul class="artist-listing">
<li class="artist" ng-class="{'x-archived': artist.is_archived}" ng-repeat="artist in artists" bindonce> <li class="artist" ng-class="{'x-archived': artist.is_archived}" ng-repeat="artist in artists" bindonce>
<a href="{{artist.url}}"> <a href="{{artist.url}}">
<img class="image" pfm-src-loader="artist.avatars.small" pfm-src-size="small" /> <img class="image" pfm-src-loader="artist.avatars.small" pfm-src-size="small" />
<span class="info"> <span class="info">
<span class="title" bo-text="artist.name"></span> <span class="title" bo-text="artist.name"></span>
<span ng-hide="artist.is_archived" class="published"> <span ng-hide="artist.is_archived" class="published">
joined <span bo-text="artist.created_at.date | momentFromNow"></span> joined <span bo-text="artist.created_at.date | momentFromNow"></span>
</span> </span>
<span ng-show="artist.is_archived" class="published"> <span ng-show="artist.is_archived" class="published">
archived artist archived artist
</span> </span>
</span> </span>
</a> </a>
</li> </li>
<li ng-show="!artists.length" class="empty"> <li ng-show="!artists.length" class="empty">
No artists found... No artists found...
</li> </li>
</ul> </ul>
</div> </div>

View file

@ -1,16 +1,16 @@
<div class="row-fluid"> <div class="row-fluid">
<div class="span6"> <div class="span6">
<div bo-show="artist.bio.trim().length"> <div bo-show="artist.bio.trim().length">
<h2>Bio</h2> <h2>Bio</h2>
<div class="description"> <div class="description">
<p bo-html="artist.bio | noHTML | newlines"></p> <p bo-html="artist.bio | noHTML | newlines"></p>
</div> </div>
</div> </div>
<pfm-comments type="user" resource="artist"></pfm-comments> <pfm-comments type="user" resource="artist"></pfm-comments>
</div> </div>
<div class="span6 cover-image"> <div class="span6 cover-image">
<h2>Recent Tracks</h2> <h2>Recent Tracks</h2>
<pfm-tracks-list tracks="artist.latest_tracks" class="two-columns no-artist" /> <pfm-tracks-list tracks="artist.latest_tracks" class="two-columns no-artist" />
</div> </div>
</div> </div>

View file

@ -1,7 +1,7 @@
<div> <div>
<h1>Login</h1> <h1>Login</h1>
<div class="alert"> <div class="alert">
Only user accounts that were created as of the launch of the pre-release will be available. Only user accounts that were created as of the launch of the pre-release will be available.
</div> </div>
<ng-include src="'/templates/partials/auth/login.html'" /> <ng-include src="'/templates/partials/auth/login.html'" />
</div> </div>

View file

@ -1,4 +1,4 @@
<div> <div>
<h1>Register!</h1> <h1>Register!</h1>
<ng-include src="'/templates/partials/auth/register.html'" /> <ng-include src="'/templates/partials/auth/register.html'" />
</div> </div>

View file

@ -1,8 +1,8 @@
<ul class="tabs"> <ul class="tabs">
<li ng-class="{active: stateIncludes('content.tracks') || stateIncludes('content.track')}"><a href="/tracks">Tracks</a></li> <li ng-class="{active: stateIncludes('content.tracks') || stateIncludes('content.track')}"><a href="/tracks">Tracks</a></li>
<li ng-class="{active: stateIncludes('content.albums') || stateIncludes('content.album')}"><a href="/albums">Albums</a></li> <li ng-class="{active: stateIncludes('content.albums') || stateIncludes('content.album')}"><a href="/albums">Albums</a></li>
<li ng-class="{active: stateIncludes('content.playlists') || stateIncludes('content.playlist')}"><a href="/playlists">Playlists</a></li> <li ng-class="{active: stateIncludes('content.playlists') || stateIncludes('content.playlist')}"><a href="/playlists">Playlists</a></li>
<li ng-class="{active: stateIncludes('content.artists') || stateIncludes('content.artist')}"><a href="/artists">Artists</a></li> <li ng-class="{active: stateIncludes('content.artists') || stateIncludes('content.artist')}"><a href="/artists">Artists</a></li>
</ul> </ul>
<ui-view></ui-view> <ui-view></ui-view>

View file

@ -1,24 +1,24 @@
<div class="dashboard stretch-to-bottom"> <div class="dashboard stretch-to-bottom">
<section class="recent-tracks"> <section class="recent-tracks">
<h1> <h1>
<a href="/tracks"><i class="icon-music"></i> see more</a> <a href="/tracks"><i class="icon-music"></i> see more</a>
The newest tunes The newest tunes
</h1> </h1>
<pfm-tracks-list tracks="recentTracks" class="two-columns"></pfm-tracks-list> <pfm-tracks-list tracks="recentTracks" class="two-columns"></pfm-tracks-list>
</section> </section>
<section class="popular-tracks"> <section class="popular-tracks">
<h1> <h1>
What's popular today What's popular today
</h1> </h1>
<pfm-tracks-list tracks="popularTracks" class="two-columns"></pfm-tracks-list> <pfm-tracks-list tracks="popularTracks" class="two-columns"></pfm-tracks-list>
</section> </section>
<section class="news"> <section class="news">
<h1> <h1>
<a href="https://twitter.com/ponyfm" target="_blank">follow @ponyfm</a> <a href="https://twitter.com/ponyfm" target="_blank">follow @ponyfm</a>
Pony.fm news Pony.fm news
</h1> </h1>
<a class="twitter-timeline" href="https://twitter.com/ponyfm" data-widget-id="644195953956798464">Tweets by <a class="twitter-timeline" href="https://twitter.com/ponyfm" data-widget-id="644195953956798464">Tweets by
@ponyfm</a> @ponyfm</a>
<script>!function (d, s, id) { <script>!function (d, s, id) {
@ -30,5 +30,5 @@
fjs.parentNode.insertBefore(js, fjs); fjs.parentNode.insertBefore(js, fjs);
} }
}(document, "script", "twitter-wjs");</script> }(document, "script", "twitter-wjs");</script>
</section> </section>
</div> </div>

View file

@ -1,21 +1,21 @@
<ul class="albums-listing {{class}}"> <ul class="albums-listing {{class}}">
<li ng-repeat="album in albums" bindonce> <li ng-repeat="album in albums" bindonce>
<a bo-href="album.url"> <a bo-href="album.url">
<img class="image" pfm-src-loader="album.covers.small" pfm-src-size="small" /> <img class="image" pfm-src-loader="album.covers.small" pfm-src-size="small" />
<span class="info"> <span class="info">
<span class="title" bo-text="album.title"></span> <span class="title" bo-text="album.title"></span>
<span class="published"> <span class="published">
by <span bo-text="album.user.name"></span> by <span bo-text="album.user.name"></span>
</span> </span>
<span class="stats"> <span class="stats">
<strong bo-text="album.stats.favourites"></strong> <i class="icon-star"></i> <strong bo-text="album.stats.favourites"></strong> <i class="icon-star"></i>
<strong bo-text="album.stats.comments"></strong> <i class="icon-comment"></i> <strong bo-text="album.stats.comments"></strong> <i class="icon-comment"></i>
<strong bo-text="album.stats.downloads"></strong> <i class="icon-download"></i> <strong bo-text="album.stats.downloads"></strong> <i class="icon-download"></i>
</span> </span>
</span> </span>
</a> </a>
</li> </li>
<li ng-show="!albums.length" class="empty"> <li ng-show="!albums.length" class="empty">
No albums found... No albums found...
</li> </li>
</ul> </ul>

View file

@ -1,22 +1,22 @@
<div class="comments" bindonce> <div class="comments" bindonce>
<h2>All Comments ({{resource.comments.length}})</h2> <h2>All Comments ({{resource.comments.length}})</h2>
<form class="pfm-form" ng-submit="addComment()" ng-show="auth.isLogged"> <form class="pfm-form" ng-submit="addComment()" ng-show="auth.isLogged">
<div class="form-row"> <div class="form-row">
<input type="text" ng-model="content" placeholder="Write a comment..." /> <input type="text" ng-model="content" placeholder="Write a comment..." />
</div> </div>
</form> </form>
<ul> <ul>
<li ng-show="resource.comments.length == 0" class="empty"> <li ng-show="resource.comments.length == 0" class="empty">
There are no comments yet! There are no comments yet!
</li> </li>
<li bindonce ng-repeat="comment in resource.comments"> <li bindonce ng-repeat="comment in resource.comments">
<img pfm-src-loader="comment.user.avatars.thumbnail" pfm-src-size="thumbnail" /> <img pfm-src-loader="comment.user.avatars.thumbnail" pfm-src-size="thumbnail" />
<div class="content"> <div class="content">
<a bo-href="comment.user.url" bo-text="comment.user.name"></a> <a bo-href="comment.user.url" bo-text="comment.user.name"></a>
<span bo-text="comment.content"></span> <span bo-text="comment.content"></span>
<div class="meta" bo-text="comment.created_at.date | momentFromNow"> <div class="meta" bo-text="comment.created_at.date | momentFromNow">
</div> </div>
</div> </div>
</li> </li>
</ul> </ul>
</div> </div>

View file

@ -1,10 +1,10 @@
<a href="#" class="btn btn-small favourite-button" ng-class="{'is-favourited': resource.is_favourited, disabled: isWorking}" pfm-eat-click ng-click="toggleFavourite()" ng-show="auth.isLogged"> <a href="#" class="btn btn-small favourite-button" ng-class="{'is-favourited': resource.is_favourited, disabled: isWorking}" pfm-eat-click ng-click="toggleFavourite()" ng-show="auth.isLogged">
<span ng-hide="resource.user_data.is_favourited"> <span ng-hide="resource.user_data.is_favourited">
Favourite This! Favourite This!
<i class="icon-star-empty"></i> <i class="icon-star-empty"></i>
</span> </span>
<span ng-show="resource.user_data.is_favourited"> <span ng-show="resource.user_data.is_favourited">
In Your Favourites In Your Favourites
<i class="icon-star"></i> <i class="icon-star"></i>
</span> </span>
</a> </a>

View file

@ -1,20 +1,20 @@
<div class="image-upload" ng-class="{'has-error': error != null}"> <div class="image-upload" ng-class="{'has-error': error != null}">
<div class="preview" ng-class="{canOpen: isImageLoaded}" ng-click="previewImage()"><img ng-show="isImageLoaded" /></div> <div class="preview" ng-class="{canOpen: isImageLoaded}" ng-click="previewImage()"><img ng-show="isImageLoaded" /></div>
<p> <p>
Image must be a PNG that is at least 350x350. <br /> Image must be a PNG that is at least 350x350. <br />
<input type="file" onchange="angular.element(this).scope().setImageFile(this)" /> <input type="file" onchange="angular.element(this).scope().setImageFile(this)" />
</p> </p>
<div class="btn-group"> <div class="btn-group">
<a href="#" pfm-popup="image-selector" class="btn btn-small"><i class="icon-picture"></i> Gallery</a> <a href="#" pfm-popup="image-selector" class="btn btn-small"><i class="icon-picture"></i> Gallery</a>
<a href="#" pfm-eat-click ng-click="uploadImage()" class="btn btn-info btn-small"><i class="icon-upload"></i> Upload</a> <a href="#" pfm-eat-click ng-click="uploadImage()" class="btn btn-info btn-small"><i class="icon-upload"></i> Upload</a>
<a href="#" pfm-eat-click ng-click="clearImage()" class="btn btn-danger btn-small" ng-show="isImageLoaded"><i class="icon-remove"></i></a> <a href="#" pfm-eat-click ng-click="clearImage()" class="btn btn-danger btn-small" ng-show="isImageLoaded"><i class="icon-remove"></i></a>
</div> </div>
<div id="image-selector" class="pfm-popup image-selector"> <div id="image-selector" class="pfm-popup image-selector">
<ul> <ul>
<li ng-repeat="image in images" ng-click="selectGalleryImage(image)"> <li ng-repeat="image in images" ng-click="selectGalleryImage(image)">
<img ng-src="{{image.urls.small}}" /> <img ng-src="{{image.urls.small}}" />
</li> </li>
</ul> </ul>
</div> </div>
<div class="error" ng-show="error != null">{{error}}</div> <div class="error" ng-show="error != null">{{error}}</div>
</div> </div>

View file

@ -1,38 +1,38 @@
<div class="track-player" ng-show="player.isPlaying"> <div class="track-player" ng-show="player.isPlaying">
<ul class="buttons"> <ul class="buttons">
<li class="status"> <li class="status">
<strong>{{player.currentTrack.progressSeconds | secondsDisplay}}</strong> / <strong>{{player.currentTrack.progressSeconds | secondsDisplay}}</strong> /
<strong>{{player.currentTrack.duration | secondsDisplay}}</strong> <strong>{{player.currentTrack.duration | secondsDisplay}}</strong>
</li> </li>
<li ng-class="{disabled: !player.canGoPrev}"><a pfm-eat-click ng-click="playPrev()" class="previous" href="#"><i class="icon-fast-backward"></i></a></li> <li ng-class="{disabled: !player.canGoPrev}"><a pfm-eat-click ng-click="playPrev()" class="previous" href="#"><i class="icon-fast-backward"></i></a></li>
<li> <li>
<a pfm-eat-click ng-click="playPause()" class="play" href="#"> <a pfm-eat-click ng-click="playPause()" class="play" href="#">
<i class="icon-pause" ng-show="player.currentTrack.isPlaying"></i> <i class="icon-pause" ng-show="player.currentTrack.isPlaying"></i>
<i class="icon-play" ng-hide="player.currentTrack.isPlaying"></i> <i class="icon-play" ng-hide="player.currentTrack.isPlaying"></i>
</a> </a>
</li> </li>
<li ng-class="{disabled: !player.canGoNext}"><a pfm-eat-click ng-click="playNext()" class="next" href="#"><i class="icon-fast-forward"></i></a></li> <li ng-class="{disabled: !player.canGoNext}"><a pfm-eat-click ng-click="playNext()" class="next" href="#"><i class="icon-fast-forward"></i></a></li>
<li class="volume"> <li class="volume">
<a pfm-eat-click ng-click="" class="volume" href="#"> <a pfm-eat-click ng-click="" class="volume" href="#">
<i class="icon-volume-up"></i> <i class="icon-volume-up"></i>
</a> </a>
<div class="volume-slider"> <div class="volume-slider">
<div class="bar"><a href="#" class="knob">&nbsp;</a></div> <div class="bar"><a href="#" class="knob">&nbsp;</a></div>
</div> </div>
</li> </li>
</ul> </ul>
<div class="image"> <div class="image">
<div class="loader" ng-class="{showing: player.currentTrack.loadingProgress == 0}"><i class="icon-spin icon-rotate-right"></i></div> <div class="loader" ng-class="{showing: player.currentTrack.loadingProgress == 0}"><i class="icon-spin icon-rotate-right"></i></div>
<img pfm-src-loader="player.currentTrack.covers.thumbnail" pfm-src-size="thumbnail" /> <img pfm-src-loader="player.currentTrack.covers.thumbnail" pfm-src-size="thumbnail" />
</div> </div>
<div class="inner"> <div class="inner">
<div class="title"> <div class="title">
<span class="song"><a href="{{player.currentTrack.url}}">{{player.currentTrack.title}}</a></span> <span class="song"><a href="{{player.currentTrack.url}}">{{player.currentTrack.title}}</a></span>
<span class="artist"><a href="{{player.currentTrack.user.url}}">{{player.currentTrack.user.name}}</a></span> <span class="artist"><a href="{{player.currentTrack.user.url}}">{{player.currentTrack.user.name}}</a></span>
</div> </div>
<div class="transport" ng-click="seek($event)"> <div class="transport" ng-click="seek($event)">
<div class="bar" pfm-progress-bar="player.currentTrack.progress"></div> <div class="bar" pfm-progress-bar="player.currentTrack.progress"></div>
<div class="loader-bar" pfm-progress-bar="player.currentTrack.loadingProgress"></div> <div class="loader-bar" pfm-progress-bar="player.currentTrack.loadingProgress"></div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,21 +1,21 @@
<ul class="playlists-listing {{class}}"> <ul class="playlists-listing {{class}}">
<li ng-repeat="playlist in playlists" bindonce> <li ng-repeat="playlist in playlists" bindonce>
<a href="{{playlist.url}}"> <a href="{{playlist.url}}">
<img class="image" pfm-src-loader="playlist.covers.small" pfm-src-size="small" /> <img class="image" pfm-src-loader="playlist.covers.small" pfm-src-size="small" />
<span class="info"> <span class="info">
<span class="title">{{playlist.title}}</span> <span class="title">{{playlist.title}}</span>
<span class="published"> <span class="published">
by {{playlist.user.name}} by {{playlist.user.name}}
</span> </span>
<span class="stats"> <span class="stats">
<strong bo-text="playlist.stats.favourites"></strong> <i class="icon-star"></i> <strong bo-text="playlist.stats.favourites"></strong> <i class="icon-star"></i>
<strong bo-text="playlist.stats.comments"></strong> <i class="icon-comment"></i> <strong bo-text="playlist.stats.comments"></strong> <i class="icon-comment"></i>
<strong bo-text="playlist.stats.downloads"></strong> <i class="icon-download"></i> <strong bo-text="playlist.stats.downloads"></strong> <i class="icon-download"></i>
</span> </span>
</span> </span>
</a> </a>
</li> </li>
<li ng-show="!playlists.length" class="empty"> <li ng-show="!playlists.length" class="empty">
No playlists found... No playlists found...
</li> </li>
</ul> </ul>

View file

@ -1,7 +1,7 @@
<div class="single-player"> <div class="single-player">
<a href="#" class="play-button" pfm-eat-click ng-click="play()"> <a href="#" class="play-button" pfm-eat-click ng-click="play()">
<i class="icon-play" ng-show="!track.isPlaying"></i> <i class="icon-play" ng-show="!track.isPlaying"></i>
<i class="icon-pause" ng-hide="!track.isPlaying"></i> <i class="icon-pause" ng-hide="!track.isPlaying"></i>
</a> </a>
<img pfm-src-loader="track.covers.thumbnail" pfm-src-size="thumbnail" /> <img pfm-src-loader="track.covers.thumbnail" pfm-src-size="thumbnail" />
</div> </div>

View file

@ -1,27 +1,27 @@
<ul class="tracks-listing {{class}}"> <ul class="tracks-listing {{class}}">
<li ng-repeat="track in tracks" ng-class="{'can-favourite': auth.isLogged, 'is-favourited': auth.isLogged && track.user_data.is_favourited, 'is-playing': track.isPlaying, 'has-played': auth.isLogged && track.user_data.views}"> <li ng-repeat="track in tracks" ng-class="{'can-favourite': auth.isLogged, 'is-favourited': auth.isLogged && track.user_data.is_favourited, 'is-playing': track.isPlaying, 'has-played': auth.isLogged && track.user_data.views}">
<div class="image"> <div class="image">
<a href="#" class="play-button" pfm-eat-click ng-click="play(track)"> <a href="#" class="play-button" pfm-eat-click ng-click="play(track)">
<i class="icon-play" ng-show="!track.isPlaying"></i> <i class="icon-play" ng-show="!track.isPlaying"></i>
<i class="icon-pause" ng-hide="!track.isPlaying"></i> <i class="icon-pause" ng-hide="!track.isPlaying"></i>
</a> </a>
<img pfm-src-loader="track.covers.thumbnail" pfm-src-size="thumbnail" /> <img pfm-src-loader="track.covers.thumbnail" pfm-src-size="thumbnail" />
</div> </div>
<div class="icons"> <div class="icons">
<span><i ng-class="{'icon-microphone-off': !track.is_vocal, 'icon-microphone': track.is_vocal}"></i></span> <span><i ng-class="{'icon-microphone-off': !track.is_vocal, 'icon-microphone': track.is_vocal}"></i></span>
<a pfm-eat-click class="icon-favourite" href="#" ng-click="toggleFavourite(track)" ng-show="auth.isLogged"><i class="icon-star-empty"></i></a> <a pfm-eat-click class="icon-favourite" href="#" ng-click="toggleFavourite(track)" ng-show="auth.isLogged"><i class="icon-star-empty"></i></a>
</div> </div>
<a class="info" href="{{track.url}}"> <a class="info" href="{{track.url}}">
<span class="title">{{track.title}}</span> <span class="title">{{track.title}}</span>
<span class="stats" title="{{track.stats.favourites}} Favourites / {{track.stats.comments}} Comments / {{track.stats.plays}} Plays"> <span class="stats" title="{{track.stats.favourites}} Favourites / {{track.stats.comments}} Comments / {{track.stats.plays}} Plays">
<strong>{{track.stats.favourites}}</strong>f <strong>{{track.stats.favourites}}</strong>f
<strong>{{track.stats.comments}}</strong>c <strong>{{track.stats.comments}}</strong>c
<strong>{{track.stats.plays}}</strong>p <strong>{{track.stats.plays}}</strong>p
</span> </span>
<span class="artist">{{track.user.name}} / {{track.genre.name}}</span> <span class="artist">{{track.user.name}} / {{track.genre.name}}</span>
</a> </a>
</li> </li>
<li ng-show="!tracks.length" class="empty"> <li ng-show="!tracks.length" class="empty">
No tracks found... No tracks found...
</li> </li>
</ul> </ul>

View file

@ -1,3 +1,3 @@
<h1>500 buckets of oats on the wall.</h1> <h1>500 buckets of oats on the wall.</h1>
<p>Something went wrong on our servers while we were processing your request. We're really sorry about this, and will work hard to get this resolved as soon as possible.</p> <p>Something went wrong on our servers while we were processing your request. We're really sorry about this, and will work hard to get this resolved as soon as possible.</p>
<p>In any case, we&#39;re sorry this happened. Perhaps you would like to go to our <a href="/">home page</a>?</p> <p>In any case, we&#39;re sorry this happened. Perhaps you would like to go to our <a href="/">home page</a>?</p>

View file

@ -1,14 +1,14 @@
<div> <div>
<ul class="tabs"> <ul class="tabs">
<li ng-class="{active: stateIncludes('favourites.tracks')}"><a href="/account/favourites/tracks">Tracks</a></li> <li ng-class="{active: stateIncludes('favourites.tracks')}"><a href="/account/favourites/tracks">Tracks</a></li>
<li ng-class="{active: stateIncludes('favourites.albums')}"><a href="/account/favourites/albums">Albums</a></li> <li ng-class="{active: stateIncludes('favourites.albums')}"><a href="/account/favourites/albums">Albums</a></li>
<li ng-class="{active: stateIncludes('favourites.playlists')}"><a href="/account/favourites/playlists">Playlists</a></li> <li ng-class="{active: stateIncludes('favourites.playlists')}"><a href="/account/favourites/playlists">Playlists</a></li>
</ul> </ul>
<ui-view></ui-view> <ui-view></ui-view>
<pre> <pre>
$state = {{$state.current.name}} $state = {{$state.current.name}}
$stateParams = {{$stateParams}} $stateParams = {{$stateParams}}
</pre> </pre>
</div> </div>

View file

@ -1,3 +1,3 @@
<div class="stretch-to-bottom"> <div class="stretch-to-bottom">
<pfm-albums-list albums="albums" /> <pfm-albums-list albums="albums" />
</div> </div>

View file

@ -1,3 +1,3 @@
<div class="stretch-to-bottom"> <div class="stretch-to-bottom">
<pfm-playlists-list playlists="playlists"></pfm-playlists-list> <pfm-playlists-list playlists="playlists"></pfm-playlists-list>
</div> </div>

View file

@ -1,3 +1,3 @@
<div class="stretch-to-bottom"> <div class="stretch-to-bottom">
<pfm-tracks-list tracks="tracks" class="three-columns"></pfm-tracks-list> <pfm-tracks-list tracks="tracks" class="three-columns"></pfm-tracks-list>
</div> </div>

View file

@ -1,33 +1,33 @@
<div class="dashboard stretch-to-bottom"> <div class="dashboard stretch-to-bottom">
<section class="recent-tracks"> <section class="recent-tracks">
<h1> <h1>
<a href="/tracks"><i class="icon-music"></i> see more</a> <a href="/tracks"><i class="icon-music"></i> see more</a>
The newest tunes The newest tunes
</h1> </h1>
<pfm-tracks-list tracks="recentTracks" class="two-columns"></pfm-tracks-list> <pfm-tracks-list tracks="recentTracks" class="two-columns"></pfm-tracks-list>
</section> </section>
<section class="popular-tracks"> <section class="popular-tracks">
<h1> <h1>
What's popular today What's popular today
</h1> </h1>
<pfm-tracks-list tracks="popularTracks" class="two-columns"></pfm-tracks-list> <pfm-tracks-list tracks="popularTracks" class="two-columns"></pfm-tracks-list>
</section> </section>
<section class="news"> <section class="news">
<h1>Welcome to Pony.fm</h1> <h1>Welcome to Pony.fm</h1>
<p>The pony fan music site. By bronies, for bronies.</p> <p>The pony fan music site. By bronies, for bronies.</p>
<p> <p>
We provide a comprehensive set of free tools to host, distribute, and catalogue your music, integrated with a rich community experience for artists and listeners alike. We provide a comprehensive set of free tools to host, distribute, and catalogue your music, integrated with a rich community experience for artists and listeners alike.
</p> </p>
<p> <p>
Features include <strong>unlimited downloads</strong>, <strong>unlimited uploads</strong>, <strong>lossless uploads</strong> and much more! Click <a href="/about">here</a> for more details! Features include <strong>unlimited downloads</strong>, <strong>unlimited uploads</strong>, <strong>lossless uploads</strong> and much more! Click <a href="/about">here</a> for more details!
</p> </p>
<h1> <h1>
<a href="http://mlpforums.com/blog/404-ponyfm-development-blog/" target="_blank">read all</a> <a href="http://mlpforums.com/blog/404-ponyfm-development-blog/" target="_blank">read all</a>
Pony.fm news Pony.fm news
</h1> </h1>
<a class="twitter-timeline" href="https://twitter.com/ponyfm" data-widget-id="644195953956798464">Tweets by <a class="twitter-timeline" href="https://twitter.com/ponyfm" data-widget-id="644195953956798464">Tweets by
@ponyfm</a> @ponyfm</a>
<script>!function (d, s, id) { <script>!function (d, s, id) {
@ -39,5 +39,5 @@
fjs.parentNode.insertBefore(js, fjs); fjs.parentNode.insertBefore(js, fjs);
} }
}(document, "script", "twitter-wjs");</script> }(document, "script", "twitter-wjs");</script>
</section> </section>
</div> </div>

View file

@ -1,26 +1,26 @@
<div class="about-page"> <div class="about-page">
<h1>What exactly <em>is</em> Pony.fm, anyway?</h1> <h1>What exactly <em>is</em> Pony.fm, anyway?</h1>
<div class="stretch-to-bottom"> <div class="stretch-to-bottom">
<p>Some <em>My Little Pony: Friendship is Magic</em> fans - typically referred to as &quot;bronies&quot; are the musical type, and show their appreciation for the show by pouring their talent into <strong>fan music</strong>. <p>Some <em>My Little Pony: Friendship is Magic</em> fans - typically referred to as &quot;bronies&quot; are the musical type, and show their appreciation for the show by pouring their talent into <strong>fan music</strong>.
<p>The brony fan music community is diverse, spanning genres from symphonic metal to trance and everything in between. But most importantly, the community creates music.</p> <p>The brony fan music community is diverse, spanning genres from symphonic metal to trance and everything in between. But most importantly, the community creates music.</p>
<p>A <em>lot</em> of music.</p> <p>A <em>lot</em> of music.</p>
<p>All this music has to go somewhere. YouTube, SoundCloud, and Bandcamp are popular outlets that many brony musicians use to host their tunes. But no mainstream sites are specifically designed for our fandom&#39;s needs, and they&#39;re not particularly helpful if, as a listener, you&#39;re looking for pony fan music.</p> <p>All this music has to go somewhere. YouTube, SoundCloud, and Bandcamp are popular outlets that many brony musicians use to host their tunes. But no mainstream sites are specifically designed for our fandom&#39;s needs, and they&#39;re not particularly helpful if, as a listener, you&#39;re looking for pony fan music.</p>
<p>That&#39;s where Pony.fm comes in. <strong>Pony.fm is a community, hosting service, and music database rolled into one, with a generous dash of pony on top.</strong></p> <p>That&#39;s where Pony.fm comes in. <strong>Pony.fm is a community, hosting service, and music database rolled into one, with a generous dash of pony on top.</strong></p>
<h2>So it&#39;s SoundCloud with ponies?</h2> <h2>So it&#39;s SoundCloud with ponies?</h2>
<p>Eenope!</p> <p>Eenope!</p>
<p>Pony.fm is an original project. Although it takes inspiration from a number of well-known services for the general public, Pony.fm is not specifically modeled after any one of them. As a fan site itself, Pony.fm is an experience all its own.</p> <p>Pony.fm is an original project. Although it takes inspiration from a number of well-known services for the general public, Pony.fm is not specifically modeled after any one of them. As a fan site itself, Pony.fm is an experience all its own.</p>
<p>Simply put, <strong>&quot;Pony.fm is Pony.fm.&quot;</strong></p> <p>Simply put, <strong>&quot;Pony.fm is Pony.fm.&quot;</strong></p>
<h2>What makes Pony.fm special?</h2> <h2>What makes Pony.fm special?</h2>
<p>Pony.fm is a service created by bronies, for bronies. Every inch of the Pony.fm experience is crafted with ponies and bronies in mind. Some of the features necessarily resemble what you may find on other sites - lossless uploads, for example - but some features are specific to the pony fan music community.</p> <p>Pony.fm is a service created by bronies, for bronies. Every inch of the Pony.fm experience is crafted with ponies and bronies in mind. Some of the features necessarily resemble what you may find on other sites - lossless uploads, for example - but some features are specific to the pony fan music community.</p>
<p>Created as a service for the fandom, Pony.fm aims to be the one-stop shop for all things pony music, for artists and listeners alike.</p> <p>Created as a service for the fandom, Pony.fm aims to be the one-stop shop for all things pony music, for artists and listeners alike.</p>
<h2>What does MLP Forums have to do with Pony.fm?</h2> <h2>What does MLP Forums have to do with Pony.fm?</h2>
<p>MLP Forums and Pony.fm share an owner, and each encompasses a different segment of the global <em>My Little Pony: Friendship is Magic</em> community. Put together, both sites are able to offer a richer &quot;supercommunity&quot; experience than either site could offer on its own.</p> <p>MLP Forums and Pony.fm share an owner, and each encompasses a different segment of the global <em>My Little Pony: Friendship is Magic</em> community. Put together, both sites are able to offer a richer &quot;supercommunity&quot; experience than either site could offer on its own.</p>
<h2>Who is behind Pony.fm?</h2> <h2>Who is behind Pony.fm?</h2>
<p>Pony.fm was created by Feld0, a pony-loving teenager who heard the call of code. Recognizing the need for a true pony-specific music hosting site, and realizing that MLP Forums provided him with the resources he needed to make it happen, he created a blank text file and started pumping code into his computer.</p> <p>Pony.fm was created by Feld0, a pony-loving teenager who heard the call of code. Recognizing the need for a true pony-specific music hosting site, and realizing that MLP Forums provided him with the resources he needed to make it happen, he created a blank text file and started pumping code into his computer.</p>
<p>The site is now maintained by him and Nelson LaQuet as part of the <a href="https://poniverse.net/" target="_blank">Poniverse</a> network.</p> <p>The site is now maintained by him and Nelson LaQuet as part of the <a href="https://poniverse.net/" target="_blank">Poniverse</a> network.</p>
</div> </div>
</div> </div>

View file

@ -1,77 +1,77 @@
<div> <div>
<h1>Pony.fm FAQ</h1> <h1>Pony.fm FAQ</h1>
<div class="stretch-to-bottom"> <div class="stretch-to-bottom">
<ul class="faq-tos"> <ul class="faq-tos">
<li><a href="#mp3">Why doesn't Pony.fm support MP3 files?</a></li> <li><a href="#mp3">Why doesn't Pony.fm support MP3 files?</a></li>
<li><a href="#not-accepted">Why isn't my file being accepted for Upload?</a></li> <li><a href="#not-accepted">Why isn't my file being accepted for Upload?</a></li>
<li><a href="#upload">How do I Upload a song?</a></li> <li><a href="#upload">How do I Upload a song?</a></li>
<li><a href="#avatar">How do you set an avatar?</a></li> <li><a href="#avatar">How do you set an avatar?</a></li>
<li><a href="#mlp-forums">Why the connection to MLP Forums?</a></li> <li><a href="#mlp-forums">Why the connection to MLP Forums?</a></li>
<li><a href="#feedback">How do I send Feedback to the Developers?</a></li> <li><a href="#feedback">How do I send Feedback to the Developers?</a></li>
<li><a href="#poniverse">What is the "Poniverse" and what does Pony FM have to do with it?</a></li> <li><a href="#poniverse">What is the "Poniverse" and what does Pony FM have to do with it?</a></li>
<li><a href="#stats">Can I view any site statistics?</a></li> <li><a href="#stats">Can I view any site statistics?</a></li>
<li><a href="#contact">How do I get in contact with other Musicians on Pony.fm?</a></li> <li><a href="#contact">How do I get in contact with other Musicians on Pony.fm?</a></li>
<li><a href="#report">How do I report someone?</a></li> <li><a href="#report">How do I report someone?</a></li>
<li><a href="#download">How do I download an artist' song?</a></li> <li><a href="#download">How do I download an artist' song?</a></li>
</ul> </ul>
<a name="mp3"></a> <a name="mp3"></a>
<h2>Why doesn't Pony.fm support MP3 files?</h2> <h2>Why doesn't Pony.fm support MP3 files?</h2>
<p>MP3 encoding is "lossy." Lossy means that, during the encoding process, quality gets sacrificed for a decrease in size.</p> <p>MP3 encoding is "lossy." Lossy means that, during the encoding process, quality gets sacrificed for a decrease in size.</p>
<p>Pony.fm does not provide only MP3's; it also provides OGG's and lossless FLAC's. Uploading a lossless file puts a "perfect" copy of your track in Pony.fm's file store, which can be offered up for download on its own for audiophiles who like CD or better-than-CD sound quality, but starting from a lossless original also allows Pony.fm to transcode a song to other lossy formats with only one degree of loss.</p> <p>Pony.fm does not provide only MP3's; it also provides OGG's and lossless FLAC's. Uploading a lossless file puts a "perfect" copy of your track in Pony.fm's file store, which can be offered up for download on its own for audiophiles who like CD or better-than-CD sound quality, but starting from a lossless original also allows Pony.fm to transcode a song to other lossy formats with only one degree of loss.</p>
<p>Pony.fm accepts a lossless upload, which is converted to FLAC (if it isn't already FLAC) for storage. This leaves a "perfect," unblemished copy of the track in Pony.fm's file store.</p> <p>Pony.fm accepts a lossless upload, which is converted to FLAC (if it isn't already FLAC) for storage. This leaves a "perfect," unblemished copy of the track in Pony.fm's file store.</p>
<p>An MP3 file can be created from the FLAC. Minimal quality is lost because creating an MP3 from the FLAC is as good as creating an MP3 directly from your DAW.</p> <p>An MP3 file can be created from the FLAC. Minimal quality is lost because creating an MP3 from the FLAC is as good as creating an MP3 directly from your DAW.</p>
<p>An OGG Vorbis file can be created from the FLAC. Minimal quality is lost because Pony.fm has a lossless copy of the track on file; thus, we don't have the "recompressing a compressed MP3" issue that is present if Pony.fm's "master file" was an MP3.</p> <p>An OGG Vorbis file can be created from the FLAC. Minimal quality is lost because Pony.fm has a lossless copy of the track on file; thus, we don't have the "recompressing a compressed MP3" issue that is present if Pony.fm's "master file" was an MP3.</p>
<a name="not-accepted"></a> <a name="not-accepted"></a>
<h2>Why isn't my file being accepted for Upload?</h2> <h2>Why isn't my file being accepted for Upload?</h2>
<p>Pony.fm analyzes all uploads to determine their format and check it against a whitelist; the file extension is ignored. Unfortunately, slight variations in AIFF and WAV files exist that need to be individually whitelisted.</p> <p>Pony.fm analyzes all uploads to determine their format and check it against a whitelist; the file extension is ignored. Unfortunately, slight variations in AIFF and WAV files exist that need to be individually whitelisted.</p>
<p>The alpha should have nailed most of these by now, but if there are some that still are not being accepted, contact an admin with the specific file details and they will try to add them to the White List.</p> <p>The alpha should have nailed most of these by now, but if there are some that still are not being accepted, contact an admin with the specific file details and they will try to add them to the White List.</p>
<a name="upload"></a> <a name="upload"></a>
<h2>How do I Upload a song?</h2> <h2>How do I Upload a song?</h2>
<p>At the top right of your screen there should be a button titled "Upload" next to the "send feedback" one. Select the Upload button and a drop down menu will appear, select the first option titled "Track Uploader". You should now be on a screen displaying the uploader. Select the Green button titled "Add Files" and select your song from your computer. The track should now start its download.</p> <p>At the top right of your screen there should be a button titled "Upload" next to the "send feedback" one. Select the Upload button and a drop down menu will appear, select the first option titled "Track Uploader". You should now be on a screen displaying the uploader. Select the Green button titled "Add Files" and select your song from your computer. The track should now start its download.</p>
<p>Please be aware that Pony.fm doesn't support MP3 uploads.</p> <p>Please be aware that Pony.fm doesn't support MP3 uploads.</p>
<a name="avatar"></a> <a name="avatar"></a>
<h2>How do you set an avatar?</h2> <h2>How do you set an avatar?</h2>
<p>Avatars in Pony.fm use a free service called Gravatar. To learn more about it, and setup your own Gravatar account, <a href="https://gravatar.com/" target="_blank">click here</a>!</p> <p>Avatars in Pony.fm use a free service called Gravatar. To learn more about it, and setup your own Gravatar account, <a href="https://gravatar.com/" target="_blank">click here</a>!</p>
<a name="mlp-forums"></a> <a name="mlp-forums"></a>
<h2>Why the connection to MLP Forums?</h2> <h2>Why the connection to MLP Forums?</h2>
<p>MLP Forums is one of the web&#39;s largest and most well known <em>My Little Pony: Friendship is Magic</em> forum communities. Formally linking the two sites together paves the way for a rich, cross-site community experience. Members of one site can easily jump into the other without the hassle of managing yet another account, and content can seamlessly be brought from MLP Forums to Pony.fm and vice versa in meaningful ways.</p> <p>MLP Forums is one of the web&#39;s largest and most well known <em>My Little Pony: Friendship is Magic</em> forum communities. Formally linking the two sites together paves the way for a rich, cross-site community experience. Members of one site can easily jump into the other without the hassle of managing yet another account, and content can seamlessly be brought from MLP Forums to Pony.fm and vice versa in meaningful ways.</p>
<a name="feedback"></a> <a name="feedback"></a>
<h2>How do I send Feedback to the Developers?</h2> <h2>How do I send Feedback to the Developers?</h2>
<p>At the top of your page should be a nifty little button to the left of the upload button that says "Send Feedback".</p> <p>At the top of your page should be a nifty little button to the left of the upload button that says "Send Feedback".</p>
<p>Click this and a form will pop up, just follow the two simple instructions and enter the information needed and click "submit".</p> <p>Click this and a form will pop up, just follow the two simple instructions and enter the information needed and click "submit".</p>
<p>All feedback is greatly appreciated on Pony FM and we do our hardest to keep this site functional and to keep all of you happy.</p> <p>All feedback is greatly appreciated on Pony FM and we do our hardest to keep this site functional and to keep all of you happy.</p>
<a name="poniverse"></a> <a name="poniverse"></a>
<h2>What is the "Poniverse" and what does Pony FM have to do with it?</h2> <h2>What is the "Poniverse" and what does Pony FM have to do with it?</h2>
<p>The Poniverse is a network that links together several Brony sites ,such as MLP Forums, together to form a super community of sorts that provides sites that satisfy everyone's needs.</p> <p>The Poniverse is a network that links together several Brony sites ,such as MLP Forums, together to form a super community of sorts that provides sites that satisfy everyone's needs.</p>
<p>Pony FM is just one of those sites and sets out to provide Brony Musicians with their own special corner to share their work with others and to receive feedback from other musicians, and in lots of cases to form collaborations that can end up in great partnerships.</p> <p>Pony FM is just one of those sites and sets out to provide Brony Musicians with their own special corner to share their work with others and to receive feedback from other musicians, and in lots of cases to form collaborations that can end up in great partnerships.</p>
<a name="stats"></a> <a name="stats"></a>
<h2>Can I view any site statistics?</h2> <h2>Can I view any site statistics?</h2>
<p>You sure can!</p> <p>You sure can!</p>
<p>At the bottom left of your screen there is a small button that says Site Stats that's nestled just below a button for Pony.fm Forum.</p> <p>At the bottom left of your screen there is a small button that says Site Stats that's nestled just below a button for Pony.fm Forum.</p>
<p>Click on the "Site Stats" button and you will be taken to a screen that shows you graphs depicting the number of Track Views, Track Downloads, Track Plays and User Registrations.</p> <p>Click on the "Site Stats" button and you will be taken to a screen that shows you graphs depicting the number of Track Views, Track Downloads, Track Plays and User Registrations.</p>
<a name="contact"></a> <a name="contact"></a>
<h2>How do I get in contact with other Musicians on Pony.fm?</h2> <h2>How do I get in contact with other Musicians on Pony.fm?</h2>
<p>On each user's screen there is a nifty little section where you can leave comments. This is used best for providing feedback and to show them your support, but if you plan on trying to start a collaboration and would prefer a more private means of communication, underneath the user Bio, there is a "send a message" which will utilise the "Personal Messenger" from MLP Forums to allow you to send a message to that artist.</p> <p>On each user's screen there is a nifty little section where you can leave comments. This is used best for providing feedback and to show them your support, but if you plan on trying to start a collaboration and would prefer a more private means of communication, underneath the user Bio, there is a "send a message" which will utilise the "Personal Messenger" from MLP Forums to allow you to send a message to that artist.</p>
<a name="report"></a> <a name="report"></a>
<h2>How do I report someone?</h2> <h2>How do I report someone?</h2>
<p>At the current time a report feature isn't quite installed into the site, however, email feld0@pony.fm and he would be glad to handle any moderating issues that you have. But to reiterate what was said before, there IS a report function in the works.</p> <p>At the current time a report feature isn't quite installed into the site, however, email feld0@pony.fm and he would be glad to handle any moderating issues that you have. But to reiterate what was said before, there IS a report function in the works.</p>
<a name="download"></a> <a name="download"></a>
<h2>How do I download an artist' song?</h2> <h2>How do I download an artist' song?</h2>
<p>Click on the song that you are looking to download and you will notice to the right of the screen is a button titled "Downloads".</p> <p>Click on the song that you are looking to download and you will notice to the right of the screen is a button titled "Downloads".</p>
<p>Click this button and you will be brought a drop down menu with FLAC, MP3, OGG, AAC and ALAC file types for you to download.</p> <p>Click this button and you will be brought a drop down menu with FLAC, MP3, OGG, AAC and ALAC file types for you to download.</p>
<p>Select your preferred file type to start the download and it should all be smooth sailing from there.</p> <p>Select your preferred file type to start the download and it should all be smooth sailing from there.</p>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,13 +1,13 @@
<div class="modal-header"> <div class="modal-header">
<h3> <h3>
<button type="button" class="close" ng-click="close()" ng-hide="isLoading">&times;</button> <button type="button" class="close" ng-click="close()" ng-hide="isLoading">&times;</button>
{{album.title}} {{album.title}}
</h3> </h3>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<h2>Shortlink</h2> <h2>Shortlink</h2>
<input type="text" ng-model="album.share.url" /> <input type="text" ng-model="album.share.url" />
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<a class="btn cancel" ng-click="close()" ng-disabled="isLoading">Close</a> <a class="btn cancel" ng-click="close()" ng-disabled="isLoading">Close</a>
</div> </div>

View file

@ -1,27 +1,27 @@
<form ng-submit="login.submit()" class="form-horizontal"> <form ng-submit="login.submit()" class="form-horizontal">
<ul class="messages" ng-hide="!messages.length"> <ul class="messages" ng-hide="!messages.length">
<li ng-repeat="message in messages" class="alert alert-error"> <li ng-repeat="message in messages" class="alert alert-error">
{{message}} {{message}}
</li> </li>
</ul> </ul>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="inputEmail">Email</label> <label class="control-label" for="inputEmail">Email</label>
<div class="controls"> <div class="controls">
<input type="text" id="inputEmail" placeholder="Email" ng-model="login.email" /> <input type="text" id="inputEmail" placeholder="Email" ng-model="login.email" />
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="inputPassword">Password</label> <label class="control-label" for="inputPassword">Password</label>
<div class="controls"> <div class="controls">
<input type="password" id="inputPassword" placeholder="Password" ng-model="login.password" /> <input type="password" id="inputPassword" placeholder="Password" ng-model="login.password" />
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<div class="controls"> <div class="controls">
<label class="checkbox"> <label class="checkbox">
<input type="checkbox" ng-model="login.remember" /> Remember me <input type="checkbox" ng-model="login.remember" /> Remember me
</label> </label>
<button type="submit" class="btn">Sign in</button> <button type="submit" class="btn">Sign in</button>
</div> </div>
</div> </div>
</form> </form>

View file

@ -1,15 +1,15 @@
<div class="modal-header"> <div class="modal-header">
<h3> <h3>
<button type="button" class="close" ng-click="close()" ng-hide="isLoading">&times;</button> <button type="button" class="close" ng-click="close()" ng-hide="isLoading">&times;</button>
Credits Credits
</h3> </h3>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<p>Pony.fm was created to organize the <em>My Little Pony</em> community&#39;s fan music. <p>Pony.fm was created to organize the <em>My Little Pony</em> community&#39;s fan music.
The project is maintained by <a href="https://poniverse.net/" target="_blank">Poniverse</a>, an The project is maintained by <a href="https://poniverse.net/" target="_blank">Poniverse</a>, an
organization devoted to building and operating fan sites for the pony community.</p> organization devoted to building and operating fan sites for the pony community.</p>
<h2>Open-source credits</h2> <h2>Open-source credits</h2>
<p>Pony.fm would not be possible without the efforts of the open-source community. <p>Pony.fm would not be possible without the efforts of the open-source community.
We thank the following projects, in no particular order, for providing the building We thank the following projects, in no particular order, for providing the building
blocks for our own.</p> blocks for our own.</p>
@ -42,5 +42,5 @@
</ul> </ul>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<a class="btn cancel" ng-click="close()" ng-disabled="isLoading">Close</a> <a class="btn cancel" ng-click="close()" ng-disabled="isLoading">Close</a>
</div> </div>

View file

@ -1,39 +1,39 @@
<form ng-submit="createPlaylist()" class="pfm-form"> <form ng-submit="createPlaylist()" class="pfm-form">
<div class="modal-header"> <div class="modal-header">
<h3> <h3>
<button type="button" class="close" ng-click="close()" ng-hide="isLoading">&times;</button> <button type="button" class="close" ng-click="close()" ng-hide="isLoading">&times;</button>
<span ng-show="isNew">Create</span> <span ng-show="isNew">Create</span>
<span ng-hide="isNew">Edit</span> <span ng-hide="isNew">Edit</span>
Playlist Playlist
</h3> </h3>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="form-row" ng-class="{'has-error': errors.title != null}"> <div class="form-row" ng-class="{'has-error': errors.title != null}">
<label class="control-label" for="title">Name</label> <label class="control-label" for="title">Name</label>
<input type="text" id="title" placeholder="Playlist Name" ng-model="form.title" ng-disabled="isLoading" /> <input type="text" id="title" placeholder="Playlist Name" ng-model="form.title" ng-disabled="isLoading" />
<div class="error">{{errors.title}}</div> <div class="error">{{errors.title}}</div>
</div> </div>
<div class="form-row" ng-class="{'has-error': errors.description != null}"> <div class="form-row" ng-class="{'has-error': errors.description != null}">
<label class="control-label" for="description">Description</label> <label class="control-label" for="description">Description</label>
<textarea id="description" placeholder="Description (optional)" ng-model="form.description" ng-disabled="isLoading"></textarea> <textarea id="description" placeholder="Description (optional)" ng-model="form.description" ng-disabled="isLoading"></textarea>
<div class="error">{{errors.description}}</div> <div class="error">{{errors.description}}</div>
</div> </div>
<div class="row-fluid"> <div class="row-fluid">
<div class="form-row span6"> <div class="form-row span6">
<label for="is_public"><input ng-disabled="isLoading" id="is_public" type="checkbox" ng-model="form.is_public" /> Is Public</label> <label for="is_public"><input ng-disabled="isLoading" id="is_public" type="checkbox" ng-model="form.is_public" /> Is Public</label>
</div> </div>
<div class="form-row span6"> <div class="form-row span6">
<label for="is_pinned"><input ng-disabled="isLoading" id="is_pinned" type="checkbox" ng-model="form.is_pinned" /> Is Pinned to Sidebar</label> <label for="is_pinned"><input ng-disabled="isLoading" id="is_pinned" type="checkbox" ng-model="form.is_pinned" /> Is Pinned to Sidebar</label>
</div> </div>
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="submit" class="btn btn-primary" ng-disabled="isLoading"> <button type="submit" class="btn btn-primary" ng-disabled="isLoading">
<span ng-show="isNew">Create</span> <span ng-show="isNew">Create</span>
<span ng-hide="isNew">Edit</span> <span ng-hide="isNew">Edit</span>
Playlist Playlist
<i class="ui-icon-gear icon-spin" ng-show="isLoading"></i> <i class="ui-icon-gear icon-spin" ng-show="isLoading"></i>
</button> </button>
<a class="btn cancel" ng-click="close()" ng-disabled="isLoading">Close</a> <a class="btn cancel" ng-click="close()" ng-disabled="isLoading">Close</a>
</div> </div>
</form> </form>

View file

@ -1,13 +1,13 @@
<div class="modal-header"> <div class="modal-header">
<h3> <h3>
<button type="button" class="close" ng-click="close()" ng-hide="isLoading">&times;</button> <button type="button" class="close" ng-click="close()" ng-hide="isLoading">&times;</button>
{{playlist.title}} {{playlist.title}}
</h3> </h3>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<h2>Shortlink</h2> <h2>Shortlink</h2>
<input type="text" ng-model="playlist.share.url" /> <input type="text" ng-model="playlist.share.url" />
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<a class="btn cancel" ng-click="close()" ng-disabled="isLoading">Close</a> <a class="btn cancel" ng-click="close()" ng-disabled="isLoading">Close</a>
</div> </div>

View file

@ -1,19 +1,19 @@
<div class="modal-header"> <div class="modal-header">
<h3> <h3>
<button type="button" class="close" ng-click="close()" ng-hide="isLoading">&times;</button> <button type="button" class="close" ng-click="close()" ng-hide="isLoading">&times;</button>
{{track.title}} {{track.title}}
</h3> </h3>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<h2>Shortlink</h2> <h2>Shortlink</h2>
<input type="text" ng-model="track.share.url" /> <input type="text" ng-model="track.share.url" />
<h2>HTML Embed <small>(websites, blogs)</small></h2> <h2>HTML Embed <small>(websites, blogs)</small></h2>
<textarea type="text" ng-model="track.share.html"></textarea> <textarea type="text" ng-model="track.share.html"></textarea>
<h2>BBCode Embed <small>(forums)</small></h2> <h2>BBCode Embed <small>(forums)</small></h2>
<textarea type="text" ng-model="track.share.bbcode"></textarea> <textarea type="text" ng-model="track.share.bbcode"></textarea>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<a class="btn cancel" ng-click="close()" ng-disabled="isLoading">Close</a> <a class="btn cancel" ng-click="close()" ng-disabled="isLoading">Close</a>
</div> </div>

View file

@ -1,11 +1,11 @@
<div class="pagination" ng-show="totalPages > 1"> <div class="pagination" ng-show="totalPages > 1">
<ul> <ul>
<li ng-class="{disabled: !prevPage}"><a href="#" ng-click="gotoPage(prevPage);" pfm-eat-click>Prev</a></li> <li ng-class="{disabled: !prevPage}"><a href="#" ng-click="gotoPage(prevPage);" pfm-eat-click>Prev</a></li>
<li ng-repeat="page in pages" ng-class="{active: page == currentPage}"> <li ng-repeat="page in pages" ng-class="{active: page == currentPage}">
<a href="#" ng-click="gotoPage(page);" pfm-eat-click>{{page}}</a> <a href="#" ng-click="gotoPage(page);" pfm-eat-click>{{page}}</a>
</li> </li>
<li ng-class="{disabled: !nextPage}"><a href="#" ng-click="gotoPage(nextPage);" pfm-eat-click>Next</a></li> <li ng-class="{disabled: !nextPage}"><a href="#" ng-click="gotoPage(nextPage);" pfm-eat-click>Next</a></li>
</ul> </ul>
</div> </div>
<ui-view></ui-view> <ui-view></ui-view>

View file

@ -1,3 +1,3 @@
<div class="stretch-to-bottom"> <div class="stretch-to-bottom">
<pfm-playlists-list playlists="playlists"></pfm-playlists-list> <pfm-playlists-list playlists="playlists"></pfm-playlists-list>
</div> </div>

View file

@ -1,52 +1,52 @@
<div class="resource-details playlist-details" bindonce="playlist"> <div class="resource-details playlist-details" bindonce="playlist">
<ul class="dropdowns"> <ul class="dropdowns">
<li class="dropdown"> <li class="dropdown">
<a href="#" class="btn btn-small btn-info dropdown-toggle"> <a href="#" class="btn btn-small btn-info dropdown-toggle">
Downloads Downloads
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li bindonce ng-repeat="format in playlist.formats"><a target="_blank" bo-href="format.url"><span bo-text="format.name"></span> <small bo-text="'(' + format.size + ')'"></small></a></li> <li bindonce ng-repeat="format in playlist.formats"><a target="_blank" bo-href="format.url"><span bo-text="format.name"></span> <small bo-text="'(' + format.size + ')'"></small></a></li>
</ul> </ul>
</li> </li>
<li><a href="#" class="btn" pfm-eat-click ng-click="share()">Share</a></li> <li><a href="#" class="btn" pfm-eat-click ng-click="share()">Share</a></li>
<li><pfm-favourite-button resource="playlist" type="playlist"></pfm-favourite-button></li> <li><pfm-favourite-button resource="playlist" type="playlist"></pfm-favourite-button></li>
</ul> </ul>
<header> <header>
<h1 bo-text="playlist.title"></h1> <h1 bo-text="playlist.title"></h1>
<h2> <h2>
created by: <a bo-href="playlist.user.url" bo-text="playlist.user.name"></a> created by: <a bo-href="playlist.user.url" bo-text="playlist.user.name"></a>
</h2> </h2>
</header> </header>
<div class="stretch-to-bottom details-columns"> <div class="stretch-to-bottom details-columns">
<div class="right"> <div class="right">
<img class="cover" pfm-src-loader="playlist.covers.normal" pfm-src-size="normal" /> <img class="cover" pfm-src-loader="playlist.covers.normal" pfm-src-size="normal" />
<div class="share-buttons" pfm-share-buttons> <div class="share-buttons" pfm-share-buttons>
<a class="tumblr" bo-href="playlist.share.tumblrUrl" title="Share on Tumblr" style="display:inline-block; overflow:hidden; width:20px; height:20px; background:url('/images/tumblr-share.png') top left no-repeat transparent;"></a> <a class="tumblr" bo-href="playlist.share.tumblrUrl" title="Share on Tumblr" style="display:inline-block; overflow:hidden; width:20px; height:20px; background:url('/images/tumblr-share.png') top left no-repeat transparent;"></a>
<div class="facebook fb-like" data-href="{{playlist.url}}" data-width="450" data-layout="button_count" data-show-faces="true" data-send="false"></div> <div class="facebook fb-like" data-href="{{playlist.url}}" data-width="450" data-layout="button_count" data-show-faces="true" data-send="false"></div>
<iframe class="twitter" allowtransparency="true" frameborder="0" scrolling="no" bo-src="playlist.share.twitterUrl" style="width:130px; height:20px;"></iframe> <iframe class="twitter" allowtransparency="true" frameborder="0" scrolling="no" bo-src="playlist.share.twitterUrl" style="width:130px; height:20px;"></iframe>
</div> </div>
<ul class="stats"> <ul class="stats">
<li>Created: <strong bo-text="playlist.created_at | pfmdate:'medium'"></strong></li> <li>Created: <strong bo-text="playlist.created_at | pfmdate:'medium'"></strong></li>
<li>Views: <strong bo-text="playlist.stats.views"></strong></li> <li>Views: <strong bo-text="playlist.stats.views"></strong></li>
<li>Downloads: <strong bo-text="playlist.stats.downloads"></strong></li> <li>Downloads: <strong bo-text="playlist.stats.downloads"></strong></li>
<li>Favourites: <strong bo-text="playlist.stats.favourites"></strong></li> <li>Favourites: <strong bo-text="playlist.stats.favourites"></strong></li>
</ul> </ul>
</div> </div>
<div class="left"> <div class="left">
<div class="description" bo-show="playlist.description.length"> <div class="description" bo-show="playlist.description.length">
<h2>Description</h2> <h2>Description</h2>
<p bo-html="playlist.description | noHTML | newlines"></p> <p bo-html="playlist.description | noHTML | newlines"></p>
</div> </div>
<h2>Tracks</h2> <h2>Tracks</h2>
<pfm-tracks-list tracks="playlist.tracks"></pfm-tracks-list> <pfm-tracks-list tracks="playlist.tracks"></pfm-tracks-list>
<pfm-comments type="playlist" resource="playlist"></pfm-comments> <pfm-comments type="playlist" resource="playlist"></pfm-comments>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,72 +1,72 @@
<ul class="dropdowns"> <ul class="dropdowns">
<li class="dropdown" ng-class="{'has-filter': query.filters.trackTypes.selectedArray.length}"> <li class="dropdown" ng-class="{'has-filter': query.filters.trackTypes.selectedArray.length}">
<a class="dropdown-toggle btn"> <a class="dropdown-toggle btn">
Type: <strong>{{query.filters.trackTypes.title}}</strong> Type: <strong>{{query.filters.trackTypes.title}}</strong>
</a> </a>
<a class="btn" pfm-eat-click ng-click="clearFilter('trackTypes')"><i class="icon-remove"></i></a> <a class="btn" pfm-eat-click ng-click="clearFilter('trackTypes')"><i class="icon-remove"></i></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li ng-repeat="type in filters.trackTypes.values" ng-class="{selected: query.isIdSelected('trackTypes', type.id)}"> <li ng-repeat="type in filters.trackTypes.values" ng-class="{selected: query.isIdSelected('trackTypes', type.id)}">
<a class="dont-close" pfm-eat-click href="#" ng-click="toggleListFilter('trackTypes', type.id); $event.stopPropagation();"><i class="icon-plus"></i></a> <a class="dont-close" pfm-eat-click href="#" ng-click="toggleListFilter('trackTypes', type.id); $event.stopPropagation();"><i class="icon-plus"></i></a>
<a pfm-eat-click href="#" ng-click="setListFilter('trackTypes', type.id);">{{type.title}}</a> <a pfm-eat-click href="#" ng-click="setListFilter('trackTypes', type.id);">{{type.title}}</a>
</li> </li>
</ul> </ul>
</li> </li>
<li class="dropdown" ng-class="{'has-filter': query.filters.showSongs.selectedArray.length}"> <li class="dropdown" ng-class="{'has-filter': query.filters.showSongs.selectedArray.length}">
<a class="dropdown-toggle btn"> <a class="dropdown-toggle btn">
Show Songs: <strong>{{query.filters.showSongs.title}}</strong> Show Songs: <strong>{{query.filters.showSongs.title}}</strong>
</a> </a>
<a class="btn" pfm-eat-click ng-click="clearFilter('showSongs')"><i class="icon-remove"></i></a> <a class="btn" pfm-eat-click ng-click="clearFilter('showSongs')"><i class="icon-remove"></i></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li ng-repeat="song in filters.showSongs.values" ng-class="{selected: query.isIdSelected('showSongs', song.id)}"> <li ng-repeat="song in filters.showSongs.values" ng-class="{selected: query.isIdSelected('showSongs', song.id)}">
<a class="dont-close" pfm-eat-click href="#" ng-click="toggleListFilter('showSongs', song.id); $event.stopPropagation();"><i class="icon-plus"></i></a> <a class="dont-close" pfm-eat-click href="#" ng-click="toggleListFilter('showSongs', song.id); $event.stopPropagation();"><i class="icon-plus"></i></a>
<a pfm-eat-click href="#" ng-click="setListFilter('showSongs', song.id);">{{song.title}}</a> <a pfm-eat-click href="#" ng-click="setListFilter('showSongs', song.id);">{{song.title}}</a>
</li> </li>
</ul> </ul>
</li> </li>
<li class="dropdown" ng-class="{'has-filter': query.filters.genres.selectedArray.length}"> <li class="dropdown" ng-class="{'has-filter': query.filters.genres.selectedArray.length}">
<a class="dropdown-toggle btn"> <a class="dropdown-toggle btn">
Genre: <strong>{{query.filters.genres.title}}</strong> Genre: <strong>{{query.filters.genres.title}}</strong>
</a> </a>
<a class="btn" pfm-eat-click ng-click="clearFilter('genres')"><i class="icon-remove"></i></a> <a class="btn" pfm-eat-click ng-click="clearFilter('genres')"><i class="icon-remove"></i></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li ng-repeat="genre in filters.genres.values" ng-class="{selected: query.isIdSelected('genres', genre.id)}"> <li ng-repeat="genre in filters.genres.values" ng-class="{selected: query.isIdSelected('genres', genre.id)}">
<a class="dont-close" pfm-eat-click href="#" ng-click="toggleListFilter('genres', genre.id); $event.stopPropagation();"><i class="icon-plus"></i></a> <a class="dont-close" pfm-eat-click href="#" ng-click="toggleListFilter('genres', genre.id); $event.stopPropagation();"><i class="icon-plus"></i></a>
<a pfm-eat-click href="#" ng-click="setListFilter('genres', genre.id);">{{genre.title}}</a> <a pfm-eat-click href="#" ng-click="setListFilter('genres', genre.id);">{{genre.title}}</a>
</li> </li>
</ul> </ul>
</li> </li>
<li class="dropdown" ng-class="{'has-filter': !query.filters.isVocal.isDefault}"> <li class="dropdown" ng-class="{'has-filter': !query.filters.isVocal.isDefault}">
<a class="dropdown-toggle btn"> <a class="dropdown-toggle btn">
Is Vocal: <strong>{{query.filters.isVocal.title}}</strong> Is Vocal: <strong>{{query.filters.isVocal.title}}</strong>
</a> </a>
<a class="btn" pfm-eat-click ng-click="clearFilter('isVocal')"><i class="icon-remove"></i></a> <a class="btn" pfm-eat-click ng-click="clearFilter('isVocal')"><i class="icon-remove"></i></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li ng-repeat="item in filters.isVocal.values" ng-class="{selected: item == query.filters.isVocal}"> <li ng-repeat="item in filters.isVocal.values" ng-class="{selected: item == query.filters.isVocal}">
<a pfm-eat-click href="#" ng-click="setFilter('isVocal', item);">{{item.title}}</a> <a pfm-eat-click href="#" ng-click="setFilter('isVocal', item);">{{item.title}}</a>
</li> </li>
</ul> </ul>
</li> </li>
<li class="dropdown" ng-class="{'has-filter': !query.filters.sort.isDefault}"> <li class="dropdown" ng-class="{'has-filter': !query.filters.sort.isDefault}">
<a class="dropdown-toggle btn"> <a class="dropdown-toggle btn">
Order: <strong>{{query.filters.sort.title}}</strong> Order: <strong>{{query.filters.sort.title}}</strong>
</a> </a>
<a class="btn" pfm-eat-click ng-click="clearFilter('sort')"><i class="icon-remove"></i></a> <a class="btn" pfm-eat-click ng-click="clearFilter('sort')"><i class="icon-remove"></i></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li ng-repeat="filter in filters.sort.values" ng-class="{selected: filter == query.filters.sort}"> <li ng-repeat="filter in filters.sort.values" ng-class="{selected: filter == query.filters.sort}">
<a pfm-eat-click href="#" ng-click="setFilter('sort', filter)">{{filter.title}}</a> <a pfm-eat-click href="#" ng-click="setFilter('sort', filter)">{{filter.title}}</a>
</li> </li>
</ul> </ul>
</li> </li>
</ul> </ul>
<div class="pagination" ng-show="totalPages > 1"> <div class="pagination" ng-show="totalPages > 1">
<ul> <ul>
<li ng-class="{disabled: !prevPage}"><a href="#" ng-click="gotoPage(prevPage);" pfm-eat-click>Prev</a></li> <li ng-class="{disabled: !prevPage}"><a href="#" ng-click="gotoPage(prevPage);" pfm-eat-click>Prev</a></li>
<li ng-repeat="page in pages" ng-class="{active: page == currentPage}"> <li ng-repeat="page in pages" ng-class="{active: page == currentPage}">
<a href="#" ng-click="gotoPage(page);" pfm-eat-click>{{page}}</a> <a href="#" ng-click="gotoPage(page);" pfm-eat-click>{{page}}</a>
</li> </li>
<li ng-class="{disabled: !nextPage}"><a href="#" ng-click="gotoPage(nextPage);" pfm-eat-click>Next</a></li> <li ng-class="{disabled: !nextPage}"><a href="#" ng-click="gotoPage(nextPage);" pfm-eat-click>Next</a></li>
</ul> </ul>
</div> </div>
<ui-view></ui-view> <ui-view></ui-view>

View file

@ -1,3 +1,3 @@
<div class="stretch-to-bottom"> <div class="stretch-to-bottom">
<pfm-tracks-list tracks="tracks" class="three-columns"></pfm-tracks-list> <pfm-tracks-list tracks="tracks" class="three-columns"></pfm-tracks-list>
</div> </div>

View file

@ -1,79 +1,79 @@
<div class="resource-details track-details" bindonce="track"> <div class="resource-details track-details" bindonce="track">
<ul class="dropdowns"> <ul class="dropdowns">
<li class="dropdown"> <li class="dropdown">
<a href="#" class="btn btn-small btn-info dropdown-toggle" ng-disabled="track.is_downloadable == 0"> <a href="#" class="btn btn-small btn-info dropdown-toggle" ng-disabled="track.is_downloadable == 0">
Downloads Downloads
</a> </a>
<ul class="dropdown-menu" ng-show="track.is_downloadable == 1"> <ul class="dropdown-menu" ng-show="track.is_downloadable == 1">
<li bindonce ng-repeat="format in track.formats"><a target="_blank" bo-href="format.url"><span bo-text="format.name"></span> <small bo-text="'(' + format.size + ')'"></small></a></li> <li bindonce ng-repeat="format in track.formats"><a target="_blank" bo-href="format.url"><span bo-text="format.name"></span> <small bo-text="'(' + format.size + ')'"></small></a></li>
</ul> </ul>
</li> </li>
<li class="dropdown"> <li class="dropdown">
<a href="#" class="btn btn-small dropdown-toggle" ng-show="auth.isLogged"> <a href="#" class="btn btn-small dropdown-toggle" ng-show="auth.isLogged">
Add to Playlist Add to Playlist
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li bindonce ng-repeat="playlist in playlists"> <li bindonce ng-repeat="playlist in playlists">
<a ng-class="{disabled: playlist.message, 'btn-success': playlist.message}" bo-href="playlist.url" pfm-eat-click ng-click="addToPlaylist(playlist); $event.stopPropagation()"> <a ng-class="{disabled: playlist.message, 'btn-success': playlist.message}" bo-href="playlist.url" pfm-eat-click ng-click="addToPlaylist(playlist); $event.stopPropagation()">
<span ng-hide="playlist.message" bo-text="playlist.title"></span> <span ng-hide="playlist.message" bo-text="playlist.title"></span>
<span ng-show="playlist.message">{{playlist.message}}</span> <span ng-show="playlist.message">{{playlist.message}}</span>
</a> </a>
</li> </li>
<li><a href="#" class="add-btn" pfm-eat-click ng-click="addToNewPlaylist()">Add to New Playlist</a></li> <li><a href="#" class="add-btn" pfm-eat-click ng-click="addToNewPlaylist()">Add to New Playlist</a></li>
</ul> </ul>
</li> </li>
<li><a href="#" class="btn" pfm-eat-click ng-click="share()">Share or Embed</a></li> <li><a href="#" class="btn" pfm-eat-click ng-click="share()">Share or Embed</a></li>
<li><pfm-favourite-button resource="track" type="track"></pfm-favourite-button></li> <li><pfm-favourite-button resource="track" type="track"></pfm-favourite-button></li>
<li bo-show="track.permissions.edit"><a class="btn btn-small" bo-href="'/account/tracks/edit/' + track.id">Edit</a></li> <li bo-show="track.permissions.edit"><a class="btn btn-small" bo-href="'/account/tracks/edit/' + track.id">Edit</a></li>
</ul> </ul>
<header> <header>
<pfm-track-player track="track"></pfm-track-player> <pfm-track-player track="track"></pfm-track-player>
<h1 bo-text="track.title"></h1> <h1 bo-text="track.title"></h1>
<h2> <h2>
<span bo-show="track.album"> <span bo-show="track.album">
from: <a bo-href="track.album.url" bo-text="track.album.title"></a> from: <a bo-href="track.album.url" bo-text="track.album.title"></a>
</span> </span>
by: <a bo-href="track.user.url" bo-text="track.user.name"></a> by: <a bo-href="track.user.url" bo-text="track.user.name"></a>
</h2> </h2>
</header> </header>
<div class="stretch-to-bottom details-columns"> <div class="stretch-to-bottom details-columns">
<div class="right"> <div class="right">
<img class="cover" pfm-src-loader="track.covers.normal" pfm-src-size="normal" /> <img class="cover" pfm-src-loader="track.covers.normal" pfm-src-size="normal" />
<div class="share-buttons" pfm-share-buttons> <div class="share-buttons" pfm-share-buttons>
<a class="tumblr" bo-href="track.share.tumblrUrl" title="Share on Tumblr" style="display:inline-block; overflow:hidden; width:20px; height:20px; background:url('/images/tumblr-share.png') top left no-repeat transparent;"></a> <a class="tumblr" bo-href="track.share.tumblrUrl" title="Share on Tumblr" style="display:inline-block; overflow:hidden; width:20px; height:20px; background:url('/images/tumblr-share.png') top left no-repeat transparent;"></a>
<div class="facebook fb-like" data-href="{{track.url}}" data-width="450" data-layout="button_count" data-show-faces="true" data-send="false"></div> <div class="facebook fb-like" data-href="{{track.url}}" data-width="450" data-layout="button_count" data-show-faces="true" data-send="false"></div>
<iframe class="twitter" allowtransparency="true" frameborder="0" scrolling="no" bo-src="track.share.twitterUrl" style="width:130px; height:20px;"></iframe> <iframe class="twitter" allowtransparency="true" frameborder="0" scrolling="no" bo-src="track.share.twitterUrl" style="width:130px; height:20px;"></iframe>
</div> </div>
<ul class="stats"> <ul class="stats">
<li>Published: <strong bo-text="track.published_at | pfmdate:'medium'"></strong></li> <li>Published: <strong bo-text="track.published_at | pfmdate:'medium'"></strong></li>
<li>Views: <strong bo-text="track.stats.views"></strong></li> <li>Views: <strong bo-text="track.stats.views"></strong></li>
<li>Plays: <strong bo-text="track.stats.plays"></strong></li> <li>Plays: <strong bo-text="track.stats.plays"></strong></li>
<li>Downloads: <strong bo-text="track.stats.downloads"></strong></li> <li>Downloads: <strong bo-text="track.stats.downloads"></strong></li>
<li>Favourites: <strong bo-text="track.stats.favourites"></strong></li> <li>Favourites: <strong bo-text="track.stats.favourites"></strong></li>
</ul> </ul>
</div> </div>
<div class="left"> <div class="left">
<div class="description" bo-show="track.description.length"> <div class="description" bo-show="track.description.length">
<h2>Description</h2> <h2>Description</h2>
<p bo-html="track.description | noHTML | newlines"></p> <p bo-html="track.description | noHTML | newlines"></p>
</div> </div>
<div bo-show="track.is_vocal && track.lyrics.length" class="lyrics-panel"> <div bo-show="track.is_vocal && track.lyrics.length" class="lyrics-panel">
<h2>Lyrics</h2> <h2>Lyrics</h2>
<div class="lyrics revealable"> <div class="lyrics revealable">
<div class="reveal"> <div class="reveal">
<a href="#">Click to reveal full lyrics...</a> <a href="#">Click to reveal full lyrics...</a>
</div> </div>
<p class="content" bo-html="track.lyrics | noHTML | newlines"></p> <p class="content" bo-html="track.lyrics | noHTML | newlines"></p>
</div> </div>
</div> </div>
<pfm-comments type="track" resource="track"></pfm-comments> <pfm-comments type="track" resource="track"></pfm-comments>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,32 +1,32 @@
<div class="uploader"> <div class="uploader">
<div class="dropzone" uploader> <div class="dropzone" uploader>
<p>Drop files here to begin your upload!</p> <p>Drop files here to begin your upload!</p>
</div> </div>
<p>FLAC, WAV, and AIFF files will be accepted. Each file can be up to 200 MB in size.</p> <p>FLAC, WAV, and AIFF files will be accepted. Each file can be up to 200 MB in size.</p>
<p>Tracks must be a <strong>minimum</strong> of 30 seconds long.</p> <p>Tracks must be a <strong>minimum</strong> of 30 seconds long.</p>
<p>Please note that you need to publish your tracks after uploading them before they will become available to the public.</p> <p>Please note that you need to publish your tracks after uploading them before they will become available to the public.</p>
<ul class="uploads"> <ul class="uploads">
<li ng-repeat="upload in data.queue" ng-class="{'uploading': upload.isUploading, 'has-error': upload.error != null, 'is-processing': upload.isUploading && upload.error == null && upload.progress >= 100}" ng-animate="'upload-queue'"> <li ng-repeat="upload in data.queue" ng-class="{'uploading': upload.isUploading, 'has-error': upload.error != null, 'is-processing': upload.isUploading && upload.error == null && upload.progress >= 100}" ng-animate="'upload-queue'">
<p> <p>
<span ng-show="!upload.success"> <span ng-show="!upload.success">
<strong ng-show="upload.isUploading && upload.error == null && upload.progress >= 100">Processing</strong> <strong ng-show="upload.isUploading && upload.error == null && upload.progress >= 100">Processing</strong>
<strong ng-show="upload.isUploading && upload.error == null && upload.progress < 100">Uploading</strong> <strong ng-show="upload.isUploading && upload.error == null && upload.progress < 100">Uploading</strong>
<strong ng-show="upload.error != null">Error</strong> <strong ng-show="upload.error != null">Error</strong>
{{upload.name}} - {{upload.name}} -
<strong ng-show="upload.error != null">{{upload.error}}</strong> <strong ng-show="upload.error != null">{{upload.error}}</strong>
</span> </span>
<span ng-show="upload.success"> <span ng-show="upload.success">
<a href="/account/tracks/edit/{{upload.trackId}}" class="btn btn-small btn-primary"> <a href="/account/tracks/edit/{{upload.trackId}}" class="btn btn-small btn-primary">
Publish Publish
</a> </a>
{{upload.name}} {{upload.name}}
</span> </span>
</p> </p>
<div class="bar" pfm-progress-bar="upload.progress"></div> <div class="bar" pfm-progress-bar="upload.progress"></div>
</li> </li>
</ul> </ul>
</div> </div>

View file

@ -3,248 +3,248 @@ window.pfm.preloaders = {}
module = angular.module 'ponyfm', ['ui.bootstrap', 'ui.state', 'ui.date', 'ui.sortable', 'pasvaz.bindonce', 'angularytics'] module = angular.module 'ponyfm', ['ui.bootstrap', 'ui.state', 'ui.date', 'ui.sortable', 'pasvaz.bindonce', 'angularytics']
if window.pfm.environment == 'production' if window.pfm.environment == 'production'
module.run [ module.run [
'Angularytics', 'Angularytics',
(analytics) -> (analytics) ->
analytics.init() analytics.init()
] ]
module.config [ module.config [
'$locationProvider', '$stateProvider', '$dialogProvider', 'AngularyticsProvider', '$httpProvider', '$sceDelegateProvider' '$locationProvider', '$stateProvider', '$dialogProvider', 'AngularyticsProvider', '$httpProvider', '$sceDelegateProvider'
(location, state, $dialogProvider, analytics, $httpProvider, $sceDelegateProvider) -> (location, state, $dialogProvider, analytics, $httpProvider, $sceDelegateProvider) ->
$httpProvider.interceptors.push [ $httpProvider.interceptors.push [
-> ->
request: (config) -> request: (config) ->
return config if !(/^\/?templates\//.test config.url) return config if !(/^\/?templates\//.test config.url)
config.url += '?' + Math.ceil(Math.random() * 1000000) config.url += '?' + Math.ceil(Math.random() * 1000000)
return config return config
] ]
# This fixes resource loading on IE # This fixes resource loading on IE
$sceDelegateProvider.resourceUrlWhitelist [ $sceDelegateProvider.resourceUrlWhitelist [
'self', 'self',
'/templates/directives/*' '/templates/directives/*'
] ]
if window.pfm.environment == 'production' if window.pfm.environment == 'production'
analytics.setEventHandlers ['Google'] analytics.setEventHandlers ['Google']
# Errors # Errors
state.state 'errors-404', state.state 'errors-404',
url: '/errors/not-found' url: '/errors/not-found'
templateUrl: '/templates/errors/404.html' templateUrl: '/templates/errors/404.html'
state.state 'errors-500', state.state 'errors-500',
url: '/errors/server' url: '/errors/server'
templateUrl: '/templates/errors/500.html' templateUrl: '/templates/errors/500.html'
state.state 'errors-403', state.state 'errors-403',
url: '/errors/not-authorized' url: '/errors/not-authorized'
templateUrl: '/templates/errors/403.html' templateUrl: '/templates/errors/403.html'
state.state 'errors-400', state.state 'errors-400',
url: '/errors/invalid' url: '/errors/invalid'
templateUrl: '/templates/errors/400.html' templateUrl: '/templates/errors/400.html'
# Upload # Upload
state.state 'uploader', state.state 'uploader',
url: '/account/uploader' url: '/account/uploader'
templateUrl: '/templates/uploader/index.html' templateUrl: '/templates/uploader/index.html'
controller: 'uploader' controller: 'uploader'
# Account # Account
state.state 'account', state.state 'account',
url: '/account' url: '/account'
abstract: true abstract: true
templateUrl: '/templates/account/_layout.html' templateUrl: '/templates/account/_layout.html'
state.state 'account.settings', state.state 'account.settings',
url: '' url: ''
templateUrl: '/templates/account/settings.html' templateUrl: '/templates/account/settings.html'
controller: 'account-settings' controller: 'account-settings'
state.state 'account.tracks', state.state 'account.tracks',
url: '/tracks' url: '/tracks'
templateUrl: '/templates/account/tracks.html' templateUrl: '/templates/account/tracks.html'
controller: 'account-tracks' controller: 'account-tracks'
state.state 'account.tracks.edit', state.state 'account.tracks.edit',
url: '/edit/:track_id' url: '/edit/:track_id'
templateUrl: '/templates/account/track.html' templateUrl: '/templates/account/track.html'
controller: 'account-track' controller: 'account-track'
state.state 'account.albums', state.state 'account.albums',
url: '/albums' url: '/albums'
templateUrl: '/templates/account/albums.html' templateUrl: '/templates/account/albums.html'
controller: 'account-albums' controller: 'account-albums'
state.state 'account.albums.create', state.state 'account.albums.create',
url: '/create' url: '/create'
templateUrl: '/templates/account/album.html' templateUrl: '/templates/account/album.html'
controller: 'account-albums-edit' controller: 'account-albums-edit'
state.state 'account.albums.edit', state.state 'account.albums.edit',
url: '/edit/:album_id' url: '/edit/:album_id'
templateUrl: '/templates/account/album.html' templateUrl: '/templates/account/album.html'
controller: 'account-albums-edit' controller: 'account-albums-edit'
state.state 'account.playlists', state.state 'account.playlists',
url: '/playlists' url: '/playlists'
templateUrl: '/templates/account/playlists.html' templateUrl: '/templates/account/playlists.html'
controller: 'account-playlists' controller: 'account-playlists'
state.state 'favourites', state.state 'favourites',
url: '/account/favourites' url: '/account/favourites'
abstract: true abstract: true
templateUrl: '/templates/favourites/_layout.html' templateUrl: '/templates/favourites/_layout.html'
state.state 'favourites.tracks', state.state 'favourites.tracks',
url: '/tracks' url: '/tracks'
templateUrl: '/templates/favourites/tracks.html' templateUrl: '/templates/favourites/tracks.html'
controller: 'favourites-tracks' controller: 'favourites-tracks'
state.state 'favourites.playlists', state.state 'favourites.playlists',
url: '/playlists' url: '/playlists'
templateUrl: '/templates/favourites/playlists.html' templateUrl: '/templates/favourites/playlists.html'
controller: 'favourites-playlists' controller: 'favourites-playlists'
state.state 'favourites.albums', state.state 'favourites.albums',
url: '/albums' url: '/albums'
templateUrl: '/templates/favourites/albums.html' templateUrl: '/templates/favourites/albums.html'
controller: 'favourites-albums' controller: 'favourites-albums'
# Tracks # Tracks
state.state 'content', state.state 'content',
abstract: true abstract: true
templateUrl: '/templates/content/_layout.html' templateUrl: '/templates/content/_layout.html'
state.state 'content.tracks', state.state 'content.tracks',
templateUrl: '/templates/tracks/index.html' templateUrl: '/templates/tracks/index.html'
controller: 'tracks' controller: 'tracks'
url: '/tracks' url: '/tracks'
abstract: true abstract: true
state.state 'content.tracks.list', state.state 'content.tracks.list',
url: '^/tracks?filter&page' url: '^/tracks?filter&page'
templateUrl: '/templates/tracks/list.html' templateUrl: '/templates/tracks/list.html'
controller: 'tracks-list' controller: 'tracks-list'
state.state 'content.track', state.state 'content.track',
url: '/tracks/{id:[^\-]+}-{slug}' url: '/tracks/{id:[^\-]+}-{slug}'
templateUrl: '/templates/tracks/show.html' templateUrl: '/templates/tracks/show.html'
controller: 'track' controller: 'track'
# Albums # Albums
state.state 'content.albums', state.state 'content.albums',
url: '/albums' url: '/albums'
templateUrl: '/templates/albums/index.html' templateUrl: '/templates/albums/index.html'
controller: 'albums' controller: 'albums'
abstract: true abstract: true
state.state 'content.albums.list', state.state 'content.albums.list',
url: '?page' url: '?page'
templateUrl: '/templates/albums/list.html' templateUrl: '/templates/albums/list.html'
controller: 'albums-list' controller: 'albums-list'
state.state 'content.album', state.state 'content.album',
url: '/albums/{id:[^\-]+}-{slug}' url: '/albums/{id:[^\-]+}-{slug}'
templateUrl: '/templates/albums/show.html' templateUrl: '/templates/albums/show.html'
controller: 'album' controller: 'album'
# Playlists # Playlists
state.state 'content.playlists', state.state 'content.playlists',
url: '/playlists' url: '/playlists'
templateUrl: '/templates/playlists/index.html' templateUrl: '/templates/playlists/index.html'
controller: 'playlists' controller: 'playlists'
abstract: true abstract: true
state.state 'content.playlists.list', state.state 'content.playlists.list',
url: '?page' url: '?page'
controller: 'playlists-list' controller: 'playlists-list'
templateUrl: '/templates/playlists/list.html' templateUrl: '/templates/playlists/list.html'
state.state 'content.playlist', state.state 'content.playlist',
url: '/playlist/{id:[^\-]+}-{slug}' url: '/playlist/{id:[^\-]+}-{slug}'
templateUrl: '/templates/playlists/show.html' templateUrl: '/templates/playlists/show.html'
controller: 'playlist' controller: 'playlist'
# Artists # Artists
state.state 'content.artists', state.state 'content.artists',
url: '/artists' url: '/artists'
templateUrl: '/templates/artists/index.html' templateUrl: '/templates/artists/index.html'
controller: 'artists' controller: 'artists'
abstract: true abstract: true
state.state 'content.artists.list', state.state 'content.artists.list',
url: '?page' url: '?page'
templateUrl: '/templates/artists/list.html' templateUrl: '/templates/artists/list.html'
controller: 'artists-list' controller: 'artists-list'
# Pages # Pages
state.state 'faq', state.state 'faq',
url: '/faq' url: '/faq'
templateUrl: '/templates/pages/faq.html' templateUrl: '/templates/pages/faq.html'
state.state 'about', state.state 'about',
url: '/about' url: '/about'
templateUrl: '/templates/pages/about.html' templateUrl: '/templates/pages/about.html'
# Auth # Auth
state.state 'login', state.state 'login',
url: '/login' url: '/login'
templateUrl: '/templates/auth/login.html' templateUrl: '/templates/auth/login.html'
controller: 'login' controller: 'login'
state.state 'register', state.state 'register',
url: '/register' url: '/register'
templateUrl: '/templates/auth/register.html' templateUrl: '/templates/auth/register.html'
# Hompage # Hompage
if window.pfm.auth.isLogged if window.pfm.auth.isLogged
state.state 'home', state.state 'home',
url: '/' url: '/'
templateUrl: '/templates/dashboard/index.html' templateUrl: '/templates/dashboard/index.html'
controller: 'dashboard' controller: 'dashboard'
else else
state.state 'home', state.state 'home',
url: '/' url: '/'
templateUrl: '/templates/home/index.html' templateUrl: '/templates/home/index.html'
controller: 'home' controller: 'home'
# Final catch-all for aritsts # Final catch-all for aritsts
state.state 'content.artist', state.state 'content.artist',
url: '^/{slug}' url: '^/{slug}'
templateUrl: '/templates/artists/_show_layout.html' templateUrl: '/templates/artists/_show_layout.html'
abstract: true abstract: true
controller: 'artist' controller: 'artist'
state.state 'content.artist.profile', state.state 'content.artist.profile',
url: '' url: ''
templateUrl: '/templates/artists/profile.html' templateUrl: '/templates/artists/profile.html'
controller: 'artist-profile' controller: 'artist-profile'
state.state 'content.artist.content', state.state 'content.artist.content',
url: '/content' url: '/content'
templateUrl: '/templates/artists/content.html' templateUrl: '/templates/artists/content.html'
controller: 'artist-content' controller: 'artist-content'
state.state 'content.artist.favourites', state.state 'content.artist.favourites',
url: '/favourites' url: '/favourites'
templateUrl: '/templates/artists/favourites.html' templateUrl: '/templates/artists/favourites.html'
controller: 'artist-favourites' controller: 'artist-favourites'
location.html5Mode(true); location.html5Mode(true);
$dialogProvider.options $dialogProvider.options
dialogFade: true dialogFade: true
backdropClick: false backdropClick: false
] ]

View file

@ -1,143 +1,143 @@
window.pfm.preloaders['account-albums-edit'] = [ window.pfm.preloaders['account-albums-edit'] = [
'account-tracks', 'account-albums', '$state' 'account-tracks', 'account-albums', '$state'
(tracks, albums, $state) -> (tracks, albums, $state) ->
defs = [tracks.refresh()] defs = [tracks.refresh()]
if $state.params.album_id if $state.params.album_id
defs.push albums.getEdit($state.params.album_id, true) defs.push albums.getEdit($state.params.album_id, true)
$.when.all defs $.when.all defs
] ]
angular.module('ponyfm').controller "account-albums-edit", [ angular.module('ponyfm').controller "account-albums-edit", [
'$scope', '$state', '$dialog', 'account-albums' '$scope', '$state', '$dialog', 'account-albums'
($scope, $state, $dialog, albums) -> ($scope, $state, $dialog, albums) ->
$scope.isNew = $state.params.album_id == undefined $scope.isNew = $state.params.album_id == undefined
$scope.data.isEditorOpen = true $scope.data.isEditorOpen = true
$scope.errors = {} $scope.errors = {}
$scope.isDirty = false $scope.isDirty = false
$scope.album = {} $scope.album = {}
$scope.isSaving = false $scope.isSaving = false
$scope.tracks = [] $scope.tracks = []
$scope.trackIds = {} $scope.trackIds = {}
$scope.toggleTrack = (track) -> $scope.toggleTrack = (track) ->
if $scope.trackIds[track.id] if $scope.trackIds[track.id]
delete $scope.trackIds[track.id] delete $scope.trackIds[track.id]
$scope.tracks.splice ($scope.tracks.indexOf track), 1 $scope.tracks.splice ($scope.tracks.indexOf track), 1
else else
$scope.trackIds[track.id] = track $scope.trackIds[track.id] = track
$scope.tracks.push track $scope.tracks.push track
$scope.isDirty = true $scope.isDirty = true
$scope.sortTracks = () -> $scope.sortTracks = () ->
$scope.isDirty = true $scope.isDirty = true
$scope.touchModel = -> $scope.isDirty = true $scope.touchModel = -> $scope.isDirty = true
$scope.setCover = (image, type) -> $scope.setCover = (image, type) ->
delete $scope.album.cover_id delete $scope.album.cover_id
delete $scope.album.cover delete $scope.album.cover
if image == null if image == null
$scope.album.remove_cover = true $scope.album.remove_cover = true
else if type == 'file' else if type == 'file'
$scope.album.cover = image $scope.album.cover = image
else if type == 'gallery' else if type == 'gallery'
$scope.album.cover_id = image.id $scope.album.cover_id = image.id
$scope.isDirty = true $scope.isDirty = true
$scope.$on '$destroy', -> $scope.data.isEditorOpen = false $scope.$on '$destroy', -> $scope.data.isEditorOpen = false
$scope.saveAlbum = -> $scope.saveAlbum = ->
return if !$scope.isNew && !$scope.isDirty return if !$scope.isNew && !$scope.isDirty
url = url =
if $scope.isNew if $scope.isNew
'/api/web/albums/create' '/api/web/albums/create'
else else
'/api/web/albums/edit/' + $state.params.album_id '/api/web/albums/edit/' + $state.params.album_id
xhr = new XMLHttpRequest() xhr = new XMLHttpRequest()
xhr.onload = -> $scope.$apply -> xhr.onload = -> $scope.$apply ->
$scope.isSaving = false $scope.isSaving = false
response = $.parseJSON(xhr.responseText) response = $.parseJSON(xhr.responseText)
if xhr.status != 200 if xhr.status != 200
$scope.errors = {} $scope.errors = {}
_.each response.errors, (value, key) -> $scope.errors[key] = value.join ', ' _.each response.errors, (value, key) -> $scope.errors[key] = value.join ', '
return return
$scope.$emit 'album-updated' $scope.$emit 'album-updated'
if $scope.isNew if $scope.isNew
$scope.isDirty = false $scope.isDirty = false
$scope.$emit 'album-created' $scope.$emit 'album-created'
$state.transitionTo 'account.albums.edit', {album_id: response.id} $state.transitionTo 'account.albums.edit', {album_id: response.id}
else else
$scope.isDirty = false $scope.isDirty = false
$scope.data.selectedAlbum.title = $scope.album.title $scope.data.selectedAlbum.title = $scope.album.title
$scope.data.selectedAlbum.covers.normal = response.real_cover_url $scope.data.selectedAlbum.covers.normal = response.real_cover_url
formData = new FormData() formData = new FormData()
_.each $scope.album, (value, name) -> _.each $scope.album, (value, name) ->
if name == 'cover' if name == 'cover'
return if value == null return if value == null
if typeof(value) == 'object' if typeof(value) == 'object'
formData.append name, value, value.name formData.append name, value, value.name
else else
formData.append name, value formData.append name, value
formData.append 'track_ids', _.map($scope.tracks, (t) -> t.id).join() formData.append 'track_ids', _.map($scope.tracks, (t) -> t.id).join()
xhr.open 'POST', url, true xhr.open 'POST', url, true
xhr.setRequestHeader 'X-CSRF-Token', pfm.token xhr.setRequestHeader 'X-CSRF-Token', pfm.token
$scope.isSaving = true $scope.isSaving = true
xhr.send formData xhr.send formData
$scope.deleteAlbum = () -> $scope.deleteAlbum = () ->
$dialog.messageBox('Delete ' + $scope.album.title, 'Are you sure you want to delete "' + $scope.album.title + '"? This cannot be undone.', [ $dialog.messageBox('Delete ' + $scope.album.title, 'Are you sure you want to delete "' + $scope.album.title + '"? This cannot be undone.', [
{result: 'ok', label: 'Yes', cssClass: 'btn-danger'}, {result: 'cancel', label: 'No', cssClass: 'btn-primary'} {result: 'ok', label: 'Yes', cssClass: 'btn-danger'}, {result: 'cancel', label: 'No', cssClass: 'btn-primary'}
]).open().then (res) -> ]).open().then (res) ->
return if res == 'cancel' return if res == 'cancel'
$.post('/api/web/albums/delete/' + $scope.album.id, {_token: window.pfm.token}) $.post('/api/web/albums/delete/' + $scope.album.id, {_token: window.pfm.token})
.then -> $scope.$apply -> .then -> $scope.$apply ->
$scope.$emit 'album-deleted' $scope.$emit 'album-deleted'
$state.transitionTo 'account.albums' $state.transitionTo 'account.albums'
$scope.setCover = (image, type) -> $scope.setCover = (image, type) ->
delete $scope.album.cover_id delete $scope.album.cover_id
delete $scope.album.cover delete $scope.album.cover
if image == null if image == null
$scope.album.remove_cover = true $scope.album.remove_cover = true
else if type == 'file' else if type == 'file'
$scope.album.cover = image $scope.album.cover = image
else if type == 'gallery' else if type == 'gallery'
$scope.album.cover_id = image.id $scope.album.cover_id = image.id
$scope.isDirty = true $scope.isDirty = true
if !$scope.isNew if !$scope.isNew
albums.getEdit($state.params.album_id).done (album) -> albums.getEdit($state.params.album_id).done (album) ->
$scope.album = $scope.album =
id: album.id id: album.id
title: album.title title: album.title
description: album.description description: album.description
remove_cover: false remove_cover: false
cover: album.cover_url cover: album.cover_url
$scope.tracks = [] $scope.tracks = []
$scope.tracks.push track for track in album.tracks $scope.tracks.push track for track in album.tracks
$scope.trackIds[track.id] = track for track in album.tracks $scope.trackIds[track.id] = track for track in album.tracks
else else
$scope.album = $scope.album =
title: '' title: ''
description: '' description: ''
$scope.$on '$locationChangeStart', (e) -> $scope.$on '$locationChangeStart', (e) ->
return if !$scope.isDirty return if !$scope.isDirty
e.preventDefault() if !confirm('Are you sure you want to leave this page without saving your changes?') e.preventDefault() if !confirm('Are you sure you want to leave this page without saving your changes?')
] ]

View file

@ -1,47 +1,47 @@
window.pfm.preloaders['account-albums'] = [ window.pfm.preloaders['account-albums'] = [
'account-tracks', 'account-albums' 'account-tracks', 'account-albums'
(tracks, albums) -> (tracks, albums) ->
$.when.all [tracks.refresh('published=true&in_album=false', true), albums.refresh(true)] $.when.all [tracks.refresh('published=true&in_album=false', true), albums.refresh(true)]
] ]
angular.module('ponyfm').controller "account-albums", [ angular.module('ponyfm').controller "account-albums", [
'$scope', '$state', 'account-albums', 'account-tracks' '$scope', '$state', 'account-albums', 'account-tracks'
($scope, $state, albums, tracks) -> ($scope, $state, albums, tracks) ->
$scope.albums = [] $scope.albums = []
$scope.data = $scope.data =
isEditorOpen: false isEditorOpen: false
selectedAlbum: null selectedAlbum: null
tracksDb: [] tracksDb: []
selectAlbum = (album) -> $scope.data.selectedAlbum = album selectAlbum = (album) -> $scope.data.selectedAlbum = album
updateTracks = (tracks) -> updateTracks = (tracks) ->
$scope.data.tracksDb.push track for track in tracks $scope.data.tracksDb.push track for track in tracks
tracks.refresh('published=true&in_album=false').done updateTracks tracks.refresh('published=true&in_album=false').done updateTracks
albumsDb = {} albumsDb = {}
updateAlbums = (albums) -> updateAlbums = (albums) ->
$scope.albums.length = 0 $scope.albums.length = 0
for album in albums for album in albums
$scope.albums.push album $scope.albums.push album
albumsDb[album.id] = album albumsDb[album.id] = album
if $state.params.album_id if $state.params.album_id
selectAlbum albumsDb[$state.params.album_id] selectAlbum albumsDb[$state.params.album_id]
albums.refresh().done updateAlbums albums.refresh().done updateAlbums
$scope.$on '$stateChangeSuccess', () -> $scope.$on '$stateChangeSuccess', () ->
if $state.params.album_id if $state.params.album_id
selectAlbum albumsDb[$state.params.album_id] selectAlbum albumsDb[$state.params.album_id]
else else
selectAlbum null selectAlbum null
$scope.$on 'album-created', () -> albums.refresh(true).done(updateAlbums) $scope.$on 'album-created', () -> albums.refresh(true).done(updateAlbums)
$scope.$on 'album-deleted', () -> albums.refresh(true).done(updateAlbums) $scope.$on 'album-deleted', () -> albums.refresh(true).done(updateAlbums)
$scope.$on 'album-updated', () -> tracks.refresh('published=true&in_album=false', true).done updateTracks $scope.$on 'album-updated', () -> tracks.refresh('published=true&in_album=false', true).done updateTracks
] ]

View file

@ -1,10 +1,10 @@
angular.module('ponyfm').controller "account-image-select", [ angular.module('ponyfm').controller "account-image-select", [
'$scope' '$scope'
($scope) -> ($scope) ->
$scope.images = [] $scope.images = []
$scope.isLoading = true $scope.isLoading = true
$.getJSON('/api/web/images/owned').done (images) -> $scope.$apply -> $.getJSON('/api/web/images/owned').done (images) -> $scope.$apply ->
$scope.images = images $scope.images = images
$scope.isLoading = false $scope.isLoading = false
] ]

View file

@ -1,44 +1,44 @@
window.pfm.preloaders['account-playlists'] = [ window.pfm.preloaders['account-playlists'] = [
'playlists' 'playlists'
(playlists) -> playlists.refreshOwned true (playlists) -> playlists.refreshOwned true
] ]
angular.module('ponyfm').controller "account-playlists", [ angular.module('ponyfm').controller "account-playlists", [
'$scope', 'auth', '$dialog', 'playlists' '$scope', 'auth', '$dialog', 'playlists'
($scope, auth, $dialog, playlists) -> ($scope, auth, $dialog, playlists) ->
$scope.playlists = [] $scope.playlists = []
loadPlaylists = (playlists) -> loadPlaylists = (playlists) ->
$scope.playlists.push playlist for playlist in playlists $scope.playlists.push playlist for playlist in playlists
playlists.refreshOwned().done loadPlaylists playlists.refreshOwned().done loadPlaylists
$scope.editPlaylist = (playlist) -> $scope.editPlaylist = (playlist) ->
dialog = $dialog.dialog dialog = $dialog.dialog
templateUrl: '/templates/partials/playlist-dialog.html' templateUrl: '/templates/partials/playlist-dialog.html'
controller: 'playlist-form' controller: 'playlist-form'
resolve: { resolve: {
playlist: () -> angular.copy playlist playlist: () -> angular.copy playlist
} }
dialog.open() dialog.open()
$scope.togglePlaylistPin = (playlist) -> $scope.togglePlaylistPin = (playlist) ->
playlist.is_pinned = !playlist.is_pinned; playlist.is_pinned = !playlist.is_pinned;
playlists.editPlaylist playlist playlists.editPlaylist playlist
$scope.deletePlaylist = (playlist) -> $scope.deletePlaylist = (playlist) ->
$dialog.messageBox('Delete ' + playlist.title, 'Are you sure you want to delete "' + playlist.title + '"? This cannot be undone.', [ $dialog.messageBox('Delete ' + playlist.title, 'Are you sure you want to delete "' + playlist.title + '"? This cannot be undone.', [
{result: 'ok', label: 'Yes', cssClass: 'btn-danger'}, {result: 'ok', label: 'Yes', cssClass: 'btn-danger'},
{result: 'cancel', label: 'No', cssClass: 'btn-primary'} {result: 'cancel', label: 'No', cssClass: 'btn-primary'}
]).open().then (res) -> ]).open().then (res) ->
return if res == 'cancel' return if res == 'cancel'
playlists.deletePlaylist(playlist).done -> playlists.deletePlaylist(playlist).done ->
$scope.playlists.splice _.indexOf($scope.playlists, (p) -> p.id == playlist.id), 1 $scope.playlists.splice _.indexOf($scope.playlists, (p) -> p.id == playlist.id), 1
$scope.$on 'playlist-updated', (e, playlist) -> $scope.$on 'playlist-updated', (e, playlist) ->
index = _.indexOf($scope.playlists, (p) -> p.id == playlist.id) index = _.indexOf($scope.playlists, (p) -> p.id == playlist.id)
content = $scope.playlists[index] content = $scope.playlists[index]
_.each playlist, (value, name) -> content[name] = value _.each playlist, (value, name) -> content[name] = value
$scope.playlists.sort (left, right) -> left.title.localeCompare right.title $scope.playlists.sort (left, right) -> left.title.localeCompare right.title
] ]

View file

@ -1,63 +1,63 @@
angular.module('ponyfm').controller "account-settings", [ angular.module('ponyfm').controller "account-settings", [
'$scope', 'auth' '$scope', 'auth'
($scope, auth) -> ($scope, auth) ->
$scope.settings = {} $scope.settings = {}
$scope.errors = {} $scope.errors = {}
$scope.isDirty = false $scope.isDirty = false
$scope.touchModel = () -> $scope.touchModel = () ->
$scope.isDirty = true $scope.isDirty = true
$scope.refresh = () -> $scope.refresh = () ->
$.getJSON('/api/web/account/settings') $.getJSON('/api/web/account/settings')
.done (res) -> $scope.$apply -> .done (res) -> $scope.$apply ->
$scope.settings = res $scope.settings = res
$scope.setAvatar = (image, type) -> $scope.setAvatar = (image, type) ->
delete $scope.settings.avatar_id delete $scope.settings.avatar_id
delete $scope.settings.avatar delete $scope.settings.avatar
if type == 'file' if type == 'file'
$scope.settings.avatar = image $scope.settings.avatar = image
else if type == 'gallery' else if type == 'gallery'
$scope.settings.avatar_id = image.id $scope.settings.avatar_id = image.id
$scope.isDirty = true $scope.isDirty = true
$scope.updateAccount = () -> $scope.updateAccount = () ->
return if !$scope.isDirty return if !$scope.isDirty
xhr = new XMLHttpRequest() xhr = new XMLHttpRequest()
xhr.onload = -> $scope.$apply -> xhr.onload = -> $scope.$apply ->
$scope.isSaving = false $scope.isSaving = false
response = $.parseJSON(xhr.responseText) response = $.parseJSON(xhr.responseText)
if xhr.status != 200 if xhr.status != 200
$scope.errors = {} $scope.errors = {}
_.each response.errors, (value, key) -> $scope.errors[key] = value.join ', ' _.each response.errors, (value, key) -> $scope.errors[key] = value.join ', '
return return
$scope.isDirty = false $scope.isDirty = false
$scope.errors = {} $scope.errors = {}
$scope.refresh() $scope.refresh()
formData = new FormData() formData = new FormData()
_.each $scope.settings, (value, name) -> _.each $scope.settings, (value, name) ->
if name == 'avatar' if name == 'avatar'
return if value == null return if value == null
if typeof(value) == 'object' if typeof(value) == 'object'
formData.append name, value, value.name formData.append name, value, value.name
else else
formData.append name, value formData.append name, value
xhr.open 'POST', '/api/web/account/settings/save', true xhr.open 'POST', '/api/web/account/settings/save', true
xhr.setRequestHeader 'X-CSRF-Token', pfm.token xhr.setRequestHeader 'X-CSRF-Token', pfm.token
$scope.isSaving = true $scope.isSaving = true
xhr.send formData xhr.send formData
$scope.refresh() $scope.refresh()
$scope.$on '$stateChangeStart', (e) -> $scope.$on '$stateChangeStart', (e) ->
return if $scope.selectedTrack == null || !$scope.isDirty return if $scope.selectedTrack == null || !$scope.isDirty
e.preventDefault() if !confirm('Are you sure you want to leave this page without saving your changes?') e.preventDefault() if !confirm('Are you sure you want to leave this page without saving your changes?')
] ]

View file

@ -1,146 +1,146 @@
window.pfm.preloaders['account-track'] = [ window.pfm.preloaders['account-track'] = [
'account-tracks', 'account-albums', 'taxonomies', '$state' 'account-tracks', 'account-albums', 'taxonomies', '$state'
(tracks, albums, taxonomies, state) -> (tracks, albums, taxonomies, state) ->
$.when.all [albums.refresh(), taxonomies.refresh(), tracks.getEdit(state.params.track_id, true)] $.when.all [albums.refresh(), taxonomies.refresh(), tracks.getEdit(state.params.track_id, true)]
] ]
angular.module('ponyfm').controller "account-track", [ angular.module('ponyfm').controller "account-track", [
'$scope', '$state', 'taxonomies', '$dialog', 'account-albums', 'account-tracks', 'images' '$scope', '$state', 'taxonomies', '$dialog', 'account-albums', 'account-tracks', 'images'
($scope, $state, taxonomies, $dialog, albums, tracks, images) -> ($scope, $state, taxonomies, $dialog, albums, tracks, images) ->
$scope.isDirty = false $scope.isDirty = false
$scope.isSaving = false $scope.isSaving = false
$scope.taxonomies = taxonomies $scope.taxonomies = taxonomies
$scope.selectedSongsTitle = 'None' $scope.selectedSongsTitle = 'None'
$scope.selectedSongs = {} $scope.selectedSongs = {}
$scope.albums = [] $scope.albums = []
$scope.selectedAlbum = null $scope.selectedAlbum = null
albumsDb = {} albumsDb = {}
albums.refresh().done (albums) -> albums.refresh().done (albums) ->
$scope.albums.legnth = 0 $scope.albums.legnth = 0
albumsDb = {} albumsDb = {}
for album in albums for album in albums
albumsDb[album.id] = album albumsDb[album.id] = album
$scope.albums.push album $scope.albums.push album
$scope.selectAlbum = (album) -> $scope.selectAlbum = (album) ->
$scope.selectedAlbum = album $scope.selectedAlbum = album
$scope.edit.album_id = if album then album.id else null $scope.edit.album_id = if album then album.id else null
$scope.isDirty = true $scope.isDirty = true
$scope.setCover = (image, type) -> $scope.setCover = (image, type) ->
delete $scope.edit.cover_id delete $scope.edit.cover_id
delete $scope.edit.cover delete $scope.edit.cover
if image == null if image == null
$scope.edit.remove_cover = true $scope.edit.remove_cover = true
else if type == 'file' else if type == 'file'
$scope.edit.cover = image $scope.edit.cover = image
else if type == 'gallery' else if type == 'gallery'
$scope.edit.cover_id = image.id $scope.edit.cover_id = image.id
$scope.isDirty = true $scope.isDirty = true
updateSongDisplay = () -> updateSongDisplay = () ->
if _.size $scope.selectedSongs if _.size $scope.selectedSongs
$scope.selectedSongsTitle = (_.map _.values($scope.selectedSongs), (s) -> s.title).join(', ') $scope.selectedSongsTitle = (_.map _.values($scope.selectedSongs), (s) -> s.title).join(', ')
else else
$scope.selectedSongsTitle = 'None' $scope.selectedSongsTitle = 'None'
$scope.toggleSong = (song) -> $scope.toggleSong = (song) ->
$scope.isDirty = true $scope.isDirty = true
if $scope.selectedSongs[song.id] if $scope.selectedSongs[song.id]
delete $scope.selectedSongs[song.id] delete $scope.selectedSongs[song.id]
else else
$scope.selectedSongs[song.id] = song $scope.selectedSongs[song.id] = song
updateSongDisplay() updateSongDisplay()
$scope.updateIsVocal = () -> $scope.updateIsVocal = () ->
delete $scope.errors.lyrics if !$scope.edit.is_vocal delete $scope.errors.lyrics if !$scope.edit.is_vocal
$scope.updateTrack = () -> $scope.updateTrack = () ->
xhr = new XMLHttpRequest() xhr = new XMLHttpRequest()
xhr.onload = -> $scope.$apply -> xhr.onload = -> $scope.$apply ->
$scope.isSaving = false $scope.isSaving = false
if xhr.status != 200 if xhr.status != 200
errors = errors =
if xhr.getResponseHeader('content-type') == 'application/json' if xhr.getResponseHeader('content-type') == 'application/json'
$.parseJSON(xhr.responseText).errors $.parseJSON(xhr.responseText).errors
else else
['There was an unknown error!'] ['There was an unknown error!']
$scope.errors = {} $scope.errors = {}
_.each errors, (value, key) -> $scope.errors[key] = value.join ', ' _.each errors, (value, key) -> $scope.errors[key] = value.join ', '
return return
track = $.parseJSON(xhr.responseText) track = $.parseJSON(xhr.responseText)
trackDbItem = $scope.data.selectedTrack trackDbItem = $scope.data.selectedTrack
trackDbItem.title = $scope.edit.title trackDbItem.title = $scope.edit.title
trackDbItem.is_explicit = $scope.edit.is_explicit trackDbItem.is_explicit = $scope.edit.is_explicit
trackDbItem.is_vocal = $scope.edit.is_vocal trackDbItem.is_vocal = $scope.edit.is_vocal
trackDbItem.genre_id = $scope.edit.genre_id trackDbItem.genre_id = $scope.edit.genre_id
trackDbItem.is_published = true trackDbItem.is_published = true
trackDbItem.cover_url = track.real_cover_url trackDbItem.cover_url = track.real_cover_url
$scope.isDirty = false $scope.isDirty = false
$scope.errors = {} $scope.errors = {}
images.refresh true images.refresh true
formData = new FormData(); formData = new FormData();
_.each $scope.edit, (value, name) -> _.each $scope.edit, (value, name) ->
if name == 'cover' if name == 'cover'
return if value == null return if value == null
if typeof(value) == 'object' if typeof(value) == 'object'
formData.append name, value, value.name formData.append name, value, value.name
else if value != null else if value != null
formData.append name, value formData.append name, value
if parseInt($scope.edit.track_type_id) == 2 if parseInt($scope.edit.track_type_id) == 2
formData.append 'show_song_ids', _.map(_.values($scope.selectedSongs), (s) -> s.id).join() formData.append 'show_song_ids', _.map(_.values($scope.selectedSongs), (s) -> s.id).join()
xhr.open 'POST', '/api/web/tracks/edit/' + $scope.edit.id, true xhr.open 'POST', '/api/web/tracks/edit/' + $scope.edit.id, true
xhr.setRequestHeader 'X-CSRF-Token', pfm.token xhr.setRequestHeader 'X-CSRF-Token', pfm.token
$scope.isSaving = true $scope.isSaving = true
xhr.send formData xhr.send formData
tracks.getEdit($state.params.track_id).done (track) -> tracks.getEdit($state.params.track_id).done (track) ->
$scope.edit = $scope.edit =
id: track.id id: track.id
title: track.title title: track.title
description: track.description description: track.description
lyrics: track.lyrics lyrics: track.lyrics
is_explicit: track.is_explicit is_explicit: track.is_explicit
is_downloadable: track.is_downloadable is_downloadable: track.is_downloadable
is_vocal: track.is_vocal is_vocal: track.is_vocal
license_id: track.license_id license_id: track.license_id
genre_id: track.genre_id genre_id: track.genre_id
track_type_id: track.track_type_id track_type_id: track.track_type_id
released_at: if track.released_at then track.released_at.date else '' released_at: if track.released_at then track.released_at.date else ''
remove_cover: false remove_cover: false
cover: track.cover_url cover: track.cover_url
album_id: track.album_id album_id: track.album_id
is_published: track.is_published is_published: track.is_published
is_listed: track.is_listed is_listed: track.is_listed
$scope.selectedAlbum = if track.album_id then albumsDb[track.album_id] else null $scope.selectedAlbum = if track.album_id then albumsDb[track.album_id] else null
$scope.selectedSongs = {} $scope.selectedSongs = {}
$scope.selectedSongs[song.id] = song for song in track.show_songs $scope.selectedSongs[song.id] = song for song in track.show_songs
updateSongDisplay() updateSongDisplay()
$scope.touchModel = -> $scope.isDirty = true $scope.touchModel = -> $scope.isDirty = true
$scope.deleteTrack = (track) -> $scope.deleteTrack = (track) ->
$dialog.messageBox('Delete ' + track.title, 'Are you sure you want to delete "' + track.title + '"? This cannot be undone.', [ $dialog.messageBox('Delete ' + track.title, 'Are you sure you want to delete "' + track.title + '"? This cannot be undone.', [
{result: 'ok', label: 'Yes', cssClass: 'btn-danger'}, {result: 'cancel', label: 'No', cssClass: 'btn-primary'} {result: 'ok', label: 'Yes', cssClass: 'btn-danger'}, {result: 'cancel', label: 'No', cssClass: 'btn-primary'}
]).open().then (res) -> ]).open().then (res) ->
return if res == 'cancel' return if res == 'cancel'
$.post('/api/web/tracks/delete/' + track.id, {_token: window.pfm.token}) $.post('/api/web/tracks/delete/' + track.id, {_token: window.pfm.token})
.then -> $scope.$apply -> .then -> $scope.$apply ->
$scope.$emit 'track-deleted' $scope.$emit 'track-deleted'
$state.transitionTo 'account.tracks' $state.transitionTo 'account.tracks'
$scope.$on '$locationChangeStart', (e) -> $scope.$on '$locationChangeStart', (e) ->
return if !$scope.isDirty return if !$scope.isDirty
e.preventDefault() if !confirm('Are you sure you want to leave this page without saving your changes?') e.preventDefault() if !confirm('Are you sure you want to leave this page without saving your changes?')
] ]

View file

@ -1,44 +1,44 @@
window.pfm.preloaders['account-tracks'] = [ window.pfm.preloaders['account-tracks'] = [
'account-tracks', 'account-albums', 'taxonomies' 'account-tracks', 'account-albums', 'taxonomies'
(tracks, albums, taxonomies) -> (tracks, albums, taxonomies) ->
$.when.all [tracks.refresh(null, true), albums.refresh(true), taxonomies.refresh()] $.when.all [tracks.refresh(null, true), albums.refresh(true), taxonomies.refresh()]
] ]
angular.module('ponyfm').controller "account-tracks", [ angular.module('ponyfm').controller "account-tracks", [
'$scope', '$state', 'taxonomies', '$dialog', 'lightbox', 'account-albums', 'account-tracks' '$scope', '$state', 'taxonomies', '$dialog', 'lightbox', 'account-albums', 'account-tracks'
($scope, $state, taxonomies, $dialog, lightbox, albums, tracks) -> ($scope, $state, taxonomies, $dialog, lightbox, albums, tracks) ->
$scope.data = $scope.data =
selectedTrack: null selectedTrack: null
$scope.tracks = [] $scope.tracks = []
tracksDb = {} tracksDb = {}
setTracks = (tracks) -> setTracks = (tracks) ->
$scope.tracks.length = 0 $scope.tracks.length = 0
tracksDb = {} tracksDb = {}
for track in tracks for track in tracks
tracksDb[track.id] = track tracksDb[track.id] = track
$scope.tracks.push track $scope.tracks.push track
if $state.params.track_id if $state.params.track_id
$scope.data.selectedTrack = tracksDb[$state.params.track_id] $scope.data.selectedTrack = tracksDb[$state.params.track_id]
tracks.refresh().done setTracks tracks.refresh().done setTracks
$scope.refreshList = () -> $scope.refreshList = () ->
tracks.refresh().done setTracks tracks.refresh().done setTracks
$scope.selectTrack = (track) -> $scope.selectTrack = (track) ->
$scope.data.selectedTrack = track $scope.data.selectedTrack = track
$scope.$on '$stateChangeSuccess', () -> $scope.$on '$stateChangeSuccess', () ->
if $state.params.track_id if $state.params.track_id
$scope.selectTrack tracksDb[$state.params.track_id] $scope.selectTrack tracksDb[$state.params.track_id]
else else
$scope.selectTrack null $scope.selectTrack null
$scope.$on 'track-deleted', () -> $scope.$on 'track-deleted', () ->
tracks.clearCache() tracks.clearCache()
$scope.refreshList() $scope.refreshList()
] ]

View file

@ -1,27 +1,27 @@
window.pfm.preloaders['album'] = [ window.pfm.preloaders['album'] = [
'albums', '$state', 'playlists' 'albums', '$state', 'playlists'
(albums, $state, playlists) -> (albums, $state, playlists) ->
$.when.all [albums.fetch $state.params.id, playlists.refreshOwned(true)] $.when.all [albums.fetch $state.params.id, playlists.refreshOwned(true)]
] ]
angular.module('ponyfm').controller "album", [ angular.module('ponyfm').controller "album", [
'$scope', 'albums', '$state', 'playlists', 'auth', '$dialog' '$scope', 'albums', '$state', 'playlists', 'auth', '$dialog'
($scope, albums, $state, playlists, auth, $dialog) -> ($scope, albums, $state, playlists, auth, $dialog) ->
album = null album = null
albums.fetch($state.params.id).done (albumResponse) -> albums.fetch($state.params.id).done (albumResponse) ->
$scope.album = albumResponse.album $scope.album = albumResponse.album
album = albumResponse.album album = albumResponse.album
$scope.playlists = [] $scope.playlists = []
$scope.share = () -> $scope.share = () ->
dialog = $dialog.dialog dialog = $dialog.dialog
templateUrl: '/templates/partials/album-share-dialog.html', templateUrl: '/templates/partials/album-share-dialog.html',
controller: ['$scope', ($scope) -> $scope.album = album; $scope.close = () -> dialog.close()] controller: ['$scope', ($scope) -> $scope.album = album; $scope.close = () -> dialog.close()]
dialog.open() dialog.open()
if auth.data.isLogged if auth.data.isLogged
playlists.refreshOwned().done (lists) -> playlists.refreshOwned().done (lists) ->
$scope.playlists.push list for list in lists $scope.playlists.push list for list in lists
] ]

View file

@ -1,12 +1,12 @@
window.pfm.preloaders['albums-list'] = [ window.pfm.preloaders['albums-list'] = [
'albums', '$state' 'albums', '$state'
(albums, $state) -> (albums, $state) ->
albums.fetchList($state.params.page, true) albums.fetchList($state.params.page, true)
] ]
angular.module('ponyfm').controller "albums-list", [ angular.module('ponyfm').controller "albums-list", [
'$scope', 'albums', '$state' '$scope', 'albums', '$state'
($scope, albums, $state) -> ($scope, albums, $state) ->
albums.fetchList($state.params.page).done (list) -> albums.fetchList($state.params.page).done (list) ->
$scope.albums = list.albums $scope.albums = list.albums
] ]

View file

@ -1,22 +1,22 @@
angular.module('ponyfm').controller "albums", [ angular.module('ponyfm').controller "albums", [
'$scope', 'albums', '$state' '$scope', 'albums', '$state'
($scope, albums, $state) -> ($scope, albums, $state) ->
refreshPages = (list) -> refreshPages = (list) ->
$scope.albums = list.albums $scope.albums = list.albums
$scope.currentPage = parseInt(list.current_page) $scope.currentPage = parseInt(list.current_page)
$scope.totalPages = parseInt(list.total_pages) $scope.totalPages = parseInt(list.total_pages)
delete $scope.nextPage delete $scope.nextPage
delete $scope.prevPage delete $scope.prevPage
$scope.nextPage = $scope.currentPage + 1 if $scope.currentPage < $scope.totalPages $scope.nextPage = $scope.currentPage + 1 if $scope.currentPage < $scope.totalPages
$scope.prevPage = $scope.currentPage - 1 if $scope.currentPage > 1 $scope.prevPage = $scope.currentPage - 1 if $scope.currentPage > 1
$scope.pages = [1..$scope.totalPages] $scope.pages = [1..$scope.totalPages]
albums.fetchList($state.params.page).done refreshPages albums.fetchList($state.params.page).done refreshPages
$scope.$on 'albums-feteched', (e, list) -> refreshPages(list) $scope.$on 'albums-feteched', (e, list) -> refreshPages(list)
$scope.gotoPage = (page) -> $scope.gotoPage = (page) ->
return if !page return if !page
$state.transitionTo 'content.albums.list', {page: page} $state.transitionTo 'content.albums.list', {page: page}
] ]

View file

@ -1,85 +1,85 @@
angular.module('ponyfm').controller "application", [ angular.module('ponyfm').controller "application", [
'$scope', 'auth', '$location', 'upload', '$state', '$stateParams', '$injector', '$rootScope', 'playlists' '$scope', 'auth', '$location', 'upload', '$state', '$stateParams', '$injector', '$rootScope', 'playlists'
($scope, auth, $location, upload, $state, $stateParams, $injector, $rootScope, playlists) -> ($scope, auth, $location, upload, $state, $stateParams, $injector, $rootScope, playlists) ->
$scope.auth = auth.data $scope.auth = auth.data
$scope.$state = $state $scope.$state = $state
$scope.$stateParams = $stateParams $scope.$stateParams = $stateParams
$scope.isPinnedPlaylistSelected = false $scope.isPinnedPlaylistSelected = false
$loadingElement = null $loadingElement = null
loadingStateName = null loadingStateName = null
if window.pfm.error if window.pfm.error
$state.transitionTo 'errors-' + window.pfm.error $state.transitionTo 'errors-' + window.pfm.error
$rootScope.safeApply = (fn) -> $rootScope.safeApply = (fn) ->
phase = $rootScope.$$phase phase = $rootScope.$$phase
if (phase == '$apply' || phase == 'digest') if (phase == '$apply' || phase == 'digest')
fn() fn()
return return
$rootScope.$apply fn $rootScope.$apply fn
$scope.logout = () -> $scope.logout = () ->
auth.logout().done -> location.reload() auth.logout().done -> location.reload()
$scope.isActive = (loc) -> $location.path() == loc $scope.isActive = (loc) -> $location.path() == loc
$scope.$on '$viewContentLoaded', () -> $scope.$on '$viewContentLoaded', () ->
window.setTimeout (-> window.handleResize()), 0 window.setTimeout (-> window.handleResize()), 0
if $loadingElement if $loadingElement
$loadingElement.removeClass 'loading' $loadingElement.removeClass 'loading'
$loadingElement = null $loadingElement = null
$scope.stateIncludes = (state) -> $scope.stateIncludes = (state) ->
if $loadingElement if $loadingElement
newParts = state.split '.' newParts = state.split '.'
oldParts = loadingStateName.split '.' oldParts = loadingStateName.split '.'
for i in [0..newParts.length] for i in [0..newParts.length]
continue if !newParts[i] continue if !newParts[i]
return false if newParts[i] != oldParts[i] return false if newParts[i] != oldParts[i]
return true return true
else else
$state.includes(state) $state.includes(state)
statesPreloaded = {} statesPreloaded = {}
$scope.$on '$stateChangeStart', (e, newState, newParams, oldState, oldParams) -> $scope.$on '$stateChangeStart', (e, newState, newParams, oldState, oldParams) ->
$scope.isPinnedPlaylistSelected = false $scope.isPinnedPlaylistSelected = false
if newState.name == 'content.playlist' if newState.name == 'content.playlist'
$scope.isPinnedPlaylistSelected = playlists.isPlaylistPinned newParams.id $scope.isPinnedPlaylistSelected = playlists.isPlaylistPinned newParams.id
return if !oldState || !newState.controller return if !oldState || !newState.controller
preloader = window.pfm.preloaders[newState.controller] preloader = window.pfm.preloaders[newState.controller]
return if !preloader return if !preloader
if statesPreloaded[newState] if statesPreloaded[newState]
delete statesPreloaded[newState] delete statesPreloaded[newState]
return return
e.preventDefault() e.preventDefault()
loadingStateName = newState.name loadingStateName = newState.name
selector = '' selector = ''
newParts = newState.name.split '.' newParts = newState.name.split '.'
oldParts = oldState.name.split '.' oldParts = oldState.name.split '.'
zipped = _.zip(newParts, oldParts) zipped = _.zip(newParts, oldParts)
for i in [0..zipped.length] for i in [0..zipped.length]
break if !zipped[i] || zipped[i][0] != zipped[i][1] break if !zipped[i] || zipped[i][0] != zipped[i][1]
selector += ' ui-view ' selector += ' ui-view '
selector += ' ui-view ' if newState.name != oldState.name selector += ' ui-view ' if newState.name != oldState.name
$loadingElement = $ selector $loadingElement = $ selector
$loadingElement.addClass 'loading' $loadingElement.addClass 'loading'
stateToInject = angular.copy newState stateToInject = angular.copy newState
stateToInject.params = newParams stateToInject.params = newParams
try try
$injector.invoke(preloader, null, {$state: stateToInject}).then -> $injector.invoke(preloader, null, {$state: stateToInject}).then ->
statesPreloaded[newState] = true statesPreloaded[newState] = true
$state.transitionTo newState, newParams $state.transitionTo newState, newParams
catch error catch error
$state.transitionTo newState, newParams $state.transitionTo newState, newParams
] ]

View file

@ -1,13 +1,13 @@
window.pfm.preloaders['artist-content'] = [ window.pfm.preloaders['artist-content'] = [
'artists', '$state' 'artists', '$state'
(artists, $state) -> (artists, $state) ->
$.when.all [artists.fetch($state.params.slug), artists.fetchContent($state.params.slug, true)] $.when.all [artists.fetch($state.params.slug), artists.fetchContent($state.params.slug, true)]
] ]
angular.module('ponyfm').controller "artist-content", [ angular.module('ponyfm').controller "artist-content", [
'$scope', 'artists', '$state' '$scope', 'artists', '$state'
($scope, artists, $state) -> ($scope, artists, $state) ->
artists.fetchContent($state.params.slug) artists.fetchContent($state.params.slug)
.done (artistResponse) -> .done (artistResponse) ->
$scope.content = artistResponse $scope.content = artistResponse
] ]

View file

@ -1,12 +1,12 @@
window.pfm.preloaders['artist-favourites'] = [ window.pfm.preloaders['artist-favourites'] = [
'artists', '$state' 'artists', '$state'
(artists, $state) -> (artists, $state) ->
$.when.all [artists.fetch($state.params.slug), artists.fetchFavourites($state.params.slug, true)] $.when.all [artists.fetch($state.params.slug), artists.fetchFavourites($state.params.slug, true)]
] ]
angular.module('ponyfm').controller "artist-favourites", [ angular.module('ponyfm').controller "artist-favourites", [
'$scope', 'artists', '$state' '$scope', 'artists', '$state'
($scope, artists, $state) -> ($scope, artists, $state) ->
artists.fetchFavourites($state.params.slug).done (artistResponse) -> artists.fetchFavourites($state.params.slug).done (artistResponse) ->
$scope.favourites = artistResponse $scope.favourites = artistResponse
] ]

View file

@ -1,10 +1,10 @@
window.pfm.preloaders['artist-profile'] = [ window.pfm.preloaders['artist-profile'] = [
'artists', '$state' 'artists', '$state'
(artists, $state) -> (artists, $state) ->
artists.fetch $state.params.slug, true artists.fetch $state.params.slug, true
] ]
angular.module('ponyfm').controller "artist-profile", [ angular.module('ponyfm').controller "artist-profile", [
'$scope', 'artists', '$state' '$scope', 'artists', '$state'
($scope, artists, $state) -> ($scope, artists, $state) ->
] ]

View file

@ -1,17 +1,17 @@
window.pfm.preloaders['artist'] = [ window.pfm.preloaders['artist'] = [
'artists', '$state' 'artists', '$state'
(artists, $state) -> (artists, $state) ->
artists.fetch $state.params.slug, true artists.fetch $state.params.slug, true
] ]
angular.module('ponyfm').controller "artist", [ angular.module('ponyfm').controller "artist", [
'$scope', 'artists', '$state', 'follow' '$scope', 'artists', '$state', 'follow'
($scope, artists, $state, follow) -> ($scope, artists, $state, follow) ->
artists.fetch($state.params.slug) artists.fetch($state.params.slug)
.done (artistResponse) -> .done (artistResponse) ->
$scope.artist = artistResponse.artist $scope.artist = artistResponse.artist
$scope.toggleFollow = () -> $scope.toggleFollow = () ->
follow.toggle('artist', $scope.artist.id).then (res) -> follow.toggle('artist', $scope.artist.id).then (res) ->
$scope.artist.user_data.is_following = res.is_followed $scope.artist.user_data.is_following = res.is_followed
] ]

View file

@ -1,12 +1,12 @@
window.pfm.preloaders['artists-list'] = [ window.pfm.preloaders['artists-list'] = [
'artists', '$state' 'artists', '$state'
(artists, $state) -> (artists, $state) ->
artists.fetchList($state.params.page, true) artists.fetchList($state.params.page, true)
] ]
angular.module('ponyfm').controller "artists-list", [ angular.module('ponyfm').controller "artists-list", [
'$scope', 'artists', '$state' '$scope', 'artists', '$state'
($scope, artists, $state) -> ($scope, artists, $state) ->
artists.fetchList($state.params.page).done (list) -> artists.fetchList($state.params.page).done (list) ->
$scope.artists = list.artists $scope.artists = list.artists
] ]

View file

@ -1,22 +1,22 @@
angular.module('ponyfm').controller "artists", [ angular.module('ponyfm').controller "artists", [
'$scope', 'artists', '$state' '$scope', 'artists', '$state'
($scope, artists, $state) -> ($scope, artists, $state) ->
refreshPages = (list) -> refreshPages = (list) ->
$scope.artists = list.artists $scope.artists = list.artists
$scope.currentPage = parseInt(list.current_page) $scope.currentPage = parseInt(list.current_page)
$scope.totalPages = parseInt(list.total_pages) $scope.totalPages = parseInt(list.total_pages)
delete $scope.nextPage delete $scope.nextPage
delete $scope.prevPage delete $scope.prevPage
$scope.nextPage = $scope.currentPage + 1 if $scope.currentPage < $scope.totalPages $scope.nextPage = $scope.currentPage + 1 if $scope.currentPage < $scope.totalPages
$scope.prevPage = $scope.currentPage - 1 if $scope.currentPage > 1 $scope.prevPage = $scope.currentPage - 1 if $scope.currentPage > 1
$scope.pages = [1..$scope.totalPages] $scope.pages = [1..$scope.totalPages]
artists.fetchList($state.params.page).done refreshPages artists.fetchList($state.params.page).done refreshPages
$scope.$on 'artists-feteched', (e, list) -> refreshPages(list) $scope.$on 'artists-feteched', (e, list) -> refreshPages(list)
$scope.gotoPage = (page) -> $scope.gotoPage = (page) ->
return if !page return if !page
$state.transitionTo 'content.artists.list', {page: page} $state.transitionTo 'content.artists.list', {page: page}
] ]

View file

@ -1,5 +1,5 @@
angular.module('ponyfm').controller "credits", [ angular.module('ponyfm').controller "credits", [
'$scope', 'dialog', '$scope', 'dialog',
($scope, dialog) -> ($scope, dialog) ->
$scope.close = () -> dialog.close(null) $scope.close = () -> dialog.close(null)
] ]

View file

@ -1,15 +1,15 @@
window.pfm.preloaders['dashboard'] = [ window.pfm.preloaders['dashboard'] = [
'dashboard' 'dashboard'
(dashboard) -> dashboard.refresh(true) (dashboard) -> dashboard.refresh(true)
] ]
angular.module('ponyfm').controller "dashboard", [ angular.module('ponyfm').controller "dashboard", [
'$scope', 'dashboard', 'auth', '$http' '$scope', 'dashboard', 'auth', '$http'
($scope, dashboard, auth, $http) -> ($scope, dashboard, auth, $http) ->
$scope.recentTracks = null $scope.recentTracks = null
$scope.popularTracks = null $scope.popularTracks = null
dashboard.refresh().done (res) -> dashboard.refresh().done (res) ->
$scope.recentTracks = res.recent_tracks $scope.recentTracks = res.recent_tracks
$scope.popularTracks = res.popular_tracks $scope.popularTracks = res.popular_tracks
] ]

View file

@ -1,12 +1,12 @@
window.pfm.preloaders['favourites-albums'] = [ window.pfm.preloaders['favourites-albums'] = [
'favourites' 'favourites'
(favourites) -> (favourites) ->
favourites.fetchAlbums(true) favourites.fetchAlbums(true)
] ]
angular.module('ponyfm').controller "favourites-albums", [ angular.module('ponyfm').controller "favourites-albums", [
'$scope', 'favourites' '$scope', 'favourites'
($scope, favourites) -> ($scope, favourites) ->
favourites.fetchAlbums().done (res) -> favourites.fetchAlbums().done (res) ->
$scope.albums = res.albums $scope.albums = res.albums
] ]

View file

@ -1,12 +1,12 @@
window.pfm.preloaders['favourites-playlists'] = [ window.pfm.preloaders['favourites-playlists'] = [
'favourites' 'favourites'
(favourites) -> (favourites) ->
favourites.fetchPlaylists(true) favourites.fetchPlaylists(true)
] ]
angular.module('ponyfm').controller "favourites-playlists", [ angular.module('ponyfm').controller "favourites-playlists", [
'$scope', 'favourites' '$scope', 'favourites'
($scope, favourites) -> ($scope, favourites) ->
favourites.fetchPlaylists().done (res) -> favourites.fetchPlaylists().done (res) ->
$scope.playlists = res.playlists $scope.playlists = res.playlists
] ]

View file

@ -1,12 +1,12 @@
window.pfm.preloaders['favourites-tracks'] = [ window.pfm.preloaders['favourites-tracks'] = [
'favourites' 'favourites'
(favourites) -> (favourites) ->
favourites.fetchTracks(true) favourites.fetchTracks(true)
] ]
angular.module('ponyfm').controller "favourites-tracks", [ angular.module('ponyfm').controller "favourites-tracks", [
'$scope', 'favourites' '$scope', 'favourites'
($scope, favourites) -> ($scope, favourites) ->
favourites.fetchTracks().done (res) -> favourites.fetchTracks().done (res) ->
$scope.tracks = res.tracks $scope.tracks = res.tracks
] ]

View file

@ -1,15 +1,15 @@
window.pfm.preloaders['home'] = [ window.pfm.preloaders['home'] = [
'dashboard' 'dashboard'
(dashboard) -> dashboard.refresh(true) (dashboard) -> dashboard.refresh(true)
] ]
angular.module('ponyfm').controller "home", [ angular.module('ponyfm').controller "home", [
'$scope', 'dashboard' '$scope', 'dashboard'
($scope, dashboard) -> ($scope, dashboard) ->
$scope.recentTracks = null $scope.recentTracks = null
$scope.popularTracks = null $scope.popularTracks = null
dashboard.refresh().done (res) -> dashboard.refresh().done (res) ->
$scope.recentTracks = res.recent_tracks $scope.recentTracks = res.recent_tracks
$scope.popularTracks = res.popular_tracks $scope.popularTracks = res.popular_tracks
] ]

View file

@ -1,18 +1,18 @@
angular.module('ponyfm').controller "login", [ angular.module('ponyfm').controller "login", [
'$scope', 'auth' '$scope', 'auth'
($scope, auth) -> ($scope, auth) ->
$scope.messages = [] $scope.messages = []
$scope.login = $scope.login =
remember: true remember: true
submit: () -> submit: () ->
$scope.messages = [] $scope.messages = []
auth.login(this.email, this.password, this.remember) auth.login(this.email, this.password, this.remember)
.done -> .done ->
location.reload() location.reload()
.fail (messages) -> .fail (messages) ->
$scope.messages = _.values messages $scope.messages = _.values messages
] ]

View file

@ -1,27 +1,27 @@
angular.module('ponyfm').controller "playlist-form", [ angular.module('ponyfm').controller "playlist-form", [
'$scope', 'dialog', 'playlists', 'playlist' '$scope', 'dialog', 'playlists', 'playlist'
($scope, dialog, playlists, playlist) -> ($scope, dialog, playlists, playlist) ->
$scope.isLoading = false $scope.isLoading = false
$scope.form = playlist $scope.form = playlist
$scope.isNew = playlist.id == undefined $scope.isNew = playlist.id == undefined
$scope.errors = {} $scope.errors = {}
$scope.createPlaylist = () -> $scope.createPlaylist = () ->
$scope.isLoading = true $scope.isLoading = true
def = def =
if $scope.isNew if $scope.isNew
playlists.createPlaylist($scope.form) playlists.createPlaylist($scope.form)
else else
playlists.editPlaylist($scope.form) playlists.editPlaylist($scope.form)
def def
.done (res) -> .done (res) ->
dialog.close(res) dialog.close(res)
.fail (errors)-> .fail (errors)->
$scope.errors = errors $scope.errors = errors
$scope.isLoading = false $scope.isLoading = false
$scope.close = () -> dialog.close(null) $scope.close = () -> dialog.close(null)
] ]

View file

@ -1,21 +1,21 @@
window.pfm.preloaders['playlist'] = [ window.pfm.preloaders['playlist'] = [
'$state', 'playlists' '$state', 'playlists'
($state, playlists) -> ($state, playlists) ->
playlists.fetch $state.params.id, true playlists.fetch $state.params.id, true
] ]
angular.module('ponyfm').controller 'playlist', [ angular.module('ponyfm').controller 'playlist', [
'$scope', '$state', 'playlists', '$dialog' '$scope', '$state', 'playlists', '$dialog'
($scope, $state, playlists, $dialog) -> ($scope, $state, playlists, $dialog) ->
playlist = null playlist = null
playlists.fetch($state.params.id).done (playlistResponse) -> playlists.fetch($state.params.id).done (playlistResponse) ->
$scope.playlist = playlistResponse $scope.playlist = playlistResponse
playlist = playlistResponse playlist = playlistResponse
$scope.share = () -> $scope.share = () ->
dialog = $dialog.dialog dialog = $dialog.dialog
templateUrl: '/templates/partials/playlist-share-dialog.html', templateUrl: '/templates/partials/playlist-share-dialog.html',
controller: ['$scope', ($scope) -> $scope.playlist = playlist; $scope.close = () -> dialog.close()] controller: ['$scope', ($scope) -> $scope.playlist = playlist; $scope.close = () -> dialog.close()]
dialog.open() dialog.open()
] ]

View file

@ -1,12 +1,12 @@
window.pfm.preloaders['playlists-list'] = [ window.pfm.preloaders['playlists-list'] = [
'playlists', '$state' 'playlists', '$state'
(playlists, $state) -> (playlists, $state) ->
playlists.fetchList($state.params.page, true) playlists.fetchList($state.params.page, true)
] ]
angular.module('ponyfm').controller "playlists-list", [ angular.module('ponyfm').controller "playlists-list", [
'$scope', 'playlists', '$state', '$scope', 'playlists', '$state',
($scope, playlists, $state) -> ($scope, playlists, $state) ->
playlists.fetchList($state.params.page).done (searchResults) -> playlists.fetchList($state.params.page).done (searchResults) ->
$scope.playlists = searchResults.playlists $scope.playlists = searchResults.playlists
] ]

View file

@ -1,22 +1,22 @@
angular.module('ponyfm').controller "playlists", [ angular.module('ponyfm').controller "playlists", [
'$scope', 'playlists', '$state' '$scope', 'playlists', '$state'
($scope, playlists, $state) -> ($scope, playlists, $state) ->
refreshPages = (list) -> refreshPages = (list) ->
$scope.playlists = list.playlists $scope.playlists = list.playlists
$scope.currentPage = parseInt(list.current_page) $scope.currentPage = parseInt(list.current_page)
$scope.totalPages = parseInt(list.total_pages) $scope.totalPages = parseInt(list.total_pages)
delete $scope.nextPage delete $scope.nextPage
delete $scope.prevPage delete $scope.prevPage
$scope.nextPage = $scope.currentPage + 1 if $scope.currentPage < $scope.totalPages $scope.nextPage = $scope.currentPage + 1 if $scope.currentPage < $scope.totalPages
$scope.prevPage = $scope.currentPage - 1 if $scope.currentPage > 1 $scope.prevPage = $scope.currentPage - 1 if $scope.currentPage > 1
$scope.pages = [1..$scope.totalPages] $scope.pages = [1..$scope.totalPages]
playlists.fetchList($state.params.page).done refreshPages playlists.fetchList($state.params.page).done refreshPages
$scope.$on 'playlists-feteched', (e, list) -> refreshPages(list) $scope.$on 'playlists-feteched', (e, list) -> refreshPages(list)
$scope.gotoPage = (page) -> $scope.gotoPage = (page) ->
return if !page return if !page
$state.transitionTo 'content.playlists.list', {page: page} $state.transitionTo 'content.playlists.list', {page: page}
] ]

View file

@ -1,50 +1,50 @@
angular.module('ponyfm').controller "sidebar", [ angular.module('ponyfm').controller "sidebar", [
'$scope', '$dialog', 'playlists' '$scope', '$dialog', 'playlists'
($scope, $dialog, playlists) -> ($scope, $dialog, playlists) ->
$scope.playlists = playlists.pinnedPlaylists $scope.playlists = playlists.pinnedPlaylists
$scope.createPlaylist = () -> $scope.createPlaylist = () ->
dialog = $dialog.dialog dialog = $dialog.dialog
templateUrl: '/templates/partials/playlist-dialog.html' templateUrl: '/templates/partials/playlist-dialog.html'
controller: 'playlist-form' controller: 'playlist-form'
resolve: { resolve: {
playlist: () -> playlist: () ->
is_public: true is_public: true
is_pinned: true is_pinned: true
name: '' name: ''
description: '' description: ''
} }
dialog.open() dialog.open()
$scope.editPlaylist = (playlist) -> $scope.editPlaylist = (playlist) ->
dialog = $dialog.dialog dialog = $dialog.dialog
templateUrl: '/templates/partials/playlist-dialog.html' templateUrl: '/templates/partials/playlist-dialog.html'
controller: 'playlist-form' controller: 'playlist-form'
resolve: { resolve: {
playlist: () -> angular.copy playlist playlist: () -> angular.copy playlist
} }
dialog.open() dialog.open()
$scope.unpinPlaylist = (playlist) -> $scope.unpinPlaylist = (playlist) ->
playlist.is_pinned = false; playlist.is_pinned = false;
playlists.editPlaylist playlist playlists.editPlaylist playlist
$scope.deletePlaylist = (playlist) -> $scope.deletePlaylist = (playlist) ->
$dialog.messageBox('Delete ' + playlist.title, 'Are you sure you want to delete "' + playlist.title + '"? This cannot be undone.', [ $dialog.messageBox('Delete ' + playlist.title, 'Are you sure you want to delete "' + playlist.title + '"? This cannot be undone.', [
{result: 'ok', label: 'Yes', cssClass: 'btn-danger'}, {result: 'ok', label: 'Yes', cssClass: 'btn-danger'},
{result: 'cancel', label: 'No', cssClass: 'btn-primary'} {result: 'cancel', label: 'No', cssClass: 'btn-primary'}
]).open().then (res) -> ]).open().then (res) ->
return if res == 'cancel' return if res == 'cancel'
playlists.deletePlaylist playlist playlists.deletePlaylist playlist
$scope.showCredits = () -> $scope.showCredits = () ->
dialog = $dialog.dialog dialog = $dialog.dialog
templateUrl: '/templates/partials/credits-dialog.html' templateUrl: '/templates/partials/credits-dialog.html'
controller: 'credits' controller: 'credits'
dialog.open() dialog.open()
] ]

View file

@ -1,59 +1,59 @@
window.pfm.preloaders['track'] = [ window.pfm.preloaders['track'] = [
'tracks', '$state', 'playlists' 'tracks', '$state', 'playlists'
(tracks, $state, playlists) -> (tracks, $state, playlists) ->
$.when.all [tracks.fetch $state.params.id, playlists.refreshOwned(true)] $.when.all [tracks.fetch $state.params.id, playlists.refreshOwned(true)]
] ]
angular.module('ponyfm').controller "track", [ angular.module('ponyfm').controller "track", [
'$scope', 'tracks', '$state', 'playlists', 'auth', 'favourites', '$dialog' '$scope', 'tracks', '$state', 'playlists', 'auth', 'favourites', '$dialog'
($scope, tracks, $state, playlists, auth, favourites, $dialog) -> ($scope, tracks, $state, playlists, auth, favourites, $dialog) ->
track = null track = null
tracks.fetch($state.params.id).done (trackResponse) -> tracks.fetch($state.params.id).done (trackResponse) ->
$scope.track = trackResponse.track $scope.track = trackResponse.track
track = trackResponse.track track = trackResponse.track
$scope.playlists = [] $scope.playlists = []
if auth.data.isLogged if auth.data.isLogged
playlists.refreshOwned().done (lists) -> playlists.refreshOwned().done (lists) ->
$scope.playlists.push list for list in lists $scope.playlists.push list for list in lists
$scope.favouriteWorking = false $scope.favouriteWorking = false
$scope.toggleFavourite = (track) -> $scope.toggleFavourite = (track) ->
$scope.favouriteWorking = true $scope.favouriteWorking = true
favourites.toggle('track', track.id).done (res) -> favourites.toggle('track', track.id).done (res) ->
track.is_favourited = res.is_favourited track.is_favourited = res.is_favourited
$scope.favouriteWorking = false $scope.favouriteWorking = false
$scope.share = () -> $scope.share = () ->
dialog = $dialog.dialog dialog = $dialog.dialog
templateUrl: '/templates/partials/track-share-dialog.html', templateUrl: '/templates/partials/track-share-dialog.html',
controller: ['$scope', ($scope) -> $scope.track = track; $scope.close = () -> dialog.close()] controller: ['$scope', ($scope) -> $scope.track = track; $scope.close = () -> dialog.close()]
dialog.open() dialog.open()
$scope.addToNewPlaylist = () -> $scope.addToNewPlaylist = () ->
dialog = $dialog.dialog dialog = $dialog.dialog
templateUrl: '/templates/partials/playlist-dialog.html' templateUrl: '/templates/partials/playlist-dialog.html'
controller: 'playlist-form' controller: 'playlist-form'
resolve: { resolve: {
playlist: () -> playlist: () ->
is_public: true is_public: true
is_pinned: true is_pinned: true
name: '' name: ''
description: '' description: ''
} }
dialog.open().then (playlist) -> dialog.open().then (playlist) ->
return if !playlist return if !playlist
playlists.addTrackToPlaylist playlist.id, $scope.track.id playlists.addTrackToPlaylist playlist.id, $scope.track.id
$state.transitionTo 'playlist', {id: playlist.id} $state.transitionTo 'playlist', {id: playlist.id}
$scope.addToPlaylist = (playlist) -> $scope.addToPlaylist = (playlist) ->
return if playlist.message return if playlist.message
playlists.addTrackToPlaylist(playlist.id, $scope.track.id).done (res) -> playlists.addTrackToPlaylist(playlist.id, $scope.track.id).done (res) ->
playlist.message = res.message playlist.message = res.message
] ]

View file

@ -1,17 +1,17 @@
window.pfm.preloaders['tracks-list'] = [ window.pfm.preloaders['tracks-list'] = [
'tracks', '$state' 'tracks', '$state'
(tracks, $state) -> (tracks, $state) ->
tracks.loadFilters().then(-> tracks.loadFilters().then(->
tracks.mainQuery.fromFilterString($state.params.filter) tracks.mainQuery.fromFilterString($state.params.filter)
tracks.mainQuery.setPage $state.params.page || 1 tracks.mainQuery.setPage $state.params.page || 1
tracks.mainQuery.fetch() tracks.mainQuery.fetch()
) )
] ]
angular.module('ponyfm').controller "tracks-list", [ angular.module('ponyfm').controller "tracks-list", [
'$scope', 'tracks', '$state', '$scope', 'tracks', '$state',
($scope, tracks, $state) -> ($scope, tracks, $state) ->
tracks.mainQuery.fetch().done (searchResults) -> tracks.mainQuery.fetch().done (searchResults) ->
$scope.tracks = searchResults.tracks $scope.tracks = searchResults.tracks
] ]

View file

@ -1,45 +1,45 @@
window.pfm.preloaders['tracks'] = [ window.pfm.preloaders['tracks'] = [
'tracks', '$state' 'tracks', '$state'
(tracks) -> (tracks) ->
tracks.loadFilters() tracks.loadFilters()
] ]
angular.module('ponyfm').controller "tracks", [ angular.module('ponyfm').controller "tracks", [
'$scope', 'tracks', '$state' '$scope', 'tracks', '$state'
($scope, tracks, $state) -> ($scope, tracks, $state) ->
$scope.recentTracks = null $scope.recentTracks = null
$scope.query = tracks.mainQuery $scope.query = tracks.mainQuery
$scope.filters = tracks.filters $scope.filters = tracks.filters
$scope.toggleListFilter = (filter, id) -> $scope.toggleListFilter = (filter, id) ->
$scope.query.toggleListFilter filter, id $scope.query.toggleListFilter filter, id
$state.transitionTo 'content.tracks.list', {filter: $scope.query.toFilterString()} $state.transitionTo 'content.tracks.list', {filter: $scope.query.toFilterString()}
$scope.setFilter = (filter, value) -> $scope.setFilter = (filter, value) ->
$scope.query.setFilter filter, value $scope.query.setFilter filter, value
$state.transitionTo 'content.tracks.list', {filter: $scope.query.toFilterString()} $state.transitionTo 'content.tracks.list', {filter: $scope.query.toFilterString()}
$scope.setListFilter = (filter, id) -> $scope.setListFilter = (filter, id) ->
$scope.query.setListFilter filter, id $scope.query.setListFilter filter, id
$state.transitionTo 'content.tracks.list', {filter: $scope.query.toFilterString()} $state.transitionTo 'content.tracks.list', {filter: $scope.query.toFilterString()}
$scope.clearFilter = (filter) -> $scope.clearFilter = (filter) ->
$scope.query.clearFilter filter $scope.query.clearFilter filter
$state.transitionTo 'content.tracks.list', {filter: $scope.query.toFilterString()} $state.transitionTo 'content.tracks.list', {filter: $scope.query.toFilterString()}
tracks.mainQuery.listen (searchResults) -> tracks.mainQuery.listen (searchResults) ->
$scope.tracks = searchResults.tracks $scope.tracks = searchResults.tracks
$scope.currentPage = parseInt(searchResults.current_page) $scope.currentPage = parseInt(searchResults.current_page)
$scope.totalPages = parseInt(searchResults.total_pages) $scope.totalPages = parseInt(searchResults.total_pages)
delete $scope.nextPage delete $scope.nextPage
delete $scope.prevPage delete $scope.prevPage
$scope.nextPage = $scope.currentPage + 1 if $scope.currentPage < $scope.totalPages $scope.nextPage = $scope.currentPage + 1 if $scope.currentPage < $scope.totalPages
$scope.prevPage = $scope.currentPage - 1 if $scope.currentPage > 1 $scope.prevPage = $scope.currentPage - 1 if $scope.currentPage > 1
$scope.pages = [1..$scope.totalPages] $scope.pages = [1..$scope.totalPages]
$scope.gotoPage = (page) -> $scope.gotoPage = (page) ->
$state.transitionTo 'content.tracks.list', {filter: $state.params.filter, page: page} $state.transitionTo 'content.tracks.list', {filter: $state.params.filter, page: page}
$scope.$on '$destroy', -> tracks.mainQuery = tracks.createQuery() $scope.$on '$destroy', -> tracks.mainQuery = tracks.createQuery()
] ]

View file

@ -1,5 +1,5 @@
angular.module('ponyfm').controller "uploader", [ angular.module('ponyfm').controller "uploader", [
'$scope', 'auth', 'upload', '$state' '$scope', 'auth', 'upload', '$state'
($scope, auth, upload, $state) -> ($scope, auth, upload, $state) ->
$scope.data = upload $scope.data = upload
] ]

Some files were not shown because too many files have changed in this diff Show more