mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-10 03:11:07 +00:00
Merge branch '10.0'
This commit is contained in:
@@ -248,6 +248,15 @@ class OrgGroupsSearchGroups extends Component {
|
||||
});
|
||||
};
|
||||
|
||||
handleKeyDown = (e) => {
|
||||
if (e.keyCode === 13) {
|
||||
const { isSubmitBtnActive } = this.state;
|
||||
if (isSubmitBtnActive) {
|
||||
this.getItems();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { query, isSubmitBtnActive } = this.state;
|
||||
|
||||
@@ -264,7 +273,7 @@ class OrgGroupsSearchGroups extends Component {
|
||||
<Form tag={'div'}>
|
||||
<FormGroup row>
|
||||
<Col sm={5}>
|
||||
<Input type="text" name="query" value={query} placeholder={gettext('Search groups')} onChange={this.handleInputChange} />
|
||||
<Input type="text" name="query" value={query} placeholder={gettext('Search groups')} onChange={this.handleInputChange} onKeyDown={this.handleKeyDown} />
|
||||
</Col>
|
||||
</FormGroup>
|
||||
<FormGroup row>
|
||||
|
@@ -150,6 +150,15 @@ class OrgUsersSearchUsers extends Component {
|
||||
});
|
||||
};
|
||||
|
||||
handleKeyDown = (e) => {
|
||||
if (e.keyCode === 13) {
|
||||
const { isSubmitBtnActive } = this.state;
|
||||
if (isSubmitBtnActive) {
|
||||
this.getItems();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { query, isSubmitBtnActive } = this.state;
|
||||
|
||||
@@ -166,7 +175,7 @@ class OrgUsersSearchUsers extends Component {
|
||||
<Form tag={'div'}>
|
||||
<FormGroup row>
|
||||
<Col sm={5}>
|
||||
<Input type="text" name="query" value={query} placeholder={gettext('Search users')} onChange={this.handleInputChange} />
|
||||
<Input type="text" name="query" value={query} placeholder={gettext('Search users')} onChange={this.handleInputChange} onKeyDown={this.handleKeyDown} />
|
||||
</Col>
|
||||
</FormGroup>
|
||||
<FormGroup row>
|
||||
|
@@ -89,6 +89,15 @@ class SearchGroups extends Component {
|
||||
});
|
||||
};
|
||||
|
||||
handleKeyDown = (e) => {
|
||||
if (e.keyCode === 13) {
|
||||
const { isSubmitBtnActive } = this.state;
|
||||
if (isSubmitBtnActive) {
|
||||
this.getGroups();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { name, isSubmitBtnActive } = this.state;
|
||||
|
||||
@@ -108,7 +117,7 @@ class SearchGroups extends Component {
|
||||
<FormGroup row>
|
||||
<Label for="name" sm={1}>{gettext('Name')}</Label>
|
||||
<Col sm={5}>
|
||||
<Input type="text" name="name" id="name" value={name} onChange={this.handleNameInputChange} />
|
||||
<Input type="text" name="name" id="name" value={name} onChange={this.handleNameInputChange} onKeyDown={this.handleKeyDown} />
|
||||
</Col>
|
||||
</FormGroup>
|
||||
<FormGroup row>
|
||||
|
@@ -86,6 +86,15 @@ class SearchOrgs extends Component {
|
||||
});
|
||||
};
|
||||
|
||||
handleKeyDown = (e) => {
|
||||
if (e.keyCode === 13) {
|
||||
const { isSubmitBtnActive } = this.state;
|
||||
if (isSubmitBtnActive) {
|
||||
this.getItems();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { query, isSubmitBtnActive } = this.state;
|
||||
return (
|
||||
@@ -104,7 +113,7 @@ class SearchOrgs extends Component {
|
||||
<FormGroup row>
|
||||
<Label for="name" sm={1}>{gettext('Name')}</Label>
|
||||
<Col sm={5}>
|
||||
<Input type="text" name="query" id="name" value={query} onChange={this.handleInputChange} />
|
||||
<Input type="text" name="query" id="name" value={query} onChange={this.handleInputChange} onKeyDown={this.handleKeyDown} />
|
||||
</Col>
|
||||
</FormGroup>
|
||||
<FormGroup row>
|
||||
|
@@ -78,6 +78,15 @@ class SearchRepos extends Component {
|
||||
});
|
||||
};
|
||||
|
||||
handleKeyDown = (e) => {
|
||||
if (e.keyCode === 13) {
|
||||
const { isSubmitBtnActive } = this.state;
|
||||
if (isSubmitBtnActive) {
|
||||
this.searchRepos();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { name, isSubmitBtnActive } = this.state;
|
||||
return (
|
||||
@@ -96,7 +105,7 @@ class SearchRepos extends Component {
|
||||
<FormGroup row>
|
||||
<Label for="name" sm={1}>{gettext('Name or ID')}</Label>
|
||||
<Col sm={5}>
|
||||
<Input type="text" name="name" id="name" value={name} onChange={this.handleNameInputChange} />
|
||||
<Input type="text" name="name" id="name" value={name} onChange={this.handleNameInputChange} onKeyDown={this.handleKeyDown} />
|
||||
</Col>
|
||||
</FormGroup>
|
||||
<FormGroup row>
|
||||
|
@@ -272,6 +272,15 @@ class SearchUsers extends Component {
|
||||
this.getItems(this.state.pageInfo.current_page + 1);
|
||||
};
|
||||
|
||||
handleKeyDown = (e) => {
|
||||
if (e.keyCode === 13) {
|
||||
const { isSubmitBtnActive } = this.state;
|
||||
if (isSubmitBtnActive) {
|
||||
this.getItems();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { query, isSubmitBtnActive } = this.state;
|
||||
const {
|
||||
@@ -301,7 +310,7 @@ class SearchUsers extends Component {
|
||||
<Form tag={'div'}>
|
||||
<FormGroup row>
|
||||
<Col sm={5}>
|
||||
<Input type="text" name="query" value={query} placeholder={gettext('Search users')} onChange={this.handleInputChange} />
|
||||
<Input type="text" name="query" value={query} placeholder={gettext('Search users')} onChange={this.handleInputChange} onKeyDown={this.handleKeyDown} />
|
||||
</Col>
|
||||
</FormGroup>
|
||||
<FormGroup row>
|
||||
|
Reference in New Issue
Block a user