Skip to content

Commit

Permalink
team name edition
Browse files Browse the repository at this point in the history
  • Loading branch information
IceMaD committed Feb 20, 2016
1 parent 89a2675 commit d4be5af
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
10 changes: 8 additions & 2 deletions app/sass/component/team/_team.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@
justify-content: space-between;
align-items: center;

@include child(name) {
@include child(editor) {

// @TODO Remove ?
border: none;
font-size: inherit;
outline: none;
line-height: 1.5;
display: block;
flex-grow: 1;
margin-right: 1em;
}

@include child(remove) {
Expand Down
4 changes: 2 additions & 2 deletions app/templates/team.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="team">
<span class="team_name">{{ team.name }}</span>
<button class="team_remove" (click)="remove(team)">X</button>
<input class="team_editor" type="text" title="Team name" [(ngModel)]="team.name">
<button class="team_remove" (click)="remove()">X</button>
</div>
9 changes: 7 additions & 2 deletions app/ts/Components/TeamComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ import {TeamHolderService} from "../Services/TeamHolderService";
})
export class TeamComponent {
@Input() team: TeamModel;
public edition: boolean = false;

remove(team: TeamModel) {
TeamHolderService.removeTeam(team);
public remove() {
TeamHolderService.removeTeam(this.team);
}

public edit() {
this.edition = true;
}
}
2 changes: 0 additions & 2 deletions app/ts/Views/TreeView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,5 @@ export class TreeView {
}

this.tree = TreeManager.tree;

console.log(TreeManager.tree);
}
}

0 comments on commit d4be5af

Please sign in to comment.