Removing additional js files

This commit is contained in:
Romaric Mourgues
2023-04-20 11:52:18 +02:00
parent c515d5bad7
commit c4cd108a51
44 changed files with 29 additions and 3596 deletions
@@ -1,118 +0,0 @@
import React, { Component } from 'react';
import Icon from '@components/icon/icon.jsx';
import PerfectScrollbar from 'react-perfect-scrollbar';
import Tabs from 'components/tabs/tabs.jsx';
import './deprecated-object-modal.scss';
import { Divider } from 'antd';
export class ObjectModalTitle extends Component {
render() {
return (
<div className={'modal_title ' + this.props.className} style={this.props.style}>
{this.props.children}
</div>
);
}
}
//ObjectModalSeparator
export class ObjectModalSeparator extends Component {
render() {
return <div className="separator"></div>;
}
}
//ObjectModalSectionTitle
export class ObjectModalSectionTitle extends Component {
render() {
return (
<div
style={{
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
marginBottom: this.props.smallMargin ? '16px' : '',
}}
>
<b>{this.props.title || this.props.children}</b>
<div>{this.props.action}</div>
</div>
);
}
}
// ObjectModalFormTitle
export class ObjectModalFormTitle extends Component {
render() {
return (
<div className={'section_title ' + this.props.className} style={this.props.style}>
{this.props.icon && <Icon type={this.props.icon} className="m-icon-small" />}
<span>{this.props.name}</span>
</div>
);
}
}
export class ObjectModal extends Component {
constructor(props) {
super();
this.state = {};
}
render() {
return (
<div className={'object_modal ' + this.props.className}>
<div className="top_right_buttons">
{this.props.onEdit && (
<div className="square_button" onClick={this.props.onEdit}>
<Icon type="edit-alt" className="m-icon-small" />
</div>
)}
{this.props.onClose && (
<div className="square_button" onClick={this.props.onClose}>
<Icon type="times" className="m-icon-small" />
</div>
)}
</div>
<div className={!this.props.noCloseButton ? 'title' : ''}>{this.props.title}</div>
{this.props.tabs && (
<Tabs
tabs={this.props.tabs.map(item => {
return {
title: item.title || '',
render: (
<div className="body">
<PerfectScrollbar options={{ suppressScrollX: true }} component="div">
{item.render}
</PerfectScrollbar>
</div>
),
};
})}
/>
)}
{!this.props.tabs && (
<div className="body">
{!!this.props.noScrollBar && (
<div className="child-with-margin">{this.props.children}</div>
)}
{!this.props.noScrollBar && (
<PerfectScrollbar options={{ suppressScrollX: true }} component="div">
{this.props.children}
</PerfectScrollbar>
)}
</div>
)}
{this.props.footer && <div className="separator" style={{ marginTop: 0 }} />}
{this.props.footer && (
<div className="footer bottom-margin">
<Divider />
<div className="x-margin">{this.props.footer}</div>
</div>
)}
</div>
);
}
}
@@ -1,64 +0,0 @@
.object_modal {
position: relative;
display: flex;
flex-direction: column;
margin-bottom: 24px;
& > .title {
padding-right: 56px;
margin: 16px 0 11px 16px;
}
& > .top_right_buttons {
position: absolute;
top: 16px;
right: 16px;
left: 16px;
text-align: right;
.square_button {
vertical-align: top;
display: inline-block;
width: 24px;
height: 24px;
line-height: 24px;
border-radius: var(--border-radius-base);
margin-left: 8px;
background: var(--grey-background);
cursor: pointer;
&:hover {
background: var(--primary-background);
}
}
}
& > .body {
margin: 0 0;
.scrollbar-container,
.child-with-margin {
padding: 16px;
max-height: calc(80vh - 200px);
}
}
.modal_title {
font-size: 24px;
color: var(--black);
}
}
.section_title {
color: var(--grey-dark);
font-size: 14px;
font-weight: 500;
margin-bottom: 8px;
margin-top: 24px;
i {
margin-right: 4px;
&:before {
margin-left: 0px;
}
}
}