|
@@ -132,17 +132,17 @@
|
|
|
|
|
|
function initChangeListener(_elem) {
|
|
function initChangeListener(_elem) {
|
|
new MutationObserver(debounce(function() {
|
|
new MutationObserver(debounce(function() {
|
|
- if(_elem.closest('.note-section').is('.edit')) {
|
|
|
|
- // console.log('ALIX: In edit mode. Auto-saving', _elem.closest('.note-section').attr('data-section-template-name'))
|
|
|
|
- doSave(_elem.closest('.note-section'))
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- // console.log('ALIX: Not in edit mode. Not auto-saving', _elem.closest('.note-section').attr('data-section-template-name'))
|
|
|
|
- }
|
|
|
|
- }, 250))
|
|
|
|
- .observe(_elem[0], {
|
|
|
|
- attributes: true
|
|
|
|
- });
|
|
|
|
|
|
+ if(_elem.closest('.note-section').is('.edit')) {
|
|
|
|
+ // console.log('ALIX: In edit mode. Auto-saving', _elem.closest('.note-section').attr('data-section-template-name'))
|
|
|
|
+ doSave(_elem.closest('.note-section'))
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ // console.log('ALIX: Not in edit mode. Not auto-saving', _elem.closest('.note-section').attr('data-section-template-name'))
|
|
|
|
+ }
|
|
|
|
+ }, 250))
|
|
|
|
+ .observe(_elem[0], {
|
|
|
|
+ attributes: true
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
addMCInitializer('note-sections-list', init);
|
|
addMCInitializer('note-sections-list', init);
|