mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 04:58:01 +01:00
Converted a bunch of tabs to spaces.
This commit is contained in:
parent
e1c6a175b0
commit
b00982cd61
177 changed files with 5958 additions and 5958 deletions
|
@ -78,25 +78,25 @@ class CreateCommentCommand extends CommandBase
|
|||
$comment->$column = $this->_id;
|
||||
$comment->save();
|
||||
|
||||
// Recount the track's comments, if this is a track comment
|
||||
if ($this->_type === 'track') {
|
||||
$entity = Track::find($this->_id);
|
||||
// Recount the track's comments, if this is a track comment
|
||||
if ($this->_type === 'track') {
|
||||
$entity = Track::find($this->_id);
|
||||
|
||||
} elseif ($this->_type === 'album') {
|
||||
$entity = Album::find($this->_id);
|
||||
} elseif ($this->_type === 'album') {
|
||||
$entity = Album::find($this->_id);
|
||||
|
||||
} elseif ($this->_type === 'playlist') {
|
||||
$entity = Playlist::find($this->_id);
|
||||
} elseif ($this->_type === 'playlist') {
|
||||
$entity = Playlist::find($this->_id);
|
||||
|
||||
} elseif ($this->_type === 'user') {
|
||||
$entity = User::find($this->_id);
|
||||
} elseif ($this->_type === 'user') {
|
||||
$entity = User::find($this->_id);
|
||||
|
||||
} else {
|
||||
App::abort(400, 'This comment is being added to an invalid entity!');
|
||||
}
|
||||
} else {
|
||||
App::abort(400, 'This comment is being added to an invalid entity!');
|
||||
}
|
||||
|
||||
$entity->comment_count = Comment::where($column, $this->_id)->count();
|
||||
$entity->save();
|
||||
$entity->comment_count = Comment::where($column, $this->_id)->count();
|
||||
$entity->save();
|
||||
|
||||
return CommandResponse::succeed(Comment::mapPublic($comment));
|
||||
}
|
||||
|
|
|
@ -62,11 +62,11 @@ class ToggleFavouriteCommand extends CommandBase
|
|||
DB::table($resourceTable)->whereId($this->_resourceId)->update([
|
||||
'favourite_count' =>
|
||||
DB::raw('(
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM
|
||||
favourites
|
||||
WHERE ' .
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM
|
||||
favourites
|
||||
WHERE ' .
|
||||
$typeId . ' = ' . $this->_resourceId . ')')
|
||||
]);
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ class ClassifyMLPMA extends Command
|
|||
$queriedTitle = DB::connection()->getPdo()->quote($sanitizedTrackTitle);
|
||||
$officialSongs = ShowSong::select(['id', 'title'])
|
||||
->whereRaw("
|
||||
MATCH (title)
|
||||
MATCH (title)
|
||||
AGAINST ($queriedTitle IN BOOLEAN MODE)
|
||||
")
|
||||
->get();
|
||||
|
|
|
@ -167,12 +167,12 @@ class ImportMLPMA extends Command
|
|||
list($parsedTags, $rawTags) = $this->getVorbisTags($allTags);
|
||||
|
||||
} elseif (Str::lower($file->getExtension()) === 'wav') {
|
||||
list($parsedTags, $rawTags) = $this->getAtomTags($allTags);
|
||||
list($parsedTags, $rawTags) = $this->getAtomTags($allTags);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================================================
|
||||
//==========================================================================================================
|
||||
// Determine the release date.
|
||||
//==========================================================================================================
|
||||
$modifiedDate = Carbon::createFromTimeStampUTC(File::lastModified($file->getPathname()));
|
||||
|
|
|
@ -42,15 +42,15 @@ class PoniverseApiSetup extends Command
|
|||
{
|
||||
$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->line('');
|
||||
$this->comment('This sets up your Poniverse API credentials, which are necessary for Pony.fm\'s integration with Poniverse to work.');
|
||||
$this->line('');
|
||||
$this->comment('If you don\'t have a Poniverse account, create one at: <bold>https://poniverse.net/register</bold>');
|
||||
$this->comment('Sign in with your Poniverse account! Your password won\'t be stored locally.');
|
||||
$this->line('');
|
||||
$this->comment('This sets up your Poniverse API credentials, which are necessary for Pony.fm\'s integration with Poniverse to work.');
|
||||
$this->line('');
|
||||
$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');
|
||||
$password = $this->secret('Your Poniverse password');
|
||||
|
||||
// log in
|
||||
// log in
|
||||
$client = new Client(['base_uri' => 'https://api.poniverse.net/v1/dev/']);
|
||||
|
||||
try {
|
||||
|
@ -75,7 +75,7 @@ class PoniverseApiSetup extends Command
|
|||
$clientId = $json->id;
|
||||
$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_SECRET', $this->laravel['config']['poniverse.secret'], $clientSecret);
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ class Poniverse {
|
|||
protected $clientSecret;
|
||||
protected $accessToken;
|
||||
protected $redirectUri;
|
||||
protected $urls;
|
||||
protected $urls;
|
||||
|
||||
/**
|
||||
* @var OAuth2\Client
|
||||
|
@ -27,7 +27,7 @@ class Poniverse {
|
|||
*/
|
||||
public function __construct($clientId, $clientSecret, $accessToken = '')
|
||||
{
|
||||
$this->urls = Config::get('poniverse.urls');
|
||||
$this->urls = Config::get('poniverse.urls');
|
||||
|
||||
$this->clientId = $clientId;
|
||||
$this->clientSecret = $clientSecret;
|
||||
|
|
|
@ -403,7 +403,7 @@ class Client
|
|||
$curl_options[CURLOPT_POST] = true;
|
||||
/* No break */
|
||||
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,
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -57,13 +57,13 @@ class ResourceLogItem extends Model
|
|||
DB::table($resourceTable)->whereId($resourceId)->update([
|
||||
$countColumn =>
|
||||
DB::raw('(SELECT
|
||||
COUNT(id)
|
||||
FROM
|
||||
resource_log_items
|
||||
WHERE ' .
|
||||
COUNT(id)
|
||||
FROM
|
||||
resource_log_items
|
||||
WHERE ' .
|
||||
$resourceIdColumn . ' = ' . $resourceId . '
|
||||
AND
|
||||
log_type = ' . $logType . ')')
|
||||
AND
|
||||
log_type = ' . $logType . ')')
|
||||
]);
|
||||
|
||||
if (Auth::check()) {
|
||||
|
@ -71,15 +71,15 @@ class ResourceLogItem extends Model
|
|||
DB::table('resource_users')->whereId($resourceUserId)->update([
|
||||
$countColumn =>
|
||||
DB::raw('(SELECT
|
||||
COUNT(id)
|
||||
FROM
|
||||
resource_log_items
|
||||
WHERE
|
||||
user_id = ' . Auth::user()->id . '
|
||||
AND ' .
|
||||
COUNT(id)
|
||||
FROM
|
||||
resource_log_items
|
||||
WHERE
|
||||
user_id = ' . Auth::user()->id . '
|
||||
AND ' .
|
||||
$resourceIdColumn . ' = ' . $resourceId . '
|
||||
AND
|
||||
log_type = ' . $logType . ')')
|
||||
AND
|
||||
log_type = ' . $logType . ')')
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,10 +127,10 @@ class Track extends Model
|
|||
::published()
|
||||
->listed()
|
||||
->join(DB::raw('
|
||||
( SELECT `track_id`, `created_at`
|
||||
FROM `resource_log_items`
|
||||
WHERE track_id IS NOT NULL AND log_type = 3 AND `created_at` > now() - INTERVAL 1 DAY
|
||||
) AS ranged_plays'),
|
||||
( SELECT `track_id`, `created_at`
|
||||
FROM `resource_log_items`
|
||||
WHERE track_id IS NOT NULL AND log_type = 3 AND `created_at` > now() - INTERVAL 1 DAY
|
||||
) AS ranged_plays'),
|
||||
'tracks.id', '=', 'ranged_plays.track_id')
|
||||
->groupBy('id')
|
||||
->orderBy('plays', 'desc')
|
||||
|
@ -598,9 +598,9 @@ class Track extends Model
|
|||
'copyright' => ['© ' . $this->year . ' ' . $this->user->display_name],
|
||||
'publisher' => ['Pony.fm - https://pony.fm/'],
|
||||
'encoded_by' => ['https://pony.fm/'],
|
||||
// 'url_artist' => [$this->user->url],
|
||||
// 'url_source' => [$this->url],
|
||||
// 'url_file' => [$this->url],
|
||||
// 'url_artist' => [$this->user->url],
|
||||
// 'url_source' => [$this->url],
|
||||
// 'url_file' => [$this->url],
|
||||
'url_publisher' => ['https://pony.fm/']
|
||||
];
|
||||
|
||||
|
|
|
@ -2,41 +2,41 @@
|
|||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default NewRelic Integration Settings
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default NewRelic Integration Settings
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
* Will automatically name transactions in NewRelic,
|
||||
* using the Laravel route name, action or request.
|
||||
*
|
||||
* Set this to false to use the NewRelic default naming
|
||||
* scheme, or to set your own in your application.
|
||||
*/
|
||||
'auto_name_transactions' => true,
|
||||
/*
|
||||
* Will automatically name transactions in NewRelic,
|
||||
* using the Laravel route name, action or request.
|
||||
*
|
||||
* Set this to false to use the NewRelic default naming
|
||||
* scheme, or to set your own in your application.
|
||||
*/
|
||||
'auto_name_transactions' => true,
|
||||
|
||||
/*
|
||||
* Define the name used when automatically naming transactions.
|
||||
* a token string:
|
||||
* a pattern you define yourself, available tokens:
|
||||
* {controller} = Controller@action or Closure@path
|
||||
* {method} = GET / POST / etc.
|
||||
* {route} = route name if named, otherwise same as {controller}
|
||||
* {path} = the registered route path (includes variable names)
|
||||
* {uri} = the actual URI requested
|
||||
* anything that is not a matched token will remain a string literal
|
||||
* example:
|
||||
* "GET /world" with pattern 'hello {path} you really {method} me' would return:
|
||||
* 'hello /world you really GET me'
|
||||
*/
|
||||
'name_provider' => '{uri} {route}',
|
||||
/*
|
||||
* Define the name used when automatically naming transactions.
|
||||
* a token string:
|
||||
* a pattern you define yourself, available tokens:
|
||||
* {controller} = Controller@action or Closure@path
|
||||
* {method} = GET / POST / etc.
|
||||
* {route} = route name if named, otherwise same as {controller}
|
||||
* {path} = the registered route path (includes variable names)
|
||||
* {uri} = the actual URI requested
|
||||
* anything that is not a matched token will remain a string literal
|
||||
* example:
|
||||
* "GET /world" with pattern 'hello {path} you really {method} me' would return:
|
||||
* 'hello /world you really GET me'
|
||||
*/
|
||||
'name_provider' => '{uri} {route}',
|
||||
|
||||
/*
|
||||
* Will cause an exception to be thrown if the NewRelic
|
||||
* PHP agent is not found / installed
|
||||
*/
|
||||
'throw_if_not_installed' => false,
|
||||
/*
|
||||
* Will cause an exception to be thrown if the NewRelic
|
||||
* PHP agent is not found / installed
|
||||
*/
|
||||
'throw_if_not_installed' => false,
|
||||
|
||||
);
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
return [
|
||||
'version' => 1,
|
||||
'urls' => [
|
||||
'api' => env('PONI_API_URL', 'https://api.poniverse.net/v1/'),
|
||||
'register' => env('PONI_REGISTER_URL', 'https://poniverse.net/register?site=pony.fm'),
|
||||
'auth' => env('PONI_AUTH_URL', 'https://poniverse.net/oauth/authorize'),
|
||||
'token' => env('PONI_TOKEN_URL', 'https://poniverse.net/oauth/access_token')
|
||||
],
|
||||
'client_id' => env('PONI_CLIENT_ID'),
|
||||
'secret' => env('PONI_CLIENT_SECRET')
|
||||
'version' => 1,
|
||||
'urls' => [
|
||||
'api' => env('PONI_API_URL', 'https://api.poniverse.net/v1/'),
|
||||
'register' => env('PONI_REGISTER_URL', 'https://poniverse.net/register?site=pony.fm'),
|
||||
'auth' => env('PONI_AUTH_URL', 'https://poniverse.net/oauth/authorize'),
|
||||
'token' => env('PONI_TOKEN_URL', 'https://poniverse.net/oauth/access_token')
|
||||
],
|
||||
'client_id' => env('PONI_CLIENT_ID'),
|
||||
'secret' => env('PONI_CLIENT_SECRET')
|
||||
];
|
||||
|
|
|
@ -11,24 +11,24 @@ class CreateLatestColumn extends Migration
|
|||
});
|
||||
|
||||
DB::update('
|
||||
UPDATE
|
||||
tracks
|
||||
SET
|
||||
is_latest = true
|
||||
WHERE
|
||||
(
|
||||
SELECT
|
||||
t2.id
|
||||
FROM
|
||||
(SELECT id, user_id FROM tracks WHERE published_at IS NOT NULL AND deleted_at IS NULL) AS t2
|
||||
WHERE
|
||||
t2.user_id = tracks.user_id
|
||||
ORDER BY
|
||||
created_at DESC
|
||||
LIMIT 1
|
||||
) = tracks.id
|
||||
AND
|
||||
published_at IS NOT NULL');
|
||||
UPDATE
|
||||
tracks
|
||||
SET
|
||||
is_latest = true
|
||||
WHERE
|
||||
(
|
||||
SELECT
|
||||
t2.id
|
||||
FROM
|
||||
(SELECT id, user_id FROM tracks WHERE published_at IS NOT NULL AND deleted_at IS NULL) AS t2
|
||||
WHERE
|
||||
t2.user_id = tracks.user_id
|
||||
ORDER BY
|
||||
created_at DESC
|
||||
LIMIT 1
|
||||
) = tracks.id
|
||||
AND
|
||||
published_at IS NOT NULL');
|
||||
}
|
||||
|
||||
public function down()
|
||||
|
|
|
@ -11,10 +11,10 @@ class TrackIsListed extends Migration
|
|||
});
|
||||
|
||||
DB::update('
|
||||
UPDATE
|
||||
tracks
|
||||
SET
|
||||
is_listed = true');
|
||||
UPDATE
|
||||
tracks
|
||||
SET
|
||||
is_listed = true');
|
||||
}
|
||||
|
||||
public function down()
|
||||
|
|
|
@ -14,10 +14,10 @@
|
|||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [L]
|
||||
|
||||
RewriteRule ^(.*\.(?:coffee))$ /asset.php?type=coffee&file=/$1 [L,QSA,NC]
|
||||
RewriteRule ^(.*\.(?:less))$ /asset.php?type=less&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]
|
||||
</IfModule>
|
||||
|
||||
<IfModule xsendfile_module>
|
||||
XSendFile On
|
||||
XSendFile On
|
||||
</IfModule>
|
|
@ -1,76 +1,76 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 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" [
|
||||
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
|
||||
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
|
||||
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
|
||||
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
|
||||
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
|
||||
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/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_extend "http://ns.adobe.com/Extensibility/1.0/">
|
||||
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
|
||||
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
|
||||
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
|
||||
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
|
||||
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
|
||||
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/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;"
|
||||
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">
|
||||
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">
|
||||
<switch>
|
||||
<foreignObject requiredExtensions="&ns_ai;" x="0" y="0" width="1" height="1">
|
||||
<i:pgfRef xlink:href="#adobe_illustrator_pgf">
|
||||
</i:pgfRef>
|
||||
</foreignObject>
|
||||
<g i:extraneous="self">
|
||||
<g>
|
||||
<title>background</title>
|
||||
<rect id="canvas_background" x="-1" y="-1" fill="none" width="692" height="139"/>
|
||||
</g>
|
||||
<g>
|
||||
<title>Layer 1</title>
|
||||
<g id="Logo">
|
||||
<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
|
||||
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
|
||||
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
|
||||
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"/>
|
||||
<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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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"/>
|
||||
</g>
|
||||
<g id="svg_9">
|
||||
<g id="svg_10">
|
||||
<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
|
||||
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
|
||||
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
|
||||
C114.4,56.5,113.3,58.5,111.4,59z"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<foreignObject requiredExtensions="&ns_ai;" x="0" y="0" width="1" height="1">
|
||||
<i:pgfRef xlink:href="#adobe_illustrator_pgf">
|
||||
</i:pgfRef>
|
||||
</foreignObject>
|
||||
<g i:extraneous="self">
|
||||
<g>
|
||||
<title>background</title>
|
||||
<rect id="canvas_background" x="-1" y="-1" fill="none" width="692" height="139"/>
|
||||
</g>
|
||||
<g>
|
||||
<title>Layer 1</title>
|
||||
<g id="Logo">
|
||||
<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
|
||||
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
|
||||
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
|
||||
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"/>
|
||||
<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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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"/>
|
||||
</g>
|
||||
<g id="svg_9">
|
||||
<g id="svg_10">
|
||||
<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
|
||||
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
|
||||
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
|
||||
C114.4,56.5,113.3,58.5,111.4,59z"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</switch>
|
||||
<i:pgf id="adobe_illustrator_pgf">
|
||||
<![CDATA[
|
||||
eJztvWd38rq2MHo/rzH4D5AKobnQ02khCUlISCONUJyEhBYDa691PtzfftVsy8ayZeA5d79jvGed
|
||||
<![CDATA[
|
||||
eJztvWd38rq2MHo/rzH4D5AKobnQ02khCUlISCONUJyEhBYDa691PtzfftVsy8ayZeA5d79jvGed
|
||||
nQfL8pzS1NRs0pQ2A7V69Lg7aitROSb4fX9tbhZUpTUdqTk/Kvaf9vuzyVSFRcGbkF9MxQRY6/g0
|
||||
0yQ17xV10hsNc+hdTIJvy/D74Gn1QpRSIX8wBMtue9O+Ako/Bs3+6HMUm/z9GdLxge+LrSl4nYqL
|
||||
ybgkiEm/KOQSgr92geq0hn+3JpPe/ygQi5yRYWF+NBt2e8PP/OifnD8qSSl/UvQnUmm/mEVNrPRu
|
||||
|
@ -142,9 +142,9 @@ dnSenRxkKnsPsfLoKXFfUl+ehOJTuXFb3j/e74g7x+khQSNveOscJBrun6omApH7t9NANBPNBMKd
|
|||
WB32KwPLSoFIs5sMhHo//UBomu/BzoXoziUiN/BXHrTk5Rh15CBb2fg2ugTQoF5NAq/bRWn7YK1o
|
||||
qRWLTzIn0uF65Q08nvSF7lajqHWkOlHV3cm9+tLPnAvxRB3T1SAV+HLzUT66DgYhmu6WiIhxZQye
|
||||
+lrYOYrJ1cwsfHAS2DIGA2FNjG7qQxbWN/W1+VW3YNV7kznZf0/+7owFW6xvqacaCw==
|
||||
]]>
|
||||
<![CDATA[
|
||||
a2W9344/2WPdCzxP1u8bNYjGtrvX+9sHucLzmR3W8G4nscfAmlpfv3+6TFqwIjQIcaLxJJTzqStb
|
||||
]]>
|
||||
<![CDATA[
|
||||
a2W9344/2WPdCzxP1u8bNYjGtrvX+9sHucLzmR3W8G4nscfAmlpfv3+6TFqwIjQIcaLxJJTzqStb
|
||||
rGvl78zGUN6t2WEVyh+dChPrlpRolPD0tOluotEVTk7Uhn1fy793UuG2Dcc1MZob1+1BjmCtbW8j
|
||||
rBgNGVpZvY9/IayAM9sl89A+q6/F+xrEGppnqMRrYhq7i9pjHVfOABoLYgNr6lLYXWdh7ahvGfHR
|
||||
HutlaWf9NzW7MLACNAbiyfo4X2ZhrRxKQ/HJHmsi1Ajv9u8ubbGulVvwpAALYnpoz6/zDKyp9c1k
|
||||
|
@ -216,9 +216,9 @@ HIE3WbChuWT48DYMe9L37CV4z910P8bACzT22sciRHPJ//FINHkZaOZ4MT4s07SJCqdguaTvcJm5
|
|||
FWuo2CZpyZj2fKl7DnKDAQCNjZs/iOa56CqrPyt2/qDdnlsOf3B66JJ8YtjVBgB6TRrB2PIOwwTg
|
||||
YCLYnONicXH14WaRxS1ljzFKtHFbmVtYcXDUmGl/tvPWIgVcKcIdiGBG1d0S9ub0HcOegV1KWLo0
|
||||
v0vV7IA5pRAEi6o1U/d18jm1o7qPyvQyW5gMhgbK1FOAI0Sbgy65ei4CiJ2WNbc5aQ==
|
||||
]]>
|
||||
<![CDATA[
|
||||
YTvt+5Q59405r0sBV1Jxz1u7LU4Up32feosFOWSwmVeBAB/M+Z6cfOCeo2dqk08/5NS2WZ6iNw5t
|
||||
]]>
|
||||
<![CDATA[
|
||||
YTvt+5Q59405r0sBV1Jxz1u7LU4Up32feosFOWSwmVeBAB/M+Z6cfOCeo2dqk08/5NS2WZ6iNw5t
|
||||
QpssVsNVTtEbn37iGF+zvEVvrG6UOW68P7VGb2Ba1DLRG4rTBmdLR2/kjVxww87TMwkbTq/izHv0
|
||||
hh0XGJwtHb0BnUsEHbaM8OfDcUZvfE7nQKF8uGWjNzAZTqaCkIvuSzrjiN6QeeOaK8iO3nBlB+mW
|
||||
DSSQpwQhx40XcYsh7dMyvVxSY7kM6XPmnguflwzJ3LXLQDI9h/kdXfLhXZojmZXj2LNzY5cucwcx
|
||||
|
@ -290,9 +290,9 @@ tAde44de91zqwkNn44fa/bDchYcGwe1Sg71GB5kXHnrPxV3owkNbKLoods5Y8XDh4eI7umwuPFw0
|
|||
Vd9HMiSXvvDQNB/nbjvEaFZw4aGWVWd/2yGRactfeOi8iQobtyu48NDZu9eItrLEK/vbDj3EOs1E
|
||||
s154uLjv6enCQ5Y8xLcdrmqLYsH5tkOf5Wj9hS88dL7tkJgcy1946Jyka6+kF7jw0Pm2Qzc7jT9J
|
||||
1/G2QzoIudSFh4tYNgtceMgcTbQAZF76doLmcuEh177O5S88dNYVKKRqVRfKdN52Aw==
|
||||
]]>
|
||||
<![CDATA[
|
||||
ZWxdQdTE3DYSPRysWTbCx10ubo0IgzIHee+839+cRIlTSSiuGltCXmCAagVDAJjWacNDmggoP0HP
|
||||
]]>
|
||||
<![CDATA[
|
||||
ZWxdQdTE3DYSPRysWTbCx10ubo0IgzIHee+839+cRIlTSSiuGltCXmCAagVDAJjWacNDmggoP0HP
|
||||
w2qtDQuEpACUZXNSUymo6sFN7yg+3Ts7FjMPdWn7YK2IqsCsrkr4ttZSA5sv4a0AjBoFtt8qX4HY
|
||||
/vdxePfgNxve271phG97PyOhVPqOC6XvaE4on18fQ0VQHvWqwsl1NipUTy+bQnXw8Slc9ZUvoX4h
|
||||
Z4Xb0969cDf5+hDuhWlfuH/bnwkP0fug8BS5Cwmv7bUr4e3t8UNo3shT4V1+3BbeL4LXqqqW4urk
|
||||
|
@ -364,9 +364,9 @@ knSKx8Yh73Q1Saeat8bMO11N0ikMQjrmnS6SdCpV0za77XCW534DSxcg1o+Rqb6jEbI+JlVgwstB
|
|||
sgGzMRNBgCYIZ1BzqhGtsg2vV/mF4ilMxBOYN5ZU+cYohphS2j4KvMJmoUOaI0iOA9baO433Hqcx
|
||||
zK29SC6M8mOB3Cid2Z0AKB/eX55ryaGxLbx3EJ7nF+zekeRTizhDESAgybRGnxMBELkTYW/O40Za
|
||||
p0mSVQUh2T6Hs+ocmhyUJDnJ/6b0tM4dvYchfNsxHhEgv3BZa625hqUWElTAKvrGuQ==
|
||||
]]>
|
||||
<![CDATA[
|
||||
pZVoGQqbS4ppoZI2RJd+0OH/e+D7KyOkRX9GFiV//GbWV9QrtffZG/qBitr1/RU/PhXFu2F3VFYV
|
||||
]]>
|
||||
<![CDATA[
|
||||
pZVoGQqbS4ppoZI2RJd+0OH/e+D7KyOkRX9GFiV//GbWV9QrtffZG/qBitr1/RU/PhXFu2F3VFYV
|
||||
5Vb5Z1ocdWYDZTj15/zx43rh9DSTLCqdUVfxR/DAvBtsESUtJgFE+lwUU2QRy4viR/bkp7J+s98q
|
||||
fgiNA+vOhpBc2Ucpoz6csbSH06EiX70vuIchFgjPcnWY8FQMRIULCTGh3flLVJz4KTV42ou+l0fp
|
||||
B1no0jNR2215sN8+jowvz47Os5ODTGXvIVYePSXuS+rLk1B8Kjduy/vH+x3ECfNnu1SzrA6TLu28
|
||||
|
@ -438,12 +438,12 @@ eZYeYAoK5s5lU7qzGQX2nf4cFTXTRRTSWtxRLzINqF4qwzrpJIp0ECB6C7Qi9AUQYySwplfUjTgE
|
|||
RLYJWlKlRos0SEazrR3DvY5CPiKRM3qKYDWqRVgBCkFjzjR+IiTPGDFqUdZEnBE+lTNGNyXcjoQe
|
||||
y8sYoXtosMlaqEyrmKYiHig0DoqQt4q/SCGxjNoOnrB/qH0qaQZeQtcTuBSL6YQRRIelOGpnKpVl
|
||||
I85LkEtazCdBDG5QlNBCgAJFB7o0rUM0lRJdFUURJTygRCWiiiRIpS0qzI9RgQyeKA==
|
||||
]]>
|
||||
<![CDATA[
|
||||
60DxuIk4DgWZXNTaCxASKokalWUJq5aozkgUy0nEvoUUSZJB1GJKFDVx+MkYGxEZwWTgwVvcsFRS
|
||||
]]>
|
||||
<![CDATA[
|
||||
60DxuIk4DgWZXNTaCxASKokalWUJq5aozkgUy0nEvoUUSZJB1GJKFDVx+MkYGxEZwWTgwVvcsFRS
|
||||
D+UBSFmtVFvtALzih5KPAJE1cyZldBQRiTQoq/cECRSNy8GzoE8Tqo2i1grUX/Csxc5kvEhCk89j
|
||||
bFZcIpLPjUNYSlPyosm6YVkAbnX0OVoVWNYHVXhaCtxnVBp20eJxFO6926y1PpVbtdXrw21Hn5PW
|
||||
34q/NRyOpq2pMgav/J+qMpmOVMU/+Rr9B5bAj/QPNjdLV2XfX/8fDbPQ6A==
|
||||
]]>
|
||||
]]>
|
||||
</i:pgf>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 33 KiB |
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
echo 'template!';
|
||||
echo 'template!';
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<ul class="tabs">
|
||||
<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.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.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.playlists')}"><a href="/account/playlists">Playlists</a></li>
|
||||
<li ng-class="{active: stateIncludes('account.settings')}"><a href="/account">Settings</a></li>
|
||||
</ul>
|
||||
|
||||
<ui-view></ui-view>
|
||||
|
|
|
@ -1,49 +1,49 @@
|
|||
<form novalidate ng-submit="saveAlbum()">
|
||||
<ul class="toolbar">
|
||||
<li>
|
||||
<button type="submit" class="btn" ng-class="{disabled: (!isDirty && !isNew) || isSaving, 'btn-primary': isDirty || isNew}">
|
||||
<span ng-show="isNew">Create Album</span>
|
||||
<span ng-hide="isNew">Save Changes</span>
|
||||
<i ng-show="isSaving" class="icon-cog icon-spin icon-large"></i>
|
||||
</button>
|
||||
</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>
|
||||
<div class="stretch-to-bottom">
|
||||
<div class="form-row" ng-class="{'has-error': errors.title != null}">
|
||||
<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" />
|
||||
<div class="error">{{errors.title}}</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="description" class="strong">Description:</label>
|
||||
<textarea ng-disabled="isSaving" ng-change="touchModel()" placeholder="Description (optional)" id="description" ng-model="album.description"></textarea>
|
||||
<div class="error">{{errors.description}}</div>
|
||||
</div>
|
||||
<div class="form-row" ng-class="{'has-error': errors.cover != null}">
|
||||
<label class="strong">Album Cover: </label>
|
||||
<pfm-image-upload set-image="setCover" image="album.cover" />
|
||||
</div>
|
||||
<div class="form-row track-selector">
|
||||
<a pfm-popup="track-selector,right" href="#" class="btn btn-small pull-right btn-info">Add Tracks</a>
|
||||
<label class="strong">Album Tracks</label>
|
||||
<div id="track-selector" class="pfm-popup">
|
||||
<ul>
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="toolbar">
|
||||
<li>
|
||||
<button type="submit" class="btn" ng-class="{disabled: (!isDirty && !isNew) || isSaving, 'btn-primary': isDirty || isNew}">
|
||||
<span ng-show="isNew">Create Album</span>
|
||||
<span ng-hide="isNew">Save Changes</span>
|
||||
<i ng-show="isSaving" class="icon-cog icon-spin icon-large"></i>
|
||||
</button>
|
||||
</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>
|
||||
<div class="stretch-to-bottom">
|
||||
<div class="form-row" ng-class="{'has-error': errors.title != null}">
|
||||
<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" />
|
||||
<div class="error">{{errors.title}}</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="description" class="strong">Description:</label>
|
||||
<textarea ng-disabled="isSaving" ng-change="touchModel()" placeholder="Description (optional)" id="description" ng-model="album.description"></textarea>
|
||||
<div class="error">{{errors.description}}</div>
|
||||
</div>
|
||||
<div class="form-row" ng-class="{'has-error': errors.cover != null}">
|
||||
<label class="strong">Album Cover: </label>
|
||||
<pfm-image-upload set-image="setCover" image="album.cover" />
|
||||
</div>
|
||||
<div class="form-row track-selector">
|
||||
<a pfm-popup="track-selector,right" href="#" class="btn btn-small pull-right btn-info">Add Tracks</a>
|
||||
<label class="strong">Album Tracks</label>
|
||||
<div id="track-selector" class="pfm-popup">
|
||||
<ul>
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ul class="album-track-listing" ui-sortable="{handle: '.handle', axis: 'y', forcePlaceholderSizeType: true, update: sortTracks}" ng-model="tracks">
|
||||
<li ng-repeat="track in tracks">
|
||||
<div>
|
||||
<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>
|
||||
<span>{{track.title}}</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="album-track-listing" ui-sortable="{handle: '.handle', axis: 'y', forcePlaceholderSizeType: true, update: sortTracks}" ng-model="tracks">
|
||||
<li ng-repeat="track in tracks">
|
||||
<div>
|
||||
<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>
|
||||
<span>{{track.title}}</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
|
@ -1,28 +1,28 @@
|
|||
<div>
|
||||
<ul class="dropdowns">
|
||||
<li class="dropdown">
|
||||
<a class="btn" href="/account/albums/create" ng-class="{'btn-primary': data.isEditorOpen && data.selectedAlbum == null}">
|
||||
<i class="icon-plus"></i> Create Album
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="dropdowns">
|
||||
<li class="dropdown">
|
||||
<a class="btn" href="/account/albums/create" ng-class="{'btn-primary': data.isEditorOpen && data.selectedAlbum == null}">
|
||||
<i class="icon-plus"></i> Create Album
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="two-pane-view" ng-class="{open: data.isEditorOpen, closed: !data.isEditorOpen}">
|
||||
<div class="list">
|
||||
<ul class="account-albums-listing stretch-to-bottom">
|
||||
<li ng-repeat="album in albums" ng-class="{selected: album.id == data.selectedAlbum.id}">
|
||||
<a href="/account/albums/edit/{{album.id}}">
|
||||
<img pfm-src-loader="album.covers.normal" pfm-src-size="normal" class="image" />
|
||||
<span class="title">{{album.title}}</span>
|
||||
<span class="published">{{album.created_at | pfmdate:'MM/dd/yyyy'}}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li ng-show="!albums.length" class="empty">
|
||||
No albums found...
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="two-pane-view" ng-class="{open: data.isEditorOpen, closed: !data.isEditorOpen}">
|
||||
<div class="list">
|
||||
<ul class="account-albums-listing stretch-to-bottom">
|
||||
<li ng-repeat="album in albums" ng-class="{selected: album.id == data.selectedAlbum.id}">
|
||||
<a href="/account/albums/edit/{{album.id}}">
|
||||
<img pfm-src-loader="album.covers.normal" pfm-src-size="normal" class="image" />
|
||||
<span class="title">{{album.title}}</span>
|
||||
<span class="published">{{album.created_at | pfmdate:'MM/dd/yyyy'}}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li ng-show="!albums.length" class="empty">
|
||||
No albums found...
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ui-view class="editor"></ui-view>
|
||||
</div>
|
||||
<ui-view class="editor"></ui-view>
|
||||
</div>
|
||||
</div>
|
|
@ -1,22 +1,22 @@
|
|||
<ul class="playlists stretch-to-bottom">
|
||||
<li ng-repeat="playlist in playlists">
|
||||
<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}">
|
||||
<i class="icon-pushpin"></i>
|
||||
</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>
|
||||
</div>
|
||||
<a href="{{playlist.url}}" class="main">
|
||||
<span class="is-public">
|
||||
<span ng-show="playlist.is_public">Is Public</span>
|
||||
<span ng-hide="playlist.is_public">Is Private</span>
|
||||
</span>
|
||||
<li ng-repeat="playlist in playlists">
|
||||
<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}">
|
||||
<i class="icon-pushpin"></i>
|
||||
</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>
|
||||
</div>
|
||||
<a href="{{playlist.url}}" class="main">
|
||||
<span class="is-public">
|
||||
<span ng-show="playlist.is_public">Is Public</span>
|
||||
<span ng-hide="playlist.is_public">Is Private</span>
|
||||
</span>
|
||||
|
||||
<img ng-src="{{playlist.covers.small}}" />
|
||||
<span class="title">
|
||||
{{playlist.title}}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<img ng-src="{{playlist.covers.small}}" />
|
||||
<span class="title">
|
||||
{{playlist.title}}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
<form ng-submit="updateAccount()" class="pfm-form account-settings-form">
|
||||
<ul class="toolbar">
|
||||
<li>
|
||||
<button type="submit" class="btn" ng-class="{disabled: !isDirty || isSaving, 'btn-primary': isDirty}">
|
||||
Save Changes
|
||||
<i ng-show="isSaving" class="icon-cog icon-spin icon-large"></i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="stretch-to-bottom">
|
||||
<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>
|
||||
<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 class="error">{{errors.display_name}}</div>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<div class="form-row" ng-class="{'has-error': errors.bio != null}">
|
||||
<label class="strong" for="bio">Bio</label>
|
||||
<textarea id="bio" placeholder="bio (optional)" ng-model="settings.bio" ng-disabled="isLoading" ng-change="touchModel()"></textarea>
|
||||
<div class="error">{{errors.description}}</div>
|
||||
</div>
|
||||
<div class="form-row" ng-class="{'has-error': errors.avatar != null || errors.gravatar != null}">
|
||||
<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
|
||||
</label>
|
||||
<div ng-show="!settings.uses_gravatar">
|
||||
<pfm-image-upload set-image="setAvatar" image="settings.avatar_url" />
|
||||
</div>
|
||||
<input type="text" ng-disabled="isSaving" ng-change="touchModel()" ng-show="settings.uses_gravatar" placeholder="Gravatar Email" ng-model="settings.gravatar" />
|
||||
<div class="error" ng-show="errors.avatar != null">{{errors.avatar}}</div>
|
||||
<div class="error" ng-show="errors.gravatar != null">{{errors.gravatar}}</div>
|
||||
</div>
|
||||
<ul class="toolbar">
|
||||
<li>
|
||||
<button type="submit" class="btn" ng-class="{disabled: !isDirty || isSaving, 'btn-primary': isDirty}">
|
||||
Save Changes
|
||||
<i ng-show="isSaving" class="icon-cog icon-spin icon-large"></i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="stretch-to-bottom">
|
||||
<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>
|
||||
<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 class="error">{{errors.display_name}}</div>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<div class="form-row" ng-class="{'has-error': errors.bio != null}">
|
||||
<label class="strong" for="bio">Bio</label>
|
||||
<textarea id="bio" placeholder="bio (optional)" ng-model="settings.bio" ng-disabled="isLoading" ng-change="touchModel()"></textarea>
|
||||
<div class="error">{{errors.description}}</div>
|
||||
</div>
|
||||
<div class="form-row" ng-class="{'has-error': errors.avatar != null || errors.gravatar != null}">
|
||||
<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
|
||||
</label>
|
||||
<div ng-show="!settings.uses_gravatar">
|
||||
<pfm-image-upload set-image="setAvatar" image="settings.avatar_url" />
|
||||
</div>
|
||||
<input type="text" ng-disabled="isSaving" ng-change="touchModel()" ng-show="settings.uses_gravatar" placeholder="Gravatar Email" ng-model="settings.gravatar" />
|
||||
<div class="error" ng-show="errors.avatar != null">{{errors.avatar}}</div>
|
||||
<div class="error" ng-show="errors.gravatar != null">{{errors.gravatar}}</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -1,120 +1,120 @@
|
|||
<form novalidate ng-submit="updateTrack(edit)">
|
||||
<ul class="toolbar">
|
||||
<li>
|
||||
<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">
|
||||
Save Changes
|
||||
</span>
|
||||
<span ng-hide="edit.is_published">
|
||||
Publish Track
|
||||
</span>
|
||||
<i ng-show="isSaving" class="icon-cog icon-spin icon-large"></i>
|
||||
</button>
|
||||
</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>
|
||||
<div class="stretch-to-bottom">
|
||||
<div class="form-row" ng-class="{'has-error': errors.title != null}">
|
||||
<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" />
|
||||
<div class="error">{{errors.title}}</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span6 form-row" ng-class="{'has-error': errors.description != null}">
|
||||
<label for="description" class="strong">Description:</label>
|
||||
<textarea ng-disabled="isSaving" ng-change="touchModel()" placeholder="Description (optional)" id="description" ng-model="edit.description"></textarea>
|
||||
<div class="error">{{errors.description}}</div>
|
||||
</div>
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="form-row span6" ng-class="{'has-error': errors.genre_id != null}">
|
||||
<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">
|
||||
<option value="">Please select a genre...</option>
|
||||
</select>
|
||||
<div class="error">{{errors.genre_id}}</div>
|
||||
</div>
|
||||
<div class="form-row span6" ng-class="{'has-error': errors.track_type_id != null}">
|
||||
<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">
|
||||
<option value="">Please select a type...</option>
|
||||
</select>
|
||||
<div class="error">{{errors.track_type_id}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="form-row album span6" ng-class="{'has-error': errors.album_id != null}">
|
||||
<a pfm-popup="album-selector" href="#" class="btn btn-small">
|
||||
Album:
|
||||
<strong ng-show="selectedAlbum">{{selectedAlbum.title}}</strong>
|
||||
<strong ng-hide="selectedAlbum">None</strong>
|
||||
</a>
|
||||
<div id="album-selector" class="pfm-popup">
|
||||
<ul>
|
||||
<li ng-class="{selected: selectedAlbum == null}">
|
||||
<a pfm-eat-click href="#" ng-click="selectAlbum(null);">None</a>
|
||||
</li>
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="error">{{errors.album_id}}</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}">
|
||||
<a pfm-popup="song-selector" href="#" class="btn btn-small">Show Songs: <strong>{{selectedSongsTitle}}</strong></a>
|
||||
<div id="song-selector" class="pfm-popup">
|
||||
<ul>
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="error">{{errors.show_song_ids}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="form-row span6" ng-class="{'has-error': errors.cover != null}">
|
||||
<label class="strong">Track Cover: </label>
|
||||
<pfm-image-upload set-image="setCover" image="edit.cover" />
|
||||
</div>
|
||||
<div class="form-row span6" ng-class="{'has-error': errors.released_at != null}">
|
||||
<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" />
|
||||
<div class="error">{{errors.released_at}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label class="strong">Choose a License:</label>
|
||||
<ul class="license-grid">
|
||||
<li ng-repeat="license in taxonomies.licenses" ng-class="{selected: edit.license_id == license.id}">
|
||||
<div ng-click="edit.license_id = license.id; touchModel()">
|
||||
<strong>{{license.title}}</strong>
|
||||
<p>{{license.description}}</p>
|
||||
<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-show="edit.license_id == license.id">Selected</span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="toolbar">
|
||||
<li>
|
||||
<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">
|
||||
Save Changes
|
||||
</span>
|
||||
<span ng-hide="edit.is_published">
|
||||
Publish Track
|
||||
</span>
|
||||
<i ng-show="isSaving" class="icon-cog icon-spin icon-large"></i>
|
||||
</button>
|
||||
</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>
|
||||
<div class="stretch-to-bottom">
|
||||
<div class="form-row" ng-class="{'has-error': errors.title != null}">
|
||||
<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" />
|
||||
<div class="error">{{errors.title}}</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span6 form-row" ng-class="{'has-error': errors.description != null}">
|
||||
<label for="description" class="strong">Description:</label>
|
||||
<textarea ng-disabled="isSaving" ng-change="touchModel()" placeholder="Description (optional)" id="description" ng-model="edit.description"></textarea>
|
||||
<div class="error">{{errors.description}}</div>
|
||||
</div>
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="form-row span6" ng-class="{'has-error': errors.genre_id != null}">
|
||||
<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">
|
||||
<option value="">Please select a genre...</option>
|
||||
</select>
|
||||
<div class="error">{{errors.genre_id}}</div>
|
||||
</div>
|
||||
<div class="form-row span6" ng-class="{'has-error': errors.track_type_id != null}">
|
||||
<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">
|
||||
<option value="">Please select a type...</option>
|
||||
</select>
|
||||
<div class="error">{{errors.track_type_id}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="form-row album span6" ng-class="{'has-error': errors.album_id != null}">
|
||||
<a pfm-popup="album-selector" href="#" class="btn btn-small">
|
||||
Album:
|
||||
<strong ng-show="selectedAlbum">{{selectedAlbum.title}}</strong>
|
||||
<strong ng-hide="selectedAlbum">None</strong>
|
||||
</a>
|
||||
<div id="album-selector" class="pfm-popup">
|
||||
<ul>
|
||||
<li ng-class="{selected: selectedAlbum == null}">
|
||||
<a pfm-eat-click href="#" ng-click="selectAlbum(null);">None</a>
|
||||
</li>
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="error">{{errors.album_id}}</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}">
|
||||
<a pfm-popup="song-selector" href="#" class="btn btn-small">Show Songs: <strong>{{selectedSongsTitle}}</strong></a>
|
||||
<div id="song-selector" class="pfm-popup">
|
||||
<ul>
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="error">{{errors.show_song_ids}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="form-row span6" ng-class="{'has-error': errors.cover != null}">
|
||||
<label class="strong">Track Cover: </label>
|
||||
<pfm-image-upload set-image="setCover" image="edit.cover" />
|
||||
</div>
|
||||
<div class="form-row span6" ng-class="{'has-error': errors.released_at != null}">
|
||||
<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" />
|
||||
<div class="error">{{errors.released_at}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label class="strong">Choose a License:</label>
|
||||
<ul class="license-grid">
|
||||
<li ng-repeat="license in taxonomies.licenses" ng-class="{selected: edit.license_id == license.id}">
|
||||
<div ng-click="edit.license_id = license.id; touchModel()">
|
||||
<strong>{{license.title}}</strong>
|
||||
<p>{{license.description}}</p>
|
||||
<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-show="edit.license_id == license.id">Selected</span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
|
@ -1,15 +1,15 @@
|
|||
<div class="two-pane-view" ng-class="{open: data.selectedTrack != null, closed: data.selectedTrack == null}">
|
||||
<div class="list">
|
||||
<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}">
|
||||
<a href="/account/tracks/edit/{{track.id}}" ng-click="selectTrack(track)">
|
||||
<img class="image" ng-src="{{track.cover_url}}" />
|
||||
<span class="title">{{track.title}}</span>
|
||||
<span class="published">{{track.created_at | pfmdate:'MM/dd/yyyy'}}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="list">
|
||||
<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}">
|
||||
<a href="/account/tracks/edit/{{track.id}}" ng-click="selectTrack(track)">
|
||||
<img class="image" ng-src="{{track.cover_url}}" />
|
||||
<span class="title">{{track.title}}</span>
|
||||
<span class="published">{{track.created_at | pfmdate:'MM/dd/yyyy'}}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ui-view class="editor"></ui-view>
|
||||
<ui-view class="editor"></ui-view>
|
||||
</div>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<div class="pagination" ng-show="totalPages > 1">
|
||||
<ul>
|
||||
<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}">
|
||||
<a href="#" ng-click="gotoPage(page);" pfm-eat-click>{{page}}</a>
|
||||
</li>
|
||||
<li ng-class="{disabled: !nextPage}"><a href="#" ng-click="gotoPage(nextPage);" pfm-eat-click>Next</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<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}">
|
||||
<a href="#" ng-click="gotoPage(page);" pfm-eat-click>{{page}}</a>
|
||||
</li>
|
||||
<li ng-class="{disabled: !nextPage}"><a href="#" ng-click="gotoPage(nextPage);" pfm-eat-click>Next</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ui-view></ui-view>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<div class="stretch-to-bottom">
|
||||
<pfm-albums-list albums="albums"></pfm-albums-list>
|
||||
<pfm-albums-list albums="albums"></pfm-albums-list>
|
||||
</div>
|
||||
|
|
|
@ -1,53 +1,53 @@
|
|||
<div class="resource-details album-details" bindonce="album">
|
||||
<ul class="dropdowns">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="btn btn-small btn-info dropdown-toggle" ng-disabled="album.is_downloadable == 0">
|
||||
Downloads
|
||||
</a>
|
||||
<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>
|
||||
</ul>
|
||||
</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 bo-show="album.permissions.edit"><a class="btn btn-small" bo-href="'/account/albums/edit/' + album.id">Edit</a></li>
|
||||
</ul>
|
||||
<ul class="dropdowns">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="btn btn-small btn-info dropdown-toggle" ng-disabled="album.is_downloadable == 0">
|
||||
Downloads
|
||||
</a>
|
||||
<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>
|
||||
</ul>
|
||||
</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 bo-show="album.permissions.edit"><a class="btn btn-small" bo-href="'/account/albums/edit/' + album.id">Edit</a></li>
|
||||
</ul>
|
||||
|
||||
<header>
|
||||
<h1 bo-text="album.title"></h1>
|
||||
<h2>
|
||||
by: <a bo-href="album.user.url" bo-text="album.user.name"></a>
|
||||
</h2>
|
||||
</header>
|
||||
<header>
|
||||
<h1 bo-text="album.title"></h1>
|
||||
<h2>
|
||||
by: <a bo-href="album.user.url" bo-text="album.user.name"></a>
|
||||
</h2>
|
||||
</header>
|
||||
|
||||
<div class="stretch-to-bottom details-columns">
|
||||
<div class="right">
|
||||
<img class="cover" pfm-src-loader="album.covers.normal" pfm-src-size="normal" />
|
||||
<div class="stretch-to-bottom details-columns">
|
||||
<div class="right">
|
||||
<img class="cover" pfm-src-loader="album.covers.normal" pfm-src-size="normal" />
|
||||
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<ul class="stats">
|
||||
<li>Published: <strong bo-text="album.created_at | pfmdate:'medium'"></strong></li>
|
||||
<li>Views: <strong bo-text="album.stats.views"></strong></li>
|
||||
<li>Downloads: <strong bo-text="album.stats.downloads"></strong></li>
|
||||
<li>Favourites: <strong bo-text="album.stats.favourites"></strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="stats">
|
||||
<li>Published: <strong bo-text="album.created_at | pfmdate:'medium'"></strong></li>
|
||||
<li>Views: <strong bo-text="album.stats.views"></strong></li>
|
||||
<li>Downloads: <strong bo-text="album.stats.downloads"></strong></li>
|
||||
<li>Favourites: <strong bo-text="album.stats.favourites"></strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="left">
|
||||
<div class="description" bo-show="album.description.length">
|
||||
<h2>Description</h2>
|
||||
<p bo-html="album.description | noHTML | newlines"></p>
|
||||
</div>
|
||||
<div class="left">
|
||||
<div class="description" bo-show="album.description.length">
|
||||
<h2>Description</h2>
|
||||
<p bo-html="album.description | noHTML | newlines"></p>
|
||||
</div>
|
||||
|
||||
<h2>Tracks</h2>
|
||||
<pfm-tracks-list tracks="album.tracks" class="condensed no-artist"></pfm-tracks-list>
|
||||
<h2>Tracks</h2>
|
||||
<pfm-tracks-list tracks="album.tracks" class="condensed no-artist"></pfm-tracks-list>
|
||||
|
||||
<pfm-comments type="album" resource="album"></pfm-comments>
|
||||
</div>
|
||||
</div>
|
||||
<pfm-comments type="album" resource="album"></pfm-comments>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,21 +1,21 @@
|
|||
<div class="resource-details artist-details" ng-class="{'x-archived': artist.is_archived}" bindonce="artist">
|
||||
<ul class="dropdowns">
|
||||
<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()">
|
||||
<span ng-hide="artist.user_data.is_following">Follow</span>
|
||||
<span ng-show="artist.user_data.is_following">Following!</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<header>
|
||||
<h1 bo-text="artist.name"></h1>
|
||||
<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.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>
|
||||
</ul>
|
||||
</header>
|
||||
<div class="stretch-to-bottom">
|
||||
<ui-view></ui-view>
|
||||
</div>
|
||||
<ul class="dropdowns">
|
||||
<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()">
|
||||
<span ng-hide="artist.user_data.is_following">Follow</span>
|
||||
<span ng-show="artist.user_data.is_following">Following!</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<header>
|
||||
<h1 bo-text="artist.name"></h1>
|
||||
<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.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>
|
||||
</ul>
|
||||
</header>
|
||||
<div class="stretch-to-bottom">
|
||||
<ui-view></ui-view>
|
||||
</div>
|
||||
</div>
|
|
@ -1,14 +1,14 @@
|
|||
<div ng-show="content.albums.length">
|
||||
<h2>Albums</h2>
|
||||
<pfm-albums-list albums="content.albums"></pfm-albums-list>
|
||||
<h2>Albums</h2>
|
||||
<pfm-albums-list albums="content.albums"></pfm-albums-list>
|
||||
</div>
|
||||
|
||||
<div ng-show="content.singles.length">
|
||||
<h2>Singles</h2>
|
||||
<pfm-tracks-list tracks="content.singles" class="four-columns no-artist"></pfm-tracks-list>
|
||||
<h2>Singles</h2>
|
||||
<pfm-tracks-list tracks="content.singles" class="four-columns no-artist"></pfm-tracks-list>
|
||||
</div>
|
||||
|
||||
<div ng-show="content.albumTracks.length">
|
||||
<h2>Part of an Album</h2>
|
||||
<pfm-tracks-list tracks="content.albumTracks" class="four-columns no-artist"></pfm-tracks-list>
|
||||
<h2>Part of an Album</h2>
|
||||
<pfm-tracks-list tracks="content.albumTracks" class="four-columns no-artist"></pfm-tracks-list>
|
||||
</div>
|
|
@ -1,10 +1,10 @@
|
|||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<h2>Tracks</h2>
|
||||
<pfm-tracks-list tracks="favourites.tracks"></pfm-tracks-list>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<h2>Albums</h2>
|
||||
<pfm-albums-list albums="favourites.albums" class="two-columns"></pfm-albums-list>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<h2>Tracks</h2>
|
||||
<pfm-tracks-list tracks="favourites.tracks"></pfm-tracks-list>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<h2>Albums</h2>
|
||||
<pfm-albums-list albums="favourites.albums" class="two-columns"></pfm-albums-list>
|
||||
</div>
|
||||
</div>
|
|
@ -1,11 +1,11 @@
|
|||
<div class="pagination" ng-show="totalPages > 1">
|
||||
<ul>
|
||||
<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}">
|
||||
<a href="#" ng-click="gotoPage(page);" pfm-eat-click>{{page}}</a>
|
||||
</li>
|
||||
<li ng-class="{disabled: !nextPage}"><a href="#" ng-click="gotoPage(nextPage);" pfm-eat-click>Next</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<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}">
|
||||
<a href="#" ng-click="gotoPage(page);" pfm-eat-click>{{page}}</a>
|
||||
</li>
|
||||
<li ng-class="{disabled: !nextPage}"><a href="#" ng-click="gotoPage(nextPage);" pfm-eat-click>Next</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ui-view></ui-view>
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
<div class="stretch-to-bottom">
|
||||
<ul class="artist-listing">
|
||||
<li class="artist" ng-class="{'x-archived': artist.is_archived}" ng-repeat="artist in artists" bindonce>
|
||||
<a href="{{artist.url}}">
|
||||
<img class="image" pfm-src-loader="artist.avatars.small" pfm-src-size="small" />
|
||||
<span class="info">
|
||||
<span class="title" bo-text="artist.name"></span>
|
||||
<span ng-hide="artist.is_archived" class="published">
|
||||
joined <span bo-text="artist.created_at.date | momentFromNow"></span>
|
||||
</span>
|
||||
<span ng-show="artist.is_archived" class="published">
|
||||
archived artist
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li ng-show="!artists.length" class="empty">
|
||||
No artists found...
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="artist-listing">
|
||||
<li class="artist" ng-class="{'x-archived': artist.is_archived}" ng-repeat="artist in artists" bindonce>
|
||||
<a href="{{artist.url}}">
|
||||
<img class="image" pfm-src-loader="artist.avatars.small" pfm-src-size="small" />
|
||||
<span class="info">
|
||||
<span class="title" bo-text="artist.name"></span>
|
||||
<span ng-hide="artist.is_archived" class="published">
|
||||
joined <span bo-text="artist.created_at.date | momentFromNow"></span>
|
||||
</span>
|
||||
<span ng-show="artist.is_archived" class="published">
|
||||
archived artist
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li ng-show="!artists.length" class="empty">
|
||||
No artists found...
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
|
@ -1,16 +1,16 @@
|
|||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<div bo-show="artist.bio.trim().length">
|
||||
<h2>Bio</h2>
|
||||
<div class="description">
|
||||
<p bo-html="artist.bio | noHTML | newlines"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<div bo-show="artist.bio.trim().length">
|
||||
<h2>Bio</h2>
|
||||
<div class="description">
|
||||
<p bo-html="artist.bio | noHTML | newlines"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<pfm-comments type="user" resource="artist"></pfm-comments>
|
||||
</div>
|
||||
<div class="span6 cover-image">
|
||||
<h2>Recent Tracks</h2>
|
||||
<pfm-tracks-list tracks="artist.latest_tracks" class="two-columns no-artist" />
|
||||
</div>
|
||||
<pfm-comments type="user" resource="artist"></pfm-comments>
|
||||
</div>
|
||||
<div class="span6 cover-image">
|
||||
<h2>Recent Tracks</h2>
|
||||
<pfm-tracks-list tracks="artist.latest_tracks" class="two-columns no-artist" />
|
||||
</div>
|
||||
</div>
|
|
@ -1,7 +1,7 @@
|
|||
<div>
|
||||
<h1>Login</h1>
|
||||
<div class="alert">
|
||||
Only user accounts that were created as of the launch of the pre-release will be available.
|
||||
</div>
|
||||
<ng-include src="'/templates/partials/auth/login.html'" />
|
||||
<h1>Login</h1>
|
||||
<div class="alert">
|
||||
Only user accounts that were created as of the launch of the pre-release will be available.
|
||||
</div>
|
||||
<ng-include src="'/templates/partials/auth/login.html'" />
|
||||
</div>
|
|
@ -1,4 +1,4 @@
|
|||
<div>
|
||||
<h1>Register!</h1>
|
||||
<ng-include src="'/templates/partials/auth/register.html'" />
|
||||
<h1>Register!</h1>
|
||||
<ng-include src="'/templates/partials/auth/register.html'" />
|
||||
</div>
|
|
@ -1,8 +1,8 @@
|
|||
<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.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.artists') || stateIncludes('content.artist')}"><a href="/artists">Artists</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.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>
|
||||
</ul>
|
||||
|
||||
<ui-view></ui-view>
|
|
@ -1,24 +1,24 @@
|
|||
<div class="dashboard stretch-to-bottom">
|
||||
<section class="recent-tracks">
|
||||
<h1>
|
||||
<a href="/tracks"><i class="icon-music"></i> see more</a>
|
||||
The newest tunes
|
||||
</h1>
|
||||
<pfm-tracks-list tracks="recentTracks" class="two-columns"></pfm-tracks-list>
|
||||
</section>
|
||||
<section class="recent-tracks">
|
||||
<h1>
|
||||
<a href="/tracks"><i class="icon-music"></i> see more</a>
|
||||
The newest tunes
|
||||
</h1>
|
||||
<pfm-tracks-list tracks="recentTracks" class="two-columns"></pfm-tracks-list>
|
||||
</section>
|
||||
|
||||
<section class="popular-tracks">
|
||||
<h1>
|
||||
What's popular today
|
||||
</h1>
|
||||
<pfm-tracks-list tracks="popularTracks" class="two-columns"></pfm-tracks-list>
|
||||
</section>
|
||||
<section class="popular-tracks">
|
||||
<h1>
|
||||
What's popular today
|
||||
</h1>
|
||||
<pfm-tracks-list tracks="popularTracks" class="two-columns"></pfm-tracks-list>
|
||||
</section>
|
||||
|
||||
<section class="news">
|
||||
<h1>
|
||||
<a href="https://twitter.com/ponyfm" target="_blank">follow @ponyfm</a>
|
||||
Pony.fm news
|
||||
</h1>
|
||||
<section class="news">
|
||||
<h1>
|
||||
<a href="https://twitter.com/ponyfm" target="_blank">follow @ponyfm</a>
|
||||
Pony.fm news
|
||||
</h1>
|
||||
<a class="twitter-timeline" href="https://twitter.com/ponyfm" data-widget-id="644195953956798464">Tweets by
|
||||
@ponyfm</a>
|
||||
<script>!function (d, s, id) {
|
||||
|
@ -30,5 +30,5 @@
|
|||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}
|
||||
}(document, "script", "twitter-wjs");</script>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
<ul class="albums-listing {{class}}">
|
||||
<li ng-repeat="album in albums" bindonce>
|
||||
<a bo-href="album.url">
|
||||
<img class="image" pfm-src-loader="album.covers.small" pfm-src-size="small" />
|
||||
<span class="info">
|
||||
<span class="title" bo-text="album.title"></span>
|
||||
<span class="published">
|
||||
by <span bo-text="album.user.name"></span>
|
||||
</span>
|
||||
<span class="stats">
|
||||
<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.downloads"></strong> <i class="icon-download"></i>
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li ng-show="!albums.length" class="empty">
|
||||
No albums found...
|
||||
</li>
|
||||
<li ng-repeat="album in albums" bindonce>
|
||||
<a bo-href="album.url">
|
||||
<img class="image" pfm-src-loader="album.covers.small" pfm-src-size="small" />
|
||||
<span class="info">
|
||||
<span class="title" bo-text="album.title"></span>
|
||||
<span class="published">
|
||||
by <span bo-text="album.user.name"></span>
|
||||
</span>
|
||||
<span class="stats">
|
||||
<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.downloads"></strong> <i class="icon-download"></i>
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li ng-show="!albums.length" class="empty">
|
||||
No albums found...
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
<div class="comments" bindonce>
|
||||
<h2>All Comments ({{resource.comments.length}})</h2>
|
||||
<form class="pfm-form" ng-submit="addComment()" ng-show="auth.isLogged">
|
||||
<div class="form-row">
|
||||
<input type="text" ng-model="content" placeholder="Write a comment..." />
|
||||
</div>
|
||||
</form>
|
||||
<ul>
|
||||
<li ng-show="resource.comments.length == 0" class="empty">
|
||||
There are no comments yet!
|
||||
</li>
|
||||
<li bindonce ng-repeat="comment in resource.comments">
|
||||
<img pfm-src-loader="comment.user.avatars.thumbnail" pfm-src-size="thumbnail" />
|
||||
<div class="content">
|
||||
<a bo-href="comment.user.url" bo-text="comment.user.name"></a>
|
||||
<span bo-text="comment.content"></span>
|
||||
<div class="meta" bo-text="comment.created_at.date | momentFromNow">
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>All Comments ({{resource.comments.length}})</h2>
|
||||
<form class="pfm-form" ng-submit="addComment()" ng-show="auth.isLogged">
|
||||
<div class="form-row">
|
||||
<input type="text" ng-model="content" placeholder="Write a comment..." />
|
||||
</div>
|
||||
</form>
|
||||
<ul>
|
||||
<li ng-show="resource.comments.length == 0" class="empty">
|
||||
There are no comments yet!
|
||||
</li>
|
||||
<li bindonce ng-repeat="comment in resource.comments">
|
||||
<img pfm-src-loader="comment.user.avatars.thumbnail" pfm-src-size="thumbnail" />
|
||||
<div class="content">
|
||||
<a bo-href="comment.user.url" bo-text="comment.user.name"></a>
|
||||
<span bo-text="comment.content"></span>
|
||||
<div class="meta" bo-text="comment.created_at.date | momentFromNow">
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
|
@ -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">
|
||||
<span ng-hide="resource.user_data.is_favourited">
|
||||
Favourite This!
|
||||
<i class="icon-star-empty"></i>
|
||||
</span>
|
||||
<span ng-show="resource.user_data.is_favourited">
|
||||
In Your Favourites
|
||||
<i class="icon-star"></i>
|
||||
</span>
|
||||
<span ng-hide="resource.user_data.is_favourited">
|
||||
Favourite This!
|
||||
<i class="icon-star-empty"></i>
|
||||
</span>
|
||||
<span ng-show="resource.user_data.is_favourited">
|
||||
In Your Favourites
|
||||
<i class="icon-star"></i>
|
||||
</span>
|
||||
</a>
|
|
@ -1,20 +1,20 @@
|
|||
<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>
|
||||
<p>
|
||||
Image must be a PNG that is at least 350x350. <br />
|
||||
<input type="file" onchange="angular.element(this).scope().setImageFile(this)" />
|
||||
</p>
|
||||
<div class="btn-group">
|
||||
<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="clearImage()" class="btn btn-danger btn-small" ng-show="isImageLoaded"><i class="icon-remove"></i></a>
|
||||
</div>
|
||||
<div id="image-selector" class="pfm-popup image-selector">
|
||||
<ul>
|
||||
<li ng-repeat="image in images" ng-click="selectGalleryImage(image)">
|
||||
<img ng-src="{{image.urls.small}}" />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="error" ng-show="error != null">{{error}}</div>
|
||||
<div class="preview" ng-class="{canOpen: isImageLoaded}" ng-click="previewImage()"><img ng-show="isImageLoaded" /></div>
|
||||
<p>
|
||||
Image must be a PNG that is at least 350x350. <br />
|
||||
<input type="file" onchange="angular.element(this).scope().setImageFile(this)" />
|
||||
</p>
|
||||
<div class="btn-group">
|
||||
<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="clearImage()" class="btn btn-danger btn-small" ng-show="isImageLoaded"><i class="icon-remove"></i></a>
|
||||
</div>
|
||||
<div id="image-selector" class="pfm-popup image-selector">
|
||||
<ul>
|
||||
<li ng-repeat="image in images" ng-click="selectGalleryImage(image)">
|
||||
<img ng-src="{{image.urls.small}}" />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="error" ng-show="error != null">{{error}}</div>
|
||||
</div>
|
|
@ -1,38 +1,38 @@
|
|||
<div class="track-player" ng-show="player.isPlaying">
|
||||
<ul class="buttons">
|
||||
<li class="status">
|
||||
<strong>{{player.currentTrack.progressSeconds | secondsDisplay}}</strong> /
|
||||
<strong>{{player.currentTrack.duration | secondsDisplay}}</strong>
|
||||
</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>
|
||||
<a pfm-eat-click ng-click="playPause()" class="play" href="#">
|
||||
<i class="icon-pause" ng-show="player.currentTrack.isPlaying"></i>
|
||||
<i class="icon-play" ng-hide="player.currentTrack.isPlaying"></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">
|
||||
<a pfm-eat-click ng-click="" class="volume" href="#">
|
||||
<i class="icon-volume-up"></i>
|
||||
</a>
|
||||
<div class="volume-slider">
|
||||
<div class="bar"><a href="#" class="knob"> </a></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="image">
|
||||
<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" />
|
||||
</div>
|
||||
<div class="inner">
|
||||
<div class="title">
|
||||
<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>
|
||||
</div>
|
||||
<div class="transport" ng-click="seek($event)">
|
||||
<div class="bar" pfm-progress-bar="player.currentTrack.progress"></div>
|
||||
<div class="loader-bar" pfm-progress-bar="player.currentTrack.loadingProgress"></div>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="buttons">
|
||||
<li class="status">
|
||||
<strong>{{player.currentTrack.progressSeconds | secondsDisplay}}</strong> /
|
||||
<strong>{{player.currentTrack.duration | secondsDisplay}}</strong>
|
||||
</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>
|
||||
<a pfm-eat-click ng-click="playPause()" class="play" href="#">
|
||||
<i class="icon-pause" ng-show="player.currentTrack.isPlaying"></i>
|
||||
<i class="icon-play" ng-hide="player.currentTrack.isPlaying"></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">
|
||||
<a pfm-eat-click ng-click="" class="volume" href="#">
|
||||
<i class="icon-volume-up"></i>
|
||||
</a>
|
||||
<div class="volume-slider">
|
||||
<div class="bar"><a href="#" class="knob"> </a></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="image">
|
||||
<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" />
|
||||
</div>
|
||||
<div class="inner">
|
||||
<div class="title">
|
||||
<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>
|
||||
</div>
|
||||
<div class="transport" ng-click="seek($event)">
|
||||
<div class="bar" pfm-progress-bar="player.currentTrack.progress"></div>
|
||||
<div class="loader-bar" pfm-progress-bar="player.currentTrack.loadingProgress"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
<ul class="playlists-listing {{class}}">
|
||||
<li ng-repeat="playlist in playlists" bindonce>
|
||||
<a href="{{playlist.url}}">
|
||||
<img class="image" pfm-src-loader="playlist.covers.small" pfm-src-size="small" />
|
||||
<span class="info">
|
||||
<span class="title">{{playlist.title}}</span>
|
||||
<span class="published">
|
||||
by {{playlist.user.name}}
|
||||
</span>
|
||||
<span class="stats">
|
||||
<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.downloads"></strong> <i class="icon-download"></i>
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li ng-show="!playlists.length" class="empty">
|
||||
No playlists found...
|
||||
</li>
|
||||
<li ng-repeat="playlist in playlists" bindonce>
|
||||
<a href="{{playlist.url}}">
|
||||
<img class="image" pfm-src-loader="playlist.covers.small" pfm-src-size="small" />
|
||||
<span class="info">
|
||||
<span class="title">{{playlist.title}}</span>
|
||||
<span class="published">
|
||||
by {{playlist.user.name}}
|
||||
</span>
|
||||
<span class="stats">
|
||||
<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.downloads"></strong> <i class="icon-download"></i>
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li ng-show="!playlists.length" class="empty">
|
||||
No playlists found...
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="single-player">
|
||||
<a href="#" class="play-button" pfm-eat-click ng-click="play()">
|
||||
<i class="icon-play" ng-show="!track.isPlaying"></i>
|
||||
<i class="icon-pause" ng-hide="!track.isPlaying"></i>
|
||||
</a>
|
||||
<img pfm-src-loader="track.covers.thumbnail" pfm-src-size="thumbnail" />
|
||||
<a href="#" class="play-button" pfm-eat-click ng-click="play()">
|
||||
<i class="icon-play" ng-show="!track.isPlaying"></i>
|
||||
<i class="icon-pause" ng-hide="!track.isPlaying"></i>
|
||||
</a>
|
||||
<img pfm-src-loader="track.covers.thumbnail" pfm-src-size="thumbnail" />
|
||||
</div>
|
|
@ -1,27 +1,27 @@
|
|||
<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}">
|
||||
<div class="image">
|
||||
<a href="#" class="play-button" pfm-eat-click ng-click="play(track)">
|
||||
<i class="icon-play" ng-show="!track.isPlaying"></i>
|
||||
<i class="icon-pause" ng-hide="!track.isPlaying"></i>
|
||||
</a>
|
||||
<img pfm-src-loader="track.covers.thumbnail" pfm-src-size="thumbnail" />
|
||||
</div>
|
||||
<div class="icons">
|
||||
<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>
|
||||
</div>
|
||||
<a class="info" href="{{track.url}}">
|
||||
<span class="title">{{track.title}}</span>
|
||||
<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.comments}}</strong>c
|
||||
<strong>{{track.stats.plays}}</strong>p
|
||||
</span>
|
||||
<span class="artist">{{track.user.name}} / {{track.genre.name}}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li ng-show="!tracks.length" class="empty">
|
||||
No tracks found...
|
||||
</li>
|
||||
<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">
|
||||
<a href="#" class="play-button" pfm-eat-click ng-click="play(track)">
|
||||
<i class="icon-play" ng-show="!track.isPlaying"></i>
|
||||
<i class="icon-pause" ng-hide="!track.isPlaying"></i>
|
||||
</a>
|
||||
<img pfm-src-loader="track.covers.thumbnail" pfm-src-size="thumbnail" />
|
||||
</div>
|
||||
<div class="icons">
|
||||
<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>
|
||||
</div>
|
||||
<a class="info" href="{{track.url}}">
|
||||
<span class="title">{{track.title}}</span>
|
||||
<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.comments}}</strong>c
|
||||
<strong>{{track.stats.plays}}</strong>p
|
||||
</span>
|
||||
<span class="artist">{{track.user.name}} / {{track.genre.name}}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li ng-show="!tracks.length" class="empty">
|
||||
No tracks found...
|
||||
</li>
|
||||
</ul>
|
|
@ -1,3 +1,3 @@
|
|||
<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're sorry this happened. Perhaps you would like to go to our <a href="/">home page</a>?</p>
|
|
@ -1,14 +1,14 @@
|
|||
<div>
|
||||
<ul class="tabs">
|
||||
<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.playlists')}"><a href="/account/favourites/playlists">Playlists</a></li>
|
||||
</ul>
|
||||
<ul class="tabs">
|
||||
<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.playlists')}"><a href="/account/favourites/playlists">Playlists</a></li>
|
||||
</ul>
|
||||
|
||||
<ui-view></ui-view>
|
||||
<ui-view></ui-view>
|
||||
|
||||
<pre>
|
||||
$state = {{$state.current.name}}
|
||||
$stateParams = {{$stateParams}}
|
||||
</pre>
|
||||
<pre>
|
||||
$state = {{$state.current.name}}
|
||||
$stateParams = {{$stateParams}}
|
||||
</pre>
|
||||
</div>
|
|
@ -1,3 +1,3 @@
|
|||
<div class="stretch-to-bottom">
|
||||
<pfm-albums-list albums="albums" />
|
||||
<pfm-albums-list albums="albums" />
|
||||
</div>
|
|
@ -1,3 +1,3 @@
|
|||
<div class="stretch-to-bottom">
|
||||
<pfm-playlists-list playlists="playlists"></pfm-playlists-list>
|
||||
<pfm-playlists-list playlists="playlists"></pfm-playlists-list>
|
||||
</div>
|
|
@ -1,3 +1,3 @@
|
|||
<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>
|
|
@ -1,33 +1,33 @@
|
|||
<div class="dashboard stretch-to-bottom">
|
||||
<section class="recent-tracks">
|
||||
<h1>
|
||||
<a href="/tracks"><i class="icon-music"></i> see more</a>
|
||||
The newest tunes
|
||||
</h1>
|
||||
<pfm-tracks-list tracks="recentTracks" class="two-columns"></pfm-tracks-list>
|
||||
</section>
|
||||
<section class="recent-tracks">
|
||||
<h1>
|
||||
<a href="/tracks"><i class="icon-music"></i> see more</a>
|
||||
The newest tunes
|
||||
</h1>
|
||||
<pfm-tracks-list tracks="recentTracks" class="two-columns"></pfm-tracks-list>
|
||||
</section>
|
||||
|
||||
<section class="popular-tracks">
|
||||
<h1>
|
||||
What's popular today
|
||||
</h1>
|
||||
<pfm-tracks-list tracks="popularTracks" class="two-columns"></pfm-tracks-list>
|
||||
</section>
|
||||
<section class="popular-tracks">
|
||||
<h1>
|
||||
What's popular today
|
||||
</h1>
|
||||
<pfm-tracks-list tracks="popularTracks" class="two-columns"></pfm-tracks-list>
|
||||
</section>
|
||||
|
||||
<section class="news">
|
||||
<h1>Welcome to Pony.fm</h1>
|
||||
<p>The pony fan music site. By bronies, for bronies.</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.
|
||||
</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!
|
||||
</p>
|
||||
<section class="news">
|
||||
<h1>Welcome to Pony.fm</h1>
|
||||
<p>The pony fan music site. By bronies, for bronies.</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.
|
||||
</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!
|
||||
</p>
|
||||
|
||||
<h1>
|
||||
<a href="http://mlpforums.com/blog/404-ponyfm-development-blog/" target="_blank">read all</a>
|
||||
Pony.fm news
|
||||
</h1>
|
||||
<h1>
|
||||
<a href="http://mlpforums.com/blog/404-ponyfm-development-blog/" target="_blank">read all</a>
|
||||
Pony.fm news
|
||||
</h1>
|
||||
<a class="twitter-timeline" href="https://twitter.com/ponyfm" data-widget-id="644195953956798464">Tweets by
|
||||
@ponyfm</a>
|
||||
<script>!function (d, s, id) {
|
||||
|
@ -39,5 +39,5 @@
|
|||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}
|
||||
}(document, "script", "twitter-wjs");</script>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
<div class="about-page">
|
||||
<h1>What exactly <em>is</em> Pony.fm, anyway?</h1>
|
||||
<div class="stretch-to-bottom">
|
||||
<p>Some <em>My Little Pony: Friendship is Magic</em> fans - typically referred to as "bronies" 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>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's needs, and they're not particularly helpful if, as a listener, you're looking for pony fan music.</p>
|
||||
<p>That'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>
|
||||
<h1>What exactly <em>is</em> Pony.fm, anyway?</h1>
|
||||
<div class="stretch-to-bottom">
|
||||
<p>Some <em>My Little Pony: Friendship is Magic</em> fans - typically referred to as "bronies" 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>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's needs, and they're not particularly helpful if, as a listener, you're looking for pony fan music.</p>
|
||||
<p>That'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's SoundCloud with ponies?</h2>
|
||||
<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>Simply put, <strong>"Pony.fm is Pony.fm."</strong></p>
|
||||
<h2>So it's SoundCloud with ponies?</h2>
|
||||
<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>Simply put, <strong>"Pony.fm is Pony.fm."</strong></p>
|
||||
|
||||
<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>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 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>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>
|
||||
<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 "supercommunity" experience than either site could offer on its own.</p>
|
||||
<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 "supercommunity" experience than either site could offer on its own.</p>
|
||||
|
||||
<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>
|
||||
<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>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>
|
|
@ -1,77 +1,77 @@
|
|||
<div>
|
||||
<h1>Pony.fm FAQ</h1>
|
||||
<div class="stretch-to-bottom">
|
||||
<ul class="faq-tos">
|
||||
<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="#upload">How do I Upload a song?</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="#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="#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="#report">How do I report someone?</a></li>
|
||||
<li><a href="#download">How do I download an artist' song?</a></li>
|
||||
</ul>
|
||||
<h1>Pony.fm FAQ</h1>
|
||||
<div class="stretch-to-bottom">
|
||||
<ul class="faq-tos">
|
||||
<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="#upload">How do I Upload a song?</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="#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="#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="#report">How do I report someone?</a></li>
|
||||
<li><a href="#download">How do I download an artist' song?</a></li>
|
||||
</ul>
|
||||
|
||||
<a name="mp3"></a>
|
||||
<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>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>
|
||||
<a name="mp3"></a>
|
||||
<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>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>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>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 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>
|
||||
<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>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="not-accepted"></a>
|
||||
<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>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>
|
||||
<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>Please be aware that Pony.fm doesn't support MP3 uploads.</p>
|
||||
<a name="upload"></a>
|
||||
<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>Please be aware that Pony.fm doesn't support MP3 uploads.</p>
|
||||
|
||||
<a name="avatar"></a>
|
||||
<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>
|
||||
<a name="avatar"></a>
|
||||
<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>
|
||||
|
||||
<a name="mlp-forums"></a>
|
||||
<h2>Why the connection to MLP Forums?</h2>
|
||||
<p>MLP Forums is one of the web'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="mlp-forums"></a>
|
||||
<h2>Why the connection to MLP Forums?</h2>
|
||||
<p>MLP Forums is one of the web'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>
|
||||
<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>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>
|
||||
<a name="feedback"></a>
|
||||
<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>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>
|
||||
|
||||
<a name="poniverse"></a>
|
||||
<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>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="poniverse"></a>
|
||||
<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>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>
|
||||
<h2>Can I view any site statistics?</h2>
|
||||
<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>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="stats"></a>
|
||||
<h2>Can I view any site statistics?</h2>
|
||||
<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>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>
|
||||
<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>
|
||||
<a name="contact"></a>
|
||||
<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>
|
||||
|
||||
<a name="report"></a>
|
||||
<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>
|
||||
<a name="report"></a>
|
||||
<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>
|
||||
|
||||
<a name="download"></a>
|
||||
<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 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>
|
||||
</div>
|
||||
</div>
|
||||
<a name="download"></a>
|
||||
<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 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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,13 +1,13 @@
|
|||
<div class="modal-header">
|
||||
<h3>
|
||||
<button type="button" class="close" ng-click="close()" ng-hide="isLoading">×</button>
|
||||
{{album.title}}
|
||||
</h3>
|
||||
<h3>
|
||||
<button type="button" class="close" ng-click="close()" ng-hide="isLoading">×</button>
|
||||
{{album.title}}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h2>Shortlink</h2>
|
||||
<input type="text" ng-model="album.share.url" />
|
||||
<h2>Shortlink</h2>
|
||||
<input type="text" ng-model="album.share.url" />
|
||||
</div>
|
||||
<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>
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
<form ng-submit="login.submit()" class="form-horizontal">
|
||||
<ul class="messages" ng-hide="!messages.length">
|
||||
<li ng-repeat="message in messages" class="alert alert-error">
|
||||
{{message}}
|
||||
</li>
|
||||
</ul>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputEmail">Email</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="inputEmail" placeholder="Email" ng-model="login.email" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputPassword">Password</label>
|
||||
<div class="controls">
|
||||
<input type="password" id="inputPassword" placeholder="Password" ng-model="login.password" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" ng-model="login.remember" /> Remember me
|
||||
</label>
|
||||
<button type="submit" class="btn">Sign in</button>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="messages" ng-hide="!messages.length">
|
||||
<li ng-repeat="message in messages" class="alert alert-error">
|
||||
{{message}}
|
||||
</li>
|
||||
</ul>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputEmail">Email</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="inputEmail" placeholder="Email" ng-model="login.email" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputPassword">Password</label>
|
||||
<div class="controls">
|
||||
<input type="password" id="inputPassword" placeholder="Password" ng-model="login.password" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" ng-model="login.remember" /> Remember me
|
||||
</label>
|
||||
<button type="submit" class="btn">Sign in</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
|
@ -1,15 +1,15 @@
|
|||
<div class="modal-header">
|
||||
<h3>
|
||||
<button type="button" class="close" ng-click="close()" ng-hide="isLoading">×</button>
|
||||
Credits
|
||||
</h3>
|
||||
<h3>
|
||||
<button type="button" class="close" ng-click="close()" ng-hide="isLoading">×</button>
|
||||
Credits
|
||||
</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Pony.fm was created to organize the <em>My Little Pony</em> community's fan music.
|
||||
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>
|
||||
|
||||
<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.
|
||||
We thank the following projects, in no particular order, for providing the building
|
||||
blocks for our own.</p>
|
||||
|
@ -42,5 +42,5 @@
|
|||
</ul>
|
||||
</div>
|
||||
<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>
|
||||
|
|
|
@ -1,39 +1,39 @@
|
|||
<form ng-submit="createPlaylist()" class="pfm-form">
|
||||
<div class="modal-header">
|
||||
<h3>
|
||||
<button type="button" class="close" ng-click="close()" ng-hide="isLoading">×</button>
|
||||
<span ng-show="isNew">Create</span>
|
||||
<span ng-hide="isNew">Edit</span>
|
||||
Playlist
|
||||
</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-row" ng-class="{'has-error': errors.title != null}">
|
||||
<label class="control-label" for="title">Name</label>
|
||||
<input type="text" id="title" placeholder="Playlist Name" ng-model="form.title" ng-disabled="isLoading" />
|
||||
<div class="error">{{errors.title}}</div>
|
||||
</div>
|
||||
<div class="form-row" ng-class="{'has-error': errors.description != null}">
|
||||
<label class="control-label" for="description">Description</label>
|
||||
<textarea id="description" placeholder="Description (optional)" ng-model="form.description" ng-disabled="isLoading"></textarea>
|
||||
<div class="error">{{errors.description}}</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-primary" ng-disabled="isLoading">
|
||||
<span ng-show="isNew">Create</span>
|
||||
<span ng-hide="isNew">Edit</span>
|
||||
Playlist
|
||||
<i class="ui-icon-gear icon-spin" ng-show="isLoading"></i>
|
||||
</button>
|
||||
<a class="btn cancel" ng-click="close()" ng-disabled="isLoading">Close</a>
|
||||
</div>
|
||||
<div class="modal-header">
|
||||
<h3>
|
||||
<button type="button" class="close" ng-click="close()" ng-hide="isLoading">×</button>
|
||||
<span ng-show="isNew">Create</span>
|
||||
<span ng-hide="isNew">Edit</span>
|
||||
Playlist
|
||||
</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-row" ng-class="{'has-error': errors.title != null}">
|
||||
<label class="control-label" for="title">Name</label>
|
||||
<input type="text" id="title" placeholder="Playlist Name" ng-model="form.title" ng-disabled="isLoading" />
|
||||
<div class="error">{{errors.title}}</div>
|
||||
</div>
|
||||
<div class="form-row" ng-class="{'has-error': errors.description != null}">
|
||||
<label class="control-label" for="description">Description</label>
|
||||
<textarea id="description" placeholder="Description (optional)" ng-model="form.description" ng-disabled="isLoading"></textarea>
|
||||
<div class="error">{{errors.description}}</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-primary" ng-disabled="isLoading">
|
||||
<span ng-show="isNew">Create</span>
|
||||
<span ng-hide="isNew">Edit</span>
|
||||
Playlist
|
||||
<i class="ui-icon-gear icon-spin" ng-show="isLoading"></i>
|
||||
</button>
|
||||
<a class="btn cancel" ng-click="close()" ng-disabled="isLoading">Close</a>
|
||||
</div>
|
||||
</form>
|
|
@ -1,13 +1,13 @@
|
|||
<div class="modal-header">
|
||||
<h3>
|
||||
<button type="button" class="close" ng-click="close()" ng-hide="isLoading">×</button>
|
||||
{{playlist.title}}
|
||||
</h3>
|
||||
<h3>
|
||||
<button type="button" class="close" ng-click="close()" ng-hide="isLoading">×</button>
|
||||
{{playlist.title}}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h2>Shortlink</h2>
|
||||
<input type="text" ng-model="playlist.share.url" />
|
||||
<h2>Shortlink</h2>
|
||||
<input type="text" ng-model="playlist.share.url" />
|
||||
</div>
|
||||
<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>
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<div class="modal-header">
|
||||
<h3>
|
||||
<button type="button" class="close" ng-click="close()" ng-hide="isLoading">×</button>
|
||||
{{track.title}}
|
||||
</h3>
|
||||
<h3>
|
||||
<button type="button" class="close" ng-click="close()" ng-hide="isLoading">×</button>
|
||||
{{track.title}}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h2>Shortlink</h2>
|
||||
<input type="text" ng-model="track.share.url" />
|
||||
<h2>Shortlink</h2>
|
||||
<input type="text" ng-model="track.share.url" />
|
||||
|
||||
<h2>HTML Embed <small>(websites, blogs)</small></h2>
|
||||
<textarea type="text" ng-model="track.share.html"></textarea>
|
||||
<h2>HTML Embed <small>(websites, blogs)</small></h2>
|
||||
<textarea type="text" ng-model="track.share.html"></textarea>
|
||||
|
||||
<h2>BBCode Embed <small>(forums)</small></h2>
|
||||
<textarea type="text" ng-model="track.share.bbcode"></textarea>
|
||||
<h2>BBCode Embed <small>(forums)</small></h2>
|
||||
<textarea type="text" ng-model="track.share.bbcode"></textarea>
|
||||
</div>
|
||||
<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>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<div class="pagination" ng-show="totalPages > 1">
|
||||
<ul>
|
||||
<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}">
|
||||
<a href="#" ng-click="gotoPage(page);" pfm-eat-click>{{page}}</a>
|
||||
</li>
|
||||
<li ng-class="{disabled: !nextPage}"><a href="#" ng-click="gotoPage(nextPage);" pfm-eat-click>Next</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<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}">
|
||||
<a href="#" ng-click="gotoPage(page);" pfm-eat-click>{{page}}</a>
|
||||
</li>
|
||||
<li ng-class="{disabled: !nextPage}"><a href="#" ng-click="gotoPage(nextPage);" pfm-eat-click>Next</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ui-view></ui-view>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<div class="stretch-to-bottom">
|
||||
<pfm-playlists-list playlists="playlists"></pfm-playlists-list>
|
||||
<pfm-playlists-list playlists="playlists"></pfm-playlists-list>
|
||||
</div>
|
|
@ -1,52 +1,52 @@
|
|||
<div class="resource-details playlist-details" bindonce="playlist">
|
||||
<ul class="dropdowns">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="btn btn-small btn-info dropdown-toggle">
|
||||
Downloads
|
||||
</a>
|
||||
<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>
|
||||
</ul>
|
||||
</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>
|
||||
</ul>
|
||||
<ul class="dropdowns">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="btn btn-small btn-info dropdown-toggle">
|
||||
Downloads
|
||||
</a>
|
||||
<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>
|
||||
</ul>
|
||||
</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>
|
||||
</ul>
|
||||
|
||||
<header>
|
||||
<h1 bo-text="playlist.title"></h1>
|
||||
<h2>
|
||||
created by: <a bo-href="playlist.user.url" bo-text="playlist.user.name"></a>
|
||||
</h2>
|
||||
</header>
|
||||
<header>
|
||||
<h1 bo-text="playlist.title"></h1>
|
||||
<h2>
|
||||
created by: <a bo-href="playlist.user.url" bo-text="playlist.user.name"></a>
|
||||
</h2>
|
||||
</header>
|
||||
|
||||
<div class="stretch-to-bottom details-columns">
|
||||
<div class="right">
|
||||
<img class="cover" pfm-src-loader="playlist.covers.normal" pfm-src-size="normal" />
|
||||
<div class="stretch-to-bottom details-columns">
|
||||
<div class="right">
|
||||
<img class="cover" pfm-src-loader="playlist.covers.normal" pfm-src-size="normal" />
|
||||
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<ul class="stats">
|
||||
<li>Created: <strong bo-text="playlist.created_at | pfmdate:'medium'"></strong></li>
|
||||
<li>Views: <strong bo-text="playlist.stats.views"></strong></li>
|
||||
<li>Downloads: <strong bo-text="playlist.stats.downloads"></strong></li>
|
||||
<li>Favourites: <strong bo-text="playlist.stats.favourites"></strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="stats">
|
||||
<li>Created: <strong bo-text="playlist.created_at | pfmdate:'medium'"></strong></li>
|
||||
<li>Views: <strong bo-text="playlist.stats.views"></strong></li>
|
||||
<li>Downloads: <strong bo-text="playlist.stats.downloads"></strong></li>
|
||||
<li>Favourites: <strong bo-text="playlist.stats.favourites"></strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="left">
|
||||
<div class="description" bo-show="playlist.description.length">
|
||||
<h2>Description</h2>
|
||||
<p bo-html="playlist.description | noHTML | newlines"></p>
|
||||
</div>
|
||||
<div class="left">
|
||||
<div class="description" bo-show="playlist.description.length">
|
||||
<h2>Description</h2>
|
||||
<p bo-html="playlist.description | noHTML | newlines"></p>
|
||||
</div>
|
||||
|
||||
<h2>Tracks</h2>
|
||||
<pfm-tracks-list tracks="playlist.tracks"></pfm-tracks-list>
|
||||
<h2>Tracks</h2>
|
||||
<pfm-tracks-list tracks="playlist.tracks"></pfm-tracks-list>
|
||||
|
||||
<pfm-comments type="playlist" resource="playlist"></pfm-comments>
|
||||
</div>
|
||||
</div>
|
||||
<pfm-comments type="playlist" resource="playlist"></pfm-comments>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,72 +1,72 @@
|
|||
<ul class="dropdowns">
|
||||
<li class="dropdown" ng-class="{'has-filter': query.filters.trackTypes.selectedArray.length}">
|
||||
<a class="dropdown-toggle btn">
|
||||
Type: <strong>{{query.filters.trackTypes.title}}</strong>
|
||||
</a>
|
||||
<a class="btn" pfm-eat-click ng-click="clearFilter('trackTypes')"><i class="icon-remove"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<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 pfm-eat-click href="#" ng-click="setListFilter('trackTypes', type.id);">{{type.title}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown" ng-class="{'has-filter': query.filters.showSongs.selectedArray.length}">
|
||||
<a class="dropdown-toggle btn">
|
||||
Show Songs: <strong>{{query.filters.showSongs.title}}</strong>
|
||||
</a>
|
||||
<a class="btn" pfm-eat-click ng-click="clearFilter('showSongs')"><i class="icon-remove"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<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 pfm-eat-click href="#" ng-click="setListFilter('showSongs', song.id);">{{song.title}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown" ng-class="{'has-filter': query.filters.genres.selectedArray.length}">
|
||||
<a class="dropdown-toggle btn">
|
||||
Genre: <strong>{{query.filters.genres.title}}</strong>
|
||||
</a>
|
||||
<a class="btn" pfm-eat-click ng-click="clearFilter('genres')"><i class="icon-remove"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<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 pfm-eat-click href="#" ng-click="setListFilter('genres', genre.id);">{{genre.title}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown" ng-class="{'has-filter': !query.filters.isVocal.isDefault}">
|
||||
<a class="dropdown-toggle btn">
|
||||
Is Vocal: <strong>{{query.filters.isVocal.title}}</strong>
|
||||
</a>
|
||||
<a class="btn" pfm-eat-click ng-click="clearFilter('isVocal')"><i class="icon-remove"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown" ng-class="{'has-filter': !query.filters.sort.isDefault}">
|
||||
<a class="dropdown-toggle btn">
|
||||
Order: <strong>{{query.filters.sort.title}}</strong>
|
||||
</a>
|
||||
<a class="btn" pfm-eat-click ng-click="clearFilter('sort')"><i class="icon-remove"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown" ng-class="{'has-filter': query.filters.trackTypes.selectedArray.length}">
|
||||
<a class="dropdown-toggle btn">
|
||||
Type: <strong>{{query.filters.trackTypes.title}}</strong>
|
||||
</a>
|
||||
<a class="btn" pfm-eat-click ng-click="clearFilter('trackTypes')"><i class="icon-remove"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<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 pfm-eat-click href="#" ng-click="setListFilter('trackTypes', type.id);">{{type.title}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown" ng-class="{'has-filter': query.filters.showSongs.selectedArray.length}">
|
||||
<a class="dropdown-toggle btn">
|
||||
Show Songs: <strong>{{query.filters.showSongs.title}}</strong>
|
||||
</a>
|
||||
<a class="btn" pfm-eat-click ng-click="clearFilter('showSongs')"><i class="icon-remove"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<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 pfm-eat-click href="#" ng-click="setListFilter('showSongs', song.id);">{{song.title}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown" ng-class="{'has-filter': query.filters.genres.selectedArray.length}">
|
||||
<a class="dropdown-toggle btn">
|
||||
Genre: <strong>{{query.filters.genres.title}}</strong>
|
||||
</a>
|
||||
<a class="btn" pfm-eat-click ng-click="clearFilter('genres')"><i class="icon-remove"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<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 pfm-eat-click href="#" ng-click="setListFilter('genres', genre.id);">{{genre.title}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown" ng-class="{'has-filter': !query.filters.isVocal.isDefault}">
|
||||
<a class="dropdown-toggle btn">
|
||||
Is Vocal: <strong>{{query.filters.isVocal.title}}</strong>
|
||||
</a>
|
||||
<a class="btn" pfm-eat-click ng-click="clearFilter('isVocal')"><i class="icon-remove"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown" ng-class="{'has-filter': !query.filters.sort.isDefault}">
|
||||
<a class="dropdown-toggle btn">
|
||||
Order: <strong>{{query.filters.sort.title}}</strong>
|
||||
</a>
|
||||
<a class="btn" pfm-eat-click ng-click="clearFilter('sort')"><i class="icon-remove"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="pagination" ng-show="totalPages > 1">
|
||||
<ul>
|
||||
<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}">
|
||||
<a href="#" ng-click="gotoPage(page);" pfm-eat-click>{{page}}</a>
|
||||
</li>
|
||||
<li ng-class="{disabled: !nextPage}"><a href="#" ng-click="gotoPage(nextPage);" pfm-eat-click>Next</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<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}">
|
||||
<a href="#" ng-click="gotoPage(page);" pfm-eat-click>{{page}}</a>
|
||||
</li>
|
||||
<li ng-class="{disabled: !nextPage}"><a href="#" ng-click="gotoPage(nextPage);" pfm-eat-click>Next</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ui-view></ui-view>
|
|
@ -1,3 +1,3 @@
|
|||
<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>
|
|
@ -1,79 +1,79 @@
|
|||
<div class="resource-details track-details" bindonce="track">
|
||||
<ul class="dropdowns">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="btn btn-small btn-info dropdown-toggle" ng-disabled="track.is_downloadable == 0">
|
||||
Downloads
|
||||
</a>
|
||||
<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>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="btn btn-small dropdown-toggle" ng-show="auth.isLogged">
|
||||
Add to Playlist
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<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()">
|
||||
<span ng-hide="playlist.message" bo-text="playlist.title"></span>
|
||||
<span ng-show="playlist.message">{{playlist.message}}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li><a href="#" class="add-btn" pfm-eat-click ng-click="addToNewPlaylist()">Add to New Playlist</a></li>
|
||||
</ul>
|
||||
</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 bo-show="track.permissions.edit"><a class="btn btn-small" bo-href="'/account/tracks/edit/' + track.id">Edit</a></li>
|
||||
</ul>
|
||||
<ul class="dropdowns">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="btn btn-small btn-info dropdown-toggle" ng-disabled="track.is_downloadable == 0">
|
||||
Downloads
|
||||
</a>
|
||||
<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>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="btn btn-small dropdown-toggle" ng-show="auth.isLogged">
|
||||
Add to Playlist
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<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()">
|
||||
<span ng-hide="playlist.message" bo-text="playlist.title"></span>
|
||||
<span ng-show="playlist.message">{{playlist.message}}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li><a href="#" class="add-btn" pfm-eat-click ng-click="addToNewPlaylist()">Add to New Playlist</a></li>
|
||||
</ul>
|
||||
</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 bo-show="track.permissions.edit"><a class="btn btn-small" bo-href="'/account/tracks/edit/' + track.id">Edit</a></li>
|
||||
</ul>
|
||||
|
||||
<header>
|
||||
<pfm-track-player track="track"></pfm-track-player>
|
||||
<h1 bo-text="track.title"></h1>
|
||||
<h2>
|
||||
<span bo-show="track.album">
|
||||
from: <a bo-href="track.album.url" bo-text="track.album.title"></a>
|
||||
</span>
|
||||
<header>
|
||||
<pfm-track-player track="track"></pfm-track-player>
|
||||
<h1 bo-text="track.title"></h1>
|
||||
<h2>
|
||||
<span bo-show="track.album">
|
||||
from: <a bo-href="track.album.url" bo-text="track.album.title"></a>
|
||||
</span>
|
||||
|
||||
by: <a bo-href="track.user.url" bo-text="track.user.name"></a>
|
||||
</h2>
|
||||
</header>
|
||||
by: <a bo-href="track.user.url" bo-text="track.user.name"></a>
|
||||
</h2>
|
||||
</header>
|
||||
|
||||
<div class="stretch-to-bottom details-columns">
|
||||
<div class="right">
|
||||
<img class="cover" pfm-src-loader="track.covers.normal" pfm-src-size="normal" />
|
||||
<div class="stretch-to-bottom details-columns">
|
||||
<div class="right">
|
||||
<img class="cover" pfm-src-loader="track.covers.normal" pfm-src-size="normal" />
|
||||
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<ul class="stats">
|
||||
<li>Published: <strong bo-text="track.published_at | pfmdate:'medium'"></strong></li>
|
||||
<li>Views: <strong bo-text="track.stats.views"></strong></li>
|
||||
<li>Plays: <strong bo-text="track.stats.plays"></strong></li>
|
||||
<li>Downloads: <strong bo-text="track.stats.downloads"></strong></li>
|
||||
<li>Favourites: <strong bo-text="track.stats.favourites"></strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="left">
|
||||
<div class="description" bo-show="track.description.length">
|
||||
<h2>Description</h2>
|
||||
<p bo-html="track.description | noHTML | newlines"></p>
|
||||
</div>
|
||||
<ul class="stats">
|
||||
<li>Published: <strong bo-text="track.published_at | pfmdate:'medium'"></strong></li>
|
||||
<li>Views: <strong bo-text="track.stats.views"></strong></li>
|
||||
<li>Plays: <strong bo-text="track.stats.plays"></strong></li>
|
||||
<li>Downloads: <strong bo-text="track.stats.downloads"></strong></li>
|
||||
<li>Favourites: <strong bo-text="track.stats.favourites"></strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="left">
|
||||
<div class="description" bo-show="track.description.length">
|
||||
<h2>Description</h2>
|
||||
<p bo-html="track.description | noHTML | newlines"></p>
|
||||
</div>
|
||||
|
||||
<div bo-show="track.is_vocal && track.lyrics.length" class="lyrics-panel">
|
||||
<h2>Lyrics</h2>
|
||||
<div class="lyrics revealable">
|
||||
<div class="reveal">
|
||||
<a href="#">Click to reveal full lyrics...</a>
|
||||
</div>
|
||||
<p class="content" bo-html="track.lyrics | noHTML | newlines"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div bo-show="track.is_vocal && track.lyrics.length" class="lyrics-panel">
|
||||
<h2>Lyrics</h2>
|
||||
<div class="lyrics revealable">
|
||||
<div class="reveal">
|
||||
<a href="#">Click to reveal full lyrics...</a>
|
||||
</div>
|
||||
<p class="content" bo-html="track.lyrics | noHTML | newlines"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<pfm-comments type="track" resource="track"></pfm-comments>
|
||||
</div>
|
||||
</div>
|
||||
<pfm-comments type="track" resource="track"></pfm-comments>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,32 +1,32 @@
|
|||
<div class="uploader">
|
||||
<div class="dropzone" uploader>
|
||||
<p>Drop files here to begin your upload!</p>
|
||||
</div>
|
||||
<div class="dropzone" uploader>
|
||||
<p>Drop files here to begin your upload!</p>
|
||||
</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">
|
||||
<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>
|
||||
<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">Uploading</strong>
|
||||
<strong ng-show="upload.error != null">Error</strong>
|
||||
{{upload.name}} -
|
||||
<strong ng-show="upload.error != null">{{upload.error}}</strong>
|
||||
</span>
|
||||
<span ng-show="upload.success">
|
||||
<a href="/account/tracks/edit/{{upload.trackId}}" class="btn btn-small btn-primary">
|
||||
Publish
|
||||
</a>
|
||||
{{upload.name}}
|
||||
</span>
|
||||
</p>
|
||||
<div class="bar" pfm-progress-bar="upload.progress"></div>
|
||||
</li>
|
||||
</ul>
|
||||
<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'">
|
||||
<p>
|
||||
<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">Uploading</strong>
|
||||
<strong ng-show="upload.error != null">Error</strong>
|
||||
{{upload.name}} -
|
||||
<strong ng-show="upload.error != null">{{upload.error}}</strong>
|
||||
</span>
|
||||
<span ng-show="upload.success">
|
||||
<a href="/account/tracks/edit/{{upload.trackId}}" class="btn btn-small btn-primary">
|
||||
Publish
|
||||
</a>
|
||||
{{upload.name}}
|
||||
</span>
|
||||
</p>
|
||||
<div class="bar" pfm-progress-bar="upload.progress"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
|
@ -3,248 +3,248 @@ window.pfm.preloaders = {}
|
|||
module = angular.module 'ponyfm', ['ui.bootstrap', 'ui.state', 'ui.date', 'ui.sortable', 'pasvaz.bindonce', 'angularytics']
|
||||
|
||||
if window.pfm.environment == 'production'
|
||||
module.run [
|
||||
'Angularytics',
|
||||
(analytics) ->
|
||||
analytics.init()
|
||||
]
|
||||
module.run [
|
||||
'Angularytics',
|
||||
(analytics) ->
|
||||
analytics.init()
|
||||
]
|
||||
|
||||
module.config [
|
||||
'$locationProvider', '$stateProvider', '$dialogProvider', 'AngularyticsProvider', '$httpProvider', '$sceDelegateProvider'
|
||||
(location, state, $dialogProvider, analytics, $httpProvider, $sceDelegateProvider) ->
|
||||
'$locationProvider', '$stateProvider', '$dialogProvider', 'AngularyticsProvider', '$httpProvider', '$sceDelegateProvider'
|
||||
(location, state, $dialogProvider, analytics, $httpProvider, $sceDelegateProvider) ->
|
||||
|
||||
$httpProvider.interceptors.push [
|
||||
->
|
||||
request: (config) ->
|
||||
return config if !(/^\/?templates\//.test config.url)
|
||||
config.url += '?' + Math.ceil(Math.random() * 1000000)
|
||||
return config
|
||||
]
|
||||
$httpProvider.interceptors.push [
|
||||
->
|
||||
request: (config) ->
|
||||
return config if !(/^\/?templates\//.test config.url)
|
||||
config.url += '?' + Math.ceil(Math.random() * 1000000)
|
||||
return config
|
||||
]
|
||||
|
||||
# This fixes resource loading on IE
|
||||
$sceDelegateProvider.resourceUrlWhitelist [
|
||||
'self',
|
||||
'/templates/directives/*'
|
||||
]
|
||||
# This fixes resource loading on IE
|
||||
$sceDelegateProvider.resourceUrlWhitelist [
|
||||
'self',
|
||||
'/templates/directives/*'
|
||||
]
|
||||
|
||||
if window.pfm.environment == 'production'
|
||||
analytics.setEventHandlers ['Google']
|
||||
if window.pfm.environment == 'production'
|
||||
analytics.setEventHandlers ['Google']
|
||||
|
||||
# Errors
|
||||
state.state 'errors-404',
|
||||
url: '/errors/not-found'
|
||||
templateUrl: '/templates/errors/404.html'
|
||||
# Errors
|
||||
state.state 'errors-404',
|
||||
url: '/errors/not-found'
|
||||
templateUrl: '/templates/errors/404.html'
|
||||
|
||||
state.state 'errors-500',
|
||||
url: '/errors/server'
|
||||
templateUrl: '/templates/errors/500.html'
|
||||
state.state 'errors-500',
|
||||
url: '/errors/server'
|
||||
templateUrl: '/templates/errors/500.html'
|
||||
|
||||
state.state 'errors-403',
|
||||
url: '/errors/not-authorized'
|
||||
templateUrl: '/templates/errors/403.html'
|
||||
state.state 'errors-403',
|
||||
url: '/errors/not-authorized'
|
||||
templateUrl: '/templates/errors/403.html'
|
||||
|
||||
state.state 'errors-400',
|
||||
url: '/errors/invalid'
|
||||
templateUrl: '/templates/errors/400.html'
|
||||
state.state 'errors-400',
|
||||
url: '/errors/invalid'
|
||||
templateUrl: '/templates/errors/400.html'
|
||||
|
||||
# Upload
|
||||
# Upload
|
||||
|
||||
state.state 'uploader',
|
||||
url: '/account/uploader'
|
||||
templateUrl: '/templates/uploader/index.html'
|
||||
controller: 'uploader'
|
||||
state.state 'uploader',
|
||||
url: '/account/uploader'
|
||||
templateUrl: '/templates/uploader/index.html'
|
||||
controller: 'uploader'
|
||||
|
||||
# Account
|
||||
# Account
|
||||
|
||||
state.state 'account',
|
||||
url: '/account'
|
||||
abstract: true
|
||||
templateUrl: '/templates/account/_layout.html'
|
||||
state.state 'account',
|
||||
url: '/account'
|
||||
abstract: true
|
||||
templateUrl: '/templates/account/_layout.html'
|
||||
|
||||
state.state 'account.settings',
|
||||
url: ''
|
||||
templateUrl: '/templates/account/settings.html'
|
||||
controller: 'account-settings'
|
||||
state.state 'account.settings',
|
||||
url: ''
|
||||
templateUrl: '/templates/account/settings.html'
|
||||
controller: 'account-settings'
|
||||
|
||||
state.state 'account.tracks',
|
||||
url: '/tracks'
|
||||
templateUrl: '/templates/account/tracks.html'
|
||||
controller: 'account-tracks'
|
||||
state.state 'account.tracks',
|
||||
url: '/tracks'
|
||||
templateUrl: '/templates/account/tracks.html'
|
||||
controller: 'account-tracks'
|
||||
|
||||
state.state 'account.tracks.edit',
|
||||
url: '/edit/:track_id'
|
||||
templateUrl: '/templates/account/track.html'
|
||||
controller: 'account-track'
|
||||
state.state 'account.tracks.edit',
|
||||
url: '/edit/:track_id'
|
||||
templateUrl: '/templates/account/track.html'
|
||||
controller: 'account-track'
|
||||
|
||||
state.state 'account.albums',
|
||||
url: '/albums'
|
||||
templateUrl: '/templates/account/albums.html'
|
||||
controller: 'account-albums'
|
||||
state.state 'account.albums',
|
||||
url: '/albums'
|
||||
templateUrl: '/templates/account/albums.html'
|
||||
controller: 'account-albums'
|
||||
|
||||
state.state 'account.albums.create',
|
||||
url: '/create'
|
||||
templateUrl: '/templates/account/album.html'
|
||||
controller: 'account-albums-edit'
|
||||
state.state 'account.albums.create',
|
||||
url: '/create'
|
||||
templateUrl: '/templates/account/album.html'
|
||||
controller: 'account-albums-edit'
|
||||
|
||||
state.state 'account.albums.edit',
|
||||
url: '/edit/:album_id'
|
||||
templateUrl: '/templates/account/album.html'
|
||||
controller: 'account-albums-edit'
|
||||
state.state 'account.albums.edit',
|
||||
url: '/edit/:album_id'
|
||||
templateUrl: '/templates/account/album.html'
|
||||
controller: 'account-albums-edit'
|
||||
|
||||
state.state 'account.playlists',
|
||||
url: '/playlists'
|
||||
templateUrl: '/templates/account/playlists.html'
|
||||
controller: 'account-playlists'
|
||||
state.state 'account.playlists',
|
||||
url: '/playlists'
|
||||
templateUrl: '/templates/account/playlists.html'
|
||||
controller: 'account-playlists'
|
||||
|
||||
state.state 'favourites',
|
||||
url: '/account/favourites'
|
||||
abstract: true
|
||||
templateUrl: '/templates/favourites/_layout.html'
|
||||
state.state 'favourites',
|
||||
url: '/account/favourites'
|
||||
abstract: true
|
||||
templateUrl: '/templates/favourites/_layout.html'
|
||||
|
||||
state.state 'favourites.tracks',
|
||||
url: '/tracks'
|
||||
templateUrl: '/templates/favourites/tracks.html'
|
||||
controller: 'favourites-tracks'
|
||||
state.state 'favourites.tracks',
|
||||
url: '/tracks'
|
||||
templateUrl: '/templates/favourites/tracks.html'
|
||||
controller: 'favourites-tracks'
|
||||
|
||||
state.state 'favourites.playlists',
|
||||
url: '/playlists'
|
||||
templateUrl: '/templates/favourites/playlists.html'
|
||||
controller: 'favourites-playlists'
|
||||
state.state 'favourites.playlists',
|
||||
url: '/playlists'
|
||||
templateUrl: '/templates/favourites/playlists.html'
|
||||
controller: 'favourites-playlists'
|
||||
|
||||
state.state 'favourites.albums',
|
||||
url: '/albums'
|
||||
templateUrl: '/templates/favourites/albums.html'
|
||||
controller: 'favourites-albums'
|
||||
state.state 'favourites.albums',
|
||||
url: '/albums'
|
||||
templateUrl: '/templates/favourites/albums.html'
|
||||
controller: 'favourites-albums'
|
||||
|
||||
# Tracks
|
||||
# Tracks
|
||||
|
||||
state.state 'content',
|
||||
abstract: true
|
||||
templateUrl: '/templates/content/_layout.html'
|
||||
state.state 'content',
|
||||
abstract: true
|
||||
templateUrl: '/templates/content/_layout.html'
|
||||
|
||||
state.state 'content.tracks',
|
||||
templateUrl: '/templates/tracks/index.html'
|
||||
controller: 'tracks'
|
||||
url: '/tracks'
|
||||
abstract: true
|
||||
state.state 'content.tracks',
|
||||
templateUrl: '/templates/tracks/index.html'
|
||||
controller: 'tracks'
|
||||
url: '/tracks'
|
||||
abstract: true
|
||||
|
||||
state.state 'content.tracks.list',
|
||||
url: '^/tracks?filter&page'
|
||||
templateUrl: '/templates/tracks/list.html'
|
||||
controller: 'tracks-list'
|
||||
state.state 'content.tracks.list',
|
||||
url: '^/tracks?filter&page'
|
||||
templateUrl: '/templates/tracks/list.html'
|
||||
controller: 'tracks-list'
|
||||
|
||||
state.state 'content.track',
|
||||
url: '/tracks/{id:[^\-]+}-{slug}'
|
||||
templateUrl: '/templates/tracks/show.html'
|
||||
controller: 'track'
|
||||
state.state 'content.track',
|
||||
url: '/tracks/{id:[^\-]+}-{slug}'
|
||||
templateUrl: '/templates/tracks/show.html'
|
||||
controller: 'track'
|
||||
|
||||
# Albums
|
||||
# Albums
|
||||
|
||||
state.state 'content.albums',
|
||||
url: '/albums'
|
||||
templateUrl: '/templates/albums/index.html'
|
||||
controller: 'albums'
|
||||
abstract: true
|
||||
state.state 'content.albums',
|
||||
url: '/albums'
|
||||
templateUrl: '/templates/albums/index.html'
|
||||
controller: 'albums'
|
||||
abstract: true
|
||||
|
||||
state.state 'content.albums.list',
|
||||
url: '?page'
|
||||
templateUrl: '/templates/albums/list.html'
|
||||
controller: 'albums-list'
|
||||
state.state 'content.albums.list',
|
||||
url: '?page'
|
||||
templateUrl: '/templates/albums/list.html'
|
||||
controller: 'albums-list'
|
||||
|
||||
state.state 'content.album',
|
||||
url: '/albums/{id:[^\-]+}-{slug}'
|
||||
templateUrl: '/templates/albums/show.html'
|
||||
controller: 'album'
|
||||
state.state 'content.album',
|
||||
url: '/albums/{id:[^\-]+}-{slug}'
|
||||
templateUrl: '/templates/albums/show.html'
|
||||
controller: 'album'
|
||||
|
||||
# Playlists
|
||||
# Playlists
|
||||
|
||||
state.state 'content.playlists',
|
||||
url: '/playlists'
|
||||
templateUrl: '/templates/playlists/index.html'
|
||||
controller: 'playlists'
|
||||
abstract: true
|
||||
state.state 'content.playlists',
|
||||
url: '/playlists'
|
||||
templateUrl: '/templates/playlists/index.html'
|
||||
controller: 'playlists'
|
||||
abstract: true
|
||||
|
||||
state.state 'content.playlists.list',
|
||||
url: '?page'
|
||||
controller: 'playlists-list'
|
||||
templateUrl: '/templates/playlists/list.html'
|
||||
state.state 'content.playlists.list',
|
||||
url: '?page'
|
||||
controller: 'playlists-list'
|
||||
templateUrl: '/templates/playlists/list.html'
|
||||
|
||||
state.state 'content.playlist',
|
||||
url: '/playlist/{id:[^\-]+}-{slug}'
|
||||
templateUrl: '/templates/playlists/show.html'
|
||||
controller: 'playlist'
|
||||
state.state 'content.playlist',
|
||||
url: '/playlist/{id:[^\-]+}-{slug}'
|
||||
templateUrl: '/templates/playlists/show.html'
|
||||
controller: 'playlist'
|
||||
|
||||
# Artists
|
||||
# Artists
|
||||
|
||||
state.state 'content.artists',
|
||||
url: '/artists'
|
||||
templateUrl: '/templates/artists/index.html'
|
||||
controller: 'artists'
|
||||
abstract: true
|
||||
state.state 'content.artists',
|
||||
url: '/artists'
|
||||
templateUrl: '/templates/artists/index.html'
|
||||
controller: 'artists'
|
||||
abstract: true
|
||||
|
||||
state.state 'content.artists.list',
|
||||
url: '?page'
|
||||
templateUrl: '/templates/artists/list.html'
|
||||
controller: 'artists-list'
|
||||
state.state 'content.artists.list',
|
||||
url: '?page'
|
||||
templateUrl: '/templates/artists/list.html'
|
||||
controller: 'artists-list'
|
||||
|
||||
# Pages
|
||||
# Pages
|
||||
|
||||
state.state 'faq',
|
||||
url: '/faq'
|
||||
templateUrl: '/templates/pages/faq.html'
|
||||
state.state 'faq',
|
||||
url: '/faq'
|
||||
templateUrl: '/templates/pages/faq.html'
|
||||
|
||||
state.state 'about',
|
||||
url: '/about'
|
||||
templateUrl: '/templates/pages/about.html'
|
||||
state.state 'about',
|
||||
url: '/about'
|
||||
templateUrl: '/templates/pages/about.html'
|
||||
|
||||
# Auth
|
||||
# Auth
|
||||
|
||||
state.state 'login',
|
||||
url: '/login'
|
||||
templateUrl: '/templates/auth/login.html'
|
||||
controller: 'login'
|
||||
state.state 'login',
|
||||
url: '/login'
|
||||
templateUrl: '/templates/auth/login.html'
|
||||
controller: 'login'
|
||||
|
||||
state.state 'register',
|
||||
url: '/register'
|
||||
templateUrl: '/templates/auth/register.html'
|
||||
state.state 'register',
|
||||
url: '/register'
|
||||
templateUrl: '/templates/auth/register.html'
|
||||
|
||||
# Hompage
|
||||
# Hompage
|
||||
|
||||
if window.pfm.auth.isLogged
|
||||
state.state 'home',
|
||||
url: '/'
|
||||
templateUrl: '/templates/dashboard/index.html'
|
||||
controller: 'dashboard'
|
||||
else
|
||||
state.state 'home',
|
||||
url: '/'
|
||||
templateUrl: '/templates/home/index.html'
|
||||
controller: 'home'
|
||||
if window.pfm.auth.isLogged
|
||||
state.state 'home',
|
||||
url: '/'
|
||||
templateUrl: '/templates/dashboard/index.html'
|
||||
controller: 'dashboard'
|
||||
else
|
||||
state.state 'home',
|
||||
url: '/'
|
||||
templateUrl: '/templates/home/index.html'
|
||||
controller: 'home'
|
||||
|
||||
# Final catch-all for aritsts
|
||||
state.state 'content.artist',
|
||||
url: '^/{slug}'
|
||||
templateUrl: '/templates/artists/_show_layout.html'
|
||||
abstract: true
|
||||
controller: 'artist'
|
||||
# Final catch-all for aritsts
|
||||
state.state 'content.artist',
|
||||
url: '^/{slug}'
|
||||
templateUrl: '/templates/artists/_show_layout.html'
|
||||
abstract: true
|
||||
controller: 'artist'
|
||||
|
||||
state.state 'content.artist.profile',
|
||||
url: ''
|
||||
templateUrl: '/templates/artists/profile.html'
|
||||
controller: 'artist-profile'
|
||||
state.state 'content.artist.profile',
|
||||
url: ''
|
||||
templateUrl: '/templates/artists/profile.html'
|
||||
controller: 'artist-profile'
|
||||
|
||||
state.state 'content.artist.content',
|
||||
url: '/content'
|
||||
templateUrl: '/templates/artists/content.html'
|
||||
controller: 'artist-content'
|
||||
state.state 'content.artist.content',
|
||||
url: '/content'
|
||||
templateUrl: '/templates/artists/content.html'
|
||||
controller: 'artist-content'
|
||||
|
||||
state.state 'content.artist.favourites',
|
||||
url: '/favourites'
|
||||
templateUrl: '/templates/artists/favourites.html'
|
||||
controller: 'artist-favourites'
|
||||
state.state 'content.artist.favourites',
|
||||
url: '/favourites'
|
||||
templateUrl: '/templates/artists/favourites.html'
|
||||
controller: 'artist-favourites'
|
||||
|
||||
location.html5Mode(true);
|
||||
$dialogProvider.options
|
||||
dialogFade: true
|
||||
backdropClick: false
|
||||
location.html5Mode(true);
|
||||
$dialogProvider.options
|
||||
dialogFade: true
|
||||
backdropClick: false
|
||||
]
|
||||
|
|
|
@ -1,143 +1,143 @@
|
|||
window.pfm.preloaders['account-albums-edit'] = [
|
||||
'account-tracks', 'account-albums', '$state'
|
||||
(tracks, albums, $state) ->
|
||||
defs = [tracks.refresh()]
|
||||
if $state.params.album_id
|
||||
defs.push albums.getEdit($state.params.album_id, true)
|
||||
'account-tracks', 'account-albums', '$state'
|
||||
(tracks, albums, $state) ->
|
||||
defs = [tracks.refresh()]
|
||||
if $state.params.album_id
|
||||
defs.push albums.getEdit($state.params.album_id, true)
|
||||
|
||||
$.when.all defs
|
||||
$.when.all defs
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "account-albums-edit", [
|
||||
'$scope', '$state', '$dialog', 'account-albums'
|
||||
($scope, $state, $dialog, albums) ->
|
||||
$scope.isNew = $state.params.album_id == undefined
|
||||
$scope.data.isEditorOpen = true
|
||||
$scope.errors = {}
|
||||
$scope.isDirty = false
|
||||
$scope.album = {}
|
||||
$scope.isSaving = false
|
||||
$scope.tracks = []
|
||||
$scope.trackIds = {}
|
||||
'$scope', '$state', '$dialog', 'account-albums'
|
||||
($scope, $state, $dialog, albums) ->
|
||||
$scope.isNew = $state.params.album_id == undefined
|
||||
$scope.data.isEditorOpen = true
|
||||
$scope.errors = {}
|
||||
$scope.isDirty = false
|
||||
$scope.album = {}
|
||||
$scope.isSaving = false
|
||||
$scope.tracks = []
|
||||
$scope.trackIds = {}
|
||||
|
||||
$scope.toggleTrack = (track) ->
|
||||
if $scope.trackIds[track.id]
|
||||
delete $scope.trackIds[track.id]
|
||||
$scope.tracks.splice ($scope.tracks.indexOf track), 1
|
||||
else
|
||||
$scope.trackIds[track.id] = track
|
||||
$scope.tracks.push track
|
||||
$scope.toggleTrack = (track) ->
|
||||
if $scope.trackIds[track.id]
|
||||
delete $scope.trackIds[track.id]
|
||||
$scope.tracks.splice ($scope.tracks.indexOf track), 1
|
||||
else
|
||||
$scope.trackIds[track.id] = track
|
||||
$scope.tracks.push track
|
||||
|
||||
$scope.isDirty = true
|
||||
$scope.isDirty = true
|
||||
|
||||
$scope.sortTracks = () ->
|
||||
$scope.isDirty = true
|
||||
$scope.sortTracks = () ->
|
||||
$scope.isDirty = true
|
||||
|
||||
$scope.touchModel = -> $scope.isDirty = true
|
||||
$scope.touchModel = -> $scope.isDirty = true
|
||||
|
||||
$scope.setCover = (image, type) ->
|
||||
delete $scope.album.cover_id
|
||||
delete $scope.album.cover
|
||||
$scope.setCover = (image, type) ->
|
||||
delete $scope.album.cover_id
|
||||
delete $scope.album.cover
|
||||
|
||||
if image == null
|
||||
$scope.album.remove_cover = true
|
||||
else if type == 'file'
|
||||
$scope.album.cover = image
|
||||
else if type == 'gallery'
|
||||
$scope.album.cover_id = image.id
|
||||
if image == null
|
||||
$scope.album.remove_cover = true
|
||||
else if type == 'file'
|
||||
$scope.album.cover = image
|
||||
else if type == 'gallery'
|
||||
$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 = ->
|
||||
return if !$scope.isNew && !$scope.isDirty
|
||||
$scope.saveAlbum = ->
|
||||
return if !$scope.isNew && !$scope.isDirty
|
||||
|
||||
url =
|
||||
if $scope.isNew
|
||||
'/api/web/albums/create'
|
||||
else
|
||||
'/api/web/albums/edit/' + $state.params.album_id
|
||||
url =
|
||||
if $scope.isNew
|
||||
'/api/web/albums/create'
|
||||
else
|
||||
'/api/web/albums/edit/' + $state.params.album_id
|
||||
|
||||
xhr = new XMLHttpRequest()
|
||||
xhr.onload = -> $scope.$apply ->
|
||||
$scope.isSaving = false
|
||||
response = $.parseJSON(xhr.responseText)
|
||||
if xhr.status != 200
|
||||
$scope.errors = {}
|
||||
_.each response.errors, (value, key) -> $scope.errors[key] = value.join ', '
|
||||
return
|
||||
xhr = new XMLHttpRequest()
|
||||
xhr.onload = -> $scope.$apply ->
|
||||
$scope.isSaving = false
|
||||
response = $.parseJSON(xhr.responseText)
|
||||
if xhr.status != 200
|
||||
$scope.errors = {}
|
||||
_.each response.errors, (value, key) -> $scope.errors[key] = value.join ', '
|
||||
return
|
||||
|
||||
$scope.$emit 'album-updated'
|
||||
$scope.$emit 'album-updated'
|
||||
|
||||
if $scope.isNew
|
||||
$scope.isDirty = false
|
||||
$scope.$emit 'album-created'
|
||||
$state.transitionTo 'account.albums.edit', {album_id: response.id}
|
||||
else
|
||||
$scope.isDirty = false
|
||||
$scope.data.selectedAlbum.title = $scope.album.title
|
||||
$scope.data.selectedAlbum.covers.normal = response.real_cover_url
|
||||
if $scope.isNew
|
||||
$scope.isDirty = false
|
||||
$scope.$emit 'album-created'
|
||||
$state.transitionTo 'account.albums.edit', {album_id: response.id}
|
||||
else
|
||||
$scope.isDirty = false
|
||||
$scope.data.selectedAlbum.title = $scope.album.title
|
||||
$scope.data.selectedAlbum.covers.normal = response.real_cover_url
|
||||
|
||||
formData = new FormData()
|
||||
formData = new FormData()
|
||||
|
||||
_.each $scope.album, (value, name) ->
|
||||
if name == 'cover'
|
||||
return if value == null
|
||||
if typeof(value) == 'object'
|
||||
formData.append name, value, value.name
|
||||
else
|
||||
formData.append name, value
|
||||
_.each $scope.album, (value, name) ->
|
||||
if name == 'cover'
|
||||
return if value == null
|
||||
if typeof(value) == 'object'
|
||||
formData.append name, value, value.name
|
||||
else
|
||||
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.setRequestHeader 'X-CSRF-Token', pfm.token
|
||||
$scope.isSaving = true
|
||||
xhr.send formData
|
||||
xhr.open 'POST', url, true
|
||||
xhr.setRequestHeader 'X-CSRF-Token', pfm.token
|
||||
$scope.isSaving = true
|
||||
xhr.send formData
|
||||
|
||||
$scope.deleteAlbum = () ->
|
||||
$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'}
|
||||
]).open().then (res) ->
|
||||
return if res == 'cancel'
|
||||
$.post('/api/web/albums/delete/' + $scope.album.id, {_token: window.pfm.token})
|
||||
.then -> $scope.$apply ->
|
||||
$scope.$emit 'album-deleted'
|
||||
$state.transitionTo 'account.albums'
|
||||
$scope.deleteAlbum = () ->
|
||||
$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'}
|
||||
]).open().then (res) ->
|
||||
return if res == 'cancel'
|
||||
$.post('/api/web/albums/delete/' + $scope.album.id, {_token: window.pfm.token})
|
||||
.then -> $scope.$apply ->
|
||||
$scope.$emit 'album-deleted'
|
||||
$state.transitionTo 'account.albums'
|
||||
|
||||
$scope.setCover = (image, type) ->
|
||||
delete $scope.album.cover_id
|
||||
delete $scope.album.cover
|
||||
$scope.setCover = (image, type) ->
|
||||
delete $scope.album.cover_id
|
||||
delete $scope.album.cover
|
||||
|
||||
if image == null
|
||||
$scope.album.remove_cover = true
|
||||
else if type == 'file'
|
||||
$scope.album.cover = image
|
||||
else if type == 'gallery'
|
||||
$scope.album.cover_id = image.id
|
||||
if image == null
|
||||
$scope.album.remove_cover = true
|
||||
else if type == 'file'
|
||||
$scope.album.cover = image
|
||||
else if type == 'gallery'
|
||||
$scope.album.cover_id = image.id
|
||||
|
||||
$scope.isDirty = true
|
||||
$scope.isDirty = true
|
||||
|
||||
if !$scope.isNew
|
||||
albums.getEdit($state.params.album_id).done (album) ->
|
||||
$scope.album =
|
||||
id: album.id
|
||||
title: album.title
|
||||
description: album.description
|
||||
remove_cover: false
|
||||
cover: album.cover_url
|
||||
if !$scope.isNew
|
||||
albums.getEdit($state.params.album_id).done (album) ->
|
||||
$scope.album =
|
||||
id: album.id
|
||||
title: album.title
|
||||
description: album.description
|
||||
remove_cover: false
|
||||
cover: album.cover_url
|
||||
|
||||
$scope.tracks = []
|
||||
$scope.tracks.push track for track in album.tracks
|
||||
$scope.trackIds[track.id] = track for track in album.tracks
|
||||
$scope.tracks = []
|
||||
$scope.tracks.push track for track in album.tracks
|
||||
$scope.trackIds[track.id] = track for track in album.tracks
|
||||
|
||||
else
|
||||
$scope.album =
|
||||
title: ''
|
||||
description: ''
|
||||
else
|
||||
$scope.album =
|
||||
title: ''
|
||||
description: ''
|
||||
|
||||
$scope.$on '$locationChangeStart', (e) ->
|
||||
return if !$scope.isDirty
|
||||
e.preventDefault() if !confirm('Are you sure you want to leave this page without saving your changes?')
|
||||
$scope.$on '$locationChangeStart', (e) ->
|
||||
return if !$scope.isDirty
|
||||
e.preventDefault() if !confirm('Are you sure you want to leave this page without saving your changes?')
|
||||
]
|
||||
|
|
|
@ -1,47 +1,47 @@
|
|||
window.pfm.preloaders['account-albums'] = [
|
||||
'account-tracks', 'account-albums'
|
||||
(tracks, albums) ->
|
||||
$.when.all [tracks.refresh('published=true&in_album=false', true), albums.refresh(true)]
|
||||
'account-tracks', 'account-albums'
|
||||
(tracks, albums) ->
|
||||
$.when.all [tracks.refresh('published=true&in_album=false', true), albums.refresh(true)]
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "account-albums", [
|
||||
'$scope', '$state', 'account-albums', 'account-tracks'
|
||||
($scope, $state, albums, tracks) ->
|
||||
'$scope', '$state', 'account-albums', 'account-tracks'
|
||||
($scope, $state, albums, tracks) ->
|
||||
|
||||
$scope.albums = []
|
||||
$scope.data =
|
||||
isEditorOpen: false
|
||||
selectedAlbum: null
|
||||
tracksDb: []
|
||||
$scope.albums = []
|
||||
$scope.data =
|
||||
isEditorOpen: false
|
||||
selectedAlbum: null
|
||||
tracksDb: []
|
||||
|
||||
selectAlbum = (album) -> $scope.data.selectedAlbum = album
|
||||
selectAlbum = (album) -> $scope.data.selectedAlbum = album
|
||||
|
||||
updateTracks = (tracks) ->
|
||||
$scope.data.tracksDb.push track for track in tracks
|
||||
updateTracks = (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) ->
|
||||
$scope.albums.length = 0
|
||||
updateAlbums = (albums) ->
|
||||
$scope.albums.length = 0
|
||||
|
||||
for album in albums
|
||||
$scope.albums.push album
|
||||
albumsDb[album.id] = album
|
||||
for album in albums
|
||||
$scope.albums.push album
|
||||
albumsDb[album.id] = album
|
||||
|
||||
if $state.params.album_id
|
||||
selectAlbum albumsDb[$state.params.album_id]
|
||||
if $state.params.album_id
|
||||
selectAlbum albumsDb[$state.params.album_id]
|
||||
|
||||
albums.refresh().done updateAlbums
|
||||
albums.refresh().done updateAlbums
|
||||
|
||||
$scope.$on '$stateChangeSuccess', () ->
|
||||
if $state.params.album_id
|
||||
selectAlbum albumsDb[$state.params.album_id]
|
||||
else
|
||||
selectAlbum null
|
||||
$scope.$on '$stateChangeSuccess', () ->
|
||||
if $state.params.album_id
|
||||
selectAlbum albumsDb[$state.params.album_id]
|
||||
else
|
||||
selectAlbum null
|
||||
|
||||
$scope.$on 'album-created', () -> 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-created', () -> 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
|
||||
]
|
|
@ -1,10 +1,10 @@
|
|||
angular.module('ponyfm').controller "account-image-select", [
|
||||
'$scope'
|
||||
($scope) ->
|
||||
$scope.images = []
|
||||
$scope.isLoading = true
|
||||
'$scope'
|
||||
($scope) ->
|
||||
$scope.images = []
|
||||
$scope.isLoading = true
|
||||
|
||||
$.getJSON('/api/web/images/owned').done (images) -> $scope.$apply ->
|
||||
$scope.images = images
|
||||
$scope.isLoading = false
|
||||
$.getJSON('/api/web/images/owned').done (images) -> $scope.$apply ->
|
||||
$scope.images = images
|
||||
$scope.isLoading = false
|
||||
]
|
|
@ -1,44 +1,44 @@
|
|||
window.pfm.preloaders['account-playlists'] = [
|
||||
'playlists'
|
||||
(playlists) -> playlists.refreshOwned true
|
||||
'playlists'
|
||||
(playlists) -> playlists.refreshOwned true
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "account-playlists", [
|
||||
'$scope', 'auth', '$dialog', 'playlists'
|
||||
($scope, auth, $dialog, playlists) ->
|
||||
$scope.playlists = []
|
||||
'$scope', 'auth', '$dialog', 'playlists'
|
||||
($scope, auth, $dialog, playlists) ->
|
||||
$scope.playlists = []
|
||||
|
||||
loadPlaylists = (playlists) ->
|
||||
$scope.playlists.push playlist for playlist in playlists
|
||||
loadPlaylists = (playlists) ->
|
||||
$scope.playlists.push playlist for playlist in playlists
|
||||
|
||||
playlists.refreshOwned().done loadPlaylists
|
||||
playlists.refreshOwned().done loadPlaylists
|
||||
|
||||
$scope.editPlaylist = (playlist) ->
|
||||
dialog = $dialog.dialog
|
||||
templateUrl: '/templates/partials/playlist-dialog.html'
|
||||
controller: 'playlist-form'
|
||||
resolve: {
|
||||
playlist: () -> angular.copy playlist
|
||||
}
|
||||
$scope.editPlaylist = (playlist) ->
|
||||
dialog = $dialog.dialog
|
||||
templateUrl: '/templates/partials/playlist-dialog.html'
|
||||
controller: 'playlist-form'
|
||||
resolve: {
|
||||
playlist: () -> angular.copy playlist
|
||||
}
|
||||
|
||||
dialog.open()
|
||||
dialog.open()
|
||||
|
||||
$scope.togglePlaylistPin = (playlist) ->
|
||||
playlist.is_pinned = !playlist.is_pinned;
|
||||
playlists.editPlaylist playlist
|
||||
$scope.togglePlaylistPin = (playlist) ->
|
||||
playlist.is_pinned = !playlist.is_pinned;
|
||||
playlists.editPlaylist playlist
|
||||
|
||||
$scope.deletePlaylist = (playlist) ->
|
||||
$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: 'cancel', label: 'No', cssClass: 'btn-primary'}
|
||||
]).open().then (res) ->
|
||||
return if res == 'cancel'
|
||||
playlists.deletePlaylist(playlist).done ->
|
||||
$scope.playlists.splice _.indexOf($scope.playlists, (p) -> p.id == playlist.id), 1
|
||||
$scope.deletePlaylist = (playlist) ->
|
||||
$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: 'cancel', label: 'No', cssClass: 'btn-primary'}
|
||||
]).open().then (res) ->
|
||||
return if res == 'cancel'
|
||||
playlists.deletePlaylist(playlist).done ->
|
||||
$scope.playlists.splice _.indexOf($scope.playlists, (p) -> p.id == playlist.id), 1
|
||||
|
||||
$scope.$on 'playlist-updated', (e, playlist) ->
|
||||
index = _.indexOf($scope.playlists, (p) -> p.id == playlist.id)
|
||||
content = $scope.playlists[index]
|
||||
_.each playlist, (value, name) -> content[name] = value
|
||||
$scope.playlists.sort (left, right) -> left.title.localeCompare right.title
|
||||
$scope.$on 'playlist-updated', (e, playlist) ->
|
||||
index = _.indexOf($scope.playlists, (p) -> p.id == playlist.id)
|
||||
content = $scope.playlists[index]
|
||||
_.each playlist, (value, name) -> content[name] = value
|
||||
$scope.playlists.sort (left, right) -> left.title.localeCompare right.title
|
||||
]
|
|
@ -1,63 +1,63 @@
|
|||
angular.module('ponyfm').controller "account-settings", [
|
||||
'$scope', 'auth'
|
||||
($scope, auth) ->
|
||||
$scope.settings = {}
|
||||
$scope.errors = {}
|
||||
$scope.isDirty = false
|
||||
'$scope', 'auth'
|
||||
($scope, auth) ->
|
||||
$scope.settings = {}
|
||||
$scope.errors = {}
|
||||
$scope.isDirty = false
|
||||
|
||||
$scope.touchModel = () ->
|
||||
$scope.isDirty = true
|
||||
$scope.touchModel = () ->
|
||||
$scope.isDirty = true
|
||||
|
||||
$scope.refresh = () ->
|
||||
$.getJSON('/api/web/account/settings')
|
||||
.done (res) -> $scope.$apply ->
|
||||
$scope.settings = res
|
||||
$scope.refresh = () ->
|
||||
$.getJSON('/api/web/account/settings')
|
||||
.done (res) -> $scope.$apply ->
|
||||
$scope.settings = res
|
||||
|
||||
$scope.setAvatar = (image, type) ->
|
||||
delete $scope.settings.avatar_id
|
||||
delete $scope.settings.avatar
|
||||
$scope.setAvatar = (image, type) ->
|
||||
delete $scope.settings.avatar_id
|
||||
delete $scope.settings.avatar
|
||||
|
||||
if type == 'file'
|
||||
$scope.settings.avatar = image
|
||||
else if type == 'gallery'
|
||||
$scope.settings.avatar_id = image.id
|
||||
if type == 'file'
|
||||
$scope.settings.avatar = image
|
||||
else if type == 'gallery'
|
||||
$scope.settings.avatar_id = image.id
|
||||
|
||||
$scope.isDirty = true
|
||||
$scope.isDirty = true
|
||||
|
||||
$scope.updateAccount = () ->
|
||||
return if !$scope.isDirty
|
||||
$scope.updateAccount = () ->
|
||||
return if !$scope.isDirty
|
||||
|
||||
xhr = new XMLHttpRequest()
|
||||
xhr.onload = -> $scope.$apply ->
|
||||
$scope.isSaving = false
|
||||
response = $.parseJSON(xhr.responseText)
|
||||
if xhr.status != 200
|
||||
$scope.errors = {}
|
||||
_.each response.errors, (value, key) -> $scope.errors[key] = value.join ', '
|
||||
return
|
||||
xhr = new XMLHttpRequest()
|
||||
xhr.onload = -> $scope.$apply ->
|
||||
$scope.isSaving = false
|
||||
response = $.parseJSON(xhr.responseText)
|
||||
if xhr.status != 200
|
||||
$scope.errors = {}
|
||||
_.each response.errors, (value, key) -> $scope.errors[key] = value.join ', '
|
||||
return
|
||||
|
||||
$scope.isDirty = false
|
||||
$scope.errors = {}
|
||||
$scope.refresh()
|
||||
$scope.isDirty = false
|
||||
$scope.errors = {}
|
||||
$scope.refresh()
|
||||
|
||||
formData = new FormData()
|
||||
formData = new FormData()
|
||||
|
||||
_.each $scope.settings, (value, name) ->
|
||||
if name == 'avatar'
|
||||
return if value == null
|
||||
if typeof(value) == 'object'
|
||||
formData.append name, value, value.name
|
||||
else
|
||||
formData.append name, value
|
||||
_.each $scope.settings, (value, name) ->
|
||||
if name == 'avatar'
|
||||
return if value == null
|
||||
if typeof(value) == 'object'
|
||||
formData.append name, value, value.name
|
||||
else
|
||||
formData.append name, value
|
||||
|
||||
xhr.open 'POST', '/api/web/account/settings/save', true
|
||||
xhr.setRequestHeader 'X-CSRF-Token', pfm.token
|
||||
$scope.isSaving = true
|
||||
xhr.send formData
|
||||
xhr.open 'POST', '/api/web/account/settings/save', true
|
||||
xhr.setRequestHeader 'X-CSRF-Token', pfm.token
|
||||
$scope.isSaving = true
|
||||
xhr.send formData
|
||||
|
||||
$scope.refresh()
|
||||
$scope.refresh()
|
||||
|
||||
$scope.$on '$stateChangeStart', (e) ->
|
||||
return if $scope.selectedTrack == null || !$scope.isDirty
|
||||
e.preventDefault() if !confirm('Are you sure you want to leave this page without saving your changes?')
|
||||
$scope.$on '$stateChangeStart', (e) ->
|
||||
return if $scope.selectedTrack == null || !$scope.isDirty
|
||||
e.preventDefault() if !confirm('Are you sure you want to leave this page without saving your changes?')
|
||||
]
|
||||
|
|
|
@ -1,146 +1,146 @@
|
|||
window.pfm.preloaders['account-track'] = [
|
||||
'account-tracks', 'account-albums', 'taxonomies', '$state'
|
||||
(tracks, albums, taxonomies, state) ->
|
||||
$.when.all [albums.refresh(), taxonomies.refresh(), tracks.getEdit(state.params.track_id, true)]
|
||||
'account-tracks', 'account-albums', 'taxonomies', '$state'
|
||||
(tracks, albums, taxonomies, state) ->
|
||||
$.when.all [albums.refresh(), taxonomies.refresh(), tracks.getEdit(state.params.track_id, true)]
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "account-track", [
|
||||
'$scope', '$state', 'taxonomies', '$dialog', 'account-albums', 'account-tracks', 'images'
|
||||
($scope, $state, taxonomies, $dialog, albums, tracks, images) ->
|
||||
$scope.isDirty = false
|
||||
$scope.isSaving = false
|
||||
$scope.taxonomies = taxonomies
|
||||
$scope.selectedSongsTitle = 'None'
|
||||
$scope.selectedSongs = {}
|
||||
$scope.albums = []
|
||||
$scope.selectedAlbum = null
|
||||
'$scope', '$state', 'taxonomies', '$dialog', 'account-albums', 'account-tracks', 'images'
|
||||
($scope, $state, taxonomies, $dialog, albums, tracks, images) ->
|
||||
$scope.isDirty = false
|
||||
$scope.isSaving = false
|
||||
$scope.taxonomies = taxonomies
|
||||
$scope.selectedSongsTitle = 'None'
|
||||
$scope.selectedSongs = {}
|
||||
$scope.albums = []
|
||||
$scope.selectedAlbum = null
|
||||
|
||||
albumsDb = {}
|
||||
albums.refresh().done (albums) ->
|
||||
$scope.albums.legnth = 0
|
||||
albumsDb = {}
|
||||
for album in albums
|
||||
albumsDb[album.id] = album
|
||||
$scope.albums.push album
|
||||
albumsDb = {}
|
||||
albums.refresh().done (albums) ->
|
||||
$scope.albums.legnth = 0
|
||||
albumsDb = {}
|
||||
for album in albums
|
||||
albumsDb[album.id] = album
|
||||
$scope.albums.push album
|
||||
|
||||
$scope.selectAlbum = (album) ->
|
||||
$scope.selectedAlbum = album
|
||||
$scope.edit.album_id = if album then album.id else null
|
||||
$scope.isDirty = true
|
||||
$scope.selectAlbum = (album) ->
|
||||
$scope.selectedAlbum = album
|
||||
$scope.edit.album_id = if album then album.id else null
|
||||
$scope.isDirty = true
|
||||
|
||||
$scope.setCover = (image, type) ->
|
||||
delete $scope.edit.cover_id
|
||||
delete $scope.edit.cover
|
||||
$scope.setCover = (image, type) ->
|
||||
delete $scope.edit.cover_id
|
||||
delete $scope.edit.cover
|
||||
|
||||
if image == null
|
||||
$scope.edit.remove_cover = true
|
||||
else if type == 'file'
|
||||
$scope.edit.cover = image
|
||||
else if type == 'gallery'
|
||||
$scope.edit.cover_id = image.id
|
||||
if image == null
|
||||
$scope.edit.remove_cover = true
|
||||
else if type == 'file'
|
||||
$scope.edit.cover = image
|
||||
else if type == 'gallery'
|
||||
$scope.edit.cover_id = image.id
|
||||
|
||||
$scope.isDirty = true
|
||||
$scope.isDirty = true
|
||||
|
||||
updateSongDisplay = () ->
|
||||
if _.size $scope.selectedSongs
|
||||
$scope.selectedSongsTitle = (_.map _.values($scope.selectedSongs), (s) -> s.title).join(', ')
|
||||
else
|
||||
$scope.selectedSongsTitle = 'None'
|
||||
updateSongDisplay = () ->
|
||||
if _.size $scope.selectedSongs
|
||||
$scope.selectedSongsTitle = (_.map _.values($scope.selectedSongs), (s) -> s.title).join(', ')
|
||||
else
|
||||
$scope.selectedSongsTitle = 'None'
|
||||
|
||||
$scope.toggleSong = (song) ->
|
||||
$scope.isDirty = true
|
||||
if $scope.selectedSongs[song.id]
|
||||
delete $scope.selectedSongs[song.id]
|
||||
else
|
||||
$scope.selectedSongs[song.id] = song
|
||||
$scope.toggleSong = (song) ->
|
||||
$scope.isDirty = true
|
||||
if $scope.selectedSongs[song.id]
|
||||
delete $scope.selectedSongs[song.id]
|
||||
else
|
||||
$scope.selectedSongs[song.id] = song
|
||||
|
||||
updateSongDisplay()
|
||||
updateSongDisplay()
|
||||
|
||||
$scope.updateIsVocal = () ->
|
||||
delete $scope.errors.lyrics if !$scope.edit.is_vocal
|
||||
$scope.updateIsVocal = () ->
|
||||
delete $scope.errors.lyrics if !$scope.edit.is_vocal
|
||||
|
||||
$scope.updateTrack = () ->
|
||||
xhr = new XMLHttpRequest()
|
||||
xhr.onload = -> $scope.$apply ->
|
||||
$scope.isSaving = false
|
||||
if xhr.status != 200
|
||||
errors =
|
||||
if xhr.getResponseHeader('content-type') == 'application/json'
|
||||
$.parseJSON(xhr.responseText).errors
|
||||
else
|
||||
['There was an unknown error!']
|
||||
$scope.updateTrack = () ->
|
||||
xhr = new XMLHttpRequest()
|
||||
xhr.onload = -> $scope.$apply ->
|
||||
$scope.isSaving = false
|
||||
if xhr.status != 200
|
||||
errors =
|
||||
if xhr.getResponseHeader('content-type') == 'application/json'
|
||||
$.parseJSON(xhr.responseText).errors
|
||||
else
|
||||
['There was an unknown error!']
|
||||
|
||||
$scope.errors = {}
|
||||
_.each errors, (value, key) -> $scope.errors[key] = value.join ', '
|
||||
return
|
||||
$scope.errors = {}
|
||||
_.each errors, (value, key) -> $scope.errors[key] = value.join ', '
|
||||
return
|
||||
|
||||
track = $.parseJSON(xhr.responseText)
|
||||
track = $.parseJSON(xhr.responseText)
|
||||
|
||||
trackDbItem = $scope.data.selectedTrack
|
||||
trackDbItem.title = $scope.edit.title
|
||||
trackDbItem.is_explicit = $scope.edit.is_explicit
|
||||
trackDbItem.is_vocal = $scope.edit.is_vocal
|
||||
trackDbItem.genre_id = $scope.edit.genre_id
|
||||
trackDbItem.is_published = true
|
||||
trackDbItem.cover_url = track.real_cover_url
|
||||
$scope.isDirty = false
|
||||
$scope.errors = {}
|
||||
images.refresh true
|
||||
trackDbItem = $scope.data.selectedTrack
|
||||
trackDbItem.title = $scope.edit.title
|
||||
trackDbItem.is_explicit = $scope.edit.is_explicit
|
||||
trackDbItem.is_vocal = $scope.edit.is_vocal
|
||||
trackDbItem.genre_id = $scope.edit.genre_id
|
||||
trackDbItem.is_published = true
|
||||
trackDbItem.cover_url = track.real_cover_url
|
||||
$scope.isDirty = false
|
||||
$scope.errors = {}
|
||||
images.refresh true
|
||||
|
||||
formData = new FormData();
|
||||
_.each $scope.edit, (value, name) ->
|
||||
if name == 'cover'
|
||||
return if value == null
|
||||
if typeof(value) == 'object'
|
||||
formData.append name, value, value.name
|
||||
else if value != null
|
||||
formData.append name, value
|
||||
formData = new FormData();
|
||||
_.each $scope.edit, (value, name) ->
|
||||
if name == 'cover'
|
||||
return if value == null
|
||||
if typeof(value) == 'object'
|
||||
formData.append name, value, value.name
|
||||
else if value != null
|
||||
formData.append name, value
|
||||
|
||||
if parseInt($scope.edit.track_type_id) == 2
|
||||
formData.append 'show_song_ids', _.map(_.values($scope.selectedSongs), (s) -> s.id).join()
|
||||
if parseInt($scope.edit.track_type_id) == 2
|
||||
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.setRequestHeader 'X-CSRF-Token', pfm.token
|
||||
$scope.isSaving = true
|
||||
xhr.send formData
|
||||
xhr.open 'POST', '/api/web/tracks/edit/' + $scope.edit.id, true
|
||||
xhr.setRequestHeader 'X-CSRF-Token', pfm.token
|
||||
$scope.isSaving = true
|
||||
xhr.send formData
|
||||
|
||||
tracks.getEdit($state.params.track_id).done (track) ->
|
||||
$scope.edit =
|
||||
id: track.id
|
||||
title: track.title
|
||||
description: track.description
|
||||
lyrics: track.lyrics
|
||||
is_explicit: track.is_explicit
|
||||
is_downloadable: track.is_downloadable
|
||||
is_vocal: track.is_vocal
|
||||
license_id: track.license_id
|
||||
genre_id: track.genre_id
|
||||
track_type_id: track.track_type_id
|
||||
released_at: if track.released_at then track.released_at.date else ''
|
||||
remove_cover: false
|
||||
cover: track.cover_url
|
||||
album_id: track.album_id
|
||||
is_published: track.is_published
|
||||
is_listed: track.is_listed
|
||||
tracks.getEdit($state.params.track_id).done (track) ->
|
||||
$scope.edit =
|
||||
id: track.id
|
||||
title: track.title
|
||||
description: track.description
|
||||
lyrics: track.lyrics
|
||||
is_explicit: track.is_explicit
|
||||
is_downloadable: track.is_downloadable
|
||||
is_vocal: track.is_vocal
|
||||
license_id: track.license_id
|
||||
genre_id: track.genre_id
|
||||
track_type_id: track.track_type_id
|
||||
released_at: if track.released_at then track.released_at.date else ''
|
||||
remove_cover: false
|
||||
cover: track.cover_url
|
||||
album_id: track.album_id
|
||||
is_published: track.is_published
|
||||
is_listed: track.is_listed
|
||||
|
||||
$scope.selectedAlbum = if track.album_id then albumsDb[track.album_id] else null
|
||||
$scope.selectedSongs = {}
|
||||
$scope.selectedSongs[song.id] = song for song in track.show_songs
|
||||
updateSongDisplay()
|
||||
$scope.selectedAlbum = if track.album_id then albumsDb[track.album_id] else null
|
||||
$scope.selectedSongs = {}
|
||||
$scope.selectedSongs[song.id] = song for song in track.show_songs
|
||||
updateSongDisplay()
|
||||
|
||||
$scope.touchModel = -> $scope.isDirty = true
|
||||
$scope.touchModel = -> $scope.isDirty = true
|
||||
|
||||
$scope.deleteTrack = (track) ->
|
||||
$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'}
|
||||
]).open().then (res) ->
|
||||
return if res == 'cancel'
|
||||
$.post('/api/web/tracks/delete/' + track.id, {_token: window.pfm.token})
|
||||
.then -> $scope.$apply ->
|
||||
$scope.$emit 'track-deleted'
|
||||
$state.transitionTo 'account.tracks'
|
||||
$scope.deleteTrack = (track) ->
|
||||
$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'}
|
||||
]).open().then (res) ->
|
||||
return if res == 'cancel'
|
||||
$.post('/api/web/tracks/delete/' + track.id, {_token: window.pfm.token})
|
||||
.then -> $scope.$apply ->
|
||||
$scope.$emit 'track-deleted'
|
||||
$state.transitionTo 'account.tracks'
|
||||
|
||||
$scope.$on '$locationChangeStart', (e) ->
|
||||
return if !$scope.isDirty
|
||||
e.preventDefault() if !confirm('Are you sure you want to leave this page without saving your changes?')
|
||||
$scope.$on '$locationChangeStart', (e) ->
|
||||
return if !$scope.isDirty
|
||||
e.preventDefault() if !confirm('Are you sure you want to leave this page without saving your changes?')
|
||||
]
|
||||
|
|
|
@ -1,44 +1,44 @@
|
|||
window.pfm.preloaders['account-tracks'] = [
|
||||
'account-tracks', 'account-albums', 'taxonomies'
|
||||
(tracks, albums, taxonomies) ->
|
||||
$.when.all [tracks.refresh(null, true), albums.refresh(true), taxonomies.refresh()]
|
||||
'account-tracks', 'account-albums', 'taxonomies'
|
||||
(tracks, albums, taxonomies) ->
|
||||
$.when.all [tracks.refresh(null, true), albums.refresh(true), taxonomies.refresh()]
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "account-tracks", [
|
||||
'$scope', '$state', 'taxonomies', '$dialog', 'lightbox', 'account-albums', 'account-tracks'
|
||||
($scope, $state, taxonomies, $dialog, lightbox, albums, tracks) ->
|
||||
$scope.data =
|
||||
selectedTrack: null
|
||||
'$scope', '$state', 'taxonomies', '$dialog', 'lightbox', 'account-albums', 'account-tracks'
|
||||
($scope, $state, taxonomies, $dialog, lightbox, albums, tracks) ->
|
||||
$scope.data =
|
||||
selectedTrack: null
|
||||
|
||||
$scope.tracks = []
|
||||
$scope.tracks = []
|
||||
|
||||
tracksDb = {}
|
||||
tracksDb = {}
|
||||
|
||||
setTracks = (tracks) ->
|
||||
$scope.tracks.length = 0
|
||||
tracksDb = {}
|
||||
for track in tracks
|
||||
tracksDb[track.id] = track
|
||||
$scope.tracks.push track
|
||||
setTracks = (tracks) ->
|
||||
$scope.tracks.length = 0
|
||||
tracksDb = {}
|
||||
for track in tracks
|
||||
tracksDb[track.id] = track
|
||||
$scope.tracks.push track
|
||||
|
||||
if $state.params.track_id
|
||||
$scope.data.selectedTrack = tracksDb[$state.params.track_id]
|
||||
if $state.params.track_id
|
||||
$scope.data.selectedTrack = tracksDb[$state.params.track_id]
|
||||
|
||||
tracks.refresh().done setTracks
|
||||
tracks.refresh().done setTracks
|
||||
|
||||
$scope.refreshList = () ->
|
||||
tracks.refresh().done setTracks
|
||||
$scope.refreshList = () ->
|
||||
tracks.refresh().done setTracks
|
||||
|
||||
$scope.selectTrack = (track) ->
|
||||
$scope.data.selectedTrack = track
|
||||
$scope.selectTrack = (track) ->
|
||||
$scope.data.selectedTrack = track
|
||||
|
||||
$scope.$on '$stateChangeSuccess', () ->
|
||||
if $state.params.track_id
|
||||
$scope.selectTrack tracksDb[$state.params.track_id]
|
||||
else
|
||||
$scope.selectTrack null
|
||||
$scope.$on '$stateChangeSuccess', () ->
|
||||
if $state.params.track_id
|
||||
$scope.selectTrack tracksDb[$state.params.track_id]
|
||||
else
|
||||
$scope.selectTrack null
|
||||
|
||||
$scope.$on 'track-deleted', () ->
|
||||
tracks.clearCache()
|
||||
$scope.refreshList()
|
||||
$scope.$on 'track-deleted', () ->
|
||||
tracks.clearCache()
|
||||
$scope.refreshList()
|
||||
]
|
|
@ -1,27 +1,27 @@
|
|||
window.pfm.preloaders['album'] = [
|
||||
'albums', '$state', 'playlists'
|
||||
(albums, $state, playlists) ->
|
||||
$.when.all [albums.fetch $state.params.id, playlists.refreshOwned(true)]
|
||||
'albums', '$state', 'playlists'
|
||||
(albums, $state, playlists) ->
|
||||
$.when.all [albums.fetch $state.params.id, playlists.refreshOwned(true)]
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "album", [
|
||||
'$scope', 'albums', '$state', 'playlists', 'auth', '$dialog'
|
||||
($scope, albums, $state, playlists, auth, $dialog) ->
|
||||
album = null
|
||||
'$scope', 'albums', '$state', 'playlists', 'auth', '$dialog'
|
||||
($scope, albums, $state, playlists, auth, $dialog) ->
|
||||
album = null
|
||||
|
||||
albums.fetch($state.params.id).done (albumResponse) ->
|
||||
$scope.album = albumResponse.album
|
||||
album = albumResponse.album
|
||||
albums.fetch($state.params.id).done (albumResponse) ->
|
||||
$scope.album = albumResponse.album
|
||||
album = albumResponse.album
|
||||
|
||||
$scope.playlists = []
|
||||
$scope.playlists = []
|
||||
|
||||
$scope.share = () ->
|
||||
dialog = $dialog.dialog
|
||||
templateUrl: '/templates/partials/album-share-dialog.html',
|
||||
controller: ['$scope', ($scope) -> $scope.album = album; $scope.close = () -> dialog.close()]
|
||||
dialog.open()
|
||||
$scope.share = () ->
|
||||
dialog = $dialog.dialog
|
||||
templateUrl: '/templates/partials/album-share-dialog.html',
|
||||
controller: ['$scope', ($scope) -> $scope.album = album; $scope.close = () -> dialog.close()]
|
||||
dialog.open()
|
||||
|
||||
if auth.data.isLogged
|
||||
playlists.refreshOwned().done (lists) ->
|
||||
$scope.playlists.push list for list in lists
|
||||
if auth.data.isLogged
|
||||
playlists.refreshOwned().done (lists) ->
|
||||
$scope.playlists.push list for list in lists
|
||||
]
|
|
@ -1,12 +1,12 @@
|
|||
window.pfm.preloaders['albums-list'] = [
|
||||
'albums', '$state'
|
||||
(albums, $state) ->
|
||||
albums.fetchList($state.params.page, true)
|
||||
'albums', '$state'
|
||||
(albums, $state) ->
|
||||
albums.fetchList($state.params.page, true)
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "albums-list", [
|
||||
'$scope', 'albums', '$state'
|
||||
($scope, albums, $state) ->
|
||||
albums.fetchList($state.params.page).done (list) ->
|
||||
$scope.albums = list.albums
|
||||
'$scope', 'albums', '$state'
|
||||
($scope, albums, $state) ->
|
||||
albums.fetchList($state.params.page).done (list) ->
|
||||
$scope.albums = list.albums
|
||||
]
|
|
@ -1,22 +1,22 @@
|
|||
angular.module('ponyfm').controller "albums", [
|
||||
'$scope', 'albums', '$state'
|
||||
($scope, albums, $state) ->
|
||||
'$scope', 'albums', '$state'
|
||||
($scope, albums, $state) ->
|
||||
|
||||
refreshPages = (list) ->
|
||||
$scope.albums = list.albums
|
||||
$scope.currentPage = parseInt(list.current_page)
|
||||
$scope.totalPages = parseInt(list.total_pages)
|
||||
refreshPages = (list) ->
|
||||
$scope.albums = list.albums
|
||||
$scope.currentPage = parseInt(list.current_page)
|
||||
$scope.totalPages = parseInt(list.total_pages)
|
||||
|
||||
delete $scope.nextPage
|
||||
delete $scope.prevPage
|
||||
$scope.nextPage = $scope.currentPage + 1 if $scope.currentPage < $scope.totalPages
|
||||
$scope.prevPage = $scope.currentPage - 1 if $scope.currentPage > 1
|
||||
$scope.pages = [1..$scope.totalPages]
|
||||
delete $scope.nextPage
|
||||
delete $scope.prevPage
|
||||
$scope.nextPage = $scope.currentPage + 1 if $scope.currentPage < $scope.totalPages
|
||||
$scope.prevPage = $scope.currentPage - 1 if $scope.currentPage > 1
|
||||
$scope.pages = [1..$scope.totalPages]
|
||||
|
||||
albums.fetchList($state.params.page).done refreshPages
|
||||
$scope.$on 'albums-feteched', (e, list) -> refreshPages(list)
|
||||
albums.fetchList($state.params.page).done refreshPages
|
||||
$scope.$on 'albums-feteched', (e, list) -> refreshPages(list)
|
||||
|
||||
$scope.gotoPage = (page) ->
|
||||
return if !page
|
||||
$state.transitionTo 'content.albums.list', {page: page}
|
||||
$scope.gotoPage = (page) ->
|
||||
return if !page
|
||||
$state.transitionTo 'content.albums.list', {page: page}
|
||||
]
|
|
@ -1,85 +1,85 @@
|
|||
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 = auth.data
|
||||
$scope.$state = $state
|
||||
$scope.$stateParams = $stateParams
|
||||
$scope.isPinnedPlaylistSelected = false
|
||||
$loadingElement = null
|
||||
loadingStateName = null
|
||||
'$scope', 'auth', '$location', 'upload', '$state', '$stateParams', '$injector', '$rootScope', 'playlists'
|
||||
($scope, auth, $location, upload, $state, $stateParams, $injector, $rootScope, playlists) ->
|
||||
$scope.auth = auth.data
|
||||
$scope.$state = $state
|
||||
$scope.$stateParams = $stateParams
|
||||
$scope.isPinnedPlaylistSelected = false
|
||||
$loadingElement = null
|
||||
loadingStateName = null
|
||||
|
||||
if window.pfm.error
|
||||
$state.transitionTo 'errors-' + window.pfm.error
|
||||
if window.pfm.error
|
||||
$state.transitionTo 'errors-' + window.pfm.error
|
||||
|
||||
$rootScope.safeApply = (fn) ->
|
||||
phase = $rootScope.$$phase
|
||||
if (phase == '$apply' || phase == 'digest')
|
||||
fn()
|
||||
return
|
||||
$rootScope.safeApply = (fn) ->
|
||||
phase = $rootScope.$$phase
|
||||
if (phase == '$apply' || phase == 'digest')
|
||||
fn()
|
||||
return
|
||||
|
||||
$rootScope.$apply fn
|
||||
$rootScope.$apply fn
|
||||
|
||||
$scope.logout = () ->
|
||||
auth.logout().done -> location.reload()
|
||||
$scope.logout = () ->
|
||||
auth.logout().done -> location.reload()
|
||||
|
||||
$scope.isActive = (loc) -> $location.path() == loc
|
||||
$scope.$on '$viewContentLoaded', () ->
|
||||
window.setTimeout (-> window.handleResize()), 0
|
||||
$scope.isActive = (loc) -> $location.path() == loc
|
||||
$scope.$on '$viewContentLoaded', () ->
|
||||
window.setTimeout (-> window.handleResize()), 0
|
||||
|
||||
if $loadingElement
|
||||
$loadingElement.removeClass 'loading'
|
||||
$loadingElement = null
|
||||
if $loadingElement
|
||||
$loadingElement.removeClass 'loading'
|
||||
$loadingElement = null
|
||||
|
||||
$scope.stateIncludes = (state) ->
|
||||
if $loadingElement
|
||||
newParts = state.split '.'
|
||||
oldParts = loadingStateName.split '.'
|
||||
for i in [0..newParts.length]
|
||||
continue if !newParts[i]
|
||||
return false if newParts[i] != oldParts[i]
|
||||
$scope.stateIncludes = (state) ->
|
||||
if $loadingElement
|
||||
newParts = state.split '.'
|
||||
oldParts = loadingStateName.split '.'
|
||||
for i in [0..newParts.length]
|
||||
continue if !newParts[i]
|
||||
return false if newParts[i] != oldParts[i]
|
||||
|
||||
return true
|
||||
else
|
||||
$state.includes(state)
|
||||
return true
|
||||
else
|
||||
$state.includes(state)
|
||||
|
||||
statesPreloaded = {}
|
||||
$scope.$on '$stateChangeStart', (e, newState, newParams, oldState, oldParams) ->
|
||||
$scope.isPinnedPlaylistSelected = false
|
||||
statesPreloaded = {}
|
||||
$scope.$on '$stateChangeStart', (e, newState, newParams, oldState, oldParams) ->
|
||||
$scope.isPinnedPlaylistSelected = false
|
||||
|
||||
if newState.name == 'content.playlist'
|
||||
$scope.isPinnedPlaylistSelected = playlists.isPlaylistPinned newParams.id
|
||||
if newState.name == 'content.playlist'
|
||||
$scope.isPinnedPlaylistSelected = playlists.isPlaylistPinned newParams.id
|
||||
|
||||
return if !oldState || !newState.controller
|
||||
return if !oldState || !newState.controller
|
||||
|
||||
preloader = window.pfm.preloaders[newState.controller]
|
||||
return if !preloader
|
||||
preloader = window.pfm.preloaders[newState.controller]
|
||||
return if !preloader
|
||||
|
||||
if statesPreloaded[newState]
|
||||
delete statesPreloaded[newState]
|
||||
return
|
||||
if statesPreloaded[newState]
|
||||
delete statesPreloaded[newState]
|
||||
return
|
||||
|
||||
e.preventDefault()
|
||||
loadingStateName = newState.name
|
||||
e.preventDefault()
|
||||
loadingStateName = newState.name
|
||||
|
||||
selector = ''
|
||||
newParts = newState.name.split '.'
|
||||
oldParts = oldState.name.split '.'
|
||||
zipped = _.zip(newParts, oldParts)
|
||||
for i in [0..zipped.length]
|
||||
break if !zipped[i] || zipped[i][0] != zipped[i][1]
|
||||
selector += ' ui-view '
|
||||
selector = ''
|
||||
newParts = newState.name.split '.'
|
||||
oldParts = oldState.name.split '.'
|
||||
zipped = _.zip(newParts, oldParts)
|
||||
for i in [0..zipped.length]
|
||||
break if !zipped[i] || zipped[i][0] != zipped[i][1]
|
||||
selector += ' ui-view '
|
||||
|
||||
selector += ' ui-view ' if newState.name != oldState.name
|
||||
selector += ' ui-view ' if newState.name != oldState.name
|
||||
|
||||
$loadingElement = $ selector
|
||||
$loadingElement.addClass 'loading'
|
||||
$loadingElement = $ selector
|
||||
$loadingElement.addClass 'loading'
|
||||
|
||||
stateToInject = angular.copy newState
|
||||
stateToInject.params = newParams
|
||||
try
|
||||
$injector.invoke(preloader, null, {$state: stateToInject}).then ->
|
||||
statesPreloaded[newState] = true
|
||||
$state.transitionTo newState, newParams
|
||||
catch error
|
||||
$state.transitionTo newState, newParams
|
||||
stateToInject = angular.copy newState
|
||||
stateToInject.params = newParams
|
||||
try
|
||||
$injector.invoke(preloader, null, {$state: stateToInject}).then ->
|
||||
statesPreloaded[newState] = true
|
||||
$state.transitionTo newState, newParams
|
||||
catch error
|
||||
$state.transitionTo newState, newParams
|
||||
]
|
|
@ -1,13 +1,13 @@
|
|||
window.pfm.preloaders['artist-content'] = [
|
||||
'artists', '$state'
|
||||
(artists, $state) ->
|
||||
$.when.all [artists.fetch($state.params.slug), artists.fetchContent($state.params.slug, true)]
|
||||
'artists', '$state'
|
||||
(artists, $state) ->
|
||||
$.when.all [artists.fetch($state.params.slug), artists.fetchContent($state.params.slug, true)]
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "artist-content", [
|
||||
'$scope', 'artists', '$state'
|
||||
($scope, artists, $state) ->
|
||||
artists.fetchContent($state.params.slug)
|
||||
.done (artistResponse) ->
|
||||
$scope.content = artistResponse
|
||||
'$scope', 'artists', '$state'
|
||||
($scope, artists, $state) ->
|
||||
artists.fetchContent($state.params.slug)
|
||||
.done (artistResponse) ->
|
||||
$scope.content = artistResponse
|
||||
]
|
|
@ -1,12 +1,12 @@
|
|||
window.pfm.preloaders['artist-favourites'] = [
|
||||
'artists', '$state'
|
||||
(artists, $state) ->
|
||||
$.when.all [artists.fetch($state.params.slug), artists.fetchFavourites($state.params.slug, true)]
|
||||
'artists', '$state'
|
||||
(artists, $state) ->
|
||||
$.when.all [artists.fetch($state.params.slug), artists.fetchFavourites($state.params.slug, true)]
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "artist-favourites", [
|
||||
'$scope', 'artists', '$state'
|
||||
($scope, artists, $state) ->
|
||||
artists.fetchFavourites($state.params.slug).done (artistResponse) ->
|
||||
$scope.favourites = artistResponse
|
||||
'$scope', 'artists', '$state'
|
||||
($scope, artists, $state) ->
|
||||
artists.fetchFavourites($state.params.slug).done (artistResponse) ->
|
||||
$scope.favourites = artistResponse
|
||||
]
|
|
@ -1,10 +1,10 @@
|
|||
window.pfm.preloaders['artist-profile'] = [
|
||||
'artists', '$state'
|
||||
(artists, $state) ->
|
||||
artists.fetch $state.params.slug, true
|
||||
'artists', '$state'
|
||||
(artists, $state) ->
|
||||
artists.fetch $state.params.slug, true
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "artist-profile", [
|
||||
'$scope', 'artists', '$state'
|
||||
($scope, artists, $state) ->
|
||||
'$scope', 'artists', '$state'
|
||||
($scope, artists, $state) ->
|
||||
]
|
|
@ -1,17 +1,17 @@
|
|||
window.pfm.preloaders['artist'] = [
|
||||
'artists', '$state'
|
||||
(artists, $state) ->
|
||||
artists.fetch $state.params.slug, true
|
||||
'artists', '$state'
|
||||
(artists, $state) ->
|
||||
artists.fetch $state.params.slug, true
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "artist", [
|
||||
'$scope', 'artists', '$state', 'follow'
|
||||
($scope, artists, $state, follow) ->
|
||||
artists.fetch($state.params.slug)
|
||||
.done (artistResponse) ->
|
||||
$scope.artist = artistResponse.artist
|
||||
'$scope', 'artists', '$state', 'follow'
|
||||
($scope, artists, $state, follow) ->
|
||||
artists.fetch($state.params.slug)
|
||||
.done (artistResponse) ->
|
||||
$scope.artist = artistResponse.artist
|
||||
|
||||
$scope.toggleFollow = () ->
|
||||
follow.toggle('artist', $scope.artist.id).then (res) ->
|
||||
$scope.artist.user_data.is_following = res.is_followed
|
||||
$scope.toggleFollow = () ->
|
||||
follow.toggle('artist', $scope.artist.id).then (res) ->
|
||||
$scope.artist.user_data.is_following = res.is_followed
|
||||
]
|
|
@ -1,12 +1,12 @@
|
|||
window.pfm.preloaders['artists-list'] = [
|
||||
'artists', '$state'
|
||||
(artists, $state) ->
|
||||
artists.fetchList($state.params.page, true)
|
||||
'artists', '$state'
|
||||
(artists, $state) ->
|
||||
artists.fetchList($state.params.page, true)
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "artists-list", [
|
||||
'$scope', 'artists', '$state'
|
||||
($scope, artists, $state) ->
|
||||
artists.fetchList($state.params.page).done (list) ->
|
||||
$scope.artists = list.artists
|
||||
'$scope', 'artists', '$state'
|
||||
($scope, artists, $state) ->
|
||||
artists.fetchList($state.params.page).done (list) ->
|
||||
$scope.artists = list.artists
|
||||
]
|
|
@ -1,22 +1,22 @@
|
|||
angular.module('ponyfm').controller "artists", [
|
||||
'$scope', 'artists', '$state'
|
||||
($scope, artists, $state) ->
|
||||
'$scope', 'artists', '$state'
|
||||
($scope, artists, $state) ->
|
||||
|
||||
refreshPages = (list) ->
|
||||
$scope.artists = list.artists
|
||||
$scope.currentPage = parseInt(list.current_page)
|
||||
$scope.totalPages = parseInt(list.total_pages)
|
||||
refreshPages = (list) ->
|
||||
$scope.artists = list.artists
|
||||
$scope.currentPage = parseInt(list.current_page)
|
||||
$scope.totalPages = parseInt(list.total_pages)
|
||||
|
||||
delete $scope.nextPage
|
||||
delete $scope.prevPage
|
||||
$scope.nextPage = $scope.currentPage + 1 if $scope.currentPage < $scope.totalPages
|
||||
$scope.prevPage = $scope.currentPage - 1 if $scope.currentPage > 1
|
||||
$scope.pages = [1..$scope.totalPages]
|
||||
delete $scope.nextPage
|
||||
delete $scope.prevPage
|
||||
$scope.nextPage = $scope.currentPage + 1 if $scope.currentPage < $scope.totalPages
|
||||
$scope.prevPage = $scope.currentPage - 1 if $scope.currentPage > 1
|
||||
$scope.pages = [1..$scope.totalPages]
|
||||
|
||||
artists.fetchList($state.params.page).done refreshPages
|
||||
$scope.$on 'artists-feteched', (e, list) -> refreshPages(list)
|
||||
artists.fetchList($state.params.page).done refreshPages
|
||||
$scope.$on 'artists-feteched', (e, list) -> refreshPages(list)
|
||||
|
||||
$scope.gotoPage = (page) ->
|
||||
return if !page
|
||||
$state.transitionTo 'content.artists.list', {page: page}
|
||||
$scope.gotoPage = (page) ->
|
||||
return if !page
|
||||
$state.transitionTo 'content.artists.list', {page: page}
|
||||
]
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('ponyfm').controller "credits", [
|
||||
'$scope', 'dialog',
|
||||
($scope, dialog) ->
|
||||
$scope.close = () -> dialog.close(null)
|
||||
'$scope', 'dialog',
|
||||
($scope, dialog) ->
|
||||
$scope.close = () -> dialog.close(null)
|
||||
]
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
window.pfm.preloaders['dashboard'] = [
|
||||
'dashboard'
|
||||
(dashboard) -> dashboard.refresh(true)
|
||||
'dashboard'
|
||||
(dashboard) -> dashboard.refresh(true)
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "dashboard", [
|
||||
'$scope', 'dashboard', 'auth', '$http'
|
||||
($scope, dashboard, auth, $http) ->
|
||||
$scope.recentTracks = null
|
||||
$scope.popularTracks = null
|
||||
'$scope', 'dashboard', 'auth', '$http'
|
||||
($scope, dashboard, auth, $http) ->
|
||||
$scope.recentTracks = null
|
||||
$scope.popularTracks = null
|
||||
|
||||
dashboard.refresh().done (res) ->
|
||||
$scope.recentTracks = res.recent_tracks
|
||||
$scope.popularTracks = res.popular_tracks
|
||||
dashboard.refresh().done (res) ->
|
||||
$scope.recentTracks = res.recent_tracks
|
||||
$scope.popularTracks = res.popular_tracks
|
||||
]
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
window.pfm.preloaders['favourites-albums'] = [
|
||||
'favourites'
|
||||
(favourites) ->
|
||||
favourites.fetchAlbums(true)
|
||||
'favourites'
|
||||
(favourites) ->
|
||||
favourites.fetchAlbums(true)
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "favourites-albums", [
|
||||
'$scope', 'favourites'
|
||||
($scope, favourites) ->
|
||||
favourites.fetchAlbums().done (res) ->
|
||||
$scope.albums = res.albums
|
||||
'$scope', 'favourites'
|
||||
($scope, favourites) ->
|
||||
favourites.fetchAlbums().done (res) ->
|
||||
$scope.albums = res.albums
|
||||
]
|
|
@ -1,12 +1,12 @@
|
|||
window.pfm.preloaders['favourites-playlists'] = [
|
||||
'favourites'
|
||||
(favourites) ->
|
||||
favourites.fetchPlaylists(true)
|
||||
'favourites'
|
||||
(favourites) ->
|
||||
favourites.fetchPlaylists(true)
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "favourites-playlists", [
|
||||
'$scope', 'favourites'
|
||||
($scope, favourites) ->
|
||||
favourites.fetchPlaylists().done (res) ->
|
||||
$scope.playlists = res.playlists
|
||||
'$scope', 'favourites'
|
||||
($scope, favourites) ->
|
||||
favourites.fetchPlaylists().done (res) ->
|
||||
$scope.playlists = res.playlists
|
||||
]
|
|
@ -1,12 +1,12 @@
|
|||
window.pfm.preloaders['favourites-tracks'] = [
|
||||
'favourites'
|
||||
(favourites) ->
|
||||
favourites.fetchTracks(true)
|
||||
'favourites'
|
||||
(favourites) ->
|
||||
favourites.fetchTracks(true)
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "favourites-tracks", [
|
||||
'$scope', 'favourites'
|
||||
($scope, favourites) ->
|
||||
favourites.fetchTracks().done (res) ->
|
||||
$scope.tracks = res.tracks
|
||||
'$scope', 'favourites'
|
||||
($scope, favourites) ->
|
||||
favourites.fetchTracks().done (res) ->
|
||||
$scope.tracks = res.tracks
|
||||
]
|
|
@ -1,15 +1,15 @@
|
|||
window.pfm.preloaders['home'] = [
|
||||
'dashboard'
|
||||
(dashboard) -> dashboard.refresh(true)
|
||||
'dashboard'
|
||||
(dashboard) -> dashboard.refresh(true)
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "home", [
|
||||
'$scope', 'dashboard'
|
||||
($scope, dashboard) ->
|
||||
$scope.recentTracks = null
|
||||
$scope.popularTracks = null
|
||||
'$scope', 'dashboard'
|
||||
($scope, dashboard) ->
|
||||
$scope.recentTracks = null
|
||||
$scope.popularTracks = null
|
||||
|
||||
dashboard.refresh().done (res) ->
|
||||
$scope.recentTracks = res.recent_tracks
|
||||
$scope.popularTracks = res.popular_tracks
|
||||
dashboard.refresh().done (res) ->
|
||||
$scope.recentTracks = res.recent_tracks
|
||||
$scope.popularTracks = res.popular_tracks
|
||||
]
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
angular.module('ponyfm').controller "login", [
|
||||
'$scope', 'auth'
|
||||
($scope, auth) ->
|
||||
'$scope', 'auth'
|
||||
($scope, auth) ->
|
||||
|
||||
$scope.messages = []
|
||||
$scope.messages = []
|
||||
|
||||
$scope.login =
|
||||
remember: true
|
||||
$scope.login =
|
||||
remember: true
|
||||
|
||||
submit: () ->
|
||||
$scope.messages = []
|
||||
submit: () ->
|
||||
$scope.messages = []
|
||||
|
||||
auth.login(this.email, this.password, this.remember)
|
||||
.done ->
|
||||
location.reload()
|
||||
.fail (messages) ->
|
||||
$scope.messages = _.values messages
|
||||
auth.login(this.email, this.password, this.remember)
|
||||
.done ->
|
||||
location.reload()
|
||||
.fail (messages) ->
|
||||
$scope.messages = _.values messages
|
||||
]
|
|
@ -1,27 +1,27 @@
|
|||
angular.module('ponyfm').controller "playlist-form", [
|
||||
'$scope', 'dialog', 'playlists', 'playlist'
|
||||
($scope, dialog, playlists, playlist) ->
|
||||
$scope.isLoading = false
|
||||
$scope.form = playlist
|
||||
$scope.isNew = playlist.id == undefined
|
||||
'$scope', 'dialog', 'playlists', 'playlist'
|
||||
($scope, dialog, playlists, playlist) ->
|
||||
$scope.isLoading = false
|
||||
$scope.form = playlist
|
||||
$scope.isNew = playlist.id == undefined
|
||||
|
||||
$scope.errors = {}
|
||||
$scope.errors = {}
|
||||
|
||||
$scope.createPlaylist = () ->
|
||||
$scope.isLoading = true
|
||||
def =
|
||||
if $scope.isNew
|
||||
playlists.createPlaylist($scope.form)
|
||||
else
|
||||
playlists.editPlaylist($scope.form)
|
||||
$scope.createPlaylist = () ->
|
||||
$scope.isLoading = true
|
||||
def =
|
||||
if $scope.isNew
|
||||
playlists.createPlaylist($scope.form)
|
||||
else
|
||||
playlists.editPlaylist($scope.form)
|
||||
|
||||
def
|
||||
.done (res) ->
|
||||
dialog.close(res)
|
||||
def
|
||||
.done (res) ->
|
||||
dialog.close(res)
|
||||
|
||||
.fail (errors)->
|
||||
$scope.errors = errors
|
||||
$scope.isLoading = false
|
||||
.fail (errors)->
|
||||
$scope.errors = errors
|
||||
$scope.isLoading = false
|
||||
|
||||
$scope.close = () -> dialog.close(null)
|
||||
$scope.close = () -> dialog.close(null)
|
||||
]
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
window.pfm.preloaders['playlist'] = [
|
||||
'$state', 'playlists'
|
||||
($state, playlists) ->
|
||||
playlists.fetch $state.params.id, true
|
||||
'$state', 'playlists'
|
||||
($state, playlists) ->
|
||||
playlists.fetch $state.params.id, true
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller 'playlist', [
|
||||
'$scope', '$state', 'playlists', '$dialog'
|
||||
($scope, $state, playlists, $dialog) ->
|
||||
playlist = null
|
||||
'$scope', '$state', 'playlists', '$dialog'
|
||||
($scope, $state, playlists, $dialog) ->
|
||||
playlist = null
|
||||
|
||||
playlists.fetch($state.params.id).done (playlistResponse) ->
|
||||
$scope.playlist = playlistResponse
|
||||
playlist = playlistResponse
|
||||
playlists.fetch($state.params.id).done (playlistResponse) ->
|
||||
$scope.playlist = playlistResponse
|
||||
playlist = playlistResponse
|
||||
|
||||
$scope.share = () ->
|
||||
dialog = $dialog.dialog
|
||||
templateUrl: '/templates/partials/playlist-share-dialog.html',
|
||||
controller: ['$scope', ($scope) -> $scope.playlist = playlist; $scope.close = () -> dialog.close()]
|
||||
dialog.open()
|
||||
$scope.share = () ->
|
||||
dialog = $dialog.dialog
|
||||
templateUrl: '/templates/partials/playlist-share-dialog.html',
|
||||
controller: ['$scope', ($scope) -> $scope.playlist = playlist; $scope.close = () -> dialog.close()]
|
||||
dialog.open()
|
||||
]
|
|
@ -1,12 +1,12 @@
|
|||
window.pfm.preloaders['playlists-list'] = [
|
||||
'playlists', '$state'
|
||||
(playlists, $state) ->
|
||||
playlists.fetchList($state.params.page, true)
|
||||
'playlists', '$state'
|
||||
(playlists, $state) ->
|
||||
playlists.fetchList($state.params.page, true)
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "playlists-list", [
|
||||
'$scope', 'playlists', '$state',
|
||||
($scope, playlists, $state) ->
|
||||
playlists.fetchList($state.params.page).done (searchResults) ->
|
||||
$scope.playlists = searchResults.playlists
|
||||
'$scope', 'playlists', '$state',
|
||||
($scope, playlists, $state) ->
|
||||
playlists.fetchList($state.params.page).done (searchResults) ->
|
||||
$scope.playlists = searchResults.playlists
|
||||
]
|
|
@ -1,22 +1,22 @@
|
|||
angular.module('ponyfm').controller "playlists", [
|
||||
'$scope', 'playlists', '$state'
|
||||
($scope, playlists, $state) ->
|
||||
'$scope', 'playlists', '$state'
|
||||
($scope, playlists, $state) ->
|
||||
|
||||
refreshPages = (list) ->
|
||||
$scope.playlists = list.playlists
|
||||
$scope.currentPage = parseInt(list.current_page)
|
||||
$scope.totalPages = parseInt(list.total_pages)
|
||||
refreshPages = (list) ->
|
||||
$scope.playlists = list.playlists
|
||||
$scope.currentPage = parseInt(list.current_page)
|
||||
$scope.totalPages = parseInt(list.total_pages)
|
||||
|
||||
delete $scope.nextPage
|
||||
delete $scope.prevPage
|
||||
$scope.nextPage = $scope.currentPage + 1 if $scope.currentPage < $scope.totalPages
|
||||
$scope.prevPage = $scope.currentPage - 1 if $scope.currentPage > 1
|
||||
$scope.pages = [1..$scope.totalPages]
|
||||
delete $scope.nextPage
|
||||
delete $scope.prevPage
|
||||
$scope.nextPage = $scope.currentPage + 1 if $scope.currentPage < $scope.totalPages
|
||||
$scope.prevPage = $scope.currentPage - 1 if $scope.currentPage > 1
|
||||
$scope.pages = [1..$scope.totalPages]
|
||||
|
||||
playlists.fetchList($state.params.page).done refreshPages
|
||||
$scope.$on 'playlists-feteched', (e, list) -> refreshPages(list)
|
||||
playlists.fetchList($state.params.page).done refreshPages
|
||||
$scope.$on 'playlists-feteched', (e, list) -> refreshPages(list)
|
||||
|
||||
$scope.gotoPage = (page) ->
|
||||
return if !page
|
||||
$state.transitionTo 'content.playlists.list', {page: page}
|
||||
$scope.gotoPage = (page) ->
|
||||
return if !page
|
||||
$state.transitionTo 'content.playlists.list', {page: page}
|
||||
]
|
|
@ -1,50 +1,50 @@
|
|||
angular.module('ponyfm').controller "sidebar", [
|
||||
'$scope', '$dialog', 'playlists'
|
||||
($scope, $dialog, playlists) ->
|
||||
$scope.playlists = playlists.pinnedPlaylists
|
||||
'$scope', '$dialog', 'playlists'
|
||||
($scope, $dialog, playlists) ->
|
||||
$scope.playlists = playlists.pinnedPlaylists
|
||||
|
||||
$scope.createPlaylist = () ->
|
||||
dialog = $dialog.dialog
|
||||
templateUrl: '/templates/partials/playlist-dialog.html'
|
||||
controller: 'playlist-form'
|
||||
resolve: {
|
||||
playlist: () ->
|
||||
is_public: true
|
||||
is_pinned: true
|
||||
name: ''
|
||||
description: ''
|
||||
}
|
||||
$scope.createPlaylist = () ->
|
||||
dialog = $dialog.dialog
|
||||
templateUrl: '/templates/partials/playlist-dialog.html'
|
||||
controller: 'playlist-form'
|
||||
resolve: {
|
||||
playlist: () ->
|
||||
is_public: true
|
||||
is_pinned: true
|
||||
name: ''
|
||||
description: ''
|
||||
}
|
||||
|
||||
dialog.open()
|
||||
dialog.open()
|
||||
|
||||
$scope.editPlaylist = (playlist) ->
|
||||
dialog = $dialog.dialog
|
||||
templateUrl: '/templates/partials/playlist-dialog.html'
|
||||
controller: 'playlist-form'
|
||||
resolve: {
|
||||
playlist: () -> angular.copy playlist
|
||||
}
|
||||
$scope.editPlaylist = (playlist) ->
|
||||
dialog = $dialog.dialog
|
||||
templateUrl: '/templates/partials/playlist-dialog.html'
|
||||
controller: 'playlist-form'
|
||||
resolve: {
|
||||
playlist: () -> angular.copy playlist
|
||||
}
|
||||
|
||||
dialog.open()
|
||||
dialog.open()
|
||||
|
||||
$scope.unpinPlaylist = (playlist) ->
|
||||
playlist.is_pinned = false;
|
||||
playlists.editPlaylist playlist
|
||||
$scope.unpinPlaylist = (playlist) ->
|
||||
playlist.is_pinned = false;
|
||||
playlists.editPlaylist playlist
|
||||
|
||||
$scope.deletePlaylist = (playlist) ->
|
||||
$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: 'cancel', label: 'No', cssClass: 'btn-primary'}
|
||||
]).open().then (res) ->
|
||||
return if res == 'cancel'
|
||||
playlists.deletePlaylist playlist
|
||||
$scope.deletePlaylist = (playlist) ->
|
||||
$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: 'cancel', label: 'No', cssClass: 'btn-primary'}
|
||||
]).open().then (res) ->
|
||||
return if res == 'cancel'
|
||||
playlists.deletePlaylist playlist
|
||||
|
||||
|
||||
$scope.showCredits = () ->
|
||||
dialog = $dialog.dialog
|
||||
templateUrl: '/templates/partials/credits-dialog.html'
|
||||
controller: 'credits'
|
||||
$scope.showCredits = () ->
|
||||
dialog = $dialog.dialog
|
||||
templateUrl: '/templates/partials/credits-dialog.html'
|
||||
controller: 'credits'
|
||||
|
||||
dialog.open()
|
||||
dialog.open()
|
||||
|
||||
]
|
||||
|
|
|
@ -1,59 +1,59 @@
|
|||
window.pfm.preloaders['track'] = [
|
||||
'tracks', '$state', 'playlists'
|
||||
(tracks, $state, playlists) ->
|
||||
$.when.all [tracks.fetch $state.params.id, playlists.refreshOwned(true)]
|
||||
'tracks', '$state', 'playlists'
|
||||
(tracks, $state, playlists) ->
|
||||
$.when.all [tracks.fetch $state.params.id, playlists.refreshOwned(true)]
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "track", [
|
||||
'$scope', 'tracks', '$state', 'playlists', 'auth', 'favourites', '$dialog'
|
||||
($scope, tracks, $state, playlists, auth, favourites, $dialog) ->
|
||||
track = null
|
||||
'$scope', 'tracks', '$state', 'playlists', 'auth', 'favourites', '$dialog'
|
||||
($scope, tracks, $state, playlists, auth, favourites, $dialog) ->
|
||||
track = null
|
||||
|
||||
tracks.fetch($state.params.id).done (trackResponse) ->
|
||||
$scope.track = trackResponse.track
|
||||
track = trackResponse.track
|
||||
tracks.fetch($state.params.id).done (trackResponse) ->
|
||||
$scope.track = trackResponse.track
|
||||
track = trackResponse.track
|
||||
|
||||
$scope.playlists = []
|
||||
$scope.playlists = []
|
||||
|
||||
if auth.data.isLogged
|
||||
playlists.refreshOwned().done (lists) ->
|
||||
$scope.playlists.push list for list in lists
|
||||
if auth.data.isLogged
|
||||
playlists.refreshOwned().done (lists) ->
|
||||
$scope.playlists.push list for list in lists
|
||||
|
||||
$scope.favouriteWorking = false
|
||||
$scope.favouriteWorking = false
|
||||
|
||||
$scope.toggleFavourite = (track) ->
|
||||
$scope.favouriteWorking = true
|
||||
favourites.toggle('track', track.id).done (res) ->
|
||||
track.is_favourited = res.is_favourited
|
||||
$scope.favouriteWorking = false
|
||||
$scope.toggleFavourite = (track) ->
|
||||
$scope.favouriteWorking = true
|
||||
favourites.toggle('track', track.id).done (res) ->
|
||||
track.is_favourited = res.is_favourited
|
||||
$scope.favouriteWorking = false
|
||||
|
||||
$scope.share = () ->
|
||||
dialog = $dialog.dialog
|
||||
templateUrl: '/templates/partials/track-share-dialog.html',
|
||||
controller: ['$scope', ($scope) -> $scope.track = track; $scope.close = () -> dialog.close()]
|
||||
dialog.open()
|
||||
$scope.share = () ->
|
||||
dialog = $dialog.dialog
|
||||
templateUrl: '/templates/partials/track-share-dialog.html',
|
||||
controller: ['$scope', ($scope) -> $scope.track = track; $scope.close = () -> dialog.close()]
|
||||
dialog.open()
|
||||
|
||||
$scope.addToNewPlaylist = () ->
|
||||
dialog = $dialog.dialog
|
||||
templateUrl: '/templates/partials/playlist-dialog.html'
|
||||
controller: 'playlist-form'
|
||||
resolve: {
|
||||
playlist: () ->
|
||||
is_public: true
|
||||
is_pinned: true
|
||||
name: ''
|
||||
description: ''
|
||||
}
|
||||
$scope.addToNewPlaylist = () ->
|
||||
dialog = $dialog.dialog
|
||||
templateUrl: '/templates/partials/playlist-dialog.html'
|
||||
controller: 'playlist-form'
|
||||
resolve: {
|
||||
playlist: () ->
|
||||
is_public: true
|
||||
is_pinned: true
|
||||
name: ''
|
||||
description: ''
|
||||
}
|
||||
|
||||
dialog.open().then (playlist) ->
|
||||
return if !playlist
|
||||
dialog.open().then (playlist) ->
|
||||
return if !playlist
|
||||
|
||||
playlists.addTrackToPlaylist playlist.id, $scope.track.id
|
||||
$state.transitionTo 'playlist', {id: playlist.id}
|
||||
playlists.addTrackToPlaylist playlist.id, $scope.track.id
|
||||
$state.transitionTo 'playlist', {id: playlist.id}
|
||||
|
||||
$scope.addToPlaylist = (playlist) ->
|
||||
return if playlist.message
|
||||
$scope.addToPlaylist = (playlist) ->
|
||||
return if playlist.message
|
||||
|
||||
playlists.addTrackToPlaylist(playlist.id, $scope.track.id).done (res) ->
|
||||
playlist.message = res.message
|
||||
playlists.addTrackToPlaylist(playlist.id, $scope.track.id).done (res) ->
|
||||
playlist.message = res.message
|
||||
]
|
|
@ -1,17 +1,17 @@
|
|||
window.pfm.preloaders['tracks-list'] = [
|
||||
'tracks', '$state'
|
||||
(tracks, $state) ->
|
||||
tracks.loadFilters().then(->
|
||||
tracks.mainQuery.fromFilterString($state.params.filter)
|
||||
tracks.mainQuery.setPage $state.params.page || 1
|
||||
'tracks', '$state'
|
||||
(tracks, $state) ->
|
||||
tracks.loadFilters().then(->
|
||||
tracks.mainQuery.fromFilterString($state.params.filter)
|
||||
tracks.mainQuery.setPage $state.params.page || 1
|
||||
|
||||
tracks.mainQuery.fetch()
|
||||
)
|
||||
tracks.mainQuery.fetch()
|
||||
)
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "tracks-list", [
|
||||
'$scope', 'tracks', '$state',
|
||||
($scope, tracks, $state) ->
|
||||
tracks.mainQuery.fetch().done (searchResults) ->
|
||||
$scope.tracks = searchResults.tracks
|
||||
'$scope', 'tracks', '$state',
|
||||
($scope, tracks, $state) ->
|
||||
tracks.mainQuery.fetch().done (searchResults) ->
|
||||
$scope.tracks = searchResults.tracks
|
||||
]
|
|
@ -1,45 +1,45 @@
|
|||
window.pfm.preloaders['tracks'] = [
|
||||
'tracks', '$state'
|
||||
(tracks) ->
|
||||
tracks.loadFilters()
|
||||
'tracks', '$state'
|
||||
(tracks) ->
|
||||
tracks.loadFilters()
|
||||
]
|
||||
|
||||
angular.module('ponyfm').controller "tracks", [
|
||||
'$scope', 'tracks', '$state'
|
||||
($scope, tracks, $state) ->
|
||||
$scope.recentTracks = null
|
||||
$scope.query = tracks.mainQuery
|
||||
$scope.filters = tracks.filters
|
||||
'$scope', 'tracks', '$state'
|
||||
($scope, tracks, $state) ->
|
||||
$scope.recentTracks = null
|
||||
$scope.query = tracks.mainQuery
|
||||
$scope.filters = tracks.filters
|
||||
|
||||
$scope.toggleListFilter = (filter, id) ->
|
||||
$scope.query.toggleListFilter filter, id
|
||||
$state.transitionTo 'content.tracks.list', {filter: $scope.query.toFilterString()}
|
||||
$scope.toggleListFilter = (filter, id) ->
|
||||
$scope.query.toggleListFilter filter, id
|
||||
$state.transitionTo 'content.tracks.list', {filter: $scope.query.toFilterString()}
|
||||
|
||||
$scope.setFilter = (filter, value) ->
|
||||
$scope.query.setFilter filter, value
|
||||
$state.transitionTo 'content.tracks.list', {filter: $scope.query.toFilterString()}
|
||||
$scope.setFilter = (filter, value) ->
|
||||
$scope.query.setFilter filter, value
|
||||
$state.transitionTo 'content.tracks.list', {filter: $scope.query.toFilterString()}
|
||||
|
||||
$scope.setListFilter = (filter, id) ->
|
||||
$scope.query.setListFilter filter, id
|
||||
$state.transitionTo 'content.tracks.list', {filter: $scope.query.toFilterString()}
|
||||
$scope.setListFilter = (filter, id) ->
|
||||
$scope.query.setListFilter filter, id
|
||||
$state.transitionTo 'content.tracks.list', {filter: $scope.query.toFilterString()}
|
||||
|
||||
$scope.clearFilter = (filter) ->
|
||||
$scope.query.clearFilter filter
|
||||
$state.transitionTo 'content.tracks.list', {filter: $scope.query.toFilterString()}
|
||||
$scope.clearFilter = (filter) ->
|
||||
$scope.query.clearFilter filter
|
||||
$state.transitionTo 'content.tracks.list', {filter: $scope.query.toFilterString()}
|
||||
|
||||
tracks.mainQuery.listen (searchResults) ->
|
||||
$scope.tracks = searchResults.tracks
|
||||
$scope.currentPage = parseInt(searchResults.current_page)
|
||||
$scope.totalPages = parseInt(searchResults.total_pages)
|
||||
delete $scope.nextPage
|
||||
delete $scope.prevPage
|
||||
tracks.mainQuery.listen (searchResults) ->
|
||||
$scope.tracks = searchResults.tracks
|
||||
$scope.currentPage = parseInt(searchResults.current_page)
|
||||
$scope.totalPages = parseInt(searchResults.total_pages)
|
||||
delete $scope.nextPage
|
||||
delete $scope.prevPage
|
||||
|
||||
$scope.nextPage = $scope.currentPage + 1 if $scope.currentPage < $scope.totalPages
|
||||
$scope.prevPage = $scope.currentPage - 1 if $scope.currentPage > 1
|
||||
$scope.pages = [1..$scope.totalPages]
|
||||
$scope.nextPage = $scope.currentPage + 1 if $scope.currentPage < $scope.totalPages
|
||||
$scope.prevPage = $scope.currentPage - 1 if $scope.currentPage > 1
|
||||
$scope.pages = [1..$scope.totalPages]
|
||||
|
||||
$scope.gotoPage = (page) ->
|
||||
$state.transitionTo 'content.tracks.list', {filter: $state.params.filter, page: page}
|
||||
$scope.gotoPage = (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()
|
||||
]
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('ponyfm').controller "uploader", [
|
||||
'$scope', 'auth', 'upload', '$state'
|
||||
($scope, auth, upload, $state) ->
|
||||
$scope.data = upload
|
||||
'$scope', 'auth', 'upload', '$state'
|
||||
($scope, auth, upload, $state) ->
|
||||
$scope.data = upload
|
||||
]
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue