stuff
This commit is contained in:
@@ -20,6 +20,10 @@ export class GameGridComponent implements OnInit {
|
||||
rawGamesContent;
|
||||
gamesData;
|
||||
|
||||
queryFilters;
|
||||
querryPage;
|
||||
queryOrder;
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private gamesService: GamesService
|
||||
@@ -28,33 +32,36 @@ export class GameGridComponent implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.getGamesList();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
getGamesList(): any{
|
||||
this.gameListSubscription = this.gamesService.getGames( ).subscribe( data => {
|
||||
getGamesList( ): any{
|
||||
|
||||
this.queryFilters = "Played,eq,true";
|
||||
this.querryPage = 1;
|
||||
this.queryOrder = "Title";
|
||||
|
||||
this.gameListSubscription = this.gamesService.getGames( this.queryFilters, this.querryPage, this.queryOrder ).subscribe( data => {
|
||||
console.log( data );
|
||||
this.gamesData = data.games;
|
||||
//var tempItemContent = [];
|
||||
|
||||
/* parse out just the input data and set that in object array */
|
||||
/*for( var key in data['ContentBlocks'] ){
|
||||
console.log( data['ContentBlocks'][key]['Type'] );
|
||||
if( data['ContentBlocks'][key]['Type'] == "ItemSelectionSetting" ){
|
||||
tempItemContent.push( data['ContentBlocks'][key]['Content'] );
|
||||
}
|
||||
}
|
||||
this.formItemContent = tempItemContent;
|
||||
*/
|
||||
});
|
||||
}
|
||||
|
||||
getGamesList2( ): any{
|
||||
|
||||
this.queryFilters = "Played,eq,true";
|
||||
this.querryPage = 2;
|
||||
this.queryOrder = "Title";
|
||||
|
||||
this.gameListSubscription = this.gamesService.getGames( this.queryFilters, this.querryPage, this.queryOrder ).subscribe( data => {
|
||||
console.log( data );
|
||||
this.gamesData = data.games;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
isEmptyObject(obj) {
|
||||
return (obj != undefined);
|
||||
}
|
||||
@@ -66,13 +73,21 @@ export class GameGridComponent implements OnInit {
|
||||
renderGridItems(lastItem: boolean) {
|
||||
if (lastItem) {
|
||||
$('.grid').masonry({
|
||||
columnWidth: '.grid-sizer',
|
||||
columnWidth: 250,
|
||||
itemSelector: '.grid-item',
|
||||
percentPosition: true
|
||||
gutter: 10
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
myFunc(){
|
||||
$('.grid').masonry('destroy')
|
||||
this.getGamesList2();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user