continuation de la page search
This commit is contained in:
parent
aaf020fa2b
commit
bec9ff6c0d
15 changed files with 171 additions and 93 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import {MessageService} from "../../../utils/services/message/message.service";
|
||||
import {FictitiousDatasService} from "../../../utils/services/fictitiousDatas/fictitious-datas.service";
|
||||
import {PlaylistService} from "../../../utils/services/playlist/playlist.service";
|
||||
import {AddVideoToPlaylistsService} from "../../../utils/services/addVideoToPlaylists/add-video-to-playlists.service";
|
||||
import {Video} from "../../../utils/interfaces/video";
|
||||
|
||||
|
||||
|
|
@ -31,8 +31,8 @@ export class PageSearchComponent implements OnInit
|
|||
|
||||
ngOnInit(): void
|
||||
{
|
||||
// --- DONNEES FICTIVES ---
|
||||
this.tabVideo = this.fictitiousDatasService.load_pageSeach(7);
|
||||
// --- FAUX CODE ---
|
||||
this.tabVideo = this.fictitiousDatasService.getTabVideo(7);
|
||||
|
||||
|
||||
// --- VRAI CODE ---
|
||||
|
|
@ -52,11 +52,9 @@ export class PageSearchComponent implements OnInit
|
|||
|
||||
onSearch()
|
||||
{
|
||||
// --- DONNEES FICTIVES ---
|
||||
console.log(this.tabPlateform)
|
||||
// --- FAUX CODE ---
|
||||
this.tabVideo = [];
|
||||
console.log(this.tabVideo)
|
||||
//this.fictitiousDatasService.load_pageSeach(4);
|
||||
//this.fictitiousDatasService.getTabVideo(4);
|
||||
|
||||
|
||||
// --- VRAI CODE ---
|
||||
|
|
@ -66,7 +64,7 @@ export class PageSearchComponent implements OnInit
|
|||
{
|
||||
if(plateform.isSelected) tabPlateformName.push(plateform.name);
|
||||
}
|
||||
let data = { search: "", plaateforms: tabPlateformName };
|
||||
let data = { "search": this.search, "plateforms": tabPlateformName };
|
||||
this.messageService
|
||||
.sendMessage("user/searchVideo", data)
|
||||
.subscribe(retour => {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
.conteneur {
|
||||
text-align: center;
|
||||
//border: solid black 2px;
|
||||
//border-radius: 5px;
|
||||
border: solid black 2px;
|
||||
border-radius: 5px;
|
||||
padding-top: 15px;
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,16 @@
|
|||
import {Component, Input, OnInit} from '@angular/core';
|
||||
import {
|
||||
Component,
|
||||
ElementRef,
|
||||
EventEmitter,
|
||||
HostListener,
|
||||
Input,
|
||||
OnInit,
|
||||
Output,
|
||||
Renderer2,
|
||||
ViewChild
|
||||
} from '@angular/core';
|
||||
import {VideoUrlService} from "../../../utils/services/videoUrl/video-url.service";
|
||||
import {PlaylistService} from "../../../utils/services/playlist/playlist.service";
|
||||
import {AddVideoToPlaylistsService} from "../../../utils/services/addVideoToPlaylists/add-video-to-playlists.service";
|
||||
import {Video} from "../../../utils/interfaces/video";
|
||||
|
||||
|
||||
|
|
@ -16,7 +26,7 @@ export class VideoCellComponent implements OnInit
|
|||
|
||||
|
||||
constructor( private videoUrlService: VideoUrlService,
|
||||
private playlistService: PlaylistService ) {}
|
||||
private addVideoToPlaylistsService: AddVideoToPlaylistsService ) {}
|
||||
|
||||
|
||||
ngOnInit(): void
|
||||
|
|
@ -27,7 +37,7 @@ export class VideoCellComponent implements OnInit
|
|||
|
||||
onAdd(): void
|
||||
{
|
||||
this.playlistService.addVideoToPlaylists(this.video)
|
||||
console.log("onAdd:" + this.video.title);
|
||||
this.addVideoToPlaylistsService.run(this.video);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue