|
|
@ -159,15 +159,15 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
|
|
|
|
onSelectSuggestion(position, token, suggestion) {
|
|
|
|
onSelectSuggestion(position, token, suggestion) {
|
|
|
|
dispatch(selectComposeSuggestion(position, token, suggestion));
|
|
|
|
dispatch(selectComposeSuggestion(position, token, suggestion));
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onMediaDescriptionConfirm() {
|
|
|
|
onMediaDescriptionConfirm(routerHistory) {
|
|
|
|
dispatch(openModal('CONFIRM', {
|
|
|
|
dispatch(openModal('CONFIRM', {
|
|
|
|
message: intl.formatMessage(messages.missingDescriptionMessage),
|
|
|
|
message: intl.formatMessage(messages.missingDescriptionMessage),
|
|
|
|
confirm: intl.formatMessage(messages.missingDescriptionConfirm),
|
|
|
|
confirm: intl.formatMessage(messages.missingDescriptionConfirm),
|
|
|
|
onConfirm: () => dispatch(submitCompose()),
|
|
|
|
onConfirm: () => dispatch(submitCompose(routerHistory)),
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onSubmit() {
|
|
|
|
onSubmit(routerHistory) {
|
|
|
|
dispatch(submitCompose());
|
|
|
|
dispatch(submitCompose(routerHistory));
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onUndoUpload(id) {
|
|
|
|
onUndoUpload(id) {
|
|
|
|
dispatch(undoUploadCompose(id));
|
|
|
|
dispatch(undoUploadCompose(id));
|
|
|
@ -256,9 +256,9 @@ const handlers = {
|
|
|
|
inputs[firstWithoutDescription].focus();
|
|
|
|
inputs[firstWithoutDescription].focus();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onMediaDescriptionConfirm();
|
|
|
|
onMediaDescriptionConfirm(this.context.router ? this.context.router.history : null);
|
|
|
|
} else if (onSubmit) {
|
|
|
|
} else if (onSubmit) {
|
|
|
|
onSubmit();
|
|
|
|
onSubmit(this.context.router ? this.context.router.history : null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
@ -563,6 +563,10 @@ Composer.propTypes = {
|
|
|
|
onMediaDescriptionConfirm: PropTypes.func,
|
|
|
|
onMediaDescriptionConfirm: PropTypes.func,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Composer.contextTypes = {
|
|
|
|
|
|
|
|
router: PropTypes.object,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Connecting and export.
|
|
|
|
// Connecting and export.
|
|
|
|
export { Composer as WrappedComponent };
|
|
|
|
export { Composer as WrappedComponent };
|
|
|
|
export default wrap(Composer, mapStateToProps, mapDispatchToProps, true);
|
|
|
|
export default wrap(Composer, mapStateToProps, mapDispatchToProps, true);
|
|
|
|