Skip to content

Commit

Permalink
(Add) Poster SWAL On Torrents List
Browse files Browse the repository at this point in the history
  • Loading branch information
HDVinnie committed Sep 26, 2018
1 parent 4aea685 commit f3c567e
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions resources/views/torrent/results.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
@if ($user->show_poster == 1)
<div class="torrent-poster pull-left">
<img src="{{ $movie->poster ?? 'https://via.placeholder.com/600x900'}}"
data-poster-mid="{{ $movie->poster ?? 'https://via.placeholder.com/600x900'}}"
class="img-tor-poster torrent-poster-img-small" alt="Poster">
data-name='<i style="color: #a5a5a5;">{{ $movie->title }}</i>' data-image='<img src="{{ $movie->poster }}" alt="Poster" style="height: 1000px;">'
class="torrent-poster-img-small show-poster" alt="Poster">
</div>
@else
<div class="torrent-poster pull-left"></div>
Expand Down Expand Up @@ -320,3 +320,24 @@ class="img-tor-poster torrent-poster-img-small" alt="Poster">
</div>
</div>

<script>
$(function() {
$('.show-poster').click(function(e) {
e.preventDefault();
var name = $(this).attr('data-name');
var image = $(this).attr('data-image');
swal({
showConfirmButton: false,
showCloseButton: true,
background: '#232323',
width: 970,
html: image,
title: name,
text: '',
});
});
});
</script>

0 comments on commit f3c567e

Please sign in to comment.