phpvms/resources/views/admin/settings/script.blade.php

31 lines
761 B
PHP
Raw Normal View History

2017-12-31 00:38:18 +08:00
@section('scripts')
<script>
$(document).ready(function() {
$('#settings a').editable({
type: 'text',
mode: 'inline',
emptytext: 'default',
url: '/admin/settings/update',
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});
});
$(document).on('pjax:complete', function() {
2018-04-07 06:10:45 +08:00
initPlugins();
2017-12-31 00:38:18 +08:00
});
});
</script>
@endsection