1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-20 19:08:21 +00:00

Change participants UI and API (#3889)

* change tooltip ID

* change dialog API

* change mention style

* change comment panel API

change detail panel API

* change Tooltip

* change mention color

update seafile-api

change comment content click
This commit is contained in:
Michael An
2019-07-26 16:51:47 +08:00
committed by Daniel Pan
parent f7d226bf95
commit ec87c48002
7 changed files with 133 additions and 97 deletions

View File

@@ -89,14 +89,12 @@ class FileParticipantDialog extends Component {
if (!selectedOption || selectedOption.length === 0) {
return;
}
for (let i = 0; i < selectedOption.length; i++) {
seafileAPI.addFileParticipant(repoID, filePath, selectedOption[i].email).then((res) => {
this.props.onParticipantsChange(repoID, filePath);
}).catch(error => {
let errMessage = Utils.getErrorMsg(error);
toaster.danger(errMessage);
});
}
let emails = selectedOption.map((option) => {return option.email;});
seafileAPI.addFileParticipants(repoID, filePath, emails).then((res) => {
this.props.onParticipantsChange(repoID, filePath);
}).catch(error => {
toaster.danger(Utils.getErrorMsg(error));
});
this.setState({ selectedOption: null });
this.refs.userSelect.clearSelect();
};