+
+
+
+
+
+
+
+
+
+
+ {{episodeDisplay}} {{name}}
+
+
+
\ No newline at end of file
diff --git a/front/src/app/component/element-video/element-video.less b/front/src/app/component/element-video/element-video.less
new file mode 100644
index 0000000..a7023b1
--- /dev/null
+++ b/front/src/app/component/element-video/element-video.less
@@ -0,0 +1,38 @@
+
+.videoImgContainer {
+ text-align: center;
+ width: 200px;
+ margin: 0 auto;
+ height: 250px;
+ img {
+ //width: 100%;
+ max-height: 250px;
+ max-width: 200px;
+ }
+ .noImage {
+ height: 243px;
+ width: 193px;
+ border: solid 3px;
+ border-color: rgba(0, 0, 0, 0.7);
+ margin: auto;
+ }
+}
+
+.title-small {
+ height: 40px;
+ width: 200px;
+ font-size: 17px;
+ overflow:hidden;
+ display:inline-block;
+ text-align: center;
+ padding:auto;
+ background: rgba(256, 256, 256, 0.3);
+ border-radius: 7px;
+}
+
+.description-small {
+ height: 30px;
+ font-size: 12px;
+ overflow:hidden;
+ vertical-align: middle;
+}
\ No newline at end of file
diff --git a/front/src/app/component/element-video/element-video.ts b/front/src/app/component/element-video/element-video.ts
new file mode 100644
index 0000000..7eed8bf
--- /dev/null
+++ b/front/src/app/component/element-video/element-video.ts
@@ -0,0 +1,106 @@
+/** @file
+ * @author Edouard DUPIN
+ * @copyright 2018, Edouard DUPIN, all right reserved
+ * @license PROPRIETARY (see license file)
+ */
+import { Injectable, Component, OnInit, Input } from '@angular/core';
+
+import { VideoService } from '../../service/video';
+import { HttpWrapperService } from '../../service/http-wrapper';
+
+@Component({
+ selector: 'app-element-video',
+ templateUrl: './element-video.html',
+ styleUrls: [ './element-video.less' ]
+})
+
+@Injectable()
+export class ElementVideoComponent implements OnInit {
+ // input parameters
+ @Input() idVideo:number = -1;
+ @Input() displayVideo:boolean = false;
+
+ error:string = '';
+
+ name:string = '';
+ description:string = '';
+ episode:number = undefined;
+ seriesId:number = undefined;
+ seasonId:number = undefined;
+ dataId:number = -1;
+ time:number = undefined;
+ typeId:number = undefined;
+ generatedName:string = '';
+ videoSource:string = '';
+ videoEnable:boolean = false;
+ imageSource:string = null;
+ episodeDisplay:string = '';
+
+ cover:string = '';
+ covers:string[] = [];
+
+ constructor(private videoService: VideoService,
+ private httpService: HttpWrapperService) {
+
+ }
+ OnDestroy() {
+ this.videoSource = '';
+ this.videoEnable = false;
+ }
+ ngOnInit() {
+ this.name = `ll ${ this.idVideo}`;
+ let self = this;
+ // console.log("get video id: " + this.idVideo);
+ this.videoService.get(this.idVideo)
+ .then((response) => {
+ // console.log("get response of video : " + JSON.stringify(response, null, 2));
+ self.error = '';
+ self.name = response.name;
+ self.description = response.description;
+ self.episode = response.episode;
+ if(response.episode === undefined || response.episode === null || response.episode === '') {
+ self.episodeDisplay = '';
+ } else {
+ self.episodeDisplay = `${response.episode } - `;
+ }
+ self.seriesId = response.seriesId;
+ self.seasonId = response.seasonId;
+ self.dataId = response.dataId;
+ self.time = response.time;
+ self.generatedName = response.generatedName;
+ if(self.dataId !== -1) {
+ self.videoSource = self.httpService.createRESTCall(`data/${ self.dataId}`);
+ self.videoEnable = true;
+ } else {
+ self.videoSource = '';
+ self.videoEnable = false;
+ }
+ if(response.covers === undefined || response.covers === null || response.covers.length === 0) {
+ self.cover = null;
+ // self.covers = [];
+ } else {
+ self.cover = self.videoService.getCoverThumbnailUrl(response.covers[0]);
+ for(let iii = 0; iii < response.covers.length; iii++) {
+ self.covers.push(self.videoService.getCoverThumbnailUrl(response.covers[iii]));
+ }
+ }
+ // console.log("101010 " + self.videoEnable + " " + self.videoSource);
+ // console.log("set transformed : " + JSON.stringify(self, null, 2));
+ }).catch((response) => {
+ self.error = 'Can not get the data';
+ self.name = '';
+ self.description = '';
+ self.episode = undefined;
+ self.episodeDisplay = '';
+ self.seriesId = undefined;
+ self.seasonId = undefined;
+ self.dataId = -1;
+ self.time = undefined;
+ self.generatedName = '';
+ self.videoSource = '';
+ self.videoEnable = false;
+ self.cover = null;
+ self.covers = [];
+ });
+ }
+}
diff --git a/front/src/app/component/popin/popin.html b/front/src/app/component/popin/popin.html
new file mode 100644
index 0000000..90b8caa
--- /dev/null
+++ b/front/src/app/component/popin/popin.html
@@ -0,0 +1,38 @@
+