Fix Bugs 2

master
NoNameGuy 2017-06-12 21:21:07 +01:00
parent cb014c5ee7
commit 94d3c7093a
2 changed files with 6 additions and 3 deletions

View File

@ -26,10 +26,11 @@ var js = $(document).ready(function(){
}
});
var array2;
$("#brand").autocomplete({
source: function(request, response){
if (array){
response($.ui.autocomplete.filter(array, request.term));
if (array2){
response($.ui.autocomplete.filter(array2, request.term));
}else{
$.ajax({
url: "api/brands",
@ -39,7 +40,7 @@ var js = $(document).ready(function(){
data: request.term,
success: function (data) {
response(array = $.map(data["brands"] , function (key, value) {
response(array2 = $.map(data["brands"] , function (key, value) {
return data["brands"][value];
}))}

View File

@ -85,6 +85,8 @@
<div class="well well-lg">
<label for="nome">Nome: </label>
{{$station->stationName}}<br>
<label for="nome">Marca: </label>
{{$station->stationBrand}}<br>
<label for="nome">Preço: </label>
{{$station->fuelPrice}}
<button type="button" class="btn btn-link" style="float:right">Detalhes</button>