-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/interface improvements (#24)
* build.prod pass * #8 primeng setup * include p-calendar in search page * #8 primeng setup * #8 primeng setup * include p-calendar in search page * include p-calendar in search page * calendar module import * #8 search action start with * include p-calendar in search page * #8 basic pagination in memory * #8 criteria query with count * #8 Pagination on server * #8 Pagination on server results per page * #13 Export current page * #7 Message in response to error in client * #12 WIP LoadingBarInterceptor * update package.json * fix client test with chrome * fix broke package.json in merge * pagination and download working but dirty * remove create, this project cant update database * fix client test * fix wercker build
- Loading branch information
Giovanni Candido da Silva
committed
May 14, 2017
1 parent
b04e4f9
commit 725d6fc
Showing
20 changed files
with
1,320 additions
and
486 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
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
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<p-growl [value]="messages"></p-growl> | ||
<p-growl [value]="msgs"></p-growl> | ||
<ng2-slim-loading-bar height="4px"></ng2-slim-loading-bar> | ||
<app-toolbar></app-toolbar> | ||
<app-navbar></app-navbar> | ||
<router-outlet></router-outlet> |
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 |
---|---|---|
@@ -1,21 +1,41 @@ | ||
import {Component, OnInit} from '@angular/core'; | ||
import {Message} from 'primeng/primeng' | ||
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit} from "@angular/core"; | ||
import {Message} from "primeng/primeng"; | ||
import {AppService} from "./app.service"; | ||
import {SlimLoadingBarService} from "ng2-slim-loading-bar"; | ||
|
||
@Component({ | ||
selector: 'app-root', | ||
templateUrl: './app.component.html' | ||
}) | ||
export class AppComponent implements OnInit { | ||
messages: Message[] = [] | ||
|
||
constructor(private appService: AppService) { | ||
msgs: Message[] = [] | ||
|
||
constructor(private appService: AppService, | ||
private changeDetectionRef: ChangeDetectorRef, | ||
private slimBarService: SlimLoadingBarService | ||
) { | ||
} | ||
|
||
ngOnInit() { | ||
this.appService.onMessage.subscribe(message => { | ||
this.messages.push(message) | ||
this.slimBarService.interval = 50; | ||
this.appService.onMessage.subscribe(e => { | ||
|
||
// For some reason the change detection for the first item in array doesn't work | ||
// Create a copy of array then empty array, trigger the detection and then put the previous copy | ||
// + new message and detect again :-) | ||
let previous = this.msgs.slice() | ||
this.msgs = [] | ||
setTimeout(() => { | ||
previous.push(e) | ||
this.msgs = previous | ||
this.changeDetectionRef.detectChanges() | ||
}) | ||
|
||
this.changeDetectionRef.detectChanges() | ||
|
||
}) | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.