#41 inline editing of fuel prices
This commit is contained in:
21
resources/views/admin/airports/script.blade.php
Normal file
21
resources/views/admin/airports/script.blade.php
Normal file
@@ -0,0 +1,21 @@
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#airports-table a.inline').editable({
|
||||
type: 'text',
|
||||
mode: 'inline',
|
||||
emptytext: '0',
|
||||
url: '/admin/airports/fuel',
|
||||
title: 'Enter price per unit of fuel',
|
||||
ajaxOptions: {'type': 'put'},
|
||||
params: function(params) {
|
||||
return {
|
||||
id: params.pk,
|
||||
name: params.name,
|
||||
value: params.value
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user