datatable.directory codebase https://datatable.directory/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
datatable.directory/resources/assets/js/components/table-editor-utils.js

22 lines
386 B

function busy (yes) {
$('#draft-busy').css('opacity', yes ? 1 : 0)
}
function query (route, data, sucfn, erfn) {
busy(true)
if (!sucfn) sucfn = () => {}
if (!erfn) erfn = () => {}
window.axios.post(route, data).then(sucfn).catch((error) => {
console.error(error.message)
erfn(error.response.data)
}).then(() => {
busy(false)
})
}
export {
busy,
query
}