Merge pull request #1913 from wknet123/dev-sync

Fix some UX issues.
This commit is contained in:
Steven Zou 2017-04-05 15:32:56 +08:00 committed by GitHub
commit 7137e0c26c
3 changed files with 16 additions and 14 deletions

View File

@ -6,3 +6,7 @@
padding-right: 16px;
margin-top: 18px;
}
.datagrid-foot {
margin-bottom: 0.5px;
}

View File

@ -12,16 +12,12 @@
<create-project (create)="createProject($event)"></create-project>
</div>
<div class="option-right">
<clr-dropdown [clrMenuPosition]="'bottom'">
<button class="btn btn-link" clrDropdownToggle>
{{projectTypes[currentFilteredType] | translate}}
<clr-icon shape="caret down"></clr-icon>
</button>
<div class="dropdown-menu">
<a href="javascript:void(0)" clrDropdownItem (click)="doFilterProjects(0)">{{projectTypes[0] | translate}}</a>
<a href="javascript:void(0)" clrDropdownItem (click)="doFilterProjects(1)">{{projectTypes[1] | translate}}</a>
</div>
</clr-dropdown>
<div class="select" style="float: left;">
<select (change)="doFilterProjects($event)">
<option value="0">{{projectTypes[0] | translate}}</option>
<option value="1">{{projectTypes[1] | translate}}</option>
</select>
</div>
<grid-filter filterPlaceholder='{{"PROJECT.FILTER_PLACEHOLDER" | translate}}' (filter)="doSearchProjects($event)" [currentValue]="projectName"></grid-filter>
<a href="javascript:void(0)" (click)="refresh()">
<clr-icon shape="refresh"></clr-icon>

View File

@ -148,10 +148,12 @@ export class ProjectComponent implements OnInit, OnDestroy {
this.retrieve();
}
doFilterProjects(filteredType: number): void {
this.isPublic = filteredType;
this.currentFilteredType = filteredType;
this.retrieve();
doFilterProjects($event: any): void {
if ($event && $event.target && $event.target["value"]) {
this.currentFilteredType = $event.target["value"];
this.isPublic = this.currentFilteredType;
this.retrieve();
}
}
toggleProject(p: Project) {