From 108675e6e6958384f0da5e4bd50a9c89eaa5dd1d Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Wed, 29 Jan 2020 23:56:12 +0100 Subject: [PATCH] [DEV] add middle button --- .../src/app/scene/group/group.component.html | 4 ++-- front/src/app/scene/group/group.component.ts | 22 +++++++++++------- front/src/app/scene/home/home.component.html | 2 +- front/src/app/scene/home/home.component.ts | 12 ++++++---- .../app/scene/saison/saison.component.html | 2 +- .../src/app/scene/saison/saison.component.ts | 10 +++++--- front/src/app/scene/type/type.component.html | 4 ++-- front/src/app/scene/type/type.component.ts | 23 ++++++++++++------- front/src/app/scene/univers/univers.html | 2 +- front/src/app/scene/univers/univers.ts | 10 +++++--- 10 files changed, 58 insertions(+), 33 deletions(-) diff --git a/front/src/app/scene/group/group.component.html b/front/src/app/scene/group/group.component.html index 5ee53c0..70b346d 100644 --- a/front/src/app/scene/group/group.component.html +++ b/front/src/app/scene/group/group.component.html @@ -1,11 +1,11 @@
-
+
-
+
diff --git a/front/src/app/scene/group/group.component.ts b/front/src/app/scene/group/group.component.ts index 03e2595..2c15bc1 100644 --- a/front/src/app/scene/group/group.component.ts +++ b/front/src/app/scene/group/group.component.ts @@ -60,16 +60,22 @@ export class GroupComponent implements OnInit { self.videos = [] }); } - onSelectSaison(_idSelected: number):void { - //this.router.navigate(['/type/' + this.type_id + '/group/' + this.id_group + '/saison/' + _idSelected ]); - this.router.navigate(['/saison/' + _idSelected ]); - this.arianeService.setSaison(_idSelected); + onSelectSaison(_event: any, _idSelected: number):void { + if(_event.which==2) { + window.open('/saison/' + _idSelected); + } else { + this.router.navigate(['/saison/' + _idSelected ]); + this.arianeService.setSaison(_idSelected); + } } - onSelectVideo(_idSelected: number):void { - //this.router.navigate(['/type/' + this.type_id + '/group/' + this.id_group + '/video/' + _idSelected ]); - this.router.navigate(['/video/' + _idSelected ]); - this.arianeService.setVideo(_idSelected); + onSelectVideo(_event: any, _idSelected: number):void { + if(_event.which==2) { + window.open('/video/' + _idSelected); + } else { + this.router.navigate(['/video/' + _idSelected ]); + this.arianeService.setVideo(_idSelected); + } } } diff --git a/front/src/app/scene/home/home.component.html b/front/src/app/scene/home/home.component.html index 9b640ec..f7009e7 100644 --- a/front/src/app/scene/home/home.component.html +++ b/front/src/app/scene/home/home.component.html @@ -1,6 +1,6 @@
-
+
diff --git a/front/src/app/scene/home/home.component.ts b/front/src/app/scene/home/home.component.ts index e052bbf..a83bfea 100644 --- a/front/src/app/scene/home/home.component.ts +++ b/front/src/app/scene/home/home.component.ts @@ -41,10 +41,14 @@ export class HomeComponent implements OnInit { }); this.arianeService.reset(); } - onSelectType(_idSelected: number):void { - this.arianeService.setType(_idSelected); - //this.router.navigate(['type/', { id: _idSelected} ]); - this.router.navigate(['type/' + _idSelected ]); + onSelectType(_event: any, _idSelected: number):void { + if(_event.which==2) { + window.open('/type/' + _idSelected); + } else { + this.arianeService.setType(_idSelected); + //this.router.navigate(['type/', { id: _idSelected} ]); + this.router.navigate(['type/' + _idSelected ]); + } } } diff --git a/front/src/app/scene/saison/saison.component.html b/front/src/app/scene/saison/saison.component.html index a125f51..bb962d2 100644 --- a/front/src/app/scene/saison/saison.component.html +++ b/front/src/app/scene/saison/saison.component.html @@ -1,6 +1,6 @@
-
+
diff --git a/front/src/app/scene/saison/saison.component.ts b/front/src/app/scene/saison/saison.component.ts index 1fd5f75..e02b1b3 100644 --- a/front/src/app/scene/saison/saison.component.ts +++ b/front/src/app/scene/saison/saison.component.ts @@ -46,9 +46,13 @@ export class SaisonComponent implements OnInit { }); } - onSelectVideo(_idSelected: number):void { - this.router.navigate(['video/' + _idSelected ]); - this.arianeService.setVideo(_idSelected); + onSelectVideo(_event: any, _idSelected: number):void { + if(_event.which==2) { + window.open('/video/' + _idSelected); + } else { + this.router.navigate(['video/' + _idSelected ]); + this.arianeService.setVideo(_idSelected); + } } } diff --git a/front/src/app/scene/type/type.component.html b/front/src/app/scene/type/type.component.html index 8517497..8b23f86 100644 --- a/front/src/app/scene/type/type.component.html +++ b/front/src/app/scene/type/type.component.html @@ -1,11 +1,11 @@
-
+
-
+
diff --git a/front/src/app/scene/type/type.component.ts b/front/src/app/scene/type/type.component.ts index 3a87052..5290600 100644 --- a/front/src/app/scene/type/type.component.ts +++ b/front/src/app/scene/type/type.component.ts @@ -62,16 +62,23 @@ export class TypeComponent implements OnInit { self.videos = [] }); } - onSelectGroup(_idSelected: number):void { - //this.router.navigate(['/type/' + this.type_id + '/group/' + _idSelected ]); - this.router.navigate(['/group/' + _idSelected ]); - this.arianeService.setGroup(_idSelected); + onSelectGroup(_event: any, _idSelected: number):void { + if(_event.which==2) { + window.open('/group/' + _idSelected); + } else { + this.router.navigate(['/group/' + _idSelected ]); + this.arianeService.setGroup(_idSelected); + } } - onSelectVideo(_idSelected: number):void { - //this.router.navigate(['/type/' + this.type_id + '/video/' + _idSelected ]); - this.router.navigate(['/video/' + _idSelected ]); - this.arianeService.setVideo(_idSelected); + onSelectVideo(_event: any, _idSelected: number):void { + //console.log("event: " + _event.which); + if(_event.which==2) { + window.open('/video/' + _idSelected); + } else { + this.router.navigate(['/video/' + _idSelected ]); + this.arianeService.setVideo(_idSelected); + } } } diff --git a/front/src/app/scene/univers/univers.html b/front/src/app/scene/univers/univers.html index a125f51..bb962d2 100644 --- a/front/src/app/scene/univers/univers.html +++ b/front/src/app/scene/univers/univers.html @@ -1,6 +1,6 @@
-
+
diff --git a/front/src/app/scene/univers/univers.ts b/front/src/app/scene/univers/univers.ts index cce3c57..4028153 100644 --- a/front/src/app/scene/univers/univers.ts +++ b/front/src/app/scene/univers/univers.ts @@ -48,9 +48,13 @@ export class UniversComponent implements OnInit { */ } - onSelectVideo(_idSelected: number):void { - this.router.navigate(['video/' + _idSelected ]); - this.arianeService.setVideo(_idSelected); + onSelectVideo(_event: any, _idSelected: number):void { + if(_event.which==2) { + window.open('/video/' + _idSelected); + } else { + this.router.navigate(['video/' + _idSelected ]); + this.arianeService.setVideo(_idSelected); + } } }