mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-10 19:29:56 +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() {
|
render() {
|
||||||
const { query, isSubmitBtnActive } = this.state;
|
const { query, isSubmitBtnActive } = this.state;
|
||||||
|
|
||||||
@@ -264,7 +273,7 @@ class OrgGroupsSearchGroups extends Component {
|
|||||||
<Form tag={'div'}>
|
<Form tag={'div'}>
|
||||||
<FormGroup row>
|
<FormGroup row>
|
||||||
<Col sm={5}>
|
<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>
|
</Col>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<FormGroup row>
|
<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() {
|
render() {
|
||||||
const { query, isSubmitBtnActive } = this.state;
|
const { query, isSubmitBtnActive } = this.state;
|
||||||
|
|
||||||
@@ -166,7 +175,7 @@ class OrgUsersSearchUsers extends Component {
|
|||||||
<Form tag={'div'}>
|
<Form tag={'div'}>
|
||||||
<FormGroup row>
|
<FormGroup row>
|
||||||
<Col sm={5}>
|
<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>
|
</Col>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<FormGroup row>
|
<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() {
|
render() {
|
||||||
const { name, isSubmitBtnActive } = this.state;
|
const { name, isSubmitBtnActive } = this.state;
|
||||||
|
|
||||||
@@ -108,7 +117,7 @@ class SearchGroups extends Component {
|
|||||||
<FormGroup row>
|
<FormGroup row>
|
||||||
<Label for="name" sm={1}>{gettext('Name')}</Label>
|
<Label for="name" sm={1}>{gettext('Name')}</Label>
|
||||||
<Col sm={5}>
|
<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>
|
</Col>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<FormGroup row>
|
<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() {
|
render() {
|
||||||
const { query, isSubmitBtnActive } = this.state;
|
const { query, isSubmitBtnActive } = this.state;
|
||||||
return (
|
return (
|
||||||
@@ -104,7 +113,7 @@ class SearchOrgs extends Component {
|
|||||||
<FormGroup row>
|
<FormGroup row>
|
||||||
<Label for="name" sm={1}>{gettext('Name')}</Label>
|
<Label for="name" sm={1}>{gettext('Name')}</Label>
|
||||||
<Col sm={5}>
|
<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>
|
</Col>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<FormGroup row>
|
<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() {
|
render() {
|
||||||
const { name, isSubmitBtnActive } = this.state;
|
const { name, isSubmitBtnActive } = this.state;
|
||||||
return (
|
return (
|
||||||
@@ -96,7 +105,7 @@ class SearchRepos extends Component {
|
|||||||
<FormGroup row>
|
<FormGroup row>
|
||||||
<Label for="name" sm={1}>{gettext('Name or ID')}</Label>
|
<Label for="name" sm={1}>{gettext('Name or ID')}</Label>
|
||||||
<Col sm={5}>
|
<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>
|
</Col>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<FormGroup row>
|
<FormGroup row>
|
||||||
|
@@ -272,6 +272,15 @@ class SearchUsers extends Component {
|
|||||||
this.getItems(this.state.pageInfo.current_page + 1);
|
this.getItems(this.state.pageInfo.current_page + 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
handleKeyDown = (e) => {
|
||||||
|
if (e.keyCode === 13) {
|
||||||
|
const { isSubmitBtnActive } = this.state;
|
||||||
|
if (isSubmitBtnActive) {
|
||||||
|
this.getItems();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { query, isSubmitBtnActive } = this.state;
|
const { query, isSubmitBtnActive } = this.state;
|
||||||
const {
|
const {
|
||||||
@@ -301,7 +310,7 @@ class SearchUsers extends Component {
|
|||||||
<Form tag={'div'}>
|
<Form tag={'div'}>
|
||||||
<FormGroup row>
|
<FormGroup row>
|
||||||
<Col sm={5}>
|
<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>
|
</Col>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<FormGroup row>
|
<FormGroup row>
|
||||||
|
Reference in New Issue
Block a user