mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-18 08:20:13 +01:00
fix(dashboard\todo\checkbox): checkboxes was rendering uncorrectly
This commit is contained in:
parent
386b1dc216
commit
743dc38f72
10 changed files with 80 additions and 85 deletions
|
|
@ -1,10 +1,10 @@
|
||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {BaMultiCheckbox} from '../../../../../../theme/components';
|
import {BaMultiCheckbox, BaCheckbox} from '../../../../../../theme/components';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'checkbox-inputs',
|
selector: 'checkbox-inputs',
|
||||||
template: require('./checkboxInputs.html'),
|
template: require('./checkboxInputs.html'),
|
||||||
directives: [BaMultiCheckbox]
|
directives: [BaMultiCheckbox, BaCheckbox]
|
||||||
})
|
})
|
||||||
export class CheckboxInputs {
|
export class CheckboxInputs {
|
||||||
public checkboxModel = [{
|
public checkboxModel = [{
|
||||||
|
|
@ -27,7 +27,7 @@ export class CheckboxInputs {
|
||||||
label: 'name',
|
label: 'name',
|
||||||
baCheckboxClass: 'class'
|
baCheckboxClass: 'class'
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="checkbox disabled">
|
<ba-checkbox [(ngModel)]="isDisabled" [baCheckboxClass]="'disabled'" [label]="'Disabled checkbox'" [disabled]="true"></ba-checkbox>
|
||||||
<ba-checkbox [label]="'Disabled checkbox'" [disabled]="true"></ba-checkbox>
|
|
||||||
</div>
|
|
||||||
<div class="radio disabled">
|
<div class="radio disabled">
|
||||||
<label class="custom-radio nowrap">
|
<label class="custom-radio nowrap">
|
||||||
<input type="radio" name="optionsRadios" id="optionsRadios3" value="option3" disabled>
|
<input type="radio" name="optionsRadios" id="optionsRadios3" value="option3" disabled>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
|
import {BaCheckbox} from '../../../../../../theme/components';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'basic-form',
|
selector: 'basic-form',
|
||||||
|
directives: [BaCheckbox],
|
||||||
template: require('./basicForm.html'),
|
template: require('./basicForm.html'),
|
||||||
})
|
})
|
||||||
export class BasicForm {
|
export class BasicForm {
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,7 @@
|
||||||
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
|
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label class="custom-checkbox">
|
<ba-checkbox [(ngModel)]="isChecked" [label]="'Check me out'" [ngModelOptions]="{standalone: true}"></ba-checkbox>
|
||||||
<input type="checkbox">
|
|
||||||
<span>Check me out</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-danger">Submit</button>
|
<button type="submit" class="btn btn-danger">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
|
import {BaCheckbox} from '../../../../../../theme/components';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'horizontal-form',
|
selector: 'horizontal-form',
|
||||||
|
directives: [BaCheckbox],
|
||||||
template: require('./horizontalForm.html'),
|
template: require('./horizontalForm.html'),
|
||||||
})
|
})
|
||||||
export class HorizontalForm {
|
export class HorizontalForm {
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,7 @@
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-sm-offset-2 col-sm-10">
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label class="custom-checkbox">
|
<ba-checkbox [(ngModel)]="isRemember" [label]="'Remember me'" [ngModelOptions]="{standalone: true}"></ba-checkbox>
|
||||||
<input type="checkbox">
|
|
||||||
<span>Remember me</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
|
import {BaCheckbox} from '../../../../../../theme/components';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'inline-form',
|
selector: 'inline-form',
|
||||||
|
directives: [BaCheckbox],
|
||||||
template: require('./inlineForm.html'),
|
template: require('./inlineForm.html'),
|
||||||
})
|
})
|
||||||
export class InlineForm {
|
export class InlineForm {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,7 @@
|
||||||
<input type="email" class="form-control" id="exampleInputEmail2" placeholder="Email">
|
<input type="email" class="form-control" id="exampleInputEmail2" placeholder="Email">
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label class="custom-checkbox">
|
<ba-checkbox [(ngModel)]="isRemember" [label]="'Remember me'" [ngModelOptions]="{standalone: true}"></ba-checkbox>
|
||||||
<input type="checkbox">
|
|
||||||
<span>Remember me</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-primary">Send invitation</button>
|
<button type="submit" class="btn btn-primary">Send invitation</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -54,72 +54,6 @@ label.custom-checkbox > span {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
label.custom-checkbox {
|
|
||||||
padding-right: 0;
|
|
||||||
padding-left: 0;
|
|
||||||
margin-bottom: 0;
|
|
||||||
& > input {
|
|
||||||
height: 0;
|
|
||||||
z-index: -100 !important;
|
|
||||||
opacity: 0;
|
|
||||||
position: absolute;
|
|
||||||
&:checked {
|
|
||||||
& + span {
|
|
||||||
&:before {
|
|
||||||
content: "\f00c";
|
|
||||||
font-weight: $font-light;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&:disabled {
|
|
||||||
& + span {
|
|
||||||
color: $disabled;
|
|
||||||
cursor: not-allowed;
|
|
||||||
&:before {
|
|
||||||
border-color: $disabled !important;
|
|
||||||
cursor: not-allowed;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
& > span {
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
margin: 0;
|
|
||||||
line-height: 16px;
|
|
||||||
font-weight: $font-light;
|
|
||||||
cursor: pointer;
|
|
||||||
padding-left: 22px;
|
|
||||||
width: 100%;
|
|
||||||
&:before {
|
|
||||||
cursor: pointer;
|
|
||||||
font-family: fontAwesome;
|
|
||||||
font-weight: $font-light;
|
|
||||||
font-size: 12px;
|
|
||||||
color: $content-text;
|
|
||||||
content: "\a0";
|
|
||||||
background-color: transparent;
|
|
||||||
border: 1px solid $border;
|
|
||||||
border-radius: 0;
|
|
||||||
display: inline-block;
|
|
||||||
text-align: center;
|
|
||||||
height: 16px;
|
|
||||||
line-height: 14px;
|
|
||||||
min-width: 16px;
|
|
||||||
margin-right: 6px;
|
|
||||||
position: relative;
|
|
||||||
top: 0;
|
|
||||||
margin-left: -22px;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
&:hover {
|
|
||||||
&:before {
|
|
||||||
border-color: $primary-bg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-horizontal {
|
.form-horizontal {
|
||||||
.checkbox, .checkbox-inline{
|
.checkbox, .checkbox-inline{
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
|
|
|
||||||
|
|
@ -580,3 +580,69 @@ label.custom-input-danger {
|
||||||
rating-inputs span {
|
rating-inputs span {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
label.custom-checkbox {
|
||||||
|
padding-right: 0;
|
||||||
|
padding-left: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
& > input {
|
||||||
|
height: 0;
|
||||||
|
z-index: -100 !important;
|
||||||
|
opacity: 0;
|
||||||
|
position: absolute;
|
||||||
|
&:checked {
|
||||||
|
& + span {
|
||||||
|
&:before {
|
||||||
|
content: "\f00c";
|
||||||
|
font-weight: $font-light;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:disabled {
|
||||||
|
& + span {
|
||||||
|
color: $disabled;
|
||||||
|
cursor: not-allowed;
|
||||||
|
&:before {
|
||||||
|
border-color: $disabled !important;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
& > span {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0;
|
||||||
|
line-height: 16px;
|
||||||
|
font-weight: $font-light;
|
||||||
|
cursor: pointer;
|
||||||
|
padding-left: 22px;
|
||||||
|
width: 100%;
|
||||||
|
&:before {
|
||||||
|
cursor: pointer;
|
||||||
|
font-family: fontAwesome;
|
||||||
|
font-weight: $font-light;
|
||||||
|
font-size: 12px;
|
||||||
|
color: $content-text;
|
||||||
|
content: "\a0";
|
||||||
|
background-color: transparent;
|
||||||
|
border: 1px solid $border;
|
||||||
|
border-radius: 0;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center;
|
||||||
|
height: 16px;
|
||||||
|
line-height: 14px;
|
||||||
|
min-width: 16px;
|
||||||
|
margin-right: 6px;
|
||||||
|
position: relative;
|
||||||
|
top: 0;
|
||||||
|
margin-left: -22px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
&:before {
|
||||||
|
border-color: $primary-bg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue