font-size: var(--smallFontSize);
}
-.search-navigator-workspace-header .button-group,
-.search-navigator-workspace-header .button-group > button,
-.search-navigator-workspace-header .button-group > .button {
- vertical-align: top;
-}
-
.search-navigator-header-component {
margin-left: 10px;
white-space: nowrap;
vertical-align: middle;
margin-right: 20px;
font-size: var(--smallFontSize);
- height: 22px;
- line-height: 18px;
+ height: var(--controlHeight);
+ line-height: var(--controlHeight);
}
.coding-rules-detail-property .select2-search-field {
{{#if isEditable}}
<div class="coding-rules-detail-description">
- <div class="button-group">
- <button class="js-edit-custom" id="coding-rules-detail-custom-rule-change">{{t 'edit'}}</button>
- <button class="button-red js-delete" id="coding-rules-detail-rule-delete" class="button-red">{{t 'delete'}}</button>
- </div>
+ <button class="js-edit-custom" id="coding-rules-detail-custom-rule-change">{{t 'edit'}}</button>
+ <button class="button-red js-delete" id="coding-rules-detail-rule-delete" class="button-red">{{t 'delete'}}</button>
</div>
{{/if}}
{{#if canEditQualityProfile}}
{{#unless isSelectedProfileBuiltIn}}
<td class="coding-rule-table-meta-cell coding-rule-activation-actions">
- <div class="button-group">
- {{#if activation}}
- <button class="coding-rules-detail-quality-profile-deactivate button-red"
- {{#notEq activation.inherit 'NONE'}}disabled title="{{t 'coding_rules.can_not_deactivate'}}"{{/notEq}}>
- {{t 'coding_rules.deactivate'}}
- </button>
- {{else}}
- {{#unless isTemplate}}
- <button class="coding-rules-detail-quality-profile-activate">{{t 'coding_rules.activate'}}</button>
- {{/unless}}
- {{/if}}
- </div>
+ {{#if activation}}
+ <button class="coding-rules-detail-quality-profile-deactivate button-red"
+ {{#notEq activation.inherit 'NONE'}}disabled title="{{t 'coding_rules.can_not_deactivate'}}"{{/notEq}}>
+ {{t 'coding_rules.deactivate'}}
+ </button>
+ {{else}}
+ {{#unless isTemplate}}
+ <button class="coding-rules-detail-quality-profile-activate">{{t 'coding_rules.activate'}}</button>
+ {{/unless}}
+ {{/if}}
</td>
{{/unless}}
{{/if}}
{{#if canDeleteCustomRule}}
<td class="coding-rules-detail-list-actions">
- <div class="button-group">
- <button class="js-delete-custom-rule button-red">
- {{t 'delete'}}
- </button>
- </div>
+ <button class="js-delete-custom-rule button-red">
+ {{t 'delete'}}
+ </button>
</td>
{{/if}}
<h3 class="coding-rules-detail-title">{{t 'coding_rules.custom_rules'}}</h3>
{{#if canCreateCustomRule}}
- <div class="button-group coding-rules-detail-quality-profiles-activation">
- <button class="js-create-custom-rule">{{t 'coding_rules.create'}}</button>
- </div>
+ <button class="js-create-custom-rule spacer-left">{{t 'coding_rules.create'}}</button>
{{/if}}
+
<table id="coding-rules-detail-custom-rules" class="coding-rules-detail-list"></table>
</div>
<div class="rule-desc spacer-bottom markdown">{{{htmlNote}}}</div>
{{/if}}
{{#if canCustomizeRule}}
- <div class="button-group">
- <button id="coding-rules-detail-extend-description">{{t 'coding_rules.extend_description'}}</button>
- </div>
+ <button id="coding-rules-detail-extend-description">{{t 'coding_rules.extend_description'}}</button>
{{/if}}
</div>
</tr>
<tr>
<td>
- <div class="button-group">
- <button id="coding-rules-detail-extend-description-submit">{{t 'save'}}</button>
- {{#if mdNote}}
- <button id="coding-rules-detail-extend-description-remove"
- class="button-red">{{t 'remove'}}</button>
- {{/if}}
- </div>
- <a id="coding-rules-detail-extend-description-cancel" class="action">{{t 'cancel'}}</a>
+ <button id="coding-rules-detail-extend-description-submit">{{t 'save'}}</button>
+ {{#if mdNote}}
+ <button id="coding-rules-detail-extend-description-remove" class="button-red">{{t 'remove'}}</button>
+ {{/if}}
+ <a id="coding-rules-detail-extend-description-cancel" class="spacer-left">{{t 'cancel'}}</a>
</td>
<td class="text-right">
{{> '../../../../components/common/templates/_markdown-tips' }}
<span>{{join sysTags ', '}}</span>{{/if}}
<input class="coding-rules-detail-tag-input" type="text" value="{{#if tags}}{{join tags ','}}{{/if}}">
- <div class="button-group">
- <button class="coding-rules-detail-tag-edit-done">{{t 'Done'}}</button>
- </div>
- <a class="coding-rules-details-tag-edit-cancel">{{t 'cancel'}}</a>
+ <button class="coding-rules-detail-tag-edit-done text-middle">{{t 'Done'}}</button>
+ <a class="coding-rules-details-tag-edit-cancel spacer-left">{{t 'cancel'}}</a>
</li>
{{/if}}
</td>
{{/unless}}
- {{#if actions.edit}}
- {{#unless isBuiltIn}}
- <td class="coding-rules-detail-quality-profile-actions">
- <div class="button-group">
- {{#unless isTemplate}}
- <button class="coding-rules-detail-quality-profile-change">{{t 'change_verb'}}</button>
- {{/unless}}
- {{#if parent}}
- {{#eq inherit 'OVERRIDES'}}
- <button class="coding-rules-detail-quality-profile-revert button-red">
- {{t 'coding_rules.revert_to_parent_definition'}}
- </button>
- {{/eq}}
- {{else}}
- <button class="coding-rules-detail-quality-profile-deactivate button-red">
- {{t 'coding_rules.deactivate'}}
+ <td class="coding-rules-detail-quality-profile-actions">
+ {{#if actions.edit}}
+ {{#unless isBuiltIn}}
+ {{#unless isTemplate}}
+ <button class="coding-rules-detail-quality-profile-change">{{t 'change_verb'}}</button>
+ {{/unless}}
+ {{#if parent}}
+ {{#eq inherit 'OVERRIDES'}}
+ <button class="coding-rules-detail-quality-profile-revert button-red">
+ {{t 'coding_rules.revert_to_parent_definition'}}
</button>
- {{/if}}
- </div>
- </td>
- {{/unless}}
- {{/if}}
+ {{/eq}}
+ {{else}}
+ <button class="coding-rules-detail-quality-profile-deactivate button-red">
+ {{t 'coding_rules.deactivate'}}
+ </button>
+ {{/if}}
+ {{/unless}}
+ {{/if}}
+ </td>
{{else}}
{{#if canWrite}}{{#unless isTemplate}}
<td class="coding-rules-detail-quality-profile-actions">
- <div class="button-group">
- <button class="coding-rules-detail-quality-profile-activate">{{t 'coding_rules.activate'}}</button>
- </div>
+ <button class="coding-rules-detail-quality-profile-activate">{{t 'coding_rules.activate'}}</button>
</td>
{{/unless}}{{/if}}
{{/if}}
{{#if canActivate}}
{{#unless isTemplate}}
- <div class="button-group coding-rules-detail-quality-profiles-activation">
- <button id="coding-rules-quality-profile-activate">{{t 'coding_rules.activate'}}</button>
- </div>
+ <button id="coding-rules-quality-profile-activate" class="spacer-left">{{t 'coding_rules.activate'}}</button>
{{/unless}}
{{/if}}
<header class="page-header">
<h1 class="page-title">{{t 'custom_measures.page'}}</h1>
<div class="page-actions">
- <div class="button-group">
- <button id="custom-measures-create">{{t 'create'}}</button>
- </div>
+ <button id="custom-measures-create">{{t 'create'}}</button>
</div>
<p class="page-description">{{t 'custom_measures.page.description'}}</p>
</header>
<h1 class="page-title">{{t 'user_groups.page'}}</h1>
<i class="spinner hidden"></i>
<div class="page-actions">
- <div class="button-group">
- <button id="groups-create">{{t 'groups.create_group'}}</button>
- </div>
+ <button id="groups-create">{{t 'groups.create_group'}}</button>
</div>
<p class="page-description">{{t 'user_groups.page.description'}}</p>
</header>
{isPluginInstalled(plugin) &&
plugin.updates &&
plugin.updates.length > 0 && (
- <div className="spacer-top button-group">
+ <div className="spacer-top">
{plugin.updates.map((update, idx) => (
<PluginUpdateButton
key={idx}
<header class="page-header">
<h1 class="page-title">{{t 'custom_metrics.page'}}</h1>
<div class="page-actions">
- <div class="button-group">
- <button id="metrics-create">{{t 'custom_metrics.create_metric'}}</button>
- </div>
+ <button id="metrics-create">{{t 'custom_metrics.create_metric'}}</button>
</div>
<p class="page-description">{{t 'custom_metrics.page.description'}}</p>
</header>
<MembersPageHeader loading={status.loading} total={status.total}>
{organization.canAdmin && (
<div className="page-actions">
- <div className="button-group">
- <AddMemberForm
- addMember={this.addMember}
- organization={organization}
- memberLogins={this.props.memberLogins}
- />
- </div>
+ <AddMemberForm
+ addMember={this.addMember}
+ organization={organization}
+ memberLogins={this.props.memberLogins}
+ />
</div>
)}
</MembersPageHeader>
<div
className="page-actions"
>
- <div
- className="button-group"
- >
- <AddMemberForm
- addMember={[Function]}
- organization={
- Object {
- "canAdmin": true,
- "key": "foo",
- "name": "Foo",
- }
+ <AddMemberForm
+ addMember={[Function]}
+ organization={
+ Object {
+ "canAdmin": true,
+ "key": "foo",
+ "name": "Foo",
}
- />
- </div>
+ }
+ />
</div>
</MembersPageHeader>
<MembersListHeader
onChange={this.handleInputChange}
/>
- <div className="button-group">
- <button disabled={!hasChanged} onClick={this.handleUpdateClick}>
- {translate('update_verb')}
- </button>
+ <button disabled={!hasChanged} onClick={this.handleUpdateClick}>
+ {translate('update_verb')}
+ </button>
- <button disabled={!hasChanged} onClick={this.handleResetClick}>
- {translate('reset_verb')}
- </button>
- </div>
+ <button className="spacer-left" disabled={!hasChanged} onClick={this.handleResetClick}>
+ {translate('reset_verb')}
+ </button>
</div>
);
}
padding-right: 10px;
}
-.projects-facet-sort {
- float: right;
- font-weight: normal;
- font-size: 11px;
- color: var(--secondFontColor);
- text-transform: lowercase;
-}
-
-.projects-facet-sort .button-group {
- margin-top: -3px;
-}
-
-.projects-facet-sort .button-small {
- padding: 0 6px;
- font-size: 11px;
- font-weight: normal;
-}
-
.projects-facets-header {
margin-bottom: 10px;
padding: 10px 0;
componentDidMount() {
const { condition } = this.props;
- if (!condition.id) {
- this.refs.operator.focus();
+ // TODO looks like `this.opetator` is always null or undefined
+ if (!condition.id && this.operator) {
+ this.operator.focus();
}
}
this.setState({ changed: true });
}
- handleOperatorChange(option) {
- const { value } = option;
+ handleOperatorChange = ({ value }) => {
this.setState({ changed: true, op: value });
- }
+ };
handlePeriodChange(checked) {
const period = checked ? '1' : undefined;
this.setState({ changed: true, error: value });
}
- handleSaveClick(e) {
+ handleSaveClick = e => {
const { qualityGate, condition, metric, onSaveCondition, onError, onResetError } = this.props;
- const period = this.state.period;
+ const { period } = this.state;
const data = {
metric: condition.metric,
op: metric.type === 'RATING' ? 'GT' : this.state.op,
onResetError();
})
.catch(onError);
- }
+ };
- handleUpdateClick(e) {
+ handleUpdateClick = e => {
const { condition, onSaveCondition, metric, onError, onResetError } = this.props;
- const period = this.state.period;
+ const { period } = this.state;
const data = {
id: condition.id,
metric: condition.metric,
onResetError();
})
.catch(onError);
- }
+ };
- handleDeleteClick(e) {
+ handleDeleteClick = e => {
const { qualityGate, condition, metric, onDeleteCondition } = this.props;
e.preventDefault();
metric,
onDelete: () => onDeleteCondition(condition)
}).render();
- }
+ };
- handleCancelClick(e) {
+ handleCancelClick = e => {
const { condition, onDeleteCondition } = this.props;
e.preventDefault();
onDeleteCondition(condition);
- }
+ };
renderPeriodValue() {
const { condition, metric } = this.props;
return (
<Select
- ref="operator"
+ ref={node => (this.operator = node)}
className="input-medium"
name="operator"
value={this.state.op}
clearable={false}
searchable={false}
options={operatorOptions}
- onChange={this.handleOperatorChange.bind(this)}
+ onChange={this.handleOperatorChange}
/>
);
}
{edit && (
<td className="thin text-middle nowrap">
{condition.id ? (
- <div className="button-group">
+ <div>
<button
className="update-condition"
disabled={!this.state.changed}
- onClick={this.handleUpdateClick.bind(this)}>
+ onClick={this.handleUpdateClick}>
{translate('update_verb')}
</button>
<button
- className="button-red delete-condition"
- onClick={this.handleDeleteClick.bind(this)}>
+ className="button-red delete-condition little-spacer-left"
+ onClick={this.handleDeleteClick}>
{translate('delete')}
</button>
</div>
) : (
- <div className="button-group">
- <button className="add-condition" onClick={this.handleSaveClick.bind(this)}>
+ <div>
+ <button className="add-condition" onClick={this.handleSaveClick}>
{translate('add_verb')}
</button>
<a
- className="action cancel-add-condition"
+ className="cancel-add-condition spacer-left"
href="#"
- onClick={this.handleCancelClick.bind(this)}>
+ onClick={this.handleCancelClick}>
{translate('cancel')}
</a>
</div>
<h2 className="pull-left">{qualityGate.name}</h2>
{edit && (
<div className="pull-right">
- <div className="button-group">
- <button id="quality-gate-rename" onClick={this.handleRenameClick}>
- {translate('rename')}
- </button>
- <button id="quality-gate-copy" onClick={this.handleCopyClick}>
- {translate('copy')}
- </button>
- <button id="quality-gate-toggle-default" onClick={this.handleSetAsDefaultClick}>
- {qualityGate.isDefault
- ? translate('unset_as_default')
- : translate('set_as_default')}
- </button>
- <button
- id="quality-gate-delete"
- className="button-red"
- onClick={this.handleDeleteClick}>
- {translate('delete')}
- </button>
- </div>
+ <button id="quality-gate-rename" onClick={this.handleRenameClick}>
+ {translate('rename')}
+ </button>
+ <button
+ className="little-spacer-left"
+ id="quality-gate-copy"
+ onClick={this.handleCopyClick}>
+ {translate('copy')}
+ </button>
+ <button
+ className="little-spacer-left"
+ id="quality-gate-toggle-default"
+ onClick={this.handleSetAsDefaultClick}>
+ {qualityGate.isDefault
+ ? translate('unset_as_default')
+ : translate('set_as_default')}
+ </button>
+ <button
+ id="quality-gate-delete"
+ className="little-spacer-left button-red"
+ onClick={this.handleDeleteClick}>
+ {translate('delete')}
+ </button>
</div>
)}
</div>
<h1 className="page-title">{translate('quality_gates.page')}</h1>
{canEdit && (
<div className="page-actions">
- <div className="button-group">
- <button id="quality-gate-add" onClick={handleAddClick}>
- {translate('create')}
- </button>
- </div>
+ <button id="quality-gate-add" onClick={handleAddClick}>
+ {translate('create')}
+ </button>
</div>
)}
</header>
<h1 className="page-title">{translate('quality_profiles.page')}</h1>
{this.props.actions.create && (
- <div className="page-actions button-group dropdown">
+ <div className="page-actions">
<button id="quality-profiles-create" onClick={this.handleCreateClick}>
{translate('create')}
</button>
- <button className="dropdown-toggle js-more-admin-actions" data-toggle="dropdown">
- <i className="icon-dropdown" />
+ <button
+ className="little-spacer-left"
+ id="quality-profiles-restore"
+ onClick={this.handleRestoreClick}>
+ {translate('restore')}
</button>
- <ul className="dropdown-menu dropdown-menu-right">
- <li>
- <a href="#" id="quality-profiles-restore" onClick={this.handleRestoreClick}>
- {translate('quality_profiles.restore_profile')}
- </a>
- </li>
- </ul>
</div>
)}
<h1 class="page-title">{{t 'users.page'}}</h1>
<i class="spinner hidden"></i>
<div class="page-actions">
- <div class="button-group">
- <button id="users-create">{{t 'users.create_user'}}</button>
- </div>
+ <button id="users-create">{{t 'users.create_user'}}</button>
</div>
<p class="page-description">{{t 'users.page.description'}}</p>
</header>