mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-21 19:37:28 +00:00
Improve variable name
This commit is contained in:
@@ -25,7 +25,7 @@ class CreateTagDialog extends React.Component {
|
||||
inputNewName = (e) => {
|
||||
this.setState({
|
||||
tagName: e.target.value,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
selectTagcolor = (e) => {
|
||||
@@ -34,7 +34,7 @@ class CreateTagDialog extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
createTag = () => {
|
||||
createTag = () => {
|
||||
let name = this.state.tagName;
|
||||
let color = this.state.tagColor;
|
||||
let repoID = this.props.repoID;
|
||||
@@ -46,7 +46,7 @@ class CreateTagDialog extends React.Component {
|
||||
handleKeyPress = (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
this.createTag();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
@@ -61,7 +61,7 @@ class CreateTagDialog extends React.Component {
|
||||
let colorList = this.state.colorList;
|
||||
return (
|
||||
<Fragment>
|
||||
<ModalHeader toggle={this.props.togglePopup}>
|
||||
<ModalHeader toggle={this.props.onClose}>
|
||||
<span className="tag-popup-back fas fa-sm fa-arrow-left" onClick={this.props.toggleCancel} aria-label={gettext('Back')}></span>
|
||||
{gettext('New Tag')}
|
||||
</ModalHeader>
|
||||
@@ -79,7 +79,7 @@ class CreateTagDialog extends React.Component {
|
||||
return (
|
||||
<div key={index} className="col-auto" onChange={this.selectTagcolor}>
|
||||
<label className="colorinput">
|
||||
{index===0 ?
|
||||
{index===0 ?
|
||||
<input name="color" type="radio" value={item} className="colorinput-input" defaultChecked onClick={this.selectTagcolor}></input> :
|
||||
<input name="color" type="radio" value={item} className="colorinput-input" onClick={this.selectTagcolor}></input>}
|
||||
<span className={className}></span>
|
||||
|
@@ -45,7 +45,7 @@ class ListTaggedFilesDialog extends React.Component {
|
||||
let taggedFileList = this.state.taggedFileList;
|
||||
return (
|
||||
<Fragment>
|
||||
<ModalHeader toggle={this.props.togglePopup}>
|
||||
<ModalHeader toggle={this.props.onClose}>
|
||||
<span className="tag-popup-back fas fa-sm fa-arrow-left" onClick={this.props.toggleCancel} aria-label={gettext('Back')}></span>
|
||||
{gettext('Tagged Files')}
|
||||
</ModalHeader>
|
||||
|
@@ -40,7 +40,7 @@ class UpdateTagDialog extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
updateTag = () => {
|
||||
updateTag = () => {
|
||||
let tag_id = this.props.currentTag.id;
|
||||
let name = this.state.newName;
|
||||
let color = this.state.newColor;
|
||||
@@ -53,7 +53,7 @@ class UpdateTagDialog extends React.Component {
|
||||
handleKeyPress = (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
this.updateTag();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
deleteTagClick = (item) => {
|
||||
@@ -74,7 +74,7 @@ class UpdateTagDialog extends React.Component {
|
||||
let colorList = this.state.colorList;
|
||||
return (
|
||||
<Fragment>
|
||||
<ModalHeader toggle={this.props.togglePopup}>
|
||||
<ModalHeader toggle={this.props.onClose}>
|
||||
<span className="tag-popup-back fas fa-sm fa-arrow-left" onClick={this.props.toggleCancel} aria-label={gettext('Back')}></span>
|
||||
{gettext('Edit Tag')}
|
||||
</ModalHeader>
|
||||
@@ -92,7 +92,7 @@ class UpdateTagDialog extends React.Component {
|
||||
return (
|
||||
<div key={index} className="col-auto" onChange={this.selectNewcolor}>
|
||||
<label className="colorinput">
|
||||
{item===this.props.currentTag.color ?
|
||||
{item===this.props.currentTag.color ?
|
||||
<input name="color" type="radio" value={item} className="colorinput-input" defaultChecked onChange={this.selectNewcolor}></input> :
|
||||
<input name="color" type="radio" value={item} className="colorinput-input" onChange={this.selectNewcolor}></input>}
|
||||
<span className={className}></span>
|
||||
|
Reference in New Issue
Block a user