Skip to content

Commit fffd851

Browse files
committed
Merge materialInput directive change.
1 parent 6ec6cef commit fffd851

15 files changed

+61
-175
lines changed

angular/src/account/account.module.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import { RegisterComponent } from './register/register.component';
2020
import { AccountLanguagesComponent } from './layout/account-languages.component';
2121

2222
import { LoginService } from './login/login.service';
23-
import { MaterialInput } from '@shared/directives/material-input.directive';
2423

2524
@NgModule({
2625
imports: [

angular/src/account/login/login.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, Injector, ElementRef, AfterViewInit, ViewChild } from '@angular/core';
1+
import { Component, Injector, ElementRef, ViewChild } from '@angular/core';
22
import { Router } from '@angular/router';
33
import { AppComponentBase } from '@shared/app-component-base';
44
import { LoginService, ExternalLoginProvider } from './login.service';

angular/src/account/register/register.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component, Injector, ElementRef, AfterViewInit, ViewChild } from '@angular/core';
22
import { Router } from '@angular/router';
3-
import { AccountServiceProxy, RegisterInput } from '@shared/service-proxies/service-proxies'
3+
import { AccountServiceProxy, RegisterInput, RegisterOutput } from '@shared/service-proxies/service-proxies'
44
import { AppComponentBase } from '@shared/app-component-base';
55
import { LoginService } from '../login/login.service';
66
import { accountModuleAnimation } from '@shared/animations/routerTransition';
@@ -38,7 +38,7 @@ export class RegisterComponent extends AppComponentBase implements AfterViewInit
3838
this.saving = true;
3939
this._accountService.register(this.model)
4040
.finally(() => { this.saving = false; })
41-
.subscribe((result) => {
41+
.subscribe((result:RegisterOutput) => {
4242
if (!result.canLogin) {
4343
this.notify.success(this.l('SuccessfullyRegistered'));
4444
this._router.navigate(['/login']);

angular/src/app/roles/create-role/create-role.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class CreateRoleComponent extends AppComponentBase implements OnInit {
4141
}
4242

4343
onShown(): void {
44-
($ as any).AdminBSB.input.activate($(this.modalContent.nativeElement));
44+
$.AdminBSB.input.activate($(this.modalContent.nativeElement));
4545

4646
$('#frm_create_role').validate({
4747
highlight: input => {

angular/src/app/roles/edit-role/edit-role.component.ts

Lines changed: 32 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import { Component, ViewChild, Injector, Output, EventEmitter, ElementRef, OnInit } from '@angular/core';
1+
import { Component, ViewChild, Injector, Output, EventEmitter, ElementRef, OnInit } from '@angular/core';
22
import { ModalDirective } from 'ngx-bootstrap';
33
import { RoleServiceProxy, RoleDto, ListResultDtoOfPermissionDto } from '@shared/service-proxies/service-proxies';
44
import { AppComponentBase } from '@shared/app-component-base';
55

66
@Component({
7-
selector: 'edit-role-modal',
8-
templateUrl: './edit-role.component.html'
7+
selector: 'edit-role-modal',
8+
templateUrl: './edit-role.component.html'
99
})
1010
export class EditRoleComponent extends AppComponentBase implements OnInit {
11-
@ViewChild('editRoleModal') modal: ModalDirective;
12-
@ViewChild('modalContent') modalContent: ElementRef;
13-
11+
@ViewChild('editRoleModal') modal: ModalDirective;
12+
@ViewChild('modalContent') modalContent: ElementRef;
13+
1414
active: boolean = false;
1515
saving: boolean = false;
1616

@@ -25,28 +25,27 @@ export class EditRoleComponent extends AppComponentBase implements OnInit {
2525
super(injector);
2626
}
2727

28-
ngOnInit(): void {
28+
ngOnInit(): void {
2929
this._roleService.getAllPermissions()
30-
.subscribe((permissions:ListResultDtoOfPermissionDto) =>
31-
{
30+
.subscribe((permissions: ListResultDtoOfPermissionDto) => {
3231
this.permissions = permissions;
3332
console.log(permissions);
3433
});
35-
}
34+
}
3635

37-
show(id:number): void {
38-
this._roleService.get(id)
39-
.finally(() => {
40-
this.active = true;
41-
this.modal.show();
42-
})
43-
.subscribe((result)=>{
44-
this.role = result;
45-
});
46-
}
36+
show(id: number): void {
37+
this._roleService.get(id)
38+
.finally(() => {
39+
this.active = true;
40+
this.modal.show();
41+
})
42+
.subscribe((result: RoleDto) => {
43+
this.role = result;
44+
});
45+
}
4746

48-
onShown(): void {
49-
($ as any).AdminBSB.input.activate($(this.modalContent.nativeElement));
47+
onShown(): void {
48+
$.AdminBSB.input.activate($(this.modalContent.nativeElement));
5049

5150
$('#frm_edit_role').validate({
5251
highlight: function (input) {
@@ -61,22 +60,20 @@ export class EditRoleComponent extends AppComponentBase implements OnInit {
6160
});
6261
}
6362

64-
checkPermission(permissionName:string): string {
65-
if(this.role.permissions.indexOf(permissionName) != -1)
66-
{
67-
return "checked";
68-
}
69-
else
70-
{
71-
return "";
72-
}
73-
}
63+
checkPermission(permissionName: string): string {
64+
if (this.role.permissions.indexOf(permissionName) != -1) {
65+
return "checked";
66+
}
67+
else {
68+
return "";
69+
}
70+
}
7471

7572
save(): void {
7673
var permissions = [];
7774
$(this.modalContent.nativeElement).find("[name=permission]").each(
78-
function( index:number, elem: Element){
79-
if($(elem).is(":checked") == true){
75+
function (index: number, elem: Element) {
76+
if ($(elem).is(":checked") == true) {
8077
permissions.push(elem.getAttribute("value").valueOf());
8178
}
8279
}
@@ -93,7 +90,7 @@ export class EditRoleComponent extends AppComponentBase implements OnInit {
9390
});
9491
}
9592

96-
close(): void {
93+
close(): void {
9794
this.active = false;
9895
this.modal.hide();
9996
}

angular/src/app/tenants/create-tenant/create-tenant.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,25 @@ <h4 class="modal-title">
1717
<div class="modal-body">
1818
<div class="form-group form-float">
1919
<div class="form-line">
20-
<input materialInput class="form-control" type="text" name="TenancyName" [(ngModel)]="tenant.tenancyName" required maxlength="64" minlength="2">
20+
<input class="form-control" type="text" name="TenancyName" [(ngModel)]="tenant.tenancyName" required maxlength="64" minlength="2">
2121
<label class="form-label">{{l("TenancyName")}}</label>
2222
</div>
2323
</div>
2424
<div class="form-group form-float">
2525
<div class="form-line">
26-
<input materialInput type="text" name="Name" class="form-control" [(ngModel)]="tenant.name" required maxlength="128">
26+
<input type="text" name="Name" class="form-control" [(ngModel)]="tenant.name" required maxlength="128">
2727
<label class="form-label">{{l("Name")}}</label>
2828
</div>
2929
</div>
3030
<div class="form-group form-float">
3131
<div class="form-line">
32-
<input materialInput type="text" name="ConnectionString" class="form-control" [(ngModel)]="tenant.connectionString" maxlength="1024">
32+
<input type="text" name="ConnectionString" class="form-control" [(ngModel)]="tenant.connectionString" maxlength="1024">
3333
<label class="form-label">{{l("DatabaseConnectionString")}} ({{l("Optional")}})</label>
3434
</div>
3535
</div>
3636
<div class="form-group form-float">
3737
<div class="form-line">
38-
<input materialInput type="email" name="AdminEmailAddress" class="form-control" [(ngModel)]="tenant.adminEmailAddress" required maxlength="256" pattern="^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{1,})+$">
38+
<input type="email" name="AdminEmailAddress" class="form-control" [(ngModel)]="tenant.adminEmailAddress" required maxlength="256" pattern="^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{1,})+$">
3939
<label class="form-label">{{l("AdminEmailAddress")}}</label>
4040
</div>
4141
</div>

angular/src/app/tenants/create-tenant/create-tenant.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class CreateTenantComponent extends AppComponentBase {
3434
}
3535

3636
onShown(): void {
37-
($ as any).AdminBSB.input.activate($(this.modalContent.nativeElement));
37+
$.AdminBSB.input.activate($(this.modalContent.nativeElement));
3838

3939
$('#frm_create_tenant').validate({
4040
highlight: input => {

angular/src/app/tenants/edit-tenant/edit-tenant.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ export class EditTenantComponent extends AppComponentBase{
3333
this.active = true;
3434
this.modal.show();
3535
})
36-
.subscribe((result)=>{
36+
.subscribe((result: TenantDto)=>{
3737
this.tenant = result;
3838
});
3939
}
4040

4141
onShown(): void {
42-
($ as any).AdminBSB.input.activate($(this.modalContent.nativeElement));
42+
$.AdminBSB.input.activate($(this.modalContent.nativeElement));
4343

4444
$('#frm_edit_tenant').validate({
4545
highlight(input) {

angular/src/app/users/create-user-modal.component.html

Lines changed: 0 additions & 63 deletions
This file was deleted.

angular/src/app/users/create-user-modal.component.ts

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)