error);
}
+ }
- AccountNumberChanged(LicenseId: number, SelectText: string){
- this.accountDropDownText = SelectText;
- this.license.LicenseId = LicenseId;
- this.lstLicenseEditionModesty = null;
- this.lstLicenseSites = null;
- this.selectedSiteId = 0;
- this.isBuildingLevel = false;
- this.GetLicenseById();
+ AccountNumberChanged(LicenseId: number, SelectText: string) {
+ this.accountDropDownText = SelectText;
+ this.license.LicenseId = LicenseId;
+ this.lstLicenseEditionModesty = null;
+ this.lstLicenseSites = null;
+ this.selectedSiteId = 0;
+ this.isBuildingLevel = false;
+ this.GetLicenseById();
+ }
+
+ onScroll($event) {
+ if (this.lastScrollPos > $event.target.scrollTop) {
+ for (var i = 0; i < 1000; i++) {
+ if (this.loopIdx1 > 0)
+ this.tempLstAccountNumbers.unshift(this.lstAccountNumbers[this.loopIdx1--]);
+ }
+ }
+ else {
+ for (var i = 0; i < 1000; i++) {
+ if (this.loopIdx2 < this.lstAccountNumbers.length)
+ this.tempLstAccountNumbers.push(this.lstAccountNumbers[this.loopIdx2++]);
+ }
}
+ this.lastScrollPos = $event.target.scrollTop;
+ }
- onScroll($event){
- if($event.target.scrollTop >= ($event.target.scrollHeight/2)){
- for (var i = 0; i < 5000; i++) {
- if(this.loopIdx < this.lstAccountNumbers.length){
- this.tempLstAccountNumbers.push(this.lstAccountNumbers[this.loopIdx]);
- this.loopIdx++;
- }
- }
- }
+ onOpenChange(data: boolean): void {
+ if (!data) {
+ this.loopIdx1 = 0;
+ this.loopIdx2 = 0;
+ this.tempLstAccountNumbers = [];
+ this.lastScrollPos = 0;
+ for (var i = 0; i < 50; i++) {
+ this.tempLstAccountNumbers.push(this.lstAccountNumbers[this.loopIdx2++]);
+ }
}
+ }
- onOpenChange(data: boolean): void {
- if(!data){
- this.loopIdx = 0;
- this.tempLstAccountNumbers = [];
- for (var i = 0; i < 1000; i++) {
- if(this.loopIdx < this.lstAccountNumbers.length){
- this.tempLstAccountNumbers.push(this.lstAccountNumbers[this.loopIdx]);
- this.loopIdx++;
- }
- }
+ onKeyPress($event) {
+ let FindItem = this.lstAccountNumbers.find(C => (C.m_Item2.toLowerCase().indexOf($event.key) == 0));
+ let prevIdx = 0;
+ if (FindItem != null) {
+ this.tempLstAccountNumbers = [];
+ for (var i = 0; i < this.lstAccountNumbers.length; i++) {
+ if (FindItem.m_Item1 == this.lstAccountNumbers[i].m_Item1) {
+ prevIdx = i;
+ break;
}
+ }
+ this.loopIdx1 = prevIdx;
+ this.loopIdx2 = prevIdx;
+ for (var i = 0; i < 50; i++) {
+ if (this.loopIdx2 < this.lstAccountNumbers.length)
+ this.tempLstAccountNumbers.push(this.lstAccountNumbers[this.loopIdx2++]);
+ }
+ this.lastScrollPos = 0;
+ $event.target.nextElementSibling.scrollTop = 0;
}
+ }
- AfterUpdateData(data, template) {
- if (data.Status == "false") {
- this.alerts = "License modesty settings update unsuccessfull.";
- } else {
- this._confirmService.activate("License modesty settings updated successfully.", "alertMsg");
- // this.modalAlerts = "License modesty setings updated successfully.
";
- // this.modalRef = this.modalService.show(template);
- }
+ AfterUpdateData(data, template) {
+ if (data.Status == "false") {
+ this.alerts = "License modesty settings update unsuccessfull.";
+ } else {
+ this._confirmService.activate("License modesty settings updated successfully.", "alertMsg");
+ // this.modalAlerts = "License modesty setings updated successfully.
";
+ // this.modalRef = this.modalService.show(template);
}
+ }
- UpdateLicenseModestySettings(template: TemplateRef){
- this.alerts = '';
- if(this.alerts == ''){
- var obj = this.updateModestySettingsFrm.value;
- return this.licenseService.UpdateLicenseModestySettings(obj)
- .subscribe(
- n => (this.AfterUpdateData(n, template)),
- error => this.error = error);
- }
+ UpdateLicenseModestySettings(template: TemplateRef) {
+ this.alerts = '';
+ if (this.alerts == '') {
+ var obj = this.updateModestySettingsFrm.value;
+ return this.licenseService.UpdateLicenseModestySettings(obj)
+ .subscribe(
+ n => (this.AfterUpdateData(n, template)),
+ error => this.error = error);
}
-
+ }
+
}
diff --git a/400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodulesettings.component.html b/400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodulesettings.component.html
index a0fc22d..25577db 100644
--- a/400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodulesettings.component.html
+++ b/400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodulesettings.component.html
@@ -32,7 +32,7 @@
-
+