Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions frontend/javascripts/admin/dataset/dataset_add_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,17 +273,7 @@ const getPostUploadModal = (
open
closable
maskClosable={false}
className="no-footer-modal"
cancelButtonProps={{
style: {
display: "none",
},
}}
okButtonProps={{
style: {
display: "none",
},
}}
footer={null}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works like a charm:
Image

onCancel={() => setDatasetId("")}
onOk={() => setDatasetId("")}
width={580}
Expand Down Expand Up @@ -336,7 +326,7 @@ const getPostUploadModal = (
</React.Fragment>
)}
</div>
</div>{" "}
</div>
</Modal>
);
};
12 changes: 1 addition & 11 deletions frontend/javascripts/admin/dataset/dataset_upload_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -492,17 +492,7 @@ class DatasetUploadView extends React.Component<PropsWithFormAndRouter, State> {
open={isUploading}
keyboard={false}
maskClosable={false}
className="no-footer-modal"
okButtonProps={{
style: {
display: "none",
},
}}
cancelButtonProps={{
style: {
display: "none",
},
}}
footer={null}
onCancel={this.cancelUpload}
>
<div
Expand Down
1 change: 0 additions & 1 deletion frontend/javascripts/admin/user/experience_modal_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ function ExperienceModalView({
onOk={updateAllUsers}
okText={"Save"}
width={multipleUsers ? 800 : 600}
maskClosable={false}
>
<Table
size="small"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,6 @@ class DatasetSettings extends React.PureComponent<DatasetSettingsProps, State> {
title: `Deleting an annotation layer makes its content and history inaccessible. ${fallbackLayerNote}This cannot be undone. Are you sure you want to delete this layer?`,
okText: `Yes, delete annotation layer “${readableAnnotationLayerName}”`,
cancelText: "Cancel",
maskClosable: true,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirmAsync uses a Modal.confirm under the hood. The intent of a confirm is to force a user decision. Therefore, both these options are not part of the defaults. I think that is sensible and we should not change the default behavior.

closable: true,
okButtonProps: {
danger: true,
block: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,7 @@ export default function AddVolumeLayerModal({
};

return (
<Modal
title="Add Volume Annotation Layer"
footer={null}
width={500}
maskClosable={false}
onCancel={onCancel}
open
>
<Modal title="Add Volume Annotation Layer" footer={null} width={500} onCancel={onCancel} open>
Layer Name:{" "}
<InputComponent
size="small"
Expand Down
13 changes: 5 additions & 8 deletions frontend/stylesheets/_utils.less
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ td.nowrap * {
flex-direction: row;
justify-content: center;

& > * {
&>* {
margin: 6px;
}

Expand All @@ -71,6 +71,7 @@ td.nowrap * {
display: table;
content: "";
}

.clearfix::after {
// sometimes required by .pull-right
display: table;
Expand All @@ -86,12 +87,6 @@ td.nowrap * {
margin-right: 5px;
}

.no-footer-modal {
.ant-modal-footer {
display: none;
}
}

.flex-container {
justify-content: space-between;
display: flex;
Expand Down Expand Up @@ -144,9 +139,11 @@ td.nowrap * {
.grabbing {
cursor: grabbing !important;
}

.grabbing * {
cursor: grabbing !important;
}

.is-dragging {
cursor: grabbing !important;
user-select: none;
Expand Down Expand Up @@ -180,4 +177,4 @@ td.nowrap * {
overflow-y: auto;
flex-shrink: 1;
}
}
}