Fixes to atlas document deletion

This commit is contained in:
Jori Lallo
2016-07-10 17:02:45 -07:00
parent 0f4c99f1f8
commit c2009fe94e
3 changed files with 51 additions and 16 deletions

View File

@@ -66,7 +66,14 @@ class DocumentScene extends React.Component {
}
onDelete = () => {
if (confirm("Are you sure you want to delete this document?")) {
let msg;
if (this.store.document.atlas.type === 'atlas') {
msg = 'Are you sure you want to delete this document and all it\'s child documents (if any)?'
} else {
msg = "Are you sure you want to delete this document?";
}
if (confirm(msg)) {
this.store.deleteDocument();
};
}