Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class name changes #1201

Merged
merged 1 commit into from
Nov 4, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/dropdown/dropdown.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { dropdownService, NONINPUT } from './dropdown.service';
})
export class DropdownDirective implements OnInit, OnDestroy {
@HostBinding('class.open')
@HostBinding('class.active')
@Input()
public get isOpen():boolean {
return this._isOpen;
Expand Down
1 change: 1 addition & 0 deletions components/modal/modal-backdrop.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class ModalBackdropComponent {
public set isShown(value:boolean) {
this._isShown = value;
this.renderer.setElementClass(this.element.nativeElement, `${ClassName.IN}`, value);
this.renderer.setElementClass(this.element.nativeElement, `${ClassName.ACTIVE}`, value);
}

public element:ElementRef;
Expand Down
3 changes: 2 additions & 1 deletion components/modal/modal-options.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export const ClassName:any = {
BACKDROP: 'modal-backdrop',
OPEN: 'modal-open',
FADE: 'fade',
IN: 'in'
IN: 'in', // bs3
ACTIVE: 'active' // bs4
};

export const Selector:any = {
Expand Down
2 changes: 2 additions & 0 deletions components/modal/modal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ export class ModalDirective implements AfterViewInit, OnDestroy {

this._isShown = false;
this.renderer.setElementClass(this.element.nativeElement, ClassName.IN, false);
this.renderer.setElementClass(this.element.nativeElement, ClassName.ACTIVE, false);
// this._addClassIn = false;

if (this.isAnimated) {
Expand Down Expand Up @@ -200,6 +201,7 @@ export class ModalDirective implements AfterViewInit, OnDestroy {

// this._addClassIn = true;
this.renderer.setElementClass(this.element.nativeElement, ClassName.IN, true);
this.renderer.setElementClass(this.element.nativeElement, ClassName.ACTIVE, true);

const transitionComplete = () => {
if (this._config.focus) {
Expand Down
3 changes: 2 additions & 1 deletion demo/index-bs4.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,700" rel="stylesheet" type="text/css">

<!--link to bootstrap.css v4.0.0-alpha-->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha/css/bootstrap.min.css" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css" rel="stylesheet">
<!--<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css">-->
<link rel="stylesheet" href="assets/css/glyphicons.css">
<link rel="stylesheet" href="assets/css/style.css">
<link rel="stylesheet" href="assets/css/prettify-angulario.css">
Expand Down