Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Commit

Permalink
[HTML client] added some behavior for the "add new asset" page
Browse files Browse the repository at this point in the history
  • Loading branch information
IanStorm committed Jan 7, 2018
1 parent 7419dae commit c7d09dc
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"devDependencies": {
"@types/express": "^4.11.0",
"@types/jquery": "^3.2.17",
"@types/node": "^8.5.2",
"@types/url-join": "^0.8.2",
"del": "^3.0.0",
Expand Down
19 changes: 19 additions & 0 deletions src/Clients/HTML/assets/new/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,24 @@ <h1>Neue flexible Ausgabe hinzufügen</h1>
<div class="content">
<div class="container">
<form>
<div class="form-group">
<label for="asset-type-earning">
Einnahme
</label>
<input id="asset-type-earning"
type="radio"
name="asset-type"
value="earning"
/>
<label for="asset-type-expense">
Ausgabe
</label>
<input id="asset-type-expense"
type="radio"
name="asset-type"
value="expense"
/>
</div>
<div class="form-group">
<label for="purchase-date">
Kaufdatum:
Expand Down Expand Up @@ -102,5 +120,6 @@ <h1>Neue flexible Ausgabe hinzufügen</h1>
</form>
</div>
</div>
<script src="index.js"></script>
</body>
</html>
18 changes: 18 additions & 0 deletions src/Clients/HTML/assets/new/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/// <reference path="../../../../../node_modules/@types/jquery/index.d.ts" />


class NewAssetViewModel {

public constructor() {
this.setDefaultValues();
}


private setDefaultValues(): void {
$("#asset-type-expense").prop("checked", true);
}

}


new NewAssetViewModel();

0 comments on commit c7d09dc

Please sign in to comment.