[DEV] add remove for season and series update gui admin
This commit is contained in:
parent
d5b18067f9
commit
8d9b3d8448
@ -1,8 +1,30 @@
|
||||
<div class="main-reduce">
|
||||
<div class="fill-all">
|
||||
<div class="title">
|
||||
Edit season
|
||||
<div class="main-reduce edit-page">
|
||||
<div class="title">
|
||||
Edit season
|
||||
</div>
|
||||
<div class="fill-all" *ngIf="itemIsRemoved">
|
||||
<div class="message-big">
|
||||
<br/><br/><br/>
|
||||
The season has been removed
|
||||
<br/><br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fill-all" *ngIf="itemIsNotFound">
|
||||
<div class="message-big">
|
||||
<br/><br/><br/>
|
||||
The season does not exist
|
||||
<br/><br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fill-all" *ngIf="itemIsLoading">
|
||||
<div class="message-big">
|
||||
<br/><br/><br/>
|
||||
Loading ...<br/>
|
||||
Please wait.
|
||||
<br/><br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fill-all" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
|
||||
<div class="request_raw">
|
||||
<div class="label">
|
||||
Number:
|
||||
@ -29,6 +51,12 @@
|
||||
<div class="send_value">
|
||||
<button class="button fill-x color-button-validate color-shadow-black" (click)="sendValues()" type="submit"><i class="material-icons">save_alt</i> Save</button>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="title" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
|
||||
Covers
|
||||
</div>
|
||||
<div class="fill-all" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
|
||||
<div class="request_raw">
|
||||
<div class="label">
|
||||
Add cover:
|
||||
@ -57,6 +85,43 @@
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="title" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
|
||||
Administration
|
||||
</div>
|
||||
<div class="fill-all" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
|
||||
<div class="request_raw">
|
||||
<div class="label">
|
||||
<i class="material-icons">data_usage</i> ID:
|
||||
</div>
|
||||
<div class="input">
|
||||
{{id_season}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="request_raw">
|
||||
<div class="label">
|
||||
Videos:
|
||||
</div>
|
||||
<div class="input">
|
||||
{{videoCount}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="request_raw">
|
||||
<div class="label">
|
||||
<i class="material-icons">delete_forever</i> Trash:
|
||||
</div>
|
||||
<div class="input" *ngIf="(videoCount == '0')">
|
||||
<button class="button color-button-cancel color-shadow-black" (click)="removeItem()" type="submit">
|
||||
<i class="material-icons">delete</i> Remove season
|
||||
</button>
|
||||
</div>
|
||||
<div class="input" *ngIf="(videoCount != '0')">
|
||||
<i class="material-icons">new_releases</i> Can not remove season, video depending on it
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
<upload-progress [mediaTitle]="upload.labelMediaTitle"
|
||||
[mediaUploaded]="upload.mediaSendSize"
|
||||
|
@ -1,61 +1,5 @@
|
||||
.fill-all{
|
||||
//width:100%;
|
||||
max-width:80%;
|
||||
height:100%;
|
||||
margin: 20px auto;
|
||||
padding: 20px;
|
||||
border:0;
|
||||
background-color: rgba(200, 200, 200, 0.5);
|
||||
box-shadow: 0px 2px 4px 0 rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
|
||||
.title {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
font-size: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.request_raw {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
height: 45px;
|
||||
.label {
|
||||
width: 20%;
|
||||
margin-right: 10px;
|
||||
text-align: right;
|
||||
float: left;
|
||||
display: block;
|
||||
}
|
||||
.input {
|
||||
width: 75%;
|
||||
float: left;
|
||||
display: block;
|
||||
input {
|
||||
width: 100%;
|
||||
font-size: 20px;
|
||||
}
|
||||
select {
|
||||
width: 100%;
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
.cover_div {
|
||||
//float: left;
|
||||
display: block;
|
||||
}
|
||||
.cover {
|
||||
max-width: 30%;
|
||||
}
|
||||
}
|
||||
.send_value {
|
||||
width: 300px;
|
||||
margin: 0 auto;
|
||||
padding: 10px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.item {
|
||||
font-size: 20px;
|
||||
height: 21%;
|
||||
|
@ -34,14 +34,19 @@ export class ElementList {
|
||||
|
||||
export class SeasonEditScene implements OnInit {
|
||||
id_season:number = -1;
|
||||
itemIsRemoved:boolean = false;
|
||||
itemIsNotFound:boolean = false;
|
||||
itemIsLoading:boolean = true;
|
||||
|
||||
error:string = "";
|
||||
|
||||
numberVal:number = null;
|
||||
description:string = "";
|
||||
coverFile:File;
|
||||
upload_file_value:string = ""
|
||||
upload_file_value:string = "";
|
||||
selectedFiles:FileList;
|
||||
videoCount:string = null;
|
||||
|
||||
|
||||
covers_display:Array<any> = [];
|
||||
// section tha define the upload value to display in the pop-in of upload
|
||||
@ -50,16 +55,22 @@ export class SeasonEditScene implements OnInit {
|
||||
public confirmDeleteComment:string = null;
|
||||
public confirmDeleteImageUrl:string = null;
|
||||
private deleteCoverId:number = null;
|
||||
private deleteItemId:number = null;
|
||||
deleteConfirmed() {
|
||||
if (this.deleteCoverId !== null) {
|
||||
this.removeCoverAfterConfirm(this.deleteCoverId);
|
||||
this.cleanConfirm();
|
||||
}
|
||||
if (this.deleteItemId !== null) {
|
||||
this.removeItemAfterConfirm(this.deleteItemId);
|
||||
this.cleanConfirm();
|
||||
}
|
||||
}
|
||||
cleanConfirm() {
|
||||
this.confirmDeleteComment = null;
|
||||
this.confirmDeleteImageUrl = null;
|
||||
this.deleteCoverId = null;
|
||||
this.deleteItemId = null;
|
||||
}
|
||||
|
||||
|
||||
@ -83,11 +94,20 @@ export class SeasonEditScene implements OnInit {
|
||||
self.numberVal = response.name;
|
||||
self.description = response.description;
|
||||
self.updateCoverList(response.covers);
|
||||
self.itemIsLoading = false;
|
||||
}).catch(function(response) {
|
||||
self.error = "Can not get the data";
|
||||
self.numberVal = null;
|
||||
self.description = "";
|
||||
self.covers_display = [];
|
||||
self.itemIsNotFound = true;
|
||||
self.itemIsLoading = false;
|
||||
});
|
||||
this.seasonService.getVideo(this.id_season)
|
||||
.then(function(response:any) {
|
||||
self.videoCount = response.length;
|
||||
}).catch(function(response:any) {
|
||||
self.videoCount = "---";
|
||||
});
|
||||
}
|
||||
|
||||
@ -192,4 +212,22 @@ export class SeasonEditScene implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
removeItem() {
|
||||
console.log("Request remove Media...");
|
||||
this.cleanConfirm();
|
||||
this.confirmDeleteComment = "Delete the Season: " + this.id_season;
|
||||
this.deleteItemId = this.id_season;
|
||||
this.popInService.open("popin-delete-confirm");
|
||||
}
|
||||
removeItemAfterConfirm(_id:number) {
|
||||
let self = this;
|
||||
this.seasonService.delete(_id)
|
||||
.then(function(response3) {
|
||||
//self.data_ori = tmpp;
|
||||
//self.updateNeedSend();
|
||||
self.itemIsRemoved = true;
|
||||
}).catch(function(response3) {
|
||||
//self.updateNeedSend();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -85,8 +85,7 @@ export class SeasonScene implements OnInit {
|
||||
}
|
||||
|
||||
onSelectVideo(_event: any, _idSelected: number):void {
|
||||
this.arianeService.navigateVideo(_idSelected, _event.which==2);
|
||||
|
||||
this.arianeService.navigateVideo(_idSelected, _event.which==2, _event.ctrlKey);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,8 +1,30 @@
|
||||
<div class="main-reduce">
|
||||
<div class="fill-all">
|
||||
<div class="title">
|
||||
Edit series
|
||||
<div class="main-reduce edit-page">
|
||||
<div class="title">
|
||||
Edit series
|
||||
</div>
|
||||
<div class="fill-all" *ngIf="itemIsRemoved">
|
||||
<div class="message-big">
|
||||
<br/><br/><br/>
|
||||
The series has been removed
|
||||
<br/><br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fill-all" *ngIf="itemIsNotFound">
|
||||
<div class="message-big">
|
||||
<br/><br/><br/>
|
||||
The series does not exist
|
||||
<br/><br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fill-all" *ngIf="itemIsLoading">
|
||||
<div class="message-big">
|
||||
<br/><br/><br/>
|
||||
Loading ...<br/>
|
||||
Please wait.
|
||||
<br/><br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fill-all" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
|
||||
<div class="request_raw">
|
||||
<div class="label">
|
||||
Type:
|
||||
@ -37,9 +59,16 @@
|
||||
(input)="onDescription($event.target.value)"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="send_value">
|
||||
<button class="button fill-x color-button-validate color-shadow-black" (click)="sendValues()" type="submit"><i class="material-icons">save_alt</i> Save</button>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="title" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
|
||||
Covers
|
||||
</div>
|
||||
<div class="fill-all" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
|
||||
<div class="request_raw">
|
||||
<div class="label">
|
||||
Add cover:
|
||||
@ -68,6 +97,52 @@
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="title" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
|
||||
Administration
|
||||
</div>
|
||||
<div class="fill-all" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
|
||||
<div class="request_raw">
|
||||
<div class="label">
|
||||
<i class="material-icons">data_usage</i> ID:
|
||||
</div>
|
||||
<div class="input">
|
||||
{{id_series}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="request_raw">
|
||||
<div class="label">
|
||||
Seasons:
|
||||
</div>
|
||||
<div class="input">
|
||||
{{seasonsCount}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="request_raw">
|
||||
<div class="label">
|
||||
Videos:
|
||||
</div>
|
||||
<div class="input">
|
||||
{{videoCount}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="request_raw">
|
||||
<div class="label">
|
||||
<i class="material-icons">delete_forever</i> Trash:
|
||||
</div>
|
||||
<div class="input" *ngIf="(videoCount == '0' && seasonsCount == '0')">
|
||||
<button class="button color-button-cancel color-shadow-black" (click)="removeItem()" type="submit">
|
||||
<i class="material-icons">delete</i> Remove Series
|
||||
</button>
|
||||
</div>
|
||||
<div class="input" *ngIf="(videoCount != '0' || seasonsCount != '0')">
|
||||
<i class="material-icons">new_releases</i> Can not remove season or video depending on it
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<upload-progress [mediaTitle]="upload.labelMediaTitle"
|
||||
|
@ -1,60 +1,3 @@
|
||||
.fill-all{
|
||||
//width:100%;
|
||||
max-width:80%;
|
||||
height:100%;
|
||||
margin: 20px auto;
|
||||
padding: 20px;
|
||||
border:0;
|
||||
background-color: rgba(200, 200, 200, 0.5);
|
||||
box-shadow: 0px 2px 4px 0 rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
|
||||
.title {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
font-size: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.request_raw {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
height: 45px;
|
||||
.label {
|
||||
width: 20%;
|
||||
margin-right: 10px;
|
||||
text-align: right;
|
||||
float: left;
|
||||
display: block;
|
||||
}
|
||||
.input {
|
||||
width: 75%;
|
||||
float: left;
|
||||
display: block;
|
||||
input {
|
||||
width: 100%;
|
||||
font-size: 20px;
|
||||
}
|
||||
select {
|
||||
width: 100%;
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
.cover_div {
|
||||
//float: left;
|
||||
display: block;
|
||||
}
|
||||
.cover {
|
||||
max-width: 30%;
|
||||
}
|
||||
}
|
||||
.send_value {
|
||||
width: 300px;
|
||||
margin: 0 auto;
|
||||
padding: 10px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.item {
|
||||
font-size: 20px;
|
||||
|
@ -35,6 +35,9 @@ export class ElementList {
|
||||
|
||||
export class SeriesEditScene implements OnInit {
|
||||
id_series:number = -1;
|
||||
itemIsRemoved:boolean = false;
|
||||
itemIsNotFound:boolean = false;
|
||||
itemIsLoading:boolean = true;
|
||||
|
||||
error:string = "";
|
||||
|
||||
@ -44,6 +47,9 @@ export class SeriesEditScene implements OnInit {
|
||||
coverFile:File;
|
||||
upload_file_value:string = "";
|
||||
selectedFiles:FileList;
|
||||
|
||||
seasonsCount:string = null;
|
||||
videoCount:string = null;
|
||||
|
||||
covers_display:Array<any> = [];
|
||||
// section tha define the upload value to display in the pop-in of upload
|
||||
@ -58,16 +64,22 @@ export class SeriesEditScene implements OnInit {
|
||||
public confirmDeleteComment:string = null;
|
||||
public confirmDeleteImageUrl:string = null;
|
||||
private deleteCoverId:number = null;
|
||||
private deleteItemId:number = null;
|
||||
deleteConfirmed() {
|
||||
if (this.deleteCoverId !== null) {
|
||||
this.removeCoverAfterConfirm(this.deleteCoverId);
|
||||
this.cleanConfirm();
|
||||
}
|
||||
if (this.deleteItemId !== null) {
|
||||
this.removeItemAfterConfirm(this.deleteItemId);
|
||||
this.cleanConfirm();
|
||||
}
|
||||
}
|
||||
cleanConfirm() {
|
||||
this.confirmDeleteComment = null;
|
||||
this.confirmDeleteImageUrl = null;
|
||||
this.deleteCoverId = null;
|
||||
this.deleteItemId = null;
|
||||
}
|
||||
|
||||
|
||||
@ -105,12 +117,28 @@ export class SeriesEditScene implements OnInit {
|
||||
self.description = response.description;
|
||||
self.updateCoverList(response.covers);
|
||||
//console.log("covers_list : " + JSON.stringify(self.covers_display, null, 2));
|
||||
self.itemIsLoading = false;
|
||||
}).catch(function(response) {
|
||||
self.error = "Can not get the data";
|
||||
self.name = "";
|
||||
self.description = "";
|
||||
self.covers_display = [];
|
||||
self.itemIsNotFound = true;
|
||||
self.itemIsLoading = false;
|
||||
});
|
||||
console.log("get parameter id: " + this.id_series);
|
||||
this.seriesService.getSeason(this.id_series, ["id", "name"])
|
||||
.then(function(response) {
|
||||
self.seasonsCount = response.length;
|
||||
}).catch(function(response) {
|
||||
self.seasonsCount = "---";
|
||||
});
|
||||
this.seriesService.getVideo(this.id_series)
|
||||
.then(function(response) {
|
||||
self.videoCount = response.length;
|
||||
}).catch(function(response) {
|
||||
self.videoCount = "---";
|
||||
});
|
||||
}
|
||||
|
||||
updateCoverList(_covers: any) {
|
||||
@ -223,5 +251,23 @@ export class SeriesEditScene implements OnInit {
|
||||
console.log("Can not remove the cover of the video...");
|
||||
});
|
||||
}
|
||||
removeItem() {
|
||||
console.log("Request remove Media...");
|
||||
this.cleanConfirm();
|
||||
this.confirmDeleteComment = "Delete the Series: " + this.id_series;
|
||||
this.deleteItemId = this.id_series;
|
||||
this.popInService.open("popin-delete-confirm");
|
||||
}
|
||||
removeItemAfterConfirm(_id:number) {
|
||||
let self = this;
|
||||
this.seriesService.delete(_id)
|
||||
.then(function(response3) {
|
||||
//self.data_ori = tmpp;
|
||||
//self.updateNeedSend();
|
||||
self.itemIsRemoved = true;
|
||||
}).catch(function(response3) {
|
||||
//self.updateNeedSend();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -84,11 +84,11 @@ export class SeriesScene implements OnInit {
|
||||
});
|
||||
}
|
||||
onSelectSeason(_event: any, _idSelected: number):void {
|
||||
this.arianeService.navigateSeason(_idSelected, _event.which==2);
|
||||
this.arianeService.navigateSeason(_idSelected, _event.which==2, _event.ctrlKey);
|
||||
}
|
||||
|
||||
onSelectVideo(_event: any, _idSelected: number):void {
|
||||
this.arianeService.navigateVideo(_idSelected, _event.which==2);
|
||||
this.arianeService.navigateVideo(_idSelected, _event.which==2, _event.ctrlKey);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -75,11 +75,11 @@ export class TypeScene implements OnInit {
|
||||
});
|
||||
}
|
||||
onSelectSeries(_event: any, _idSelected: number):void {
|
||||
this.arianeService.navigateSeries(_idSelected, _event.which==2);
|
||||
this.arianeService.navigateSeries(_idSelected, _event.which==2, _event.ctrlKey);
|
||||
}
|
||||
|
||||
onSelectVideo(_event: any, _idSelected: number):void {
|
||||
this.arianeService.navigateVideo(_idSelected, _event.which==2);
|
||||
this.arianeService.navigateVideo(_idSelected, _event.which==2, _event.ctrlKey);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,28 +1,31 @@
|
||||
<div class="main-reduce">
|
||||
<div class="fill-all" *ngIf="mediaIsRemoved">
|
||||
<div class="title">
|
||||
Edit media<br/><br/><br/><br/><br/>
|
||||
<div class="main-reduce edit-page">
|
||||
<div class="title">
|
||||
Edit Media
|
||||
</div>
|
||||
<div class="fill-all" *ngIf="itemIsRemoved">
|
||||
<div class="message-big">
|
||||
<br/><br/><br/>
|
||||
The media has been removed
|
||||
<br/><br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fill-all" *ngIf="mediaIsNotFound">
|
||||
<div class="title">
|
||||
Edit media<br/><br/><br/><br/><br/>
|
||||
<div class="fill-all" *ngIf="itemIsNotFound">
|
||||
<div class="message-big">
|
||||
<br/><br/><br/>
|
||||
The media does not exist
|
||||
<br/><br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fill-all" *ngIf="mediaIsLoading">
|
||||
<div class="title">
|
||||
Edit media<br/><br/><br/><br/><br/>
|
||||
<div class="fill-all" *ngIf="itemIsLoading">
|
||||
<div class="message-big">
|
||||
<br/><br/><br/>
|
||||
Loading ...<br/>
|
||||
Please wait.
|
||||
<br/><br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fill-all" *ngIf="!mediaIsRemoved && !mediaIsNotFound && !mediaIsLoading">
|
||||
<div class="title">
|
||||
Edit media
|
||||
</div>
|
||||
<div class="fill-all" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
|
||||
<div class="request_raw">
|
||||
<div class="label">
|
||||
Title:
|
||||
@ -135,18 +138,15 @@
|
||||
(input)="onEpisode($event.target)"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="request_raw">
|
||||
<div class="label">
|
||||
<i class="material-icons">data_usage</i> Data ID:
|
||||
</div>
|
||||
<div class="input">
|
||||
{{data.data_id}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="send_value">
|
||||
<button class="button fill-x color-button-validate color-shadow-black" [disabled]="!need_send" (click)="sendValues()" type="submit"><i class="material-icons">save_alt</i> Save</button>
|
||||
</div>
|
||||
<div class="clear"><hr/></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="title" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
|
||||
Covers
|
||||
</div>
|
||||
<div class="fill-all" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
|
||||
<div class="request_raw">
|
||||
<div class="label">
|
||||
Add covers:
|
||||
@ -173,13 +173,27 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"><hr/></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="title" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
|
||||
Administration
|
||||
</div>
|
||||
<div class="fill-all" *ngIf="!itemIsRemoved && !itemIsNotFound && !itemIsLoading">
|
||||
<div class="request_raw">
|
||||
<div class="label">
|
||||
<i class="material-icons">warning</i> Administration:
|
||||
<i class="material-icons">data_usage</i> ID:
|
||||
</div>
|
||||
<div class="input">
|
||||
<button class="button color-button-cancel color-shadow-black" (click)="removeMedia()" type="submit">
|
||||
{{data.data_id}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="request_raw">
|
||||
<div class="label">
|
||||
<i class="material-icons">delete_forever</i> Trash:
|
||||
</div>
|
||||
<div class="input">
|
||||
<button class="button color-button-cancel color-shadow-black" (click)="removeItem()" type="submit">
|
||||
<i class="material-icons">delete</i> Remove Media
|
||||
</button>
|
||||
</div>
|
||||
|
@ -1,94 +1,3 @@
|
||||
.fill-all{
|
||||
//width:100%;
|
||||
max-width:80%;
|
||||
height:100%;
|
||||
margin: 20px auto;
|
||||
padding: 20px;
|
||||
border:0;
|
||||
background-color: rgba(200, 200, 200, 0.5);
|
||||
box-shadow: 0px 2px 4px 0 rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
font-size: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.request_raw2 {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
height: 160px;
|
||||
.label {
|
||||
width: 15%;
|
||||
margin-right: 10px;
|
||||
text-align: right;
|
||||
float: left;
|
||||
display: block;
|
||||
}
|
||||
.input {
|
||||
width: 75%;
|
||||
float: left;
|
||||
display: block;
|
||||
textarea {
|
||||
width: 100%;
|
||||
font-size: 20px;
|
||||
resize: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.request_raw {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
height: 45px;
|
||||
.label {
|
||||
width: 15%;
|
||||
margin-right: 10px;
|
||||
text-align: right;
|
||||
float: left;
|
||||
display: block;
|
||||
}
|
||||
.input {
|
||||
width: 75%;
|
||||
float: left;
|
||||
display: block;
|
||||
input {
|
||||
width: 100%;
|
||||
font-size: 20px;
|
||||
}
|
||||
select {
|
||||
width: 100%;
|
||||
font-size: 20px;
|
||||
}
|
||||
textarea {
|
||||
width: 100%;
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
.input_add {
|
||||
width: 5%;
|
||||
float: right;
|
||||
display: block;
|
||||
}
|
||||
.cover_div {
|
||||
float: left;
|
||||
display: block;
|
||||
}
|
||||
.cover_remove_div {
|
||||
float: left;
|
||||
display: block;
|
||||
}
|
||||
.cover {
|
||||
max-width: 30%;
|
||||
}
|
||||
}
|
||||
.send_value {
|
||||
width: 300px;
|
||||
margin: 0 auto;
|
||||
padding: 10px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.item {
|
||||
font-size: 20px;
|
||||
|
@ -70,9 +70,9 @@ class DataToSend {
|
||||
|
||||
export class VideoEditScene implements OnInit {
|
||||
id_video:number = -1;
|
||||
mediaIsRemoved:boolean = false
|
||||
mediaIsNotFound:boolean = false
|
||||
mediaIsLoading:boolean = true
|
||||
itemIsRemoved:boolean = false
|
||||
itemIsNotFound:boolean = false
|
||||
itemIsLoading:boolean = true
|
||||
|
||||
error:string = ""
|
||||
|
||||
@ -97,7 +97,7 @@ export class VideoEditScene implements OnInit {
|
||||
this.cleanConfirm();
|
||||
}
|
||||
if (this.deleteMediaId !== null) {
|
||||
this.removeMediaAfterConfirm(this.deleteMediaId);
|
||||
this.removeItemAfterConfirm(this.deleteMediaId);
|
||||
this.cleanConfirm();
|
||||
}
|
||||
}
|
||||
@ -239,15 +239,15 @@ export class VideoEditScene implements OnInit {
|
||||
self.updateCoverList(response.covers);
|
||||
self.updateNeedSend();
|
||||
console.log("covers_list : " + JSON.stringify(self.covers_display, null, 2));
|
||||
self.mediaIsLoading = false;
|
||||
self.itemIsLoading = false;
|
||||
}).catch(function(response) {
|
||||
self.error = "Can not get the data";
|
||||
self.data = new DataToSend();
|
||||
self.covers_display = [];
|
||||
self.data_ori = self.data.clone();
|
||||
self.updateNeedSend();
|
||||
self.mediaIsNotFound = true;
|
||||
self.mediaIsLoading = false;
|
||||
self.itemIsNotFound = true;
|
||||
self.itemIsLoading = false;
|
||||
});
|
||||
}
|
||||
|
||||
@ -473,20 +473,20 @@ export class VideoEditScene implements OnInit {
|
||||
self.upload.error = "Error in the upload of the cover..." + JSON.stringify(response, null, 2);
|
||||
});
|
||||
}
|
||||
removeMedia() {
|
||||
removeItem() {
|
||||
console.log("Request remove Media...");
|
||||
this.cleanConfirm();
|
||||
this.confirmDeleteComment = "Delete the Media: " + this.id_video;
|
||||
this.deleteMediaId = this.id_video;
|
||||
this.popInService.open("popin-delete-confirm");
|
||||
}
|
||||
removeMediaAfterConfirm(_id:number) {
|
||||
removeItemAfterConfirm(_id:number) {
|
||||
let self = this;
|
||||
this.videoService.delete(_id)
|
||||
.then(function(response3) {
|
||||
//self.data_ori = tmpp;
|
||||
//self.updateNeedSend();
|
||||
self.mediaIsRemoved = true;
|
||||
self.itemIsRemoved = true;
|
||||
}).catch(function(response3) {
|
||||
//self.updateNeedSend();
|
||||
});
|
||||
|
@ -55,10 +55,13 @@
|
||||
<div class="video-elem">
|
||||
<video src="{{video_source}}/{{generated_name}}"
|
||||
#videoPlayer
|
||||
preload
|
||||
(play)="changeStateToPlay()"
|
||||
(pause)="changeStateToPause()"
|
||||
(timeupdate)="changeTimeupdate($event.currentTime)"
|
||||
(durationchange)="changeDurationchange($event.duration)"
|
||||
(loadedmetadata)="changeMetadata()"
|
||||
(audioTracks)="audioTracks($event)"
|
||||
autoplay
|
||||
(ended)="onVideoEnded()"
|
||||
><!-- controls > --> <!--preload="none"-->
|
||||
|
@ -142,6 +142,34 @@ export class VideoScene implements OnInit {
|
||||
myPeriodicCheckFunction() {
|
||||
console.log("check ... ");
|
||||
}
|
||||
changeMetadata() {
|
||||
console.log("list of the stream:");
|
||||
/*
|
||||
let captureStream = this.videoPlayer.audioTracks;
|
||||
for (let iii=0; iii < captureStream.length; iii++) {
|
||||
console.log(" - " + captureStream[iii].language);
|
||||
if (captureStream[iii].language.substring(0,2) === "fr") {
|
||||
captureStream[iii].enabled = true;
|
||||
} else {
|
||||
captureStream[iii].enabled = false;
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
audioTracks(event) {
|
||||
console.log("list of the stream:" + event);
|
||||
/*
|
||||
let captureStream = this.videoPlayer.audioTracks;
|
||||
for (let iii=0; iii < captureStream.length; iii++) {
|
||||
console.log(" - " + captureStream[iii].language);
|
||||
if (captureStream[iii].language.substring(0,2) === "fr") {
|
||||
captureStream[iii].enabled = true;
|
||||
} else {
|
||||
captureStream[iii].enabled = false;
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.startHideTimer();
|
||||
@ -215,14 +243,17 @@ export class VideoScene implements OnInit {
|
||||
});
|
||||
}
|
||||
onRequirePlay() {
|
||||
this.startHideTimer();
|
||||
this.playVideo = true;
|
||||
this.displayVolumeMenu = false;
|
||||
}
|
||||
onRequireStop() {
|
||||
this.startHideTimer();
|
||||
this.playVideo = false;
|
||||
this.displayVolumeMenu = false;
|
||||
}
|
||||
onVideoEnded() {
|
||||
this.startHideTimer();
|
||||
this.playVideo = false;
|
||||
this.displayVolumeMenu = false;
|
||||
}
|
||||
@ -275,6 +306,7 @@ export class VideoScene implements OnInit {
|
||||
|
||||
onPlay() {
|
||||
console.log("play");
|
||||
this.startHideTimer();
|
||||
if (this.videoPlayer === null
|
||||
|| this.videoPlayer === undefined) {
|
||||
console.log("error element: " + this.videoPlayer);
|
||||
@ -286,15 +318,16 @@ export class VideoScene implements OnInit {
|
||||
|
||||
onPause() {
|
||||
console.log("pause");
|
||||
this.startHideTimer();
|
||||
if (this.videoPlayer === null
|
||||
|| this.videoPlayer === undefined) {
|
||||
console.log("error element: " + this.videoPlayer);
|
||||
return;
|
||||
}
|
||||
this.videoPlayer.pause();
|
||||
}
|
||||
onPauseToggle() {
|
||||
console.log("pause toggle");
|
||||
this.startHideTimer();
|
||||
if (this.videoPlayer === null
|
||||
|| this.videoPlayer === undefined) {
|
||||
console.log("error element: " + this.videoPlayer);
|
||||
@ -309,6 +342,7 @@ export class VideoScene implements OnInit {
|
||||
|
||||
onStop() {
|
||||
console.log("stop");
|
||||
this.startHideTimer();
|
||||
if (this.videoPlayer === null
|
||||
|| this.videoPlayer === undefined) {
|
||||
console.log("error element: " + this.videoPlayer);
|
||||
@ -321,15 +355,17 @@ export class VideoScene implements OnInit {
|
||||
|
||||
onBefore() {
|
||||
console.log("before");
|
||||
this.startHideTimer();
|
||||
}
|
||||
|
||||
onNext() {
|
||||
console.log("next");
|
||||
this.startHideTimer();
|
||||
}
|
||||
|
||||
seek(newValue:any) {
|
||||
console.log("seek " + newValue.value);
|
||||
console.log("next");
|
||||
this.startHideTimer();
|
||||
if (this.videoPlayer === null
|
||||
|| this.videoPlayer === undefined) {
|
||||
console.log("error element: " + this.videoPlayer);
|
||||
@ -340,6 +376,7 @@ export class VideoScene implements OnInit {
|
||||
|
||||
onRewind() {
|
||||
console.log("rewind");
|
||||
this.startHideTimer();
|
||||
if (this.videoPlayer === null
|
||||
|| this.videoPlayer === undefined) {
|
||||
console.log("error element: " + this.videoPlayer);
|
||||
@ -350,6 +387,7 @@ export class VideoScene implements OnInit {
|
||||
|
||||
onForward() {
|
||||
console.log("forward");
|
||||
this.startHideTimer();
|
||||
if (this.videoPlayer === null
|
||||
|| this.videoPlayer === undefined) {
|
||||
console.log("error element: " + this.videoPlayer);
|
||||
@ -360,6 +398,7 @@ export class VideoScene implements OnInit {
|
||||
|
||||
onMore() {
|
||||
console.log("more");
|
||||
this.startHideTimer();
|
||||
if (this.videoPlayer === null
|
||||
|| this.videoPlayer === undefined) {
|
||||
console.log("error element: " + this.videoPlayer);
|
||||
@ -368,6 +407,7 @@ export class VideoScene implements OnInit {
|
||||
}
|
||||
onFullscreen() {
|
||||
console.log("fullscreen");
|
||||
this.startHideTimer();
|
||||
if (this.videoGlobal === null
|
||||
|| this.videoGlobal === undefined) {
|
||||
console.log("error element: " + this.videoGlobal);
|
||||
@ -389,6 +429,7 @@ export class VideoScene implements OnInit {
|
||||
}
|
||||
onFullscreenExit22(docc:any) {
|
||||
console.log("fullscreen EXIT");
|
||||
this.startHideTimer();
|
||||
if (this.videoGlobal === null
|
||||
|| this.videoGlobal === undefined) {
|
||||
console.log("error element: " + this.videoGlobal);
|
||||
@ -419,10 +460,12 @@ export class VideoScene implements OnInit {
|
||||
|
||||
onVolumeMenu() {
|
||||
this.displayVolumeMenu = !this.displayVolumeMenu;
|
||||
this.startHideTimer();
|
||||
}
|
||||
|
||||
onVolume(newValue:any) {
|
||||
console.log("onVolume " + newValue.value);
|
||||
this.startHideTimer();
|
||||
if (this.videoPlayer === null
|
||||
|| this.videoPlayer === undefined) {
|
||||
console.log("error element: " + this.videoPlayer);
|
||||
@ -434,6 +477,7 @@ export class VideoScene implements OnInit {
|
||||
}
|
||||
|
||||
onVolumeMute() {
|
||||
this.startHideTimer();
|
||||
if (this.videoPlayer === null
|
||||
|| this.videoPlayer === undefined) {
|
||||
console.log("error element: " + this.videoPlayer);
|
||||
@ -443,6 +487,7 @@ export class VideoScene implements OnInit {
|
||||
}
|
||||
|
||||
onVolumeUnMute() {
|
||||
this.startHideTimer();
|
||||
if (this.videoPlayer === null
|
||||
|| this.videoPlayer === undefined) {
|
||||
console.log("error element: " + this.videoPlayer);
|
||||
@ -452,6 +497,7 @@ export class VideoScene implements OnInit {
|
||||
}
|
||||
|
||||
onTakeScreenShoot() {
|
||||
this.startHideTimer();
|
||||
//const canvas = document.createElement("canvas");
|
||||
// scale the canvas accordingly
|
||||
this.videoCanva.width = this.videoPlayer.videoWidth;
|
||||
|
@ -330,25 +330,42 @@ export class ArianeService {
|
||||
navigateUniverseEdit(_id:number, _newWindows:boolean):void {
|
||||
this.genericNavigate('universe-edit', _id, this.type_id, null, null, null, _newWindows);
|
||||
}
|
||||
navigateType(_id:number, _newWindows:boolean):void {
|
||||
navigateType(_id:number, _newWindows:boolean, _ctrl:boolean = false):void {
|
||||
if (_ctrl == true) {
|
||||
this.navigateTypeEdit(_id, _newWindows);
|
||||
return;
|
||||
}
|
||||
this.genericNavigate('type', this.universe_id, _id, null, null, null, _newWindows);
|
||||
}
|
||||
navigateTypeEdit(_id:number, _newWindows:boolean):void {
|
||||
this.genericNavigate('type-edit', this.universe_id, _id, null, null, null, _newWindows);
|
||||
}
|
||||
navigateSeries(_id:number, _newWindows:boolean):void {
|
||||
navigateSeries(_id:number, _newWindows:boolean, _ctrl:boolean = false):void {
|
||||
if (_ctrl == true) {
|
||||
this.navigateTypeEdit(_id, _newWindows);
|
||||
return;
|
||||
}
|
||||
this.genericNavigate('series', this.universe_id, this.type_id, _id, null, null, _newWindows);
|
||||
}
|
||||
navigateSeriesEdit(_id:number, _newWindows:boolean):void {
|
||||
this.genericNavigate('series-edit', this.universe_id, this.type_id, _id, null, null, _newWindows);
|
||||
}
|
||||
navigateSeason(_id:number, _newWindows:boolean):void {
|
||||
navigateSeason(_id:number, _newWindows:boolean, _ctrl:boolean = false):void {
|
||||
if (_ctrl == true) {
|
||||
this.navigateSeasonEdit(_id, _newWindows);
|
||||
return;
|
||||
}
|
||||
this.genericNavigate('season', this.universe_id, this.type_id, this.series_id, _id, null, _newWindows);
|
||||
}
|
||||
navigateSeasonEdit(_id:number, _newWindows:boolean):void {
|
||||
this.genericNavigate('season-edit', this.universe_id, this.type_id, this.series_id, _id, null, _newWindows);
|
||||
}
|
||||
navigateVideo(_id:number, _newWindows:boolean):void {
|
||||
navigateVideo(_id:number, _newWindows:boolean, _ctrl:boolean = false):void {
|
||||
console.log("======================================" + _ctrl);
|
||||
if (_ctrl == true) {
|
||||
this.navigateVideoEdit(_id, _newWindows);
|
||||
return;
|
||||
}
|
||||
this.genericNavigate('video', this.universe_id, this.type_id, this.series_id, this.season_id, _id, _newWindows);
|
||||
}
|
||||
navigateVideoEdit(_id:number, _newWindows:boolean):void {
|
||||
|
@ -61,6 +61,12 @@ export class SeasonService {
|
||||
let ret = this.http.put_specific(this.serviceName, _id, _data);
|
||||
return this.bdd.setAfterPut(this.serviceName, _id, ret);
|
||||
}
|
||||
|
||||
delete(_id:number):any {
|
||||
let ret = this.http.delete_specific(this.serviceName, _id);
|
||||
return this.bdd.delete(this.serviceName, _id, ret);
|
||||
}
|
||||
|
||||
getCoverUrl(_coverId:number):any {
|
||||
return this.http.createRESTCall("data/" + _coverId);
|
||||
}
|
||||
|
@ -118,7 +118,12 @@ export class SeriesService {
|
||||
let ret = this.http.put_specific(this.serviceName, _id, _data);
|
||||
return this.bdd.setAfterPut(this.serviceName, _id, ret);
|
||||
}
|
||||
|
||||
|
||||
delete(_id:number):any {
|
||||
let ret = this.http.delete_specific(this.serviceName, _id);
|
||||
return this.bdd.delete(this.serviceName, _id, ret);
|
||||
}
|
||||
|
||||
getCoverUrl(_coverId:number):any {
|
||||
return this.http.createRESTCall("data/" + _coverId);
|
||||
}
|
||||
|
@ -125,3 +125,114 @@
|
||||
}
|
||||
}
|
||||
|
||||
.edit-page {
|
||||
.title {
|
||||
//background-color: green;
|
||||
font-size: 45px;
|
||||
font-weight: bold;
|
||||
line-height: 60px;
|
||||
width:100%;
|
||||
align: center;
|
||||
height: 50px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
margin: 10px 0 10px 0;
|
||||
text-shadow: 1px 1px 2px white, 0 0 1em white, 0 0 0.2em white;
|
||||
text-transform: uppercase;
|
||||
font-family: "Roboto","Helvetica","Arial",sans-serif;
|
||||
}
|
||||
|
||||
.fill-all{
|
||||
//width:100%;
|
||||
max-width:80%;
|
||||
height:100%;
|
||||
margin: 20px auto;
|
||||
padding: 20px;
|
||||
border:0;
|
||||
background-color: rgba(200, 200, 200, 0.5);
|
||||
box-shadow: 0px 2px 4px 0 rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.message-big {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
font-size: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
.request_raw2 {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
height: 160px;
|
||||
.label {
|
||||
width: 15%;
|
||||
margin-right: 10px;
|
||||
text-align: right;
|
||||
float: left;
|
||||
display: block;
|
||||
}
|
||||
.input {
|
||||
width: 75%;
|
||||
float: left;
|
||||
display: block;
|
||||
textarea {
|
||||
width: 100%;
|
||||
font-size: 20px;
|
||||
resize: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.request_raw {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
height: 45px;
|
||||
.label {
|
||||
width: 15%;
|
||||
margin-right: 10px;
|
||||
text-align: right;
|
||||
float: left;
|
||||
display: block;
|
||||
}
|
||||
.input {
|
||||
width: 75%;
|
||||
float: left;
|
||||
display: block;
|
||||
input {
|
||||
width: 100%;
|
||||
font-size: 20px;
|
||||
}
|
||||
select {
|
||||
width: 100%;
|
||||
font-size: 20px;
|
||||
}
|
||||
textarea {
|
||||
width: 100%;
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
.input_add {
|
||||
width: 5%;
|
||||
float: right;
|
||||
display: block;
|
||||
}
|
||||
.cover_div {
|
||||
float: left;
|
||||
display: block;
|
||||
}
|
||||
.cover_remove_div {
|
||||
float: left;
|
||||
display: block;
|
||||
}
|
||||
.cover {
|
||||
max-width: 30%;
|
||||
}
|
||||
}
|
||||
.send_value {
|
||||
width: 300px;
|
||||
margin: 0 auto;
|
||||
padding: 10px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user