mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 15:53:28 +00:00
change select editor custom style (#7060)
* change select editor custom style * change add permission
This commit is contained in:
@@ -43,20 +43,26 @@ class SelectEditor extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setOptions = () => {
|
setOptions = () => {
|
||||||
|
const { enableAddCustomPermission, options } = this.props;
|
||||||
this.options = [];
|
this.options = [];
|
||||||
const options = this.props.options;
|
|
||||||
for (let i = 0, length = options.length; i < length; i++) {
|
for (let i = 0, length = options.length; i < length; i++) {
|
||||||
let option = {};
|
let option = {};
|
||||||
option.value = options[i];
|
option.value = options[i];
|
||||||
if (!options[i].length) { // it's ''. for example, intitution option in 'system admin - users' page can be ''.
|
if (!options[i].length) { // it's ''. for example, intitution option in 'system admin - users' page can be ''.
|
||||||
option.label = <div style={{ minHeight: '1em' }}></div>;
|
option.label = <div style={{ minHeight: '1em' }}></div>;
|
||||||
} else {
|
} else {
|
||||||
option.label = <div>{this.props.translateOption(options[i])}{ this.props.translateExplanation && <div className="permission-editor-explanation">{this.props.translateExplanation(options[i])}</div>}</div>;
|
option.label = (
|
||||||
|
<div>
|
||||||
|
{this.props.translateOption(options[i])}
|
||||||
|
{this.props.translateExplanation &&
|
||||||
|
<div className="permission-editor-explanation">{this.props.translateExplanation(options[i])}</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
this.options.push(option);
|
this.options.push(option);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { enableAddCustomPermission } = this.props;
|
|
||||||
if (enableAddCustomPermission && !this.props.isWiki) {
|
if (enableAddCustomPermission && !this.props.isWiki) {
|
||||||
const option = {
|
const option = {
|
||||||
value: gettext('Add custom permission'),
|
value: gettext('Add custom permission'),
|
||||||
|
@@ -54,9 +54,11 @@
|
|||||||
padding: .5rem 0;
|
padding: .5rem 0;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 13px;
|
line-height: 13px;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #212529;
|
||||||
}
|
}
|
||||||
|
|
||||||
.permission-editor-btn-add-custom-permission .fa {
|
.permission-editor-btn-add-custom-permission .sf3-font {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 13px;
|
line-height: 13px;
|
||||||
margin-right: .25rem;
|
margin-right: .25rem;
|
||||||
|
Reference in New Issue
Block a user