mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-15 21:56:12 +08:00
11 lines
293 B
JavaScript
11 lines
293 B
JavaScript
(function() {
|
|
'use strict';
|
|
|
|
function initAutosaveListeners() {
|
|
$(document).on('change', 'form[data-action*="autosave-form"]', function({ currentTarget }) {
|
|
$.rails.fire($(currentTarget), 'submit');
|
|
});
|
|
}
|
|
|
|
$(document).one('turbolinks:load', initAutosaveListeners);
|
|
}());
|