v1.5.12 Added the last things to the preview function, its all working now
This commit is contained in:
@@ -73,7 +73,7 @@
|
||||
<strong><label for="accountable">Aktivitets ansvarlig</label></strong>
|
||||
<p id="accountable"></p>
|
||||
<hr>
|
||||
<img src="{{ asset(\App\Resource::query()->where("id", "=", $events->resource_id)->first()->filename) }}">
|
||||
<img id="eventimg">
|
||||
<p id="description"></p>
|
||||
</center>
|
||||
</div>
|
||||
@@ -96,6 +96,11 @@
|
||||
$("#date").html(l.date);
|
||||
$("#accountable").html(l.accountable);
|
||||
$("#description").html(l.description);
|
||||
|
||||
if (l.filename)
|
||||
$("#eventimg").attr('src', l.filename);
|
||||
|
||||
|
||||
},
|
||||
error:function (data) {
|
||||
console.log(data);
|
||||
@@ -105,11 +110,23 @@
|
||||
|
||||
function closeModal() {
|
||||
modalNews.style.display = "none";
|
||||
|
||||
$("#name").html('');
|
||||
$("#date").html('');
|
||||
$("#accountable").html('');
|
||||
$("#description").html('');
|
||||
$("#eventimg").attr('src', '');
|
||||
}
|
||||
|
||||
window.onmousedown = function(event) {
|
||||
if (event.target == modalNews) {
|
||||
modalNews.style.display = "none";
|
||||
|
||||
$("#name").html('');
|
||||
$("#date").html('');
|
||||
$("#accountable").html('');
|
||||
$("#description").html('');
|
||||
$("#eventimg").attr('src', '');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user