diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-08-29 11:38:53 +0200 |
---|---|---|
committer | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-09-13 13:53:58 +0200 |
commit | 793e86fce66f356099792b7231c9a1d949ff875e (patch) | |
tree | 8bd08099539c3cb1ff159823ee1d1f74a5f2c979 /server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.js | |
parent | 736e89cc1629e1e52db00f67e4650f1b88695de9 (diff) | |
download | sonarqube-793e86fce66f356099792b7231c9a1d949ff875e.tar.gz sonarqube-793e86fce66f356099792b7231c9a1d949ff875e.zip |
update prettier
Diffstat (limited to 'server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.js')
-rw-r--r-- | server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.js | 78 |
1 files changed, 38 insertions, 40 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.js b/server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.js index a0ce352c35b..c1202812707 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.js +++ b/server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.js @@ -226,63 +226,64 @@ export default class BulkChangeModal extends React.PureComponent { })); } - renderCancelButton = () => + renderCancelButton = () => ( <a id="bulk-change-cancel" href="#" onClick={this.handleCloseClick}> {translate('cancel')} - </a>; + </a> + ); - renderLoading = () => + renderLoading = () => ( <div> <div className="modal-head"> - <h2> - {translate('bulk_change')} - </h2> + <h2>{translate('bulk_change')}</h2> </div> <div className="modal-body"> <div className="text-center"> <i className="spinner spinner-margin" /> </div> </div> - <div className="modal-foot"> - {this.renderCancelButton()} - </div> - </div>; + <div className="modal-foot">{this.renderCancelButton()}</div> + </div> + ); - renderCheckbox = (field /*: string */) => - <Checkbox checked={this.state[field] != null} onCheck={this.handleFieldCheck(field)} />; + renderCheckbox = (field /*: string */) => ( + <Checkbox checked={this.state[field] != null} onCheck={this.handleFieldCheck(field)} /> + ); - renderAffected = (affected /*: number */) => + renderAffected = (affected /*: number */) => ( <div className="pull-right note"> ({translateWithParameters('issue_bulk_change.x_issues', affected)}) - </div>; + </div> + ); renderField = ( field /*: string */, label /*: string */, affected /*: ?number */, input /*: Object */ - ) => + ) => ( <div className="modal-field" id={`issues-bulk-change-${field}`}> - <label htmlFor={field}> - {translate(label)} - </label> + <label htmlFor={field}>{translate(label)}</label> {this.renderCheckbox(field)} {input} {affected != null && this.renderAffected(affected)} - </div>; + </div> + ); - renderAssigneeOption = (option /*: { avatar?: string, email?: string, label: string } */) => + renderAssigneeOption = (option /*: { avatar?: string, email?: string, label: string } */) => ( <span> - {(option.avatar != null || option.email != null) && + {(option.avatar != null || option.email != null) && ( <Avatar className="little-spacer-right" email={option.email} hash={option.avatar} name={option.label} size={16} - />} + /> + )} {option.label} - </span>; + </span> + ); renderAssigneeField = () => { const affected /*: number */ = this.state.issues.filter(hasAction('assign')).length; @@ -315,11 +316,12 @@ export default class BulkChangeModal extends React.PureComponent { const types = ['BUG', 'VULNERABILITY', 'CODE_SMELL']; const options = types.map(type => ({ label: translate('issue.type', type), value: type })); - const optionRenderer = (option /*: { label: string, value: string } */) => + const optionRenderer = (option /*: { label: string, value: string } */) => ( <span> <IssueTypeIcon className="little-spacer-right" query={option.value} /> {option.label} - </span>; + </span> + ); const input = ( <Select @@ -423,10 +425,8 @@ export default class BulkChangeModal extends React.PureComponent { return ( <div className="modal-field"> - <label> - {translate('issue.transition')} - </label> - {transitions.map(transition => + <label>{translate('issue.transition')}</label> + {transitions.map(transition => ( <span key={transition.transition}> <input checked={this.state.transition === transition.transition} @@ -444,7 +444,7 @@ export default class BulkChangeModal extends React.PureComponent { {this.renderAffected(transition.count)} <br /> </span> - )} + ))} </div> ); }; @@ -480,13 +480,12 @@ export default class BulkChangeModal extends React.PureComponent { ); }; - renderNotificationsField = () => + renderNotificationsField = () => ( <div className="modal-field"> - <label htmlFor="send-notifications"> - {translate('issue.send_notifications')} - </label> + <label htmlFor="send-notifications">{translate('issue.send_notifications')}</label> {this.renderCheckbox('notifications')} - </div>; + </div> + ); renderForm = () => { const { issues, paging, submitting } = this.state; @@ -497,16 +496,15 @@ export default class BulkChangeModal extends React.PureComponent { return ( <form id="bulk-change-form" onSubmit={this.handleSubmit}> <div className="modal-head"> - <h2> - {translateWithParameters('issue_bulk_change.form.title', issues.length)} - </h2> + <h2>{translateWithParameters('issue_bulk_change.form.title', issues.length)}</h2> </div> <div className="modal-body"> - {limitReached && + {limitReached && ( <div className="alert alert-warning"> {translateWithParameters('issue_bulk_change.max_issues_reached', issues.length)} - </div>} + </div> + )} {this.renderAssigneeField()} {this.renderTypeField()} |