2017-07-03 04:11:27 +08:00
|
|
|
@section('scripts')
|
|
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('#aircraft_fares a').editable({
|
|
|
|
type: 'text',
|
|
|
|
mode: 'inline',
|
|
|
|
emptytext: 'default',
|
|
|
|
url: '/admin/subfleets/{!! $subfleet->id !!}/fares',
|
|
|
|
title: 'Enter override value',
|
|
|
|
ajaxOptions: { 'type': 'put'},
|
|
|
|
params: function(params) {
|
|
|
|
return {
|
|
|
|
fare_id: params.pk,
|
|
|
|
name: params.name,
|
|
|
|
value: params.value
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
$(document).on('submit', 'form.rm_fare', function(event) {
|
|
|
|
event.preventDefault();
|
|
|
|
$.pjax.submit(event, '#aircraft_fares_wrapper', {push: false});
|
|
|
|
});
|
2017-11-23 01:52:02 +08:00
|
|
|
|
|
|
|
$(document).on('pjax:complete', function() {
|
|
|
|
$(".select2").select2();
|
|
|
|
});
|
2017-07-03 04:11:27 +08:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
@endsection
|