Build new versioned files
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
9
resources/js/app.js
vendored
9
resources/js/app.js
vendored
@ -121,7 +121,7 @@ $(document).ready(function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var $this = $(this),
|
||||
$row = $this.closest('tr');
|
||||
$row = $this.closest('tr, .action-container');
|
||||
|
||||
bootbox.confirm('Are you sure?', function(result) {
|
||||
if (!result) {
|
||||
@ -130,8 +130,11 @@ $(document).ready(function(e) {
|
||||
|
||||
axios.delete($row.data('url')).then(function(res) {
|
||||
if (res.data.success) {
|
||||
|
||||
$row.remove();
|
||||
if ($row.hasClass('action-container')) {
|
||||
window.location = '/';
|
||||
} else {
|
||||
$row.remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
|
@ -1,7 +1,14 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('content')
|
||||
<h3>{{ $book->name }}</h3>
|
||||
<h3>
|
||||
{{ $book->name }}
|
||||
<div class="action-container float-right" data-url="{{ route('books.show', $book->id) }}">
|
||||
<button class="remove-item btn btn-danger">
|
||||
Remove
|
||||
</button>
|
||||
</div>
|
||||
</h3>
|
||||
<h5>By: {{ $book->authors->pluck('name')->join(', ') }}</h5>
|
||||
<br />
|
||||
@if ($thumbnail = $book->attachment('thumbnail'))
|
||||
@ -22,4 +29,5 @@
|
||||
{{ $book->description }}
|
||||
</p>
|
||||
@endif
|
||||
|
||||
@endsection
|
Reference in New Issue
Block a user