mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-13 20:56:52 +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);
|
|
}());
|