2013-07-26 11:20:34 +02:00
|
|
|
angular.module 'ponyfm', ['ui.bootstrap', 'ui.state', 'ui.date'], [
|
2013-07-25 23:33:04 +02:00
|
|
|
'$routeProvider', '$locationProvider', '$stateProvider', '$dialogProvider'
|
|
|
|
(route, location, state, $dialogProvider) ->
|
|
|
|
|
|
|
|
# Account
|
|
|
|
|
|
|
|
state.state 'account',
|
|
|
|
url: '/account'
|
|
|
|
templateUrl: '/templates/account/settings.html'
|
|
|
|
controller: 'account-settings'
|
|
|
|
|
|
|
|
state.state 'account-content',
|
|
|
|
url: '/account/content'
|
|
|
|
abstract: true
|
|
|
|
templateUrl: '/templates/account/content/_layout.html'
|
|
|
|
|
|
|
|
state.state 'account-content.tracks',
|
|
|
|
url: '/tracks'
|
|
|
|
templateUrl: '/templates/account/content/tracks.html'
|
|
|
|
controller: 'account-content-tracks'
|
|
|
|
|
|
|
|
state.state 'account-content.tracks.edit',
|
|
|
|
url: '/:track_id'
|
|
|
|
|
|
|
|
state.state 'account-content.albums',
|
|
|
|
url: '/albums'
|
|
|
|
templateUrl: '/templates/account/content/albums.html'
|
|
|
|
|
|
|
|
state.state 'account-content.playlists',
|
|
|
|
url: '/playlists'
|
|
|
|
templateUrl: '/templates/account/content/playlists.html'
|
|
|
|
|
2013-07-27 02:15:07 +02:00
|
|
|
state.state 'account-favourites',
|
|
|
|
url: '/account/favourites'
|
2013-07-25 23:33:04 +02:00
|
|
|
abstract: true
|
2013-07-27 02:15:07 +02:00
|
|
|
templateUrl: '/templates/account/favourites/_layout.html'
|
2013-07-25 23:33:04 +02:00
|
|
|
|
2013-07-27 02:15:07 +02:00
|
|
|
state.state 'account-favourites.tracks',
|
2013-07-25 23:33:04 +02:00
|
|
|
url: ''
|
2013-07-27 02:15:07 +02:00
|
|
|
templateUrl: '/templates/account/favourites/tracks.html'
|
2013-07-25 23:33:04 +02:00
|
|
|
|
2013-07-27 02:15:07 +02:00
|
|
|
state.state 'account-favourites.playlists',
|
2013-07-25 23:33:04 +02:00
|
|
|
url: '/playlists'
|
2013-07-27 02:15:07 +02:00
|
|
|
templateUrl: '/templates/account/favourites/playlists.html'
|
2013-07-25 23:33:04 +02:00
|
|
|
|
2013-07-27 02:15:07 +02:00
|
|
|
state.state 'account-favourites.albums',
|
2013-07-25 23:33:04 +02:00
|
|
|
url: '/albums'
|
2013-07-27 02:15:07 +02:00
|
|
|
templateUrl: '/templates/account/favourites/albums.html'
|
2013-07-25 23:33:04 +02:00
|
|
|
|
|
|
|
# Tracks
|
|
|
|
|
|
|
|
state.state 'tracks',
|
|
|
|
url: '/tracks'
|
|
|
|
templateUrl: '/templates/tracks/_layout.html'
|
|
|
|
abstract: true
|
|
|
|
|
|
|
|
state.state 'tracks.list',
|
|
|
|
url: ''
|
|
|
|
templateUrl: '/templates/tracks/index.html'
|
|
|
|
|
|
|
|
state.state 'tracks.random',
|
|
|
|
url: '/random'
|
|
|
|
templateUrl: '/templates/tracks/index.html'
|
|
|
|
|
|
|
|
state.state 'tracks.popular',
|
|
|
|
url: '/popular'
|
|
|
|
templateUrl: '/templates/tracks/index.html'
|
|
|
|
|
|
|
|
# Albums
|
|
|
|
|
|
|
|
state.state 'albums',
|
|
|
|
url: '/albums'
|
|
|
|
templateUrl: '/templates/albums/index.html'
|
|
|
|
|
|
|
|
# Playlists
|
|
|
|
|
|
|
|
state.state 'playlists',
|
|
|
|
url: '/playlists'
|
|
|
|
templateUrl: '/templates/playlists/index.html'
|
|
|
|
|
|
|
|
# Artists
|
|
|
|
|
|
|
|
state.state 'artists',
|
|
|
|
url: '/artists'
|
|
|
|
templateUrl: '/templates/artists/index.html'
|
|
|
|
|
|
|
|
# Pages
|
|
|
|
|
|
|
|
state.state 'faq',
|
|
|
|
url: '/faq'
|
|
|
|
templateUrl: '/templates/pages/faq.html'
|
|
|
|
|
|
|
|
state.state 'about',
|
|
|
|
url: '/about'
|
|
|
|
templateUrl: '/templates/pages/about.html'
|
|
|
|
|
|
|
|
# Auth
|
|
|
|
|
|
|
|
state.state 'login',
|
|
|
|
url: '/login'
|
|
|
|
templateUrl: '/templates/auth/login.html'
|
|
|
|
controller: 'login'
|
|
|
|
|
|
|
|
state.state 'register',
|
|
|
|
url: '/register'
|
|
|
|
templateUrl: '/templates/auth/register.html'
|
|
|
|
|
|
|
|
# Hompage
|
|
|
|
|
|
|
|
state.state 'home',
|
|
|
|
url: '/'
|
|
|
|
templateUrl: '/templates/home/index.html'
|
|
|
|
|
|
|
|
route.otherwise '/'
|
|
|
|
|
|
|
|
location.html5Mode(true);
|
|
|
|
$dialogProvider.options
|
|
|
|
dialogFade: true
|
|
|
|
backdropClick: false
|
|
|
|
]
|