v1.5.15a - Changes by Anders
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
<td>{{ $event->accountable }}</td>
|
||||
<td>{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($event->date))->format('d/m/Y \k\l\. H:i') }}</td>
|
||||
<td><a href="{{ route("events.signups", [ "event" => $event ]) }}"><img class="w-100" src="{{ asset('/images/icons/eye-dark.svg') }}" alt="Show"></a></td>
|
||||
<td><a id="preview" onclick="modalNewsContent({{$event->id}})" style="cursor: pointer" ><img class="w-100" src="{{ asset('/images/icons/preview-dark.svg') }}" alt="preview"></a></td>
|
||||
<td><a id="preview" onclick="modalEventContent({{$event->id}})" style="cursor: pointer" ><img class="w-100" src="{{ asset('/images/icons/preview-dark.svg') }}" alt="preview"></a></td>
|
||||
@if(auth()->user()->can('event.edit'))
|
||||
<td><a href="{{ route("events.edit", [ "event" => $event ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
@endif
|
||||
@@ -64,7 +64,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div id="newsModal" class="modal zindex-100">
|
||||
<div id="eventModal" class="modal zindex-100">
|
||||
<div id="modal-content" class="modal-content text-black d-block w-50">
|
||||
<span class="close" onclick="closeModal()">×</span>
|
||||
<center>
|
||||
@@ -83,9 +83,9 @@
|
||||
@endsection
|
||||
@section('scripts')
|
||||
<script>
|
||||
var modalNews = document.getElementById("newsModal");
|
||||
var modalEvent = document.getElementById("eventModal");
|
||||
|
||||
function modalNewsContent(id) {
|
||||
function modalEventContent(id) {
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '{{route('events.preview')}}',
|
||||
@@ -93,7 +93,6 @@
|
||||
success:function (data) {
|
||||
modalNews.style.display = "flex";
|
||||
var l = JSON.parse(data);
|
||||
console.log(l);
|
||||
$("#name").html(l.name);
|
||||
$("#date").html(l.date);
|
||||
$("#accountable").html(l.accountable);
|
||||
@@ -101,8 +100,6 @@
|
||||
|
||||
if (l.filename)
|
||||
$("#eventimg").attr('src', l.filename);
|
||||
|
||||
|
||||
},
|
||||
error:function (data) {
|
||||
console.log(data);
|
||||
@@ -111,7 +108,7 @@
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
modalNews.style.display = "none";
|
||||
modalEvent.style.display = "none";
|
||||
|
||||
$("#name").html('');
|
||||
$("#date").html('');
|
||||
@@ -121,8 +118,8 @@
|
||||
}
|
||||
|
||||
window.onmousedown = function(event) {
|
||||
if (event.target == modalNews) {
|
||||
modalNews.style.display = "none";
|
||||
if (event.target == modalEvent) {
|
||||
modalEvent.style.display = "none";
|
||||
|
||||
$("#name").html('');
|
||||
$("#date").html('');
|
||||
|
||||
Reference in New Issue
Block a user