Files
This commit is contained in:
@ -3,15 +3,18 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>
|
||||
@hasSection('page_title')
|
||||
@yield('page_title') -
|
||||
@endif
|
||||
@if (isset($titulo))
|
||||
{{$titulo}} -
|
||||
@endif
|
||||
Incoviba S. A.</title>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.7.8/semantic.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/app.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/custom.css" />
|
||||
<link rel="icon" type="image/png" href="images/Isotipo 32.png" />
|
||||
<script type="text/javascript" src="js/app.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="{{$urls->styles}}/app.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$urls->styles}}/custom.css" />
|
||||
<link rel="icon" type="image/png" href="{{$urls->images}}/Isotipo 32.png" />
|
||||
<script type="text/javascript" src="{{$urls->scripts}}/app.js"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.7.8/semantic.min.js"></script>
|
||||
|
||||
@stack('styles')
|
||||
@ -26,6 +29,53 @@
|
||||
</div>
|
||||
</div>
|
||||
@include('layout.footer')
|
||||
<script type="text/javascript">
|
||||
const API_KEY = '{{$api_key}}'
|
||||
const _urls = {
|
||||
base: '{{$urls->base}}',
|
||||
api: 'http://localhost:8081'
|
||||
}
|
||||
function buildAjax(uri, method, files=false) {
|
||||
const url = _urls.api + uri
|
||||
if (files) {
|
||||
return {
|
||||
url,
|
||||
headers: {
|
||||
'Authorization': 'Bearer ' + API_KEY
|
||||
},
|
||||
method,
|
||||
processData: false,
|
||||
contentType: false
|
||||
}
|
||||
}
|
||||
return {
|
||||
url,
|
||||
headers: {
|
||||
'Authorization': 'Bearer ' + API_KEY
|
||||
},
|
||||
method,
|
||||
dataType: 'json'
|
||||
}
|
||||
}
|
||||
function sendGet(uri) {
|
||||
let ajax_obj = buildAjax(uri, 'GET')
|
||||
return $.ajax(ajax_obj)
|
||||
}
|
||||
function sendPost(uri, data, files=false) {
|
||||
let ajax_obj = buildAjax(uri, 'POST', files)
|
||||
ajax_obj['data'] = data
|
||||
return $.ajax(ajax_obj)
|
||||
}
|
||||
function sendPut(uri, data) {
|
||||
let ajax_obj = buildAjax(uri, 'PUT')
|
||||
ajax_obj['data'] = data
|
||||
return $.ajax(ajax_obj)
|
||||
}
|
||||
function sendDelete(uri) {
|
||||
let ajax_obj = buildAjax(uri, 'DELETE')
|
||||
return $.ajax(ajax_obj)
|
||||
}
|
||||
</script>
|
||||
@stack('scripts')
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user