Skip to content

Commit ff27ec8

Browse files
author
Manuel Rauber
committed
Merge branch 'master' of github.com:thinktecture/nodejs-aspnetcore-webapi
2 parents f0da34a + 9af621c commit ff27ec8

File tree

5 files changed

+19
-5
lines changed

5 files changed

+19
-5
lines changed

src/ng2client/app/components/adminCustomerList/adminCustomerList.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ <h1>Customer list</h1>
33
<div class="span-1">
44
<div class="flakes-actions-bar">
55
<a class="action button-gray smaller" [routerLink]="['AdminCustomersCreate']">Create new customer</a>
6+
<span class="action button-gray smaller" [hidden]="!selectedCustomer" (click)="deleteSelectedCustomer()">Delete selected customer</span>
67
</div>
78
<table class="flakes-table">
89
<thead>

src/ng2client/app/components/adminCustomerList/adminCustomerList.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,13 @@ export class AdminCustomerListComponent implements OnInit {
2727
this.selectedCustomer = undefined;
2828
});
2929
}
30+
31+
public deleteSelectedCustomer(): void {
32+
if (!this.selectedCustomer) {
33+
return;
34+
}
35+
36+
this._customerApiService.remove(this.selectedCustomer.id)
37+
.subscribe(() => this.refresh());
38+
}
3039
}

src/ng2client/app/components/adminHome/adminHome.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ <h1>Admin Area - Home</h1>
44
<h2>Additional resources</h2>
55
<ul>
66
<li>GitHub: <a href="https://github.com/thinktecture/nodejs-aspnetcore-webapi/">https://github.com/thinktecture/nodejs-aspnetcore-webapi/</a></li>
7-
<li>Slides: <a href="https://speakerdeck.com/manuelrauber/web-apis-with-node-dot-js-for-net-developers">https://speakerdeck.com/manuelrauber/web-apis-with-node-dot-js-for-net-developers</a></li>
8-
<li>Node.js: <a href="https://nodejs.org/en/">https://nodejs.org/</a></li>
7+
<!-- <li>Slides: <a href="https://speakerdeck.com/manuelrauber/web-apis-with-node-dot-js-for-net-developers">https://speakerdeck.com/manuelrauber/web-apis-with-node-dot-js-for-net-developers</a></li>
8+
--> <li>Node.js: <a href="https://nodejs.org/en/">https://nodejs.org/</a></li>
99
<li>Restify: <a href="http://restify.com/">http://restify.com/</a></li>
1010
<li>SequelizeJS: <a href="http://sequelizejs.com/">http://sequelizejs.com/</a></li>
1111
<li>ASP.NET Core 1.0: <a href="https://docs.asp.net/">https://docs.asp.net/</a></li>

src/ng2client/app/components/login/login.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<ul>
66
<li>
77
<label for="name">Username</label>
8-
<input id="name" type="text" [(ngModel)]="username" (ngControl)="username" placeholder="Username"
8+
<input id="name" type="text" [(ngModel)]="username" (ngControl)="username" placeholder="Username = bob"
99
required>
1010
</li>
1111
<li>
1212
<label for="password">Password</label>
1313
<input id="password" type="password" [(ngModel)]="password" (ngControl)="password"
14-
placeholder="Password" required>
14+
placeholder="Password = bob" required>
1515
</li>
1616
<li>
1717
<button type="submit" [disabled]="!loginForm.form.valid" class="button-blue">Submit</button>

src/ng2client/less/main.less

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@import "_mixins";
22

33
body {
4-
.maxSize();
4+
width:100vw;
55
}
66

77
.center {
@@ -67,3 +67,7 @@ li.router-link-active {
6767
table.flakes-table tbody tr.active td {
6868
background-color: lightgray;
6969
}
70+
71+
[hidden] {
72+
display: none;
73+
}

0 commit comments

Comments
 (0)