mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 04:58:01 +01:00
Switched to angular-strap
This commit is contained in:
parent
852e427da5
commit
5b8fb0f025
32 changed files with 4463 additions and 3434 deletions
|
@ -1,7 +1,7 @@
|
|||
<div class="resource-details album-details">
|
||||
<ul class="dropdowns">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="btn btn-sm btn-info dropdown-toggle" ng-disabled="album.is_downloadable == 0" auto-close="outsideClick">
|
||||
<a href="#" class="btn btn-sm btn-primary dropdown-toggle" bs-dropdown ng-disabled="album.is_downloadable == 0" auto-close="outsideClick">
|
||||
Downloads
|
||||
</a>
|
||||
<ul class="dropdown-menu" ng-show="::album.is_downloadable == 1">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<a href="#" class="btn btn-default 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="fa fa-star-empty"></i>
|
||||
<i class="fa fa-star-o"></i>
|
||||
</span>
|
||||
<span ng-show="resource.user_data.is_favourited">
|
||||
In Your Favourites
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
<div class="modal-header">
|
||||
<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" />
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a class="btn cancel" ng-click="close()" ng-disabled="isLoading">Close</a>
|
||||
<div class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" ng-click="$hide()">×</button>
|
||||
<h4 class="modal-title">{{ album.title }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h4>Shortlink</h4>
|
||||
<input type="text" ng-model="album.share.url" />
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" ng-click="$hide()">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,56 +1,62 @@
|
|||
<div class="modal-header">
|
||||
<h3>
|
||||
<button type="button" class="close" ng-click="close()" ng-hide="isLoading">×</button>
|
||||
Pony.fm source & 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>
|
||||
<div class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4>
|
||||
<button type="button" class="close" ng-click="$hide()" ng-hide="isLoading">×</button>
|
||||
Pony.fm source & credits
|
||||
</h4>
|
||||
</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>Are you a developer?</h2>
|
||||
<p>Pony.fm is open-sourced under the GNU Affero General Public License (AGPL).
|
||||
Join the project's development at <a href="https://github.com/Poniverse/Pony.fm" target="_blank">GitHub</a>!</p>
|
||||
<h2>Are you a developer?</h2>
|
||||
<p>Pony.fm is open-sourced under the GNU Affero General Public License (AGPL).
|
||||
Join the project's development at <a href="https://github.com/Poniverse/Pony.fm" target="_blank">GitHub</a>!</p>
|
||||
|
||||
<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>
|
||||
<ul>
|
||||
<li><a href="http://laravel.com/" target="_blank">Laravel</a> - our backend framework of choice</li>
|
||||
<li><a href="https://angularjs.org/" target="_blank">Angular.js</a> - our front-end framework of choice</li>
|
||||
<li><a href="https://secure.php.net/" target="_blank">PHP</a> - for providing a batteries-loaded language to build great web apps in</li>
|
||||
<li><a href="https://getcomposer.org/" target="_blank">Composer</a> - for making the management of PHP dependencies sane</li>
|
||||
<li><a href="https://ffmpeg.org/" target="_blank">FFmpeg</a> - for analyzing and dealing with every audio file we can throw at it</li>
|
||||
<li><a href="http://guzzlephp.org/" target="_blank">Guzzle</a> - for adding sanity to the art of making HTTP requests</li>
|
||||
<li><a href="https://github.com/CodeScaleInc/ffmpeg-php" target="_blank">FFmpegPHP</a> - for providing a sweet PHP interface to ffmpeg</li>
|
||||
<li><a href="https://github.com/barryvdh/laravel-ide-helper" target="_blank">Laravel IDE Helper Generator</a> - for making our IDE useful</li>
|
||||
<li><a href="https://github.com/In-Touch/laravel-newrelic" target="_blank">Laravel NewRelic Service Provider</a> - for making it easy to monitor Pony.fm''s performance</li>
|
||||
<li><a href="https://www.vagrantup.com/" target="_blank">Vagrant</a> - for making cross-platform dev environments possible</li>
|
||||
<li><a href="http://atomicparsley.sourceforge.net/" target="_blank">AtomicParsley</a> - for making it easy to work with tags in M4A files</li>
|
||||
<li><a href="https://xiph.org/flac/" target="_blank">FLAC</a> - FLAC is best audio codec /)</li>
|
||||
<li><a href="http://www.vorbis.com/" target="_blank">OGG Vorbis</a> - A great open-source audio codec</li>
|
||||
<li><a href="http://www.audiocoding.com/faac.html" target="_blank">FAAC</a> - for encoding our AAC files</li>
|
||||
<li><a href="http://lame.sourceforge.net/" target="_blank">LAME</a> - for encoding our MP3 files</li>
|
||||
<li><a href="http://gulpjs.com/" target="_blank">gulp</a> - for being our asset pipeline</li>
|
||||
<li><a href="https://nodejs.org/" target="_blank">Node.js</a> - for making JavaScript useful outside the browser</li>
|
||||
<li><a href="http://www.schillmania.com/projects/soundmanager2/" target="_blank">SoundManager</a> - for smoothing out cross-browser audio playback</li>
|
||||
<li><a href="http://momentjs.com/" target="_blank">Moment.js</a> - for making JavaScript dates sane</li>
|
||||
<li><a href="http://getbootstrap.com/" target="_blank">Bootstrap</a> - for its front-end components and making layouts easy</li>
|
||||
<li><a href="http://lesscss.org/" target="_blank">LESS</a> - for (almost) making CSS awesome</li>
|
||||
<li><a href="https://jquery.com/" target="_blank">jQuery</a> - for being useful all over the place</li>
|
||||
<li><a href="https://github.com/mgonto/angularytics" target="_blank">Angularytics</a> - for making Google Analytics useful in a single-page app</li>
|
||||
<li><a href="https://github.com/angular-ui/ui-router" target="_blank">UI-Router</a> - for making non-trivial Angular.js routes possible</li>
|
||||
<li><a href="https://angular-ui.github.io/bootstrap/" target="_blank">UI-Bootstrap</a> - for making Bootstrap and Angular.js get along</li>
|
||||
<li><a href="https://github.com/VentureCraft/revisionable" target="_blank">Revisionable</a> - for making audit logs easy</li>
|
||||
<li><a href="https://github.com/jackmoore/colorbox" target="_blank">Colorbox</a> - for allowing us to have pretty lightboxes</li>
|
||||
<li><a href="https://github.com/chjj/marked" target="_blank">Marked</a> - for the Markdown parser</li>
|
||||
<li><a href="https://github.com/Hypercubed/angular-marked" target="_blank">angular-marked</a> - for giving us an Angular way to use Marked</li>
|
||||
<li><a href="http://www.chartjs.org/" target="_blank">chart.js</a> - for giving us beautiful, programmable charts</li>
|
||||
<li><a href="http://jtblin.github.io/angular-chart.js/" target="_blank">angular-chart.js</a> - for making using chart.js with Angular easy</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a class="btn cancel" ng-click="close()" ng-disabled="isLoading">Close</a>
|
||||
<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>
|
||||
<ul>
|
||||
<li><a href="http://laravel.com/" target="_blank">Laravel</a> - our backend framework of choice</li>
|
||||
<li><a href="https://angularjs.org/" target="_blank">Angular.js</a> - our front-end framework of choice</li>
|
||||
<li><a href="https://secure.php.net/" target="_blank">PHP</a> - for providing a batteries-loaded language to build great web apps in</li>
|
||||
<li><a href="https://getcomposer.org/" target="_blank">Composer</a> - for making the management of PHP dependencies sane</li>
|
||||
<li><a href="https://ffmpeg.org/" target="_blank">FFmpeg</a> - for analyzing and dealing with every audio file we can throw at it</li>
|
||||
<li><a href="http://guzzlephp.org/" target="_blank">Guzzle</a> - for adding sanity to the art of making HTTP requests</li>
|
||||
<li><a href="https://github.com/CodeScaleInc/ffmpeg-php" target="_blank">FFmpegPHP</a> - for providing a sweet PHP interface to ffmpeg</li>
|
||||
<li><a href="https://github.com/barryvdh/laravel-ide-helper" target="_blank">Laravel IDE Helper Generator</a> - for making our IDE useful</li>
|
||||
<li><a href="https://github.com/In-Touch/laravel-newrelic" target="_blank">Laravel NewRelic Service Provider</a> - for making it easy to monitor Pony.fm''s performance</li>
|
||||
<li><a href="https://www.vagrantup.com/" target="_blank">Vagrant</a> - for making cross-platform dev environments possible</li>
|
||||
<li><a href="http://atomicparsley.sourceforge.net/" target="_blank">AtomicParsley</a> - for making it easy to work with tags in M4A files</li>
|
||||
<li><a href="https://xiph.org/flac/" target="_blank">FLAC</a> - FLAC is best audio codec /)</li>
|
||||
<li><a href="http://www.vorbis.com/" target="_blank">OGG Vorbis</a> - A great open-source audio codec</li>
|
||||
<li><a href="http://www.audiocoding.com/faac.html" target="_blank">FAAC</a> - for encoding our AAC files</li>
|
||||
<li><a href="http://lame.sourceforge.net/" target="_blank">LAME</a> - for encoding our MP3 files</li>
|
||||
<li><a href="http://gulpjs.com/" target="_blank">gulp</a> - for being our asset pipeline</li>
|
||||
<li><a href="https://nodejs.org/" target="_blank">Node.js</a> - for making JavaScript useful outside the browser</li>
|
||||
<li><a href="http://www.schillmania.com/projects/soundmanager2/" target="_blank">SoundManager</a> - for smoothing out cross-browser audio playback</li>
|
||||
<li><a href="http://momentjs.com/" target="_blank">Moment.js</a> - for making JavaScript dates sane</li>
|
||||
<li><a href="http://getbootstrap.com/" target="_blank">Bootstrap</a> - for its front-end components and making layouts easy</li>
|
||||
<li><a href="http://lesscss.org/" target="_blank">LESS</a> - for (almost) making CSS awesome</li>
|
||||
<li><a href="https://jquery.com/" target="_blank">jQuery</a> - for being useful all over the place</li>
|
||||
<li><a href="https://github.com/mgonto/angularytics" target="_blank">Angularytics</a> - for making Google Analytics useful in a single-page app</li>
|
||||
<li><a href="https://github.com/angular-ui/ui-router" target="_blank">UI-Router</a> - for making non-trivial Angular.js routes possible</li>
|
||||
<li><a href="https://angular-ui.github.io/bootstrap/" target="_blank">UI-Bootstrap</a> - for making Bootstrap and Angular.js get along</li>
|
||||
<li><a href="https://github.com/VentureCraft/revisionable" target="_blank">Revisionable</a> - for making audit logs easy</li>
|
||||
<li><a href="https://github.com/jackmoore/colorbox" target="_blank">Colorbox</a> - for allowing us to have pretty lightboxes</li>
|
||||
<li><a href="https://github.com/chjj/marked" target="_blank">Marked</a> - for the Markdown parser</li>
|
||||
<li><a href="https://github.com/Hypercubed/angular-marked" target="_blank">angular-marked</a> - for giving us an Angular way to use Marked</li>
|
||||
<li><a href="http://www.chartjs.org/" target="_blank">chart.js</a> - for giving us beautiful, programmable charts</li>
|
||||
<li><a href="http://jtblin.github.io/angular-chart.js/" target="_blank">angular-chart.js</a> - for making using chart.js with Angular easy</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-primary" ng-click="$hide()" ng-disabled="isLoading">Close</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
17
public/templates/partials/delete-album-dialog.html
Normal file
17
public/templates/partials/delete-album-dialog.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
<div class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" ng-show="title">
|
||||
<button type="button" class="close" ng-click="$hide()">×</button>
|
||||
<h4 class="modal-title">Delete {{ album.title }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Are you sure you want to delete {{ album.title }}?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" ng-click="confirmDeleteAlbum();$hide()">Yes</button>
|
||||
<button type="button" class="btn btn-primary" ng-click="$hide()">No</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
17
public/templates/partials/delete-playlist-dialog.html
Normal file
17
public/templates/partials/delete-playlist-dialog.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
<div class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" ng-show="title">
|
||||
<button type="button" class="close" ng-click="$hide()">×</button>
|
||||
<h4 class="modal-title">Delete {{ playlistToDelete.title }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Are you sure you want to delete {{ playlistToDelete.title }}?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" ng-click="confirmDeletePlaylist();$hide()">Yes</button>
|
||||
<button type="button" class="btn btn-primary" ng-click="$hide()">No</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,39 +1,45 @@
|
|||
<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 col-md-6">
|
||||
<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 col-md-6">
|
||||
<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 class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content playlist-form">
|
||||
<form ng-submit="createPlaylist()" class="pfm-form">
|
||||
<div class="modal-header">
|
||||
<h4>
|
||||
<button type="button" class="close" ng-click="$hide()" ng-hide="isLoading">×</button>
|
||||
<span ng-show="isNew">Create</span>
|
||||
<span ng-hide="isNew">Edit</span>
|
||||
Playlist
|
||||
</h4>
|
||||
</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 col-md-6">
|
||||
<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 col-md-6">
|
||||
<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 fa-spin" ng-show="isLoading"></i>
|
||||
</button>
|
||||
<a class="btn btn-default" ng-click="$hide()" ng-disabled="isLoading">Close</a>
|
||||
</div>
|
||||
</form>
|
||||
</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 fa-spin" ng-show="isLoading"></i>
|
||||
</button>
|
||||
<a class="btn cancel" ng-click="close()" ng-disabled="isLoading">Close</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -1,13 +1,19 @@
|
|||
<div class="modal-header">
|
||||
<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" />
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a class="btn cancel" ng-click="close()" ng-disabled="isLoading">Close</a>
|
||||
<div class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4>
|
||||
<button type="button" class="close" ng-click="$hide()" ng-hide="isLoading">×</button>
|
||||
{{playlist.title}}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h2>Shortlink</h2>
|
||||
<input type="text" ng-model="playlist.share.url" />
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-primary" ng-click="$hide()" ng-disabled="isLoading">Close</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,19 +1,25 @@
|
|||
<div class="modal-header">
|
||||
<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" />
|
||||
<div class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4>
|
||||
<button type="button" class="close" ng-click="$hide()" ng-hide="isLoading">×</button>
|
||||
{{track.title}}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<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>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a class="btn cancel" ng-click="close()" ng-disabled="isLoading">Close</a>
|
||||
<h2>BBCode Embed <small>(forums)</small></h2>
|
||||
<textarea type="text" ng-model="track.share.bbcode"></textarea>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-primary" ng-click="$hide()" ng-disabled="isLoading">Close</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="resource-details playlist-details">
|
||||
<ul class="dropdowns">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="btn btn-sm btn-info dropdown-toggle" auto-close="outsideClick">
|
||||
<a href="#" class="btn btn-sm btn-primary dropdown-toggle" bs-dropdown auto-close="outsideClick">
|
||||
Downloads
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="resource-details track-details">
|
||||
<ul class="dropdowns">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="btn btn-default btn-info dropdown-toggle" ng-disabled="track.is_downloadable == 0" auto-close="outsideClick">
|
||||
<a href="#" class="btn btn-primary dropdown-toggle" bs-dropdown ng-disabled="track.is_downloadable == 0" auto-close="outsideClick">
|
||||
Downloads
|
||||
</a>
|
||||
<ul class="dropdown-menu" ng-show="track.is_downloadable == 1">
|
||||
|
@ -20,7 +20,7 @@
|
|||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="btn btn-default dropdown-toggle" ng-show="::auth.isLogged">Add to Playlist</a>
|
||||
<a href="#" class="btn btn-default dropdown-toggle" bs-dropdown ng-show="::auth.isLogged">Add to Playlist</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li ng-repeat="playlist in playlists track by playlist.id">
|
||||
<a ng-class="{disabled: playlist.message, 'btn-success': playlist.message}"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<ul class="dropdowns">
|
||||
<li class="dropdown" ng-class="{'has-filter': query.filters.trackTypes.selectedArray.length}">
|
||||
<a class="dropdown-toggle btn btn-default">
|
||||
<a class="dropdown-toggle btn btn-default" bs-dropdown>
|
||||
Type: <strong>{{query.filters.trackTypes.title}}</strong>
|
||||
</a>
|
||||
<a class="btn btn-default" pfm-eat-click ng-click="clearFilter('trackTypes')"><i class="fa fa-remove"></i></a>
|
||||
|
@ -14,7 +14,7 @@
|
|||
</ul>
|
||||
</li>
|
||||
<li class="dropdown" ng-class="{'has-filter': query.filters.showSongs.selectedArray.length}">
|
||||
<a class="dropdown-toggle btn btn-default">
|
||||
<a class="dropdown-toggle btn btn-default" bs-dropdown>
|
||||
Show Songs: <strong>{{query.filters.showSongs.title}}</strong>
|
||||
</a>
|
||||
<a class="btn btn-default" pfm-eat-click ng-click="clearFilter('showSongs')"><i class="fa fa-remove"></i></a>
|
||||
|
@ -28,7 +28,7 @@
|
|||
</ul>
|
||||
</li>
|
||||
<li class="dropdown" ng-class="{'has-filter': query.filters.genres.selectedArray.length}">
|
||||
<a class="dropdown-toggle btn btn-default">
|
||||
<a class="dropdown-toggle btn btn-default" bs-dropdown>
|
||||
Genre: <strong>{{query.filters.genres.title}}</strong>
|
||||
</a>
|
||||
<a class="btn btn-default" pfm-eat-click ng-click="clearFilter('genres')"><i class="fa fa-remove"></i></a>
|
||||
|
@ -40,7 +40,7 @@
|
|||
</ul>
|
||||
</li>
|
||||
<li class="dropdown" ng-class="{'has-filter': !query.filters.isVocal.isDefault}">
|
||||
<a class="dropdown-toggle btn btn-default">
|
||||
<a class="dropdown-toggle btn btn-default" bs-dropdown>
|
||||
Is Vocal: <strong>{{query.filters.isVocal.title}}</strong>
|
||||
</a>
|
||||
<a class="btn btn-default" pfm-eat-click ng-click="clearFilter('isVocal')"><i class="fa fa-remove"></i></a>
|
||||
|
@ -53,7 +53,7 @@
|
|||
</ul>
|
||||
</li>
|
||||
<li class="dropdown" ng-class="{'has-filter': !query.filters.sort.isDefault}">
|
||||
<a class="dropdown-toggle btn btn-default">
|
||||
<a class="dropdown-toggle btn btn-default" bs-dropdown>
|
||||
Order: <strong>{{query.filters.sort.title}}</strong>
|
||||
</a>
|
||||
<a class="btn btn-default" pfm-eat-click ng-click="clearFilter('sort')"><i class="fa fa-remove"></i></a>
|
||||
|
|
|
@ -42,7 +42,8 @@ require 'script!../base/marked'
|
|||
require 'script!../base/moment'
|
||||
require '../base/soundmanager2-nodebug'
|
||||
require 'script!../base/tumblr'
|
||||
require '../base/ui-bootstrap-tpls-0.4.0'
|
||||
require '../base/angular-strap'
|
||||
require '../base/angular-strap.tpl'
|
||||
require 'chart.js';
|
||||
require 'angular-chart.js';
|
||||
|
||||
|
@ -51,7 +52,7 @@ require '../shared/pfm-angular-sanitize'
|
|||
require '../shared/init.coffee'
|
||||
|
||||
|
||||
ponyfm = angular.module 'ponyfm', ['ui.bootstrap', 'ui.router', 'ui.date', 'ui.sortable', 'angularytics', 'ngSanitize', 'hc.marked', 'chart.js']
|
||||
ponyfm = angular.module 'ponyfm', ['mgcrea.ngStrap', 'ui.router', 'ui.date', 'ui.sortable', 'angularytics', 'ngSanitize', 'hc.marked', 'chart.js']
|
||||
window.pfm.preloaders = {}
|
||||
|
||||
# Inspired by: https://stackoverflow.com/a/30652110/3225811
|
||||
|
@ -79,8 +80,8 @@ ponyfm.run [
|
|||
]
|
||||
|
||||
ponyfm.config [
|
||||
'$locationProvider', '$stateProvider', '$dialogProvider', 'AngularyticsProvider', '$httpProvider', '$sceDelegateProvider', 'markedProvider'
|
||||
(location, state, $dialogProvider, analytics, $httpProvider, $sceDelegateProvider, markedProvider) ->
|
||||
'$locationProvider', '$stateProvider', 'AngularyticsProvider', '$httpProvider', '$sceDelegateProvider', 'markedProvider'
|
||||
(location, state, analytics, $httpProvider, $sceDelegateProvider, markedProvider) ->
|
||||
|
||||
if window.pfm.environment == 'local'
|
||||
$httpProvider.interceptors.push [
|
||||
|
@ -363,9 +364,6 @@ ponyfm.config [
|
|||
|
||||
|
||||
location.html5Mode(true);
|
||||
$dialogProvider.options
|
||||
dialogFade: true
|
||||
backdropClick: false
|
||||
|
||||
]
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ window.pfm.preloaders['account-albums-edit'] = [
|
|||
]
|
||||
|
||||
module.exports = angular.module('ponyfm').controller "account-albums-edit", [
|
||||
'$scope', '$state', '$dialog', 'account-albums', 'auth'
|
||||
($scope, $state, $dialog, albums, auth) ->
|
||||
'$scope', '$state', '$modal', 'account-albums', 'auth'
|
||||
($scope, $state, $modal, albums, auth) ->
|
||||
$scope.isNew = $state.params.album_id == undefined
|
||||
$scope.data.isEditorOpen = true
|
||||
$scope.errors = {}
|
||||
|
@ -114,14 +114,13 @@ module.exports = angular.module('ponyfm').controller "account-albums-edit", [
|
|||
xhr.send formData
|
||||
|
||||
$scope.deleteAlbum = () ->
|
||||
$dialog.messageBox('Delete ' + $scope.album.title, 'Are you sure you want to delete "' + $scope.album.title + '"?', [
|
||||
{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)
|
||||
.then -> $scope.$apply ->
|
||||
$scope.$emit 'album-deleted'
|
||||
$state.go '^'
|
||||
modal = $modal({scope: $scope, templateUrl: 'templates/partials/delete-album-dialog.html', show: true});
|
||||
|
||||
$scope.confirmDeleteAlbum = () ->
|
||||
$.post('/api/web/albums/delete/' + $scope.album.id)
|
||||
.then -> $scope.$apply ->
|
||||
$scope.$emit 'album-deleted'
|
||||
$state.go '^'
|
||||
|
||||
$scope.setCover = (image, type) ->
|
||||
delete $scope.album.cover_id
|
||||
|
|
|
@ -20,8 +20,8 @@ window.pfm.preloaders['account-playlists'] = [
|
|||
]
|
||||
|
||||
module.exports = angular.module('ponyfm').controller "account-playlists", [
|
||||
'$scope', 'auth', '$dialog', 'playlists'
|
||||
($scope, auth, $dialog, playlists) ->
|
||||
'$scope', 'auth', '$modal', 'playlists'
|
||||
($scope, auth, $modal, playlists) ->
|
||||
$scope.playlists = []
|
||||
|
||||
loadPlaylists = (playlists) ->
|
||||
|
@ -30,27 +30,25 @@ module.exports = angular.module('ponyfm').controller "account-playlists", [
|
|||
playlists.refreshOwned().done loadPlaylists
|
||||
|
||||
$scope.editPlaylist = (playlist) ->
|
||||
dialog = $dialog.dialog
|
||||
$modal
|
||||
templateUrl: '/templates/partials/playlist-dialog.html'
|
||||
controller: 'playlist-form'
|
||||
resolve: {
|
||||
playlist: () -> angular.copy playlist
|
||||
}
|
||||
|
||||
dialog.open()
|
||||
},
|
||||
show: true
|
||||
|
||||
$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 + '"?', [
|
||||
{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.playlistToDelete = playlist
|
||||
$modal({scope: $scope, templateUrl: 'templates/partials/delete-playlist-dialog.html', show: true})
|
||||
|
||||
$scope.confirmDeletePlaylist = () ->
|
||||
playlists.deletePlaylist($scope.playlistToDelete).done ->
|
||||
$scope.playlists.splice _.indexOf($scope.playlists, (p) -> p.id == $scope.playlistToDelete.id), 1
|
||||
|
||||
$scope.$on 'playlist-updated', (e, playlist) ->
|
||||
index = _.indexOf($scope.playlists, (p) -> p.id == playlist.id)
|
||||
|
|
|
@ -21,8 +21,8 @@ window.pfm.preloaders['account-tracks'] = [
|
|||
]
|
||||
|
||||
module.exports = angular.module('ponyfm').controller "account-tracks", [
|
||||
'$scope', '$state', 'taxonomies', '$dialog', 'lightbox', 'account-albums', 'account-tracks'
|
||||
($scope, $state, taxonomies, $dialog, lightbox, albums, tracks) ->
|
||||
'$scope', '$state', 'taxonomies', '$modal', 'lightbox', 'account-albums', 'account-tracks'
|
||||
($scope, $state, taxonomies, $modal, lightbox, albums, tracks) ->
|
||||
$scope.data =
|
||||
selectedTrack: null
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@ window.pfm.preloaders['album'] = [
|
|||
]
|
||||
|
||||
module.exports = angular.module('ponyfm').controller "album", [
|
||||
'$scope', 'meta', 'albums', '$state', 'playlists', 'auth', '$dialog', 'download-cached', '$window', '$timeout'
|
||||
($scope, meta, albums, $state, playlists, auth, $dialog, cachedAlbum, $window, $timeout) ->
|
||||
'$scope', 'meta', 'albums', '$state', 'playlists', 'auth', '$modal', 'download-cached', '$window', '$timeout'
|
||||
($scope, meta, albums, $state, playlists, auth, $modal, cachedAlbum, $window, $timeout) ->
|
||||
album = null
|
||||
|
||||
albums.fetch($state.params.id).done (albumResponse) ->
|
||||
|
@ -34,10 +34,10 @@ module.exports = angular.module('ponyfm').controller "album", [
|
|||
$scope.playlists = []
|
||||
|
||||
$scope.share = () ->
|
||||
dialog = $dialog.dialog
|
||||
dialog = $modal
|
||||
templateUrl: '/templates/partials/album-share-dialog.html',
|
||||
controller: ['$scope', ($scope) -> $scope.album = album; $scope.close = () -> dialog.close()]
|
||||
dialog.open()
|
||||
scope: $scope,
|
||||
show: true
|
||||
|
||||
if auth.data.isLogged
|
||||
playlists.refreshOwned().done (lists) ->
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
module.exports = angular.module('ponyfm').controller "credits", [
|
||||
'$scope', 'dialog',
|
||||
($scope, dialog) ->
|
||||
$scope.close = () -> dialog.close(null)
|
||||
'$scope', '$modal',
|
||||
($scope, modal) ->
|
||||
$scope.close = () -> modal.$hide()
|
||||
]
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
module.exports = angular.module('ponyfm').controller "playlist-form", [
|
||||
'$scope', 'dialog', 'playlists', 'playlist'
|
||||
($scope, dialog, playlists, playlist) ->
|
||||
'$scope', '$modal', 'playlists', 'playlist'
|
||||
($scope, modal, playlists, playlist) ->
|
||||
$scope.isLoading = false
|
||||
$scope.form = playlist
|
||||
$scope.isNew = playlist.id == undefined
|
||||
|
@ -33,11 +33,13 @@ module.exports = angular.module('ponyfm').controller "playlist-form", [
|
|||
|
||||
def
|
||||
.done (res) ->
|
||||
dialog.close(res)
|
||||
if $scope.track
|
||||
$scope.finishAddingToPlaylist(res, $scope.track)
|
||||
$scope.$hide()
|
||||
|
||||
.fail (errors)->
|
||||
$scope.errors = errors
|
||||
$scope.isLoading = false
|
||||
|
||||
$scope.close = () -> dialog.close(null)
|
||||
$scope.close = () -> $scope.$hide()
|
||||
]
|
||||
|
|
|
@ -21,8 +21,8 @@ window.pfm.preloaders['playlist'] = [
|
|||
]
|
||||
|
||||
module.exports = angular.module('ponyfm').controller 'playlist', [
|
||||
'$scope', 'meta', '$state', 'playlists', '$dialog', 'download-cached', '$window', '$timeout'
|
||||
($scope, meta, $state, playlists, $dialog, cachedPlaylist, $window, $timeout) ->
|
||||
'$scope', 'meta', '$state', 'playlists', '$modal', 'download-cached', '$window', '$timeout'
|
||||
($scope, meta, $state, playlists, $modal, cachedPlaylist, $window, $timeout) ->
|
||||
playlist = null
|
||||
|
||||
playlists.fetch($state.params.id).done (playlistResponse) ->
|
||||
|
@ -32,10 +32,10 @@ module.exports = angular.module('ponyfm').controller 'playlist', [
|
|||
meta.setDescription("Listen to \"#{playlist.title}\", a playlist by #{playlist.user.name}, on the largest pony music site.")
|
||||
|
||||
$scope.share = () ->
|
||||
dialog = $dialog.dialog
|
||||
dialog = $modal
|
||||
templateUrl: '/templates/partials/playlist-share-dialog.html',
|
||||
controller: ['$scope', ($scope) -> $scope.playlist = playlist; $scope.close = () -> dialog.close()]
|
||||
dialog.open()
|
||||
controller: ['$scope', ($scope) -> $scope.playlist = playlist; $scope.close = () -> dialog.close()],
|
||||
show: true
|
||||
|
||||
$scope.getCachedPlaylist = (id, format) ->
|
||||
$scope.isInProgress = true
|
||||
|
@ -54,4 +54,3 @@ module.exports = angular.module('ponyfm').controller 'playlist', [
|
|||
$scope.isInProgress = false
|
||||
$window.open $scope.playlistUrl
|
||||
]
|
||||
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
module.exports = angular.module('ponyfm').controller "sidebar", [
|
||||
'$scope', '$dialog', 'playlists'
|
||||
($scope, $dialog, playlists) ->
|
||||
'$scope', '$modal', 'playlists'
|
||||
($scope, $modal, playlists) ->
|
||||
$scope.playlists = playlists.pinnedPlaylists
|
||||
|
||||
$scope.createPlaylist = () ->
|
||||
dialog = $dialog.dialog
|
||||
$modal
|
||||
templateUrl: '/templates/partials/playlist-dialog.html'
|
||||
controller: 'playlist-form'
|
||||
resolve: {
|
||||
|
@ -29,38 +29,33 @@ module.exports = angular.module('ponyfm').controller "sidebar", [
|
|||
is_pinned: true
|
||||
name: ''
|
||||
description: ''
|
||||
}
|
||||
|
||||
dialog.open()
|
||||
},
|
||||
show: true
|
||||
|
||||
$scope.editPlaylist = (playlist) ->
|
||||
dialog = $dialog.dialog
|
||||
$modal
|
||||
templateUrl: '/templates/partials/playlist-dialog.html'
|
||||
controller: 'playlist-form'
|
||||
resolve: {
|
||||
playlist: () -> angular.copy playlist
|
||||
}
|
||||
|
||||
dialog.open()
|
||||
},
|
||||
show: true
|
||||
|
||||
$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 + '"?', [
|
||||
{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.playlistToDelete = playlist
|
||||
$modal({scope: $scope, templateUrl: 'templates/partials/delete-playlist-dialog.html', show: true})
|
||||
|
||||
$scope.confirmDeletePlaylist = () ->
|
||||
playlists.deletePlaylist playlist
|
||||
|
||||
$scope.showCredits = () ->
|
||||
dialog = $dialog.dialog
|
||||
$modal
|
||||
templateUrl: '/templates/partials/credits-dialog.html'
|
||||
controller: 'credits'
|
||||
|
||||
dialog.open()
|
||||
controller: 'credits',
|
||||
show: true
|
||||
|
||||
]
|
||||
|
|
|
@ -21,6 +21,6 @@ window.pfm.preloaders['track-show'] = [
|
|||
]
|
||||
|
||||
module.exports = angular.module('ponyfm').controller "track-show", [
|
||||
'$scope', 'tracks', '$state', 'playlists', 'auth', 'favourites', '$dialog'
|
||||
($scope, tracks, $state, playlists, auth, favourites, $dialog) ->
|
||||
'$scope', 'tracks', '$state', 'playlists', 'auth', 'favourites', '$modal'
|
||||
($scope, tracks, $state, playlists, auth, favourites, $modal) ->
|
||||
]
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
module.exports = angular.module('ponyfm').controller "track", [
|
||||
'$scope', 'meta', 'tracks', '$state', 'playlists', 'auth', 'favourites', '$dialog', 'download-cached', '$window', '$timeout'
|
||||
($scope, meta, tracks, $state, playlists, auth, favourites, $dialog, cachedTrack, $window, $timeout) ->
|
||||
'$scope', 'meta', 'tracks', '$state', 'playlists', 'auth', 'favourites', '$modal', 'download-cached', '$window', '$timeout'
|
||||
($scope, meta, tracks, $state, playlists, auth, favourites, $modal, cachedTrack, $window, $timeout) ->
|
||||
$scope.track
|
||||
$scope.trackId = parseInt($state.params.id)
|
||||
|
||||
|
@ -53,32 +53,34 @@ module.exports = angular.module('ponyfm').controller "track", [
|
|||
$scope.favouriteWorking = false
|
||||
|
||||
$scope.share = () ->
|
||||
dialog = $dialog.dialog
|
||||
dialog = $modal
|
||||
templateUrl: '/templates/partials/track-share-dialog.html',
|
||||
controller: ['$scope', ($localScope) ->
|
||||
$localScope.track = $scope.track
|
||||
$localScope.close = () ->
|
||||
dialog.close()
|
||||
]
|
||||
dialog.open()
|
||||
dialog.$hide()
|
||||
],
|
||||
show: true
|
||||
|
||||
$scope.addToNewPlaylist = () ->
|
||||
dialog = $dialog.dialog
|
||||
dialog = $modal
|
||||
templateUrl: '/templates/partials/playlist-dialog.html'
|
||||
controller: 'playlist-form'
|
||||
controller: 'playlist-form',
|
||||
scope: $scope,
|
||||
resolve: {
|
||||
playlist: () ->
|
||||
is_public: true
|
||||
is_pinned: true
|
||||
name: ''
|
||||
description: ''
|
||||
}
|
||||
},
|
||||
show: true
|
||||
|
||||
dialog.open().then (playlist) ->
|
||||
return if !playlist
|
||||
$scope.finishAddingToPlaylist = (playlist, track) ->
|
||||
return if !playlist
|
||||
|
||||
playlists.addTrackToPlaylist playlist.id, $scope.track.id
|
||||
$state.transitionTo 'playlist', {id: playlist.id}
|
||||
playlists.addTrackToPlaylist playlist.id, track.id
|
||||
$state.transitionTo 'content.playlist', {id: playlist.id}
|
||||
|
||||
$scope.addToPlaylist = (playlist) ->
|
||||
return if playlist.message
|
||||
|
|
|
@ -21,8 +21,8 @@ module.exports = angular.module('ponyfm').directive 'pfmTrackEditor', () ->
|
|||
trackId: '=trackId'
|
||||
|
||||
controller: [
|
||||
'$scope', '$dialog', 'auth', 'account-tracks', 'account-albums', 'taxonomies', 'images'
|
||||
($scope, $dialog, auth, tracks, albums, taxonomies, images) ->
|
||||
'$scope', '$modal', 'auth', 'account-tracks', 'account-albums', 'taxonomies', 'images'
|
||||
($scope, $modal, auth, tracks, albums, taxonomies, images) ->
|
||||
$scope.isDirty = false
|
||||
$scope.isSaving = false
|
||||
$scope.taxonomies = taxonomies
|
||||
|
@ -116,14 +116,14 @@ module.exports = angular.module('ponyfm').directive 'pfmTrackEditor', () ->
|
|||
xhr.send formData
|
||||
|
||||
$scope.deleteTrack = () ->
|
||||
$dialog.messageBox('Delete ' + $scope.track.title, 'Are you sure you want to delete "' + $scope.track.title + '"?', [
|
||||
{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/' + $scope.track.id)
|
||||
.then -> $scope.$apply ->
|
||||
$scope.$emit 'track-deleted'
|
||||
#$dialog.messageBox('Delete ' + $scope.track.title, 'Are you sure you want to delete "' + $scope.track.title + '"?', [
|
||||
# {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/' + $scope.track.id)
|
||||
# .then -> $scope.$apply ->
|
||||
# $scope.$emit 'track-deleted'
|
||||
|
||||
# ========================================
|
||||
# The part where everything gets loaded!
|
||||
|
|
|
@ -24,24 +24,24 @@ module.exports = angular.module('ponyfm').directive 'pfmTracksList', () ->
|
|||
class: '@class'
|
||||
|
||||
controller: [
|
||||
'$dialog', '$scope', 'favourites', 'player', 'playlists', 'auth'
|
||||
($dialog, $scope, favourites, player, playlists, auth) ->
|
||||
'$modal', '$scope', 'favourites', 'player', 'playlists', 'auth'
|
||||
($modal, $scope, favourites, player, playlists, auth) ->
|
||||
$scope.auth = auth.data
|
||||
|
||||
$scope.canModifyPlaylist = ->
|
||||
$scope.playlist and $scope.auth.isLogged and $scope.playlist.user.id == $scope.auth.user.id
|
||||
|
||||
$scope.removeFromPlaylist = (track) ->
|
||||
$dialog.messageBox "Remove #{track.title} from playlist",
|
||||
"Are you sure you want to delete \"#{track.title}\"?", [
|
||||
{ result: 'ok', label: 'Yes', cssClass: 'btn-danger' },
|
||||
{ result: 'cancel', label: 'No', cssClass: 'btn-primary' }
|
||||
]
|
||||
.open().then (res) ->
|
||||
return if res is 'cancel'
|
||||
playlists.removeTrackFromPlaylist $scope.playlist?.id, track.id
|
||||
.done ->
|
||||
$scope.tracks = _.reject $scope.tracks, (t) -> t.id == track.id
|
||||
#$dialog.messageBox "Remove #{track.title} from playlist",
|
||||
# "Are you sure you want to delete \"#{track.title}\"?", [
|
||||
# { result: 'ok', label: 'Yes', cssClass: 'btn-danger' },
|
||||
# { result: 'cancel', label: 'No', cssClass: 'btn-primary' }
|
||||
# ]
|
||||
#.open().then (res) ->
|
||||
# return if res is 'cancel'
|
||||
# playlists.removeTrackFromPlaylist $scope.playlist?.id, track.id
|
||||
# .done ->
|
||||
# $scope.tracks = _.reject $scope.tracks, (t) -> t.id == track.id
|
||||
|
||||
$scope.toggleFavourite = (track) ->
|
||||
favourites.toggle('track', track.id).done (res) ->
|
||||
|
|
4110
resources/assets/scripts/base/angular-strap.js
vendored
Normal file
4110
resources/assets/scripts/base/angular-strap.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
43
resources/assets/scripts/base/angular-strap.tpl.js
Normal file
43
resources/assets/scripts/base/angular-strap.tpl.js
Normal file
|
@ -0,0 +1,43 @@
|
|||
/**
|
||||
* angular-strap
|
||||
* @version v2.3.6 - 2015-11-14
|
||||
* @link http://mgcrea.github.io/angular-strap
|
||||
* @author Olivier Louvignes <olivier@mg-crea.com> (https://github.com/mgcrea)
|
||||
* @license MIT License, http://www.opensource.org/licenses/MIT
|
||||
*/
|
||||
(function(window, document, undefined) {
|
||||
'use strict';
|
||||
angular.module('mgcrea.ngStrap.alert').run([ '$templateCache', function($templateCache) {
|
||||
$templateCache.put('alert/alert.tpl.html', '<div class="alert" ng-class="[type ? \'alert-\' + type : null]"><button type="button" class="close" ng-if="dismissable" ng-click="$hide()">×</button> <strong ng-bind="title"></strong> <span ng-bind-html="content"></span></div>');
|
||||
} ]);
|
||||
angular.module('mgcrea.ngStrap.datepicker').run([ '$templateCache', function($templateCache) {
|
||||
$templateCache.put('datepicker/datepicker.tpl.html', '<div class="dropdown-menu datepicker" ng-class="\'datepicker-mode-\' + $mode" style="max-width: 320px"><table style="table-layout: fixed; height: 100%; width: 100%"><thead><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$selectPane(-1)"><i class="{{$iconLeft}}"></i></button></th><th colspan="{{ rows[0].length - 2 }}"><button tabindex="-1" type="button" class="btn btn-default btn-block text-strong" ng-click="$toggleMode()"><strong style="text-transform: capitalize" ng-bind="title"></strong></button></th><th><button tabindex="-1" type="button" class="btn btn-default pull-right" ng-click="$selectPane(+1)"><i class="{{$iconRight}}"></i></button></th></tr><tr ng-if="showLabels" ng-bind-html="labels"></tr></thead><tbody><tr ng-repeat="(i, row) in rows" height="{{ 100 / rows.length }}%"><td class="text-center" ng-repeat="(j, el) in row"><button tabindex="-1" type="button" class="btn btn-default" style="width: 100%" ng-class="{\'btn-primary\': el.selected, \'btn-info btn-today\': el.isToday && !el.selected}" ng-click="$select(el.date)" ng-disabled="el.disabled"><span ng-class="{\'text-muted\': el.muted}" ng-bind="el.label"></span></button></td></tr></tbody></table></div>');
|
||||
} ]);
|
||||
angular.module('mgcrea.ngStrap.aside').run([ '$templateCache', function($templateCache) {
|
||||
$templateCache.put('aside/aside.tpl.html', '<div class="aside" tabindex="-1" role="dialog"><div class="aside-dialog"><div class="aside-content"><div class="aside-header" ng-show="title"><button type="button" class="close" ng-click="$hide()">×</button><h4 class="aside-title" ng-bind="title"></h4></div><div class="aside-body" ng-bind="content"></div><div class="aside-footer"><button type="button" class="btn btn-default" ng-click="$hide()">Close</button></div></div></div></div>');
|
||||
} ]);
|
||||
angular.module('mgcrea.ngStrap.dropdown').run([ '$templateCache', function($templateCache) {
|
||||
$templateCache.put('dropdown/dropdown.tpl.html', '<ul tabindex="-1" class="dropdown-menu" role="menu" ng-show="content && content.length"><li role="presentation" ng-class="{divider: item.divider, active: item.active}" ng-repeat="item in content"><a role="menuitem" tabindex="-1" ng-href="{{item.href}}" ng-if="!item.divider && item.href" target="{{item.target || \'\'}}" ng-bind="item.text"></a> <a role="menuitem" tabindex="-1" href="javascript:void(0)" ng-if="!item.divider && item.click" ng-click="$eval(item.click);$hide()" ng-bind="item.text"></a></li></ul>');
|
||||
} ]);
|
||||
angular.module('mgcrea.ngStrap.modal').run([ '$templateCache', function($templateCache) {
|
||||
$templateCache.put('modal/modal.tpl.html', '<div class="modal" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog"><div class="modal-content"><div class="modal-header" ng-show="title"><button type="button" class="close" aria-label="Close" ng-click="$hide()"><span aria-hidden="true">×</span></button><h4 class="modal-title" ng-bind="title"></h4></div><div class="modal-body" ng-bind="content"></div><div class="modal-footer"><button type="button" class="btn btn-default" ng-click="$hide()">Close</button></div></div></div></div>');
|
||||
} ]);
|
||||
angular.module('mgcrea.ngStrap.popover').run([ '$templateCache', function($templateCache) {
|
||||
$templateCache.put('popover/popover.tpl.html', '<div class="popover" tabindex="-1"><div class="arrow"></div><h3 class="popover-title" ng-bind="title" ng-show="title"></h3><div class="popover-content" ng-bind="content"></div></div>');
|
||||
} ]);
|
||||
angular.module('mgcrea.ngStrap.select').run([ '$templateCache', function($templateCache) {
|
||||
$templateCache.put('select/select.tpl.html', '<ul tabindex="-1" class="select dropdown-menu" ng-show="$isVisible()" role="select"><li ng-if="$showAllNoneButtons"><div class="btn-group" style="margin-bottom: 5px; margin-left: 5px"><button type="button" class="btn btn-default btn-xs" ng-click="$selectAll()">{{$allText}}</button> <button type="button" class="btn btn-default btn-xs" ng-click="$selectNone()">{{$noneText}}</button></div></li><li role="presentation" ng-repeat="match in $matches" ng-class="{active: $isActive($index)}"><a style="cursor: default" role="menuitem" tabindex="-1" ng-click="$select($index, $event)"><i class="{{$iconCheckmark}} pull-right" ng-if="$isMultiple && $isActive($index)"></i> <span ng-bind="match.label"></span></a></li></ul>');
|
||||
} ]);
|
||||
angular.module('mgcrea.ngStrap.timepicker').run([ '$templateCache', function($templateCache) {
|
||||
$templateCache.put('timepicker/timepicker.tpl.html', '<div class="dropdown-menu timepicker" style="min-width: 0px;width: auto"><table height="100%"><thead><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(-1, 0)"><i class="{{ $iconUp }}"></i></button></th><th> </th><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(-1, 1)"><i class="{{ $iconUp }}"></i></button></th><th> </th><th><button ng-if="showSeconds" tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(-1, 2)"><i class="{{ $iconUp }}"></i></button></th></tr></thead><tbody><tr ng-repeat="(i, row) in rows"><td class="text-center"><button tabindex="-1" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[0].selected}" ng-click="$select(row[0].date, 0)" ng-disabled="row[0].disabled"><span ng-class="{\'text-muted\': row[0].muted}" ng-bind="row[0].label"></span></button></td><td><span ng-bind="i == midIndex ? timeSeparator : \' \'"></span></td><td class="text-center"><button tabindex="-1" ng-if="row[1].date" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[1].selected}" ng-click="$select(row[1].date, 1)" ng-disabled="row[1].disabled"><span ng-class="{\'text-muted\': row[1].muted}" ng-bind="row[1].label"></span></button></td><td><span ng-bind="i == midIndex ? timeSeparator : \' \'"></span></td><td class="text-center"><button tabindex="-1" ng-if="showSeconds && row[2].date" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[2].selected}" ng-click="$select(row[2].date, 2)" ng-disabled="row[2].disabled"><span ng-class="{\'text-muted\': row[2].muted}" ng-bind="row[2].label"></span></button></td><td ng-if="showAM"> </td><td ng-if="showAM"><button tabindex="-1" ng-show="i == midIndex - !isAM * 1" style="width: 100%" type="button" ng-class="{\'btn-primary\': !!isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">AM</button> <button tabindex="-1" ng-show="i == midIndex + 1 - !isAM * 1" style="width: 100%" type="button" ng-class="{\'btn-primary\': !isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">PM</button></td></tr></tbody><tfoot><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(1, 0)"><i class="{{ $iconDown }}"></i></button></th><th> </th><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(1, 1)"><i class="{{ $iconDown }}"></i></button></th><th> </th><th><button ng-if="showSeconds" tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(1, 2)"><i class="{{ $iconDown }}"></i></button></th></tr></tfoot></table></div>');
|
||||
} ]);
|
||||
angular.module('mgcrea.ngStrap.tab').run([ '$templateCache', function($templateCache) {
|
||||
$templateCache.put('tab/tab.tpl.html', '<ul class="nav" ng-class="$navClass" role="tablist"><li role="presentation" ng-repeat="$pane in $panes track by $index" ng-class="[ $isActive($pane, $index) ? $activeClass : \'\', $pane.disabled ? \'disabled\' : \'\' ]"><a role="tab" data-toggle="tab" ng-click="!$pane.disabled && $setActive($pane.name || $index)" data-index="{{ $index }}" ng-bind-html="$pane.title" aria-controls="$pane.title"></a></li></ul><div ng-transclude class="tab-content"></div>');
|
||||
} ]);
|
||||
angular.module('mgcrea.ngStrap.typeahead').run([ '$templateCache', function($templateCache) {
|
||||
$templateCache.put('typeahead/typeahead.tpl.html', '<ul tabindex="-1" class="typeahead dropdown-menu" ng-show="$isVisible()" role="select"><li role="presentation" ng-repeat="match in $matches" ng-class="{active: $index == $activeIndex}"><a role="menuitem" tabindex="-1" ng-click="$select($index, $event)" ng-bind="match.label"></a></li></ul>');
|
||||
} ]);
|
||||
angular.module('mgcrea.ngStrap.tooltip').run([ '$templateCache', function($templateCache) {
|
||||
$templateCache.put('tooltip/tooltip.tpl.html', '<div class="tooltip in" ng-show="title"><div class="tooltip-arrow"></div><div class="tooltip-inner" ng-bind="title"></div></div>');
|
||||
} ]);
|
||||
})(window, document);
|
File diff suppressed because it is too large
Load diff
|
@ -14,7 +14,7 @@
|
|||
@gray-light: lighten(@gray-base, 46.7%); // #777
|
||||
@gray-lighter: lighten(@gray-base, 93.5%); // #eee
|
||||
|
||||
@brand-primary: darken(#428bca, 6.5%); // #337ab7
|
||||
@brand-primary: #B885BD;
|
||||
@brand-success: #5cb85c;
|
||||
@brand-info: #5bc0de;
|
||||
@brand-warning: #f0ad4e;
|
||||
|
|
|
@ -347,6 +347,7 @@ html .dropdown-menu {
|
|||
html {
|
||||
.modal-backdrop {
|
||||
background: #fff;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.modal {
|
||||
|
|
6
resources/assets/styles/layout.less
vendored
6
resources/assets/styles/layout.less
vendored
|
@ -60,7 +60,7 @@ header {
|
|||
}
|
||||
|
||||
.dropdown-menu {
|
||||
left: auto;
|
||||
left: auto !important;
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
|
@ -297,3 +297,7 @@ header {
|
|||
.bun-bottom {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.playlist-form .modal-footer {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
<div class="now-playing">
|
||||
@if (Auth::check())
|
||||
<div class="user-details dropdown">
|
||||
<a class="avatar dropdown-toggle" href="#">
|
||||
<a class="avatar dropdown-toggle" bs-dropdown href="#">
|
||||
<img src="{{Auth::user()->getAvatarUrl(\Poniverse\Ponyfm\Models\Image::THUMBNAIL)}}" />
|
||||
<span><i class="fa fa-chevron-down"></i></span>
|
||||
</a>
|
||||
|
|
Loading…
Reference in a new issue