mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-28 23:57:59 +01:00
Improved the performance of track listings with lots of bindonce.
This commit is contained in:
parent
d7c15a4f14
commit
4443a672be
1 changed files with 11 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
|||
<ul class="tracks-listing {{class}}">
|
||||
<li ng-repeat="track in tracks" ng-class="{'can-favourite': auth.isLogged, 'is-favourited': auth.isLogged && track.user_data.is_favourited, 'is-playing': track.isPlaying, 'has-played': auth.isLogged && track.user_data.views}">
|
||||
<li bindonce ng-repeat="track in tracks track by track.id" 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>
|
||||
|
@ -8,20 +8,20 @@
|
|||
<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>
|
||||
<span><i bo-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)" bo-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
|
||||
<a class="info" bo-href="track.url">
|
||||
<span class="title" bo-text="track.title"></span>
|
||||
<span class="stats" bo-title="track.stats.favourites +' Favourites / '+ track.stats.comments +' Comments / '+ track.stats.plays +' Plays'">
|
||||
<strong bo-text="track.stats.favourites"></strong>f
|
||||
<strong bo-text="track.stats.comments"></strong>c
|
||||
<strong bo-text="track.stats.plays"></strong>p
|
||||
</span>
|
||||
<span class="artist">{{track.user.name}} / {{track.genre.name}}</span>
|
||||
<span class="artist" bo-text="track.user.name + ' / ' + track.genre.name"></span>
|
||||
</a>
|
||||
</li>
|
||||
<li ng-show="!tracks.length" class="empty">
|
||||
No tracks found...
|
||||
No tracks found…
|
||||
</li>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in a new issue