Skip to content
Permalink
Browse files

code reverted: window-ce

  • Loading branch information...
kedar8 committed Aug 5, 2019
1 parent 11544e5 commit 375379a12a4e22cd666dff1a8c1873e11e38e35f
@@ -4,17 +4,13 @@
'color': color,'background':background,'height': height}"
[ngClass]="{'card-container-ce-theme-color': applyThemeColor}">

<span #contentWrapper>
<ng-content ></ng-content>
</span>


<span *ngIf="windowFlag" class="creative-header-icon-div" [ngStyle]="iconPosition">
<amexio-c-icon class="cursor-style" *ngIf="(isFullWindow && maximize )" [key]="'window_maximize'" (onClick)="sizeChange()"></amexio-c-icon>
<amexio-c-icon class="cursor-style" *ngIf="(!isFullWindow && maximize )" [key]="'window_restore'" (click)="sizeChange()"></amexio-c-icon>
<i *ngIf="minimize" class="fa fa-window-minimize" (click)="onMinimizeClick($event)"
style = "cursor: pointer;padding-left:5px;"></i>
<amexio-c-icon class="cursor-style" style="padding-left:5px;" *ngIf="closeable" [key]="'window_close'"
<amexio-c-icon class="cursor-style" style="padding-left:5px;" *ngIf="closeable" [key]="'window_close'"
(onClick)="onCloseClick()"></amexio-c-icon>
</span>
</header>
@@ -29,7 +29,7 @@ import { BehaviorSubject } from 'rxjs/index';
`,
],
})
export class AmexioCardCEHeaderComponent implements AfterViewInit, OnInit {
export class AmexioCardCEHeaderComponent implements OnInit {

@Input('align') align = '';

@@ -49,24 +49,16 @@ export class AmexioCardCEHeaderComponent implements AfterViewInit, OnInit {

@Input('apply-theme-color') applyThemeColor = false;

@ViewChild('contentWrapper') content: ElementRef;

@Output() minimizeWindow: any = new EventEmitter<any>();

cclass = '';

closeable = false;

maximize = false;

minimize = false;

isFullWindow = false;

windowFlag: boolean;

textName: any;

themeCss: any;

closeableBehaiour = new BehaviorSubject(false);
@@ -87,14 +79,6 @@ export class AmexioCardCEHeaderComponent implements AfterViewInit, OnInit {
}
this.setIconPosition();
}
ngAfterViewInit() {
this.textName = this.content.nativeElement.innerText;
}

onMinimizeClick() {
this.closeableBehaiour.next(false);
this.minimizeWindow.emit(this, this.textName);
}

setMaximizeData(maximize: boolean, isFullWindow: boolean) {
this.maximize = maximize;
@@ -9,12 +9,4 @@
</div>
</div>
</div>
</div>


<ng-container *ngIf="minimizeFlag && !show">
<amexio-button [label]="textName" [type]="'theme-color'"
style="bottom: 0px; float:left;left: 0px; position: fixed;z-index: 9999;" [tooltip]="textName"
(onClick)="minimizeBtnClick($event)">
</amexio-button>
</ng-container>
</div>
@@ -25,12 +25,9 @@ describe('amexio-window-ce', () => {

const compiled = fixture.debugElement.nativeElement;
event = jasmine.createSpyObj('event', ['preventDefault', 'stopPropagation']);
let renderer = Renderer2;


});


it('variable check', () => {
comp.x = 0;
comp.y = 0;
@@ -45,9 +42,6 @@ describe('amexio-window-ce', () => {
expect(comp.minArea).toEqual(20000);
expect(comp.draggingWindow).toEqual(false);




});

});
@@ -56,7 +56,6 @@ export class AmexioWindowCEComponent extends LifeCycleBaseComponent implements O
@Input('align') align: string;

cclass: string;
minimizeFlag = false;

@Input('vertical-position') verticalposition = 'center';

@@ -75,7 +74,6 @@ export class AmexioWindowCEComponent extends LifeCycleBaseComponent implements O
isFullWindow: boolean;

@Input() maximize = false;
@Input() minimize = false;

@Input() closable = true;

@@ -98,7 +96,6 @@ export class AmexioWindowCEComponent extends LifeCycleBaseComponent implements O

@Input('remember-window-position') windowposition: boolean;
maximumWindowStyle: any;
textName: any;
dummyWidth: string;

x = 0;
@@ -131,15 +128,6 @@ export class AmexioWindowCEComponent extends LifeCycleBaseComponent implements O
this.y = 0;
}
}
this.minimizeFlag = false;
}
onMinimizeClick(event: any) {
this.minimizeFlag = true;
this.show = !this.show;
this.minimizeBtnClick();
}
minimizeBtnClick() {
this.show = !this.show;
}

ngOnInit() {
@@ -248,13 +236,6 @@ export class AmexioWindowCEComponent extends LifeCycleBaseComponent implements O

ngAfterContentInit(): void {
if (this.amexioHeader && this.amexioHeader.toArray().length > 0) {
if (this.minimize) {
this.amexioHeader.toArray()[0].minimize = this.minimize;
this.amexioHeader.toArray()[0].minimizeWindow.subscribe((event: any) => {
this.textName = event.textName;
this.onMinimizeClick(event);
});
}
setTimeout(() => {
this.amexioHeader.toArray()[0].amexioComponentId = 'amexio-window';
this.amexioHeader.toArray()[0].closeable = this.closable;

0 comments on commit 375379a

Please sign in to comment.
You can’t perform that action at this time.