-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TSK-203 Add classification tree view
- Loading branch information
1 parent
88eca3d
commit 2efa1c6
Showing
49 changed files
with
747 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 18 additions & 38 deletions
56
web/src/app/administration/classification/master/list/classification-list.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,20 @@ | ||
<div class="classification-list-full-height"> | ||
<ul id="cl-list-container" class="list-group footer-space"> | ||
<li id="cl-action-toolbar" class="list-group-item tab-align"> | ||
<div class="row"> | ||
<div class="col-xs-9"> | ||
<taskana-import-export-component [currentSelection]="selectionToImport"></taskana-import-export-component> | ||
</div> | ||
</div> | ||
</li> | ||
<taskana-spinner [isRunning]="requestInProgress" class="centered-horizontally"></taskana-spinner> | ||
<li id="wb-action-toolbar" class="list-group-item tab-align"> | ||
<div class="row"> | ||
<div class="col-xs-12"> | ||
<button type="button" (click)="addClassification()" data-toggle="tooltip" title="Add" class="btn btn-default"> | ||
<span class="glyphicon glyphicon-plus green" aria-hidden="true"></span> | ||
</button> | ||
<button type="button" (click)="removeClassification()" data-toggle="tooltip" title="Remove" class="btn btn-default remove"> | ||
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span> | ||
</button> | ||
<taskana-import-export-component [currentSelection]="selectionToImport"></taskana-import-export-component> | ||
<taskana-classification-types-selector class="pull-right" [classificationTypes]="classificationsTypes" [(classificationTypeSelected)]="classificationTypeSelected" | ||
(classificationTypeChanged)=selectClassificationType($event)></taskana-classification-types-selector> | ||
</div> | ||
</div> | ||
</li> | ||
<taskana-spinner [isRunning]="requestInProgress" class="centered-horizontally"></taskana-spinner> | ||
<taskana-tree [treeNodes]="classifications"></taskana-tree> | ||
|
||
</ul> | ||
<ul id="wb-pagination" class="pagination vertical-center"> | ||
<li> | ||
<a href="#" aria-label="Previous"> | ||
<span aria-hidden="true">«</span> | ||
</a> | ||
</li> | ||
<li> | ||
<a href="">1</a> | ||
</li> | ||
<li> | ||
<a href="">2</a> | ||
</li> | ||
<li> | ||
<a href="">3</a> | ||
</li> | ||
<li> | ||
<a href="">4</a> | ||
</li> | ||
<li> | ||
<a href="">5</a> | ||
</li> | ||
<li> | ||
<a href="#" aria-label="Next"> | ||
<span aria-hidden="true">»</span> | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 47 additions & 11 deletions
58
web/src/app/administration/classification/master/list/classification-list.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,55 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { Component, OnInit, OnDestroy } from '@angular/core'; | ||
import { Subscription } from 'rxjs/Subscription'; | ||
|
||
import { ImportType } from 'app/models/import-type'; | ||
import { Classification } from 'app/models/classification'; | ||
import { TreeNode } from 'app/models/tree-node'; | ||
|
||
import { ClassificationsService } from 'app/services/classifications/classifications.service'; | ||
|
||
@Component({ | ||
selector: 'taskana-classification-list', | ||
templateUrl: './classification-list.component.html', | ||
styleUrls: ['./classification-list.component.scss'] | ||
selector: 'taskana-classification-list', | ||
templateUrl: './classification-list.component.html', | ||
styleUrls: ['./classification-list.component.scss'] | ||
}) | ||
export class ClassificationListComponent implements OnInit { | ||
export class ClassificationListComponent implements OnInit, OnDestroy { | ||
|
||
|
||
selectionToImport = ImportType.CLASSIFICATIONS; | ||
requestInProgress = false; | ||
|
||
classifications: Array<Classification> = []; | ||
classificationsTypes: Map<string, string> = new Map(); | ||
classificationTypeSelected: string; | ||
classificationServiceSubscription: Subscription; | ||
classificationTypeServiceSubscription: Subscription; | ||
constructor(private classificationService: ClassificationsService) { | ||
} | ||
|
||
ngOnInit() { | ||
this.classificationServiceSubscription = this.classificationService.getClassifications() | ||
.subscribe((classifications: Array<TreeNode>) => { | ||
this.classifications = classifications; | ||
this.classificationTypeServiceSubscription = this.classificationService.getClassificationTypes() | ||
.subscribe((classificationsTypes: Map<string, string>) => { | ||
this.classificationsTypes = classificationsTypes; | ||
this.classificationTypeSelected = this.classifications[0].type; | ||
}); | ||
}); | ||
} | ||
|
||
selectionToImport = ImportType.CLASSIFICATIONS; | ||
requestInProgress = false; | ||
selectClassificationType(classificationTypeSelected: string) { | ||
this.classificationService.getClassifications(true, classificationTypeSelected) | ||
.subscribe((classifications: Array<TreeNode>) => { | ||
this.classifications = classifications; | ||
}); | ||
} | ||
|
||
constructor() { | ||
} | ||
addClassification() { } | ||
removeClassification() { } | ||
|
||
ngOnInit() { | ||
} | ||
ngOnDestroy(): void { | ||
if (this.classificationServiceSubscription) { this.classificationServiceSubscription.unsubscribe(); } | ||
if (this.classificationTypeServiceSubscription) { this.classificationTypeServiceSubscription.unsubscribe(); } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ion/workbasket/master/list/workbasket-list-toolbar/workbasket-list-toolbar.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ li > div.row > dl:first-child { | |
margin-left: 10px; | ||
} | ||
|
||
.no-border { | ||
.no-space { | ||
border-top: none; | ||
padding: 0px | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.