mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-16 14:17:00 +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);
|
|
}());
|