This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
memberdb/resources/theme/backend/adminlte/account.blade.php

45 lines
1.0 KiB
PHP
Raw Normal View History

2017-08-05 23:53:57 +00:00
<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