Jamstash/app/queue/queue.html
Carey Metcalfe dbf5010745 Fix double click event propagation
This fixes an issue where attempting to rapidly remove songs from the
queue would cause them to be played.

- When clicking the add/play/remove/star buttons quickly, the double
  click event would propagate and start playing the song
- Fixed by extending the `stopEvent` directive to accept a
  comma-delimited list of events to stop. This allowed for using
  `stop-event="click,dblclick"` in the html to not propagate both click
  and double click events.
- Also removed some duplicate directives that seemed to have snuck in
  during a merge.
2017-11-10 14:31:01 -05:00

68 lines
2.3 KiB
HTML

<div class="queue headeractions">
<a
class="icon-wrap"
title="Select All"
ng-click="vm.selectAll()"
>
<svg class="icon">
<title>Select all songs</title>
<use xlink:href="images/sprite/iconic.svg#check" class="icon-select-all"></use>
</svg>
</a>
<a
class="buttonimg"
title="Shuffle Queue"
ng-click="vm.shuffleQueue()"
><img src="images/fork_gd_11x12.png"></a>
<a
class="buttonimg"
title="Delete Queue"
ng-click="vm.emptyQueue()"
><img src="images/trash_fill_gd_12x12.png"></a>
<a
class="buttonimg"
title="Remove Selected From Queue"
ng-click="vm.removeSelectedSongsFromQueue()"
><img src="images/x_11x11.png"></a>
</div>
<div class="header">Queue</div>
<div id="SideQueue">
<ul class="simplelist songlist noselect">
<div
class="songs"
ui-sortable
ng-model="vm.player.queue"
>
<li
ng-repeat="song in vm.player.queue track by $index"
class="row song id{{song.id}}"
ng-click="vm.toggleSelection(song)"
ng-dblclick="vm.playSong(song)"
ng-class="{'selected': song.selected, 'playing': vm.isPlayingSong(song)}"
>
<div class="itemactions">
<a
class="remove"
href=""
title="Remove Song"
ng-click="vm.removeSongFromQueue(song)"
stop-event="click,dblclick"
></a>
<a
href=""
title="Star"
ng-class="{'favorite': song.starred, 'rate': ! song.starred}"
ng-click="vm.toggleStar(song)"
stop-event="click,dblclick"
></a>
<div class="clear"></div>
</div>
<div class="title floatleft" title="{{ song.description }}" ng-bind-html="song.name"></div>
<div class="time floatleft">{{ song.time }}</div>
<div class="clear"></div>
</li>
</div>
</ul>
<div class="colspacer"></div>
</div>