Logging
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
@section('emails_content')
|
||||
<h3>Message - <span id="subject"></span> - <span id="from"></span></h3>
|
||||
<h4 id="date_time"></h4>
|
||||
<div class="ui list" id="attachments"></div>
|
||||
<div class="ui bulleted link list" id="attachments"></div>
|
||||
@endsection
|
||||
|
||||
@push('page_scripts')
|
||||
@ -82,7 +82,7 @@
|
||||
attachments: parent => {
|
||||
this.get().attachments().forEach(attachment => {
|
||||
parent.append(
|
||||
$('<a></a>').attr('href', _urls.base + '/attachment/' + attachment.id).attr('download', attachment.fullname).html(attachment.fullname)
|
||||
$('<a></a>').attr('href', '{{$urls->base}}/attachment/' + attachment.id).attr('download', attachment.fullname).html(attachment.fullname)
|
||||
)
|
||||
})
|
||||
}
|
||||
@ -100,4 +100,4 @@
|
||||
message.setup('{{$message_id}}')
|
||||
})
|
||||
</script>
|
||||
@endpush
|
||||
@endpush
|
||||
|
@ -3,18 +3,17 @@
|
||||
base_url: '{{$urls->api}}',
|
||||
base: function({method, uri, data = null}) {
|
||||
const request = {
|
||||
uri: uri.replace(/^\//g, ''),
|
||||
uri: uri,
|
||||
method
|
||||
}
|
||||
const options = {
|
||||
url: this.base_url,
|
||||
method: 'post',
|
||||
contentType: 'application/json'
|
||||
}
|
||||
if (method.toLowerCase() !== 'get' && data !== null) {
|
||||
request['data'] = data
|
||||
}
|
||||
options['data'] = JSON.stringify(request)
|
||||
options['data'] = request
|
||||
return $.ajax(options)
|
||||
},
|
||||
get: function(uri) {
|
||||
@ -30,5 +29,5 @@
|
||||
return this.base({method: 'delete', uri, data})
|
||||
}
|
||||
}
|
||||
const _urls = JSON.parse('{!! Safe\json_encode($urls) !!}')
|
||||
</script>
|
||||
//const _urls = JSON.parse('{!! Safe\json_encode($urls) !!}')
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user