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