aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx')
-rw-r--r--server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx27
1 files changed, 12 insertions, 15 deletions
diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx
index 6e3fa3d02ac..c2df72d6bef 100644
--- a/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx
+++ b/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx
@@ -30,6 +30,7 @@ import Tooltip from '../../components/controls/Tooltip';
import DateInput from '../../components/controls/DateInput';
import Select from '../../components/controls/Select';
import SearchBox from '../../components/controls/SearchBox';
+import { Button } from '../../components/ui/buttons';
export interface Props {
analyzedBefore?: string;
@@ -76,9 +77,7 @@ export default class Search extends React.PureComponent<Props, State> {
}
};
- handleDeleteClick = (event: React.SyntheticEvent<HTMLButtonElement>) => {
- event.preventDefault();
- event.currentTarget.blur();
+ handleDeleteClick = () => {
this.setState({ deleteModal: true });
};
@@ -91,9 +90,7 @@ export default class Search extends React.PureComponent<Props, State> {
this.props.onDeleteProjects();
};
- handleBulkApplyTemplateClick = (event: React.SyntheticEvent<HTMLButtonElement>) => {
- event.preventDefault();
- event.currentTarget.blur();
+ handleBulkApplyTemplateClick = () => {
this.setState({ bulkApplyTemplateModal: true });
};
@@ -115,8 +112,8 @@ export default class Search extends React.PureComponent<Props, State> {
<Checkbox
checked={checked}
id="projects-selection"
- thirdState={thirdState}
onCheck={this.onCheck}
+ thirdState={thirdState}
/>
);
};
@@ -139,13 +136,13 @@ export default class Search extends React.PureComponent<Props, State> {
className="input-medium"
clearable={false}
disabled={!this.props.ready}
+ name="projects-qualifier"
+ onChange={this.handleQualifierChange}
optionRenderer={this.renderQualifierOption}
options={this.getQualifierOptions()}
+ searchable={false}
value={this.props.qualifiers}
valueRenderer={this.renderQualifierOption}
- name="projects-qualifier"
- onChange={this.handleQualifierChange}
- searchable={false}
/>
</td>
);
@@ -155,8 +152,8 @@ export default class Search extends React.PureComponent<Props, State> {
this.props.qualifiers === 'TRK' ? (
<td className="thin nowrap text-middle">
<Checkbox
- className="link-checkbox-control"
checked={this.props.provisioned}
+ className="link-checkbox-control"
id="projects-provisioned"
onCheck={this.props.onProvisionedChanged}>
<span className="little-spacer-left">
@@ -204,19 +201,19 @@ export default class Search extends React.PureComponent<Props, State> {
/>
</td>
<td className="thin nowrap text-middle">
- <button
+ <Button
className="js-bulk-apply-permission-template"
disabled={this.props.total === 0}
onClick={this.handleBulkApplyTemplateClick}>
{translate('permission_templates.bulk_apply_permission_template')}
- </button>
+ </Button>
{this.props.qualifiers === 'TRK' && (
- <button
+ <Button
className="js-delete spacer-left button-red"
disabled={this.props.total === 0}
onClick={this.handleDeleteClick}>
{translate('delete')}
- </button>
+ </Button>
)}
</td>
</tr>