| | |
| | | if (!this.content) { |
| | | return; |
| | | } |
| | | this.isTimeline = false; |
| | | |
| | | this.initElements(); |
| | | this.updateBulkOptions(); |
| | |
| | | this.init(); |
| | | } |
| | | handleFormChange(event, data) { |
| | | if (this.isTimeline) { |
| | | data.changes.content = this.content; |
| | | let changes = {}; |
| | | let postID = data.config.id.replace('edit-', ''); |
| | | changes[postID] = data.changes; |
| | | this.savePosts(changes, `Saving ${data.fullData.post_title}'s Changes`); |
| | | return; |
| | | } |
| | | data.changes.content = this.content; |
| | | let changes = {}; |
| | | let title = ''; |
| | |
| | | uploader: 'details.uploader' |
| | | }; |
| | | this.ui = window.uiFromSelectors(this.elements); |
| | | this.isTimeline = Object.hasOwn(this.ui.forms.edit.dataset, 'timeline'); |
| | | } |
| | | init() { |
| | | this.settings.addSetting(this.ui.uploader, 'open'); |