jqwidgets-scripts-custom
Version:
jQWidgets is an advanced jQuery, Angular 7, Vue, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.
62 lines (49 loc) • 1.61 kB
text/typescript
import { Component, ViewChild, ElementRef } from '@angular/core';
import { jqxButtonComponent } from 'jqwidgets-scripts/jqwidgets-ts/angular_jqxbuttons';
import { jqxWindowComponent } from 'jqwidgets-scripts/jqwidgets-ts/angular_jqxwindow';
export class AppComponent {
customWindow: jqxWindowComponent;
searchTextButton: jqxButtonComponent;
searchTextInput: ElementRef;
_searchButtonHandle = () => {
if (this.searchTextInput.nativeElement !== null) {
if (this.searchTextInput.nativeElement.value !== '') {
this.searchTextButton.disabled(false);
}
else {
this.searchTextButton.disabled(true);
}
}
}
onKey(event: any): void {
this._searchButtonHandle();
};
onKeyUp(event: any): void {
this._searchButtonHandle();
};
onChange(event: any): void {
this._searchButtonHandle();
};
showWindowButtonClick(): void {
this.customWindow.open();
}
hideWindowButtonClick(): void {
this.customWindow.close();
}
pinWindowButtonClick(): void {
this.customWindow.draggable(false);
}
unpinWindowButtonClick(): void {
this.customWindow.draggable(true);
}
collapseWindowButtonClick(): void {
this.customWindow.collapse();
}
expandWindowButtonClick(): void {
this.customWindow.expand();
}
}