45 lines
1.0 KiB
PHP
45 lines
1.0 KiB
PHP
<style>
|
|
#favourite.selected {
|
|
color: orange;
|
|
}
|
|
</style>
|
|
|
|
@extends('adminlte::layouts.app')
|
|
|
|
@section('htmlheader_title')
|
|
{{ $co->name }}|{{ $name }}
|
|
@endsection
|
|
|
|
@section('contentheader_title')
|
|
<span id="favourite" class="@if(Auth::user()->accounts->contains($ao->id)) selected @endif"><i class="fa fa-star" ></i></span> Detail for {{$ao->name}}
|
|
@endsection
|
|
@section('contentheader_description')
|
|
{{ $ido->import_date->format('Y-m-d') }}
|
|
@endsection
|
|
|
|
@section('main-content')
|
|
@include('widgets.account')
|
|
@yield('account')
|
|
@endsection
|
|
|
|
@section('page-scripts')
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$("#favourite").click(function() {
|
|
var item = this;
|
|
//alert('{{csrf_token()}}');
|
|
$.ajax({
|
|
'type':'POST',
|
|
'data':'id={{$ao->id}}&_token={{csrf_token()}}',
|
|
'success':function() {
|
|
$(item).toggleClass('selected');
|
|
},
|
|
'error':function(){ alert('That didnt work? Please try again....') },
|
|
'url':'{{ url('favourite') }}',
|
|
'cache':false
|
|
})
|
|
|
|
});
|
|
});
|
|
</script>
|
|
@append |