[DEV] rework naming of stupid end naming of filename

This commit is contained in:
Edouard DUPIN 2020-03-04 21:41:25 +01:00
parent 1393cc8520
commit 75abeefeaa
83 changed files with 385 additions and 385 deletions

View File

@ -8,15 +8,15 @@ import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; import { RouterModule, Routes } from '@angular/router';
import { ModuleWithProviders } from '@angular/core'; import { ModuleWithProviders } from '@angular/core';
import { HomeComponent } from './scene/home/home.component'; import { HomeComponent } from './scene/home/home';
import { TypeComponent } from './scene/type/type.component'; import { TypeComponent } from './scene/type/type';
import { UniversComponent } from './scene/univers/univers'; import { UniversComponent } from './scene/univers/univers';
import { GroupComponent } from './scene/group/group.component'; import { GroupComponent } from './scene/group/group';
import { SaisonComponent } from './scene/saison/saison.component'; import { SaisonComponent } from './scene/saison/saison';
import { VideoComponent } from './scene/video/video.component'; import { VideoComponent } from './scene/video/video';
import { LoginComponent } from './scene/login/login.component'; import { LoginComponent } from './scene/login/login';
import { SignUpComponent } from './scene/sign-up/sign-up.component'; import { SignUpComponent } from './scene/sign-up/sign-up';
import { SettingsComponent } from './scene/settings/settings.component'; import { SettingsComponent } from './scene/settings/settings';
import { VideoEditComponent } from './scene/video-edit/video-edit'; import { VideoEditComponent } from './scene/video-edit/video-edit';
import { GroupEditComponent } from './scene/group-edit/group-edit'; import { GroupEditComponent } from './scene/group-edit/group-edit';
import { SaisonEditComponent } from './scene/saison-edit/saison-edit'; import { SaisonEditComponent } from './scene/saison-edit/saison-edit';

View File

@ -5,9 +5,9 @@
*/ */
import { Component, OnInit} from '@angular/core'; import { Component, OnInit} from '@angular/core';
import { UserService } from './service/user.service'; import { UserService } from './service/user';
import { SessionService } from './service/session.service'; import { SessionService } from './service/session';
import { CookiesService } from './service/cookies.service'; import { CookiesService } from './service/cookies';
@Component({ @Component({
selector: 'app-root', selector: 'app-root',

View File

@ -14,45 +14,45 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { routing } from './app-routing.module'; import { routing } from './app-routing.module';
import { UploadFileComponent } from './component/upload-file/upload-file.component'; import { UploadFileComponent } from './component/upload-file/upload-file';
import { TopMenuComponent } from './component/top-menu/top-menu.component'; import { TopMenuComponent } from './component/top-menu/top-menu';
import { ElementTypeComponent } from './component/element-type/element-type.component'; import { ElementTypeComponent } from './component/element-type/element-type';
import { ElementGroupComponent } from './component/element-group/element-group.component'; import { ElementGroupComponent } from './component/element-group/element-group';
import { ElementSaisonComponent } from './component/element-saison/element-saison.component'; import { ElementSaisonComponent } from './component/element-saison/element-saison';
import { ElementVideoComponent } from './component/element-video/element-video.component'; import { ElementVideoComponent } from './component/element-video/element-video';
import { ModalComponent } from './component/modal/modal'; import { PopInComponent } from './component/popin/popin';
import { HelpComponent } from './scene/help/help.component'; import { HelpComponent } from './scene/help/help';
import { LoginComponent } from './scene/login/login.component'; import { LoginComponent } from './scene/login/login';
import { SignUpComponent } from './scene/sign-up/sign-up.component'; import { SignUpComponent } from './scene/sign-up/sign-up';
import { ValidateEmailComponent } from './scene/validate-email/validate-email.component'; import { ValidateEmailComponent } from './scene/validate-email/validate-email';
import { HomeComponent } from './scene/home/home.component'; import { HomeComponent } from './scene/home/home';
import { TypeComponent } from './scene/type/type.component'; import { TypeComponent } from './scene/type/type';
import { UniversComponent } from './scene/univers/univers'; import { UniversComponent } from './scene/univers/univers';
import { GroupComponent } from './scene/group/group.component'; import { GroupComponent } from './scene/group/group';
import { SaisonComponent } from './scene/saison/saison.component'; import { SaisonComponent } from './scene/saison/saison';
import { VideoComponent } from './scene/video/video.component'; import { VideoComponent } from './scene/video/video';
import { SettingsComponent } from './scene/settings/settings.component'; import { SettingsComponent } from './scene/settings/settings';
import { ErrorViewerComponent } from './scene/error-viewer/error-viewer.component'; import { ErrorViewerComponent } from './scene/error-viewer/error-viewer';
import { ErrorComponent } from './error/error.component'; import { ErrorComponent } from './error/error';
import { VideoEditComponent } from './scene/video-edit/video-edit'; import { VideoEditComponent } from './scene/video-edit/video-edit';
import { SaisonEditComponent } from './scene/saison-edit/saison-edit'; import { SaisonEditComponent } from './scene/saison-edit/saison-edit';
import { GroupEditComponent } from './scene/group-edit/group-edit'; import { GroupEditComponent } from './scene/group-edit/group-edit';
import { AuthService } from './service/auth.service'; import { AuthService } from './service/auth';
import { ArianeService } from './service/ariane.service'; import { ArianeService } from './service/ariane';
import { CookiesService } from './service/cookies.service'; import { CookiesService } from './service/cookies';
import { HttpWrapperService } from './service/http-wrapper.service'; import { HttpWrapperService } from './service/http-wrapper';
import { UserService } from './service/user.service'; import { UserService } from './service/user';
import { UniversService } from './service/univers.service'; import { UniversService } from './service/univers';
import { GroupService } from './service/group.service'; import { GroupService } from './service/group';
import { DataService } from './service/data.service'; import { DataService } from './service/data';
import { TypeService } from './service/type.service'; import { TypeService } from './service/type';
import { SaisonService } from './service/saison.service'; import { SaisonService } from './service/saison';
import { VideoService } from './service/video.service'; import { VideoService } from './service/video';
import { SessionService } from './service/session.service'; import { SessionService } from './service/session';
import { BddService } from './service/bdd.service'; import { BddService } from './service/bdd';
import { ModalService } from './service/modal'; import { PopInService } from './service/popin';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
@NgModule({ @NgModule({
@ -80,7 +80,7 @@ import { AppComponent } from './app.component';
VideoEditComponent, VideoEditComponent,
SaisonEditComponent, SaisonEditComponent,
GroupEditComponent, GroupEditComponent,
ModalComponent PopInComponent
], ],
imports: [ imports: [
BrowserModule, BrowserModule,
@ -92,7 +92,7 @@ import { AppComponent } from './app.component';
ReactiveFormsModule ReactiveFormsModule
], ],
providers: [ providers: [
ModalService, PopInService,
HttpWrapperService, HttpWrapperService,
BddService, BddService,
AuthService, AuthService,

View File

@ -9,12 +9,12 @@ import { Injectable, Component, OnInit, Input } from '@angular/core';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { ActivatedRoute, Params } from '@angular/router'; import { ActivatedRoute, Params } from '@angular/router';
import { GroupService } from '../../service/group.service'; import { GroupService } from '../../service/group';
@Component({ @Component({
selector: 'app-element-group', selector: 'app-element-group',
templateUrl: './element-group.component.html', templateUrl: './element-group.html',
styleUrls: ['./element-group.component.less'] styleUrls: ['./element-group.less']
}) })
@Injectable() @Injectable()

View File

@ -9,12 +9,12 @@ import { Injectable, Component, OnInit, Input } from '@angular/core';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { ActivatedRoute, Params } from '@angular/router'; import { ActivatedRoute, Params } from '@angular/router';
import { SaisonService } from '../../service/saison.service'; import { SaisonService } from '../../service/saison';
@Component({ @Component({
selector: 'app-element-saison', selector: 'app-element-saison',
templateUrl: './element-saison.component.html', templateUrl: './element-saison.html',
styleUrls: ['./element-saison.component.less'] styleUrls: ['./element-saison.less']
}) })
@Injectable() @Injectable()

View File

@ -9,12 +9,12 @@ import { Injectable, Component, OnInit, Input } from '@angular/core';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { ActivatedRoute, Params } from '@angular/router'; import { ActivatedRoute, Params } from '@angular/router';
import { TypeService } from '../../service/type.service'; import { TypeService } from '../../service/type';
@Component({ @Component({
selector: 'app-element-type', selector: 'app-element-type',
templateUrl: './element-type.component.html', templateUrl: './element-type.html',
styleUrls: ['./element-type.component.less'] styleUrls: ['./element-type.less']
}) })
@Injectable() @Injectable()

View File

@ -1,111 +0,0 @@
/** @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 { AppRoutingModule } from "../app-routing.module";
import { Router } from "@angular/router";
import { ActivatedRoute, Params } from '@angular/router';
import { VideoService } from '../../service/video.service';
import { HttpWrapperService } from '../../service/http-wrapper.service';
@Component({
selector: 'app-element-video',
templateUrl: './element-video.component.html',
styleUrls: ['./element-video.component.less']
})
@Injectable()
export class ElementVideoComponent implements OnInit {
// input parameters
@Input() id_video:number = -1;
@Input() display_video:boolean = false;
error:string = "";
name:string = "";
description:string = "";
episode:number = undefined;
group_id:number = undefined;
saison_id:number = undefined;
data_id:number = -1;
time:number = undefined;
type_id:number = undefined;
generated_name:string = "";
video_source:string = "";
video_enable:boolean = false;
imageSource:string = null;
episode_display:string = "";
cover:string = "";
covers:Array<string> = [];
constructor(private router: Router,
private videoService: VideoService,
private httpService: HttpWrapperService) {
}
OnDestroy() {
this.video_source = "";
this.video_enable = false;
}
ngOnInit() {
this.name = "ll " + this.id_video
let self = this;
//console.log("get video id: " + this.id_video);
this.videoService.get(this.id_video)
.then(function(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.episode_display = "";
} else {
self.episode_display = response.episode + " - ";
}
self.group_id = response.serie_id;
self.saison_id = response.saison_id;
self.data_id = response.data_id;
self.time = response.time;
self.generated_name = response.generated_name;
if (self.data_id != -1) {
self.video_source = self.httpService.createRESTCall("data/" + self.data_id);
self.video_enable = true;
} else {
self.video_source = "";
self.video_enable = false;
}
if (response.covers == undefined || response.covers == null || response.covers.length == 0) {
self.cover = null;
//self.covers = [];
} else {
self.cover = self.videoService.getCoverUrl(response.covers[0]);
for (let iii=0; iii<response.covers.length; iii++) {
self.covers.push(self.videoService.getCoverUrl(response.covers[iii]));
}
}
//console.log("101010 " + self.video_enable + " " + self.video_source);
//console.log("set transformed : " + JSON.stringify(self, null, 2));
}).catch(function(response) {
self.error = "Can not get the data";
self.name = "";
self.description = "";
self.episode = undefined;
self.episode_display = "";
self.group_id = undefined;
self.saison_id = undefined;
self.data_id = -1;
self.time = undefined;
self.generated_name = "";
self.video_source = "";
self.video_enable = false;
self.cover = null;
self.covers = [];
});
}
}

View File

@ -0,0 +1,111 @@
/** @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 { AppRoutingModule } from "../app-routing.module";
import { Router } from "@angular/router";
import { ActivatedRoute, Params } from '@angular/router';
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() id_video:number = -1;
@Input() display_video:boolean = false;
error:string = "";
name:string = "";
description:string = "";
episode:number = undefined;
group_id:number = undefined;
saison_id:number = undefined;
data_id:number = -1;
time:number = undefined;
type_id:number = undefined;
generated_name:string = "";
video_source:string = "";
video_enable:boolean = false;
imageSource:string = null;
episode_display:string = "";
cover:string = "";
covers:Array<string> = [];
constructor(private router: Router,
private videoService: VideoService,
private httpService: HttpWrapperService) {
}
OnDestroy() {
this.video_source = "";
this.video_enable = false;
}
ngOnInit() {
this.name = "ll " + this.id_video
let self = this;
//console.log("get video id: " + this.id_video);
this.videoService.get(this.id_video)
.then(function(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.episode_display = "";
} else {
self.episode_display = response.episode + " - ";
}
self.group_id = response.serie_id;
self.saison_id = response.saison_id;
self.data_id = response.data_id;
self.time = response.time;
self.generated_name = response.generated_name;
if (self.data_id != -1) {
self.video_source = self.httpService.createRESTCall("data/" + self.data_id);
self.video_enable = true;
} else {
self.video_source = "";
self.video_enable = false;
}
if (response.covers == undefined || response.covers == null || response.covers.length == 0) {
self.cover = null;
//self.covers = [];
} else {
self.cover = self.videoService.getCoverUrl(response.covers[0]);
for (let iii=0; iii<response.covers.length; iii++) {
self.covers.push(self.videoService.getCoverUrl(response.covers[iii]));
}
}
//console.log("101010 " + self.video_enable + " " + self.video_source);
//console.log("set transformed : " + JSON.stringify(self, null, 2));
}).catch(function(response) {
self.error = "Can not get the data";
self.name = "";
self.description = "";
self.episode = undefined;
self.episode_display = "";
self.group_id = undefined;
self.saison_id = undefined;
self.data_id = -1;
self.time = undefined;
self.generated_name = "";
self.video_source = "";
self.video_enable = false;
self.cover = null;
self.covers = [];
});
}
}

View File

@ -1,9 +0,0 @@
<div class="fill-modal">
<div class="modal">
<div class="modal-body">
<h1>{{title}}</h1>
<ng-content></ng-content>
</div>
</div>
<div class="modal-background"></div>
</div>

View File

@ -1,59 +0,0 @@
/* MODAL STYLES
-------------------------------*/
/* modals are hidden by default */
//display: none;
.fill-modal {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 800;
}
.modal {
/* modal container fixed across whole screen */
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: block;
/* z-index must be higher than .modal-background */
z-index: 1000;
/* enables scrolling for tall modals */
overflow: auto;
.modal-body {
padding: 20px;
background: #fff;
/* margin exposes part of the modal background */
margin: 40px;
}
}
.modal-background {
/* modal background fixed across whole screen */
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
/* semi-transparent black */
background-color: #000;
opacity: 0.75;
/* z-index must be below .modal and above everything else */
z-index: 900;
}
body.modal-open {
/* body overflow is hidden to hide main scrollbar when modal window is open */
overflow: hidden;
}

View File

@ -0,0 +1,9 @@
<div class="fill-popin">
<div class="popin">
<div class="popin-body">
<h1>{{title}}</h1>
<ng-content></ng-content>
</div>
</div>
<div class="popin-background"></div>
</div>

View File

@ -0,0 +1,59 @@
/* popin STYLES
-------------------------------*/
/* popins are hidden by default */
//display: none;
.fill-popin {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 800;
}
.popin {
/* popin container fixed across whole screen */
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: block;
/* z-index must be higher than .popin-background */
z-index: 1000;
/* enables scrolling for tall popins */
overflow: auto;
.popin-body {
padding: 20px;
background: #fff;
/* margin exposes part of the popin background */
margin: 40px;
}
}
.popin-background {
/* popin background fixed across whole screen */
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
/* semi-transparent black */
background-color: #000;
opacity: 0.75;
/* z-index must be below .popin and above everything else */
z-index: 900;
}
body.popin-open {
/* body overflow is hidden to hide main scrollbar when popin window is open */
overflow: hidden;
}

View File

@ -1,60 +1,60 @@
import { Component, ElementRef, Input, OnInit, OnDestroy } from '@angular/core'; import { Component, ElementRef, Input, OnInit, OnDestroy } from '@angular/core';
import * as $ from 'jquery'; import * as $ from 'jquery';
import { ModalService } from '../../service/modal'; import { PopInService } from '../../service/popin';
@Component({ @Component({
moduleId: module.id.toString(), moduleId: module.id.toString(),
selector: 'modal', selector: 'popin',
templateUrl: './modal.html', templateUrl: './popin.html',
styleUrls: ['./modal.less'] styleUrls: ['./popin.less']
}) })
export class ModalComponent implements OnInit, OnDestroy { export class PopInComponent implements OnInit, OnDestroy {
@Input() id: string; @Input() id: string;
@Input() title: string = 'No title'; @Input() title: string = 'No title';
@Input() closeOnOutClick: any = "false"; @Input() closeOnOutClick: any = "false";
private element: any; private element: any;
constructor(private modalService: ModalService, constructor(private popInService: PopInService,
private el: ElementRef) { private el: ElementRef) {
this.element = $(el.nativeElement); this.element = $(el.nativeElement);
} }
ngOnInit(): void { ngOnInit(): void {
let modal = this; let self = this;
// ensure id attribute exists // ensure id attribute exists
if (!this.id) { if (!this.id) {
console.error('modal must have an id'); console.error('popin must have an id');
return; return;
} }
// move element to bottom of page (just before </body>) so it can be displayed above everything else // move element to bottom of page (just before </body>) so it can be displayed above everything else
this.element.appendTo('body'); this.element.appendTo('body');
if (this.closeOnOutClick == "true") { if (this.closeOnOutClick == "true") {
// close modal on background click // close popin on background click
this.element.on('click', function (e: any) { this.element.on('click', function (e: any) {
let target = $(e.target); let target = $(e.target);
if (!target.closest('.modal-body').length) { if (!target.closest('.modal-body').length) {
modal.close(); self.close();
} }
}); });
} }
// add self (this modal instance) to the modal service so it's accessible from controllers // add self (this popin instance) to the popin service so it's accessible from controllers
this.modalService.add(this); this.popInService.add(this);
} }
// remove self from modal service when directive is destroyed // remove self from popIn service when directive is destroyed
ngOnDestroy(): void { ngOnDestroy(): void {
this.modalService.remove(this.id); this.popInService.remove(this.id);
this.element.remove(); this.element.remove();
} }
// open modal // open popIn
open(): void { open(): void {
//console.log("request element show ..."); //console.log("request element show ...");
this.element.show(); this.element.show();
//$('body').addClass('modal-open'); //$('body').addClass('popin-open');
//console.log(" ==> done"); //console.log(" ==> done");
} }
// close modal // close popin
close(): void { close(): void {
this.element.hide(); this.element.hide();
//$('body').removeClass('modal-open'); //$('body').removeClass('popin-open');
} }
} }

View File

@ -9,13 +9,13 @@ import { Injectable, Component, OnInit } from '@angular/core';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { ActivatedRoute, Params } from '@angular/router'; import { ActivatedRoute, Params } from '@angular/router';
import { SessionService } from '../../service/session.service'; import { SessionService } from '../../service/session';
import { ArianeService } from '../../service/ariane.service'; import { ArianeService } from '../../service/ariane';
@Component({ @Component({
selector: 'app-top-menu', selector: 'app-top-menu',
templateUrl: './top-menu.component.html', templateUrl: './top-menu.html',
styleUrls: ['./top-menu.component.less'] styleUrls: ['./top-menu.less']
}) })
@Injectable() @Injectable()
export class TopMenuComponent implements OnInit { export class TopMenuComponent implements OnInit {

View File

@ -2,8 +2,8 @@ import { Component} from '@angular/core';
@Component({ @Component({
selector: 'app-upload-file', selector: 'app-upload-file',
templateUrl: './upload-file.component.html', templateUrl: './upload-file.html',
styleUrls: ['./upload-file.component.less'] styleUrls: ['./upload-file.less']
}) })
export class UploadFileComponent { export class UploadFileComponent {

View File

@ -8,8 +8,8 @@ import { Component, OnInit } from '@angular/core';
@Component({ @Component({
selector: 'app-error', selector: 'app-error',
templateUrl: './error.component.html', templateUrl: './error.html',
styleUrls: ['./error.component.less'] styleUrls: ['./error.less']
}) })
export class ErrorComponent implements OnInit { export class ErrorComponent implements OnInit {

View File

@ -8,8 +8,8 @@ import { Component, OnInit } from '@angular/core';
@Component({ @Component({
selector: 'app-error-viewer', selector: 'app-error-viewer',
templateUrl: './error-viewer.component.html', templateUrl: './error-viewer.html',
styleUrls: ['./error-viewer.component.less'] styleUrls: ['./error-viewer.less']
}) })
export class ErrorViewerComponent implements OnInit { export class ErrorViewerComponent implements OnInit {

View File

@ -11,8 +11,8 @@ import { NgForm } from '@angular/forms';
import { FormGroup, FormControl } from "@angular/forms"; import { FormGroup, FormControl } from "@angular/forms";
import { fadeInAnimation } from '../../_animations/index'; import { fadeInAnimation } from '../../_animations/index';
import { GroupService } from '../../service/group.service'; import { GroupService } from '../../service/group';
import { DataService } from '../../service/data.service'; import { DataService } from '../../service/data';
export class ElementList { export class ElementList {
value: number; value: number;

View File

@ -9,14 +9,14 @@ import { Router, ActivatedRoute, ParamMap } from '@angular/router';
import { Location } from '@angular/common'; import { Location } from '@angular/common';
import { fadeInAnimation } from '../../_animations/index'; import { fadeInAnimation } from '../../_animations/index';
import { GroupService } from '../../service/group.service'; import { GroupService } from '../../service/group';
import { ArianeService } from '../../service/ariane.service'; import { ArianeService } from '../../service/ariane';
import { environment } from 'environments/environment'; import { environment } from 'environments/environment';
@Component({ @Component({
selector: 'app-group', selector: 'app-group',
templateUrl: './group.component.html', templateUrl: './group.html',
styleUrls: ['./group.component.less'], styleUrls: ['./group.less'],
animations: [fadeInAnimation], animations: [fadeInAnimation],
host: { '[@fadeInAnimation]': '' } host: { '[@fadeInAnimation]': '' }
}) })

View File

@ -2,8 +2,8 @@ import { Component, OnInit } from '@angular/core';
@Component({ @Component({
selector: 'app-help', selector: 'app-help',
templateUrl: './help.component.html', templateUrl: './help.html',
styleUrls: ['./help.component.less'] styleUrls: ['./help.less']
}) })
export class HelpComponent implements OnInit { export class HelpComponent implements OnInit {

View File

@ -9,14 +9,14 @@ import { Router } from "@angular/router";
import { Location } from '@angular/common'; import { Location } from '@angular/common';
import { fadeInAnimation } from '../../_animations/index'; import { fadeInAnimation } from '../../_animations/index';
import { TypeService } from '../../service/type.service'; import { TypeService } from '../../service/type';
import { ArianeService } from '../../service/ariane.service'; import { ArianeService } from '../../service/ariane';
import { environment } from 'environments/environment'; import { environment } from 'environments/environment';
@Component({ @Component({
selector: 'app-home', selector: 'app-home',
templateUrl: './home.component.html', templateUrl: './home.html',
styleUrls: ['./home.component.less'], styleUrls: ['./home.less'],
animations: [fadeInAnimation], animations: [fadeInAnimation],
host: { '[@fadeInAnimation]': '' } host: { '[@fadeInAnimation]': '' }
}) })

View File

@ -9,9 +9,9 @@ import { Router } from "@angular/router";
import { Location } from '@angular/common'; import { Location } from '@angular/common';
import { fadeInAnimation } from '../../_animations/index'; import { fadeInAnimation } from '../../_animations/index';
import { slideInOutAnimation } from '../../_animations/index'; import { slideInOutAnimation } from '../../_animations/index';
import { UserService } from '../../service/user.service'; import { UserService } from '../../service/user';
import { SessionService } from '../../service/session.service'; import { SessionService } from '../../service/session';
import { CookiesService } from '../../service/cookies.service'; import { CookiesService } from '../../service/cookies';
export let checkLoginValidity = function(_value:string):boolean { export let checkLoginValidity = function(_value:string):boolean {
@ -43,8 +43,8 @@ declare function SHA512(param1: any): any;
@Component({ @Component({
selector: 'app-login', selector: 'app-login',
templateUrl: './login.component.html', templateUrl: './login.html',
styleUrls: ['./login.component.less'], styleUrls: ['./login.less'],
animations: [fadeInAnimation], animations: [fadeInAnimation],
host: { '[@fadeInAnimation]': '' } host: { '[@fadeInAnimation]': '' }
}) })

View File

@ -11,8 +11,8 @@ import { NgForm } from '@angular/forms';
import { FormGroup, FormControl } from "@angular/forms"; import { FormGroup, FormControl } from "@angular/forms";
import { fadeInAnimation } from '../../_animations/index'; import { fadeInAnimation } from '../../_animations/index';
import { SaisonService } from '../../service/saison.service'; import { SaisonService } from '../../service/saison';
import { DataService } from '../../service/data.service'; import { DataService } from '../../service/data';
export class ElementList { export class ElementList {
value: number; value: number;

View File

@ -9,15 +9,15 @@ import { Router, ActivatedRoute, ParamMap } from '@angular/router';
import { Location } from '@angular/common'; import { Location } from '@angular/common';
import { fadeInAnimation } from '../../_animations/index'; import { fadeInAnimation } from '../../_animations/index';
import { SaisonService } from '../../service/saison.service'; import { SaisonService } from '../../service/saison';
import { GroupService } from '../../service/group.service'; import { GroupService } from '../../service/group';
import { ArianeService } from '../../service/ariane.service'; import { ArianeService } from '../../service/ariane';
import { environment } from 'environments/environment'; import { environment } from 'environments/environment';
@Component({ @Component({
selector: 'app-saison', selector: 'app-saison',
templateUrl: './saison.component.html', templateUrl: './saison.html',
styleUrls: ['./saison.component.less'], styleUrls: ['./saison.less'],
animations: [fadeInAnimation], animations: [fadeInAnimation],
host: { '[@fadeInAnimation]': '' } host: { '[@fadeInAnimation]': '' }
}) })

View File

@ -8,8 +8,8 @@ import { Component, OnInit } from '@angular/core';
@Component({ @Component({
selector: 'app-settings', selector: 'app-settings',
templateUrl: './settings.component.html', templateUrl: './settings.html',
styleUrls: ['./settings.component.less'] styleUrls: ['./settings.less']
}) })
export class SettingsComponent implements OnInit { export class SettingsComponent implements OnInit {

View File

@ -6,15 +6,15 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { checkLoginValidity, checkEmailValidity, checkPasswordValidity } from '../login/login.component'; import { checkLoginValidity, checkEmailValidity, checkPasswordValidity } from '../login/login';
import { fadeInAnimation } from '../../_animations/index'; import { fadeInAnimation } from '../../_animations/index';
import { UserService } from '../../service/user.service'; import { UserService } from '../../service/user';
@Component({ @Component({
selector: 'app-sign-up', selector: 'app-sign-up',
templateUrl: './sign-up.component.html', templateUrl: './sign-up.html',
styleUrls: ['./sign-up.component.less'], styleUrls: ['./sign-up.less'],
animations: [fadeInAnimation], animations: [fadeInAnimation],
host: { '[@fadeInAnimation]': '' } host: { '[@fadeInAnimation]': '' }
}) })

View File

@ -9,14 +9,14 @@ import { Router, ActivatedRoute, ParamMap } from '@angular/router';
import { Location } from '@angular/common'; import { Location } from '@angular/common';
import { fadeInAnimation } from '../../_animations/index'; import { fadeInAnimation } from '../../_animations/index';
import { TypeService } from '../../service/type.service'; import { TypeService } from '../../service/type';
import { ArianeService } from '../../service/ariane.service'; import { ArianeService } from '../../service/ariane';
import { environment } from 'environments/environment'; import { environment } from 'environments/environment';
@Component({ @Component({
selector: 'app-type', selector: 'app-type',
templateUrl: './type.component.html', templateUrl: './type.html',
styleUrls: ['./type.component.less'], styleUrls: ['./type.less'],
animations: [fadeInAnimation], animations: [fadeInAnimation],
host: { '[@fadeInAnimation]': '' } host: { '[@fadeInAnimation]': '' }
}) })

View File

@ -9,8 +9,8 @@ import { Router, ActivatedRoute, ParamMap } from '@angular/router';
import { Location } from '@angular/common'; import { Location } from '@angular/common';
import { fadeInAnimation } from '../../_animations/index'; import { fadeInAnimation } from '../../_animations/index';
import { UniversService } from '../../service/univers.service'; import { UniversService } from '../../service/univers';
import { ArianeService } from '../../service/ariane.service'; import { ArianeService } from '../../service/ariane';
import { environment } from 'environments/environment'; import { environment } from 'environments/environment';

View File

@ -2,8 +2,8 @@ import { Component, OnInit } from '@angular/core';
@Component({ @Component({
selector: 'app-validate-email', selector: 'app-validate-email',
templateUrl: './validate-email.component.html', templateUrl: './validate-email.html',
styleUrls: ['./validate-email.component.less'] styleUrls: ['./validate-email.less']
}) })
export class ValidateEmailComponent implements OnInit { export class ValidateEmailComponent implements OnInit {

View File

@ -169,14 +169,14 @@
</div> </div>
<modal id="custom-modal-1" title="A Custom Modal test 1" > <popin id="custom-modal-1" title="A Custom Modal test 1" >
<p> <p>
Home page text: <input type="text" [(ngModel)]="bodyText" /> Home page text: <input type="text" [(ngModel)]="bodyText" />
</p> </p>
<button (click)="closeModal('custom-modal-1');">Close</button> <button (click)="closeModal('custom-modal-1');">Close</button>
</modal> </popin>
<modal id="custom-modal-2" title="My second test" closeOnOutClick="true"> <popin id="custom-modal-2" title="My second test" closeOnOutClick="true">
<button (click)="closeModal('custom-modal-2');">Close</button> <button (click)="closeModal('custom-modal-2');">Close</button>
</modal> </popin>

View File

@ -10,17 +10,17 @@ import { Location } from '@angular/common';
import { NgForm } from '@angular/forms'; import { NgForm } from '@angular/forms';
import { FormGroup, FormControl } from "@angular/forms"; import { FormGroup, FormControl } from "@angular/forms";
import { fadeInAnimation } from '../../_animations/index'; import { fadeInAnimation } from '../../_animations/index';
import { HttpWrapperService } from '../../service/http-wrapper.service'; import { HttpWrapperService } from '../../service/http-wrapper';
import { HttpEventType, HttpResponse} from '@angular/common/http'; import { HttpEventType, HttpResponse} from '@angular/common/http';
import { ModalService } from '../../service/modal'; import { PopInService } from '../../service/popin';
import { TypeService } from '../../service/type.service'; import { TypeService } from '../../service/type';
import { UniversService } from '../../service/univers.service'; import { UniversService } from '../../service/univers';
import { GroupService } from '../../service/group.service'; import { GroupService } from '../../service/group';
import { VideoService } from '../../service/video.service'; import { VideoService } from '../../service/video';
import { DataService } from '../../service/data.service'; import { DataService } from '../../service/data';
import { ArianeService } from '../../service/ariane.service'; import { ArianeService } from '../../service/ariane';
export class ElementList { export class ElementList {
value: number; value: number;
@ -106,7 +106,7 @@ export class VideoEditComponent implements OnInit {
private videoService: VideoService, private videoService: VideoService,
private httpService: HttpWrapperService, private httpService: HttpWrapperService,
private arianeService: ArianeService, private arianeService: ArianeService,
private modalService: ModalService) { private popInService: PopInService) {
} }
@ -383,14 +383,14 @@ export class VideoEditComponent implements OnInit {
} }
newSaison() { newSaison() {
console.log("Request new Saison..."); console.log("Request new Saison...");
this.modalService.open("custom-modal-1"); this.popInService.open("custom-modal-1");
} }
newSerie() { newSerie() {
console.log("Request new Serie..."); console.log("Request new Serie...");
this.modalService.open("custom-modal-2"); this.popInService.open("custom-modal-2");
} }
closeModal(_id) { closeModal(_id) {
this.modalService.close(_id); this.popInService.close(_id);
} }
newType() { newType() {
console.log("Request new Type..."); console.log("Request new Type...");

View File

@ -8,16 +8,16 @@ import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute, ParamMap } from '@angular/router'; import { Router, ActivatedRoute, ParamMap } from '@angular/router';
import { Location } from '@angular/common'; import { Location } from '@angular/common';
import { fadeInAnimation } from '../../_animations/index'; import { fadeInAnimation } from '../../_animations/index';
import { HttpWrapperService } from '../../service/http-wrapper.service'; import { HttpWrapperService } from '../../service/http-wrapper';
import { VideoService } from '../../service/video.service'; import { VideoService } from '../../service/video';
import { GroupService } from '../../service/group.service'; import { GroupService } from '../../service/group';
import { SaisonService } from '../../service/saison.service'; import { SaisonService } from '../../service/saison';
import { ArianeService } from '../../service/ariane.service'; import { ArianeService } from '../../service/ariane';
@Component({ @Component({
selector: 'app-video', selector: 'app-video',
templateUrl: './video.component.html', templateUrl: './video.html',
styleUrls: ['./video.component.less'], styleUrls: ['./video.less'],
animations: [fadeInAnimation], animations: [fadeInAnimation],
host: { '[@fadeInAnimation]': '' } host: { '[@fadeInAnimation]': '' }
}) })

View File

@ -8,11 +8,11 @@ import { Injectable, Output, EventEmitter } from '@angular/core'
import { Router, ActivatedRoute, ParamMap } from '@angular/router'; import { Router, ActivatedRoute, ParamMap } from '@angular/router';
import { TypeService } from 'app/service/type.service'; import { TypeService } from 'app/service/type';
import { UniversService } from 'app/service/univers.service'; import { UniversService } from 'app/service/univers';
import { GroupService } from 'app/service/group.service'; import { GroupService } from 'app/service/group';
import { SaisonService } from 'app/service/saison.service'; import { SaisonService } from 'app/service/saison';
import { VideoService } from 'app/service/video.service'; import { VideoService } from 'app/service/video';
export class InputOrders { export class InputOrders {
public type_id: number = null; public type_id: number = null;

View File

@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpWrapperService } from 'app/service/http-wrapper.service'; import { HttpWrapperService } from 'app/service/http-wrapper';
import { DataInterface } from 'app/service/dataInterface'; import { DataInterface } from 'app/service/dataInterface';
import { environment } from 'environments/environment'; import { environment } from 'environments/environment';

View File

@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpWrapperService } from 'app/service/http-wrapper.service'; import { HttpWrapperService } from 'app/service/http-wrapper';
import { DataInterface } from 'app/service/dataInterface'; import { DataInterface } from 'app/service/dataInterface';
import { environment } from 'environments/environment'; import { environment } from 'environments/environment';

View File

@ -1,7 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpWrapperService } from 'app/service/http-wrapper.service'; import { HttpWrapperService } from 'app/service/http-wrapper';
import { DataInterface } from 'app/service/dataInterface'; import { DataInterface } from 'app/service/dataInterface';
import { BddService } from 'app/service/bdd.service'; import { BddService } from 'app/service/bdd';
import { environment } from 'environments/environment'; import { environment } from 'environments/environment';

View File

@ -1,44 +0,0 @@
import { Injectable } from '@angular/core';
@Injectable()
export class ModalService {
private modals: any[] = [];
constructor() {
console.log("Start Modal Service");
}
add(_modal: any) {
// add modal to array of active modals
this.modals.push(_modal);
}
remove(_id: string) {
// remove modal from array of active modals
//let modalToRemove = _.findWhere(this.modals, { id: id });
//this.modals = _.without(this.modals, modalToRemove);
}
open(_id: string) {
console.log("Try to open pop-in: '" + _id + "'");
// open modal specified by id
for (let iii=0; iii<this.modals.length; iii++) {
if (this.modals[iii].id == _id) {
console.log(" ==>find it ...");
this.modals[iii].open();
return;
}
}
console.log(" ==> NOT found !!!!!");
}
close(_id: string) {
// close modal specified by id
for (let iii=0; iii<this.modals.length; iii++) {
if (this.modals[iii].id == _id) {
this.modals[iii].close();
return;
}
}
}
}

View File

@ -0,0 +1,44 @@
import { Injectable } from '@angular/core';
@Injectable()
export class PopInService {
private popins: any[] = [];
constructor() {
console.log("Start PopIn Service");
}
add(_popin: any) {
// add popin to array of active popins
this.popins.push(_popin);
}
remove(_id: string) {
// remove popin from array of active popins
//let popinToRemove = _.findWhere(this.popins, { id: id });
//this.popins = _.without(this.popins, popinToRemove);
}
open(_id: string) {
console.log("Try to open pop-in: '" + _id + "'");
// open popin specified by id
for (let iii=0; iii<this.popins.length; iii++) {
if (this.popins[iii].id == _id) {
console.log(" ==>find it ...");
this.popins[iii].open();
return;
}
}
console.log(" ==> NOT found !!!!!");
}
close(_id: string) {
// close popin specified by id
for (let iii=0; iii<this.popins.length; iii++) {
if (this.popins[iii].id == _id) {
this.popins[iii].close();
return;
}
}
}
}

View File

@ -1,8 +1,8 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpWrapperService } from 'app/service/http-wrapper.service'; import { HttpWrapperService } from 'app/service/http-wrapper';
import { DataInterface } from 'app/service/dataInterface'; import { DataInterface } from 'app/service/dataInterface';
import { environment } from 'environments/environment'; import { environment } from 'environments/environment';
import { BddService } from 'app/service/bdd.service'; import { BddService } from 'app/service/bdd';
@Injectable() @Injectable()
export class SaisonService { export class SaisonService {

View File

@ -1,8 +1,8 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpWrapperService } from 'app/service/http-wrapper.service'; import { HttpWrapperService } from 'app/service/http-wrapper';
//import { SHA512 } from 'assets/js_3rd_party/sha512'; //import { SHA512 } from 'assets/js_3rd_party/sha512';
import { DataInterface } from 'app/service/dataInterface'; import { DataInterface } from 'app/service/dataInterface';
import { BddService } from 'app/service/bdd.service'; import { BddService } from 'app/service/bdd';
import { environment } from 'environments/environment'; import { environment } from 'environments/environment';

View File

@ -1,7 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpWrapperService } from 'app/service/http-wrapper.service'; import { HttpWrapperService } from 'app/service/http-wrapper';
import { DataInterface } from 'app/service/dataInterface'; import { DataInterface } from 'app/service/dataInterface';
import { BddService } from 'app/service/bdd.service'; import { BddService } from 'app/service/bdd';
import { environment } from 'environments/environment'; import { environment } from 'environments/environment';

View File

@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpWrapperService } from 'app/service/http-wrapper.service'; import { HttpWrapperService } from 'app/service/http-wrapper';
//import { SHA512 } from 'assets/js_3rd_party/sha512'; //import { SHA512 } from 'assets/js_3rd_party/sha512';
interface MessageLogIn { interface MessageLogIn {

View File

@ -1,7 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpWrapperService } from 'app/service/http-wrapper.service'; import { HttpWrapperService } from 'app/service/http-wrapper';
import { DataInterface } from 'app/service/dataInterface'; import { DataInterface } from 'app/service/dataInterface';
import { BddService } from 'app/service/bdd.service'; import { BddService } from 'app/service/bdd';
import { environment } from 'environments/environment'; import { environment } from 'environments/environment';