2017-12-31 00:38:18 +08:00
|
|
|
@section('scripts')
|
2020-02-02 02:05:56 +08:00
|
|
|
<script>
|
|
|
|
$(document).ready(function () {
|
|
|
|
$('#settings a').editable({
|
2017-12-31 00:38:18 +08:00
|
|
|
type: 'text',
|
|
|
|
mode: 'inline',
|
|
|
|
emptytext: 'default',
|
|
|
|
url: '/admin/settings/update',
|
|
|
|
title: 'Enter override value',
|
2020-02-02 02:05:56 +08:00
|
|
|
ajaxOptions: {'type': 'put'},
|
|
|
|
params: function (params) {
|
|
|
|
return {
|
|
|
|
fare_id: params.pk,
|
|
|
|
name: params.name,
|
|
|
|
value: params.value
|
|
|
|
}
|
2017-12-31 00:38:18 +08:00
|
|
|
}
|
2020-02-02 02:05:56 +08:00
|
|
|
});
|
2017-12-31 00:38:18 +08:00
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
$(document).on('submit', 'form.rm_fare', function (event) {
|
2017-12-31 00:38:18 +08:00
|
|
|
event.preventDefault();
|
|
|
|
$.pjax.submit(event, '#aircraft_fares_wrapper', {push: false});
|
2020-02-02 02:05:56 +08:00
|
|
|
});
|
2017-12-31 00:38:18 +08:00
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
$(document).on('pjax:complete', function () {
|
|
|
|
initPlugins();
|
|
|
|
});
|
2017-12-31 00:38:18 +08:00
|
|
|
});
|
2020-02-02 02:05:56 +08:00
|
|
|
</script>
|
2017-12-31 00:38:18 +08:00
|
|
|
@endsection
|