[DEV] some update

This commit is contained in:
Edouard DUPIN 2020-03-08 22:03:11 +01:00
parent 40092cd8b7
commit 877c514cc9
10 changed files with 4425 additions and 3379 deletions

7635
front/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -12,28 +12,30 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^8.2.14", "@angular/animations": "~9.0.5",
"@angular/common": "^8.2.14", "@angular/cdk": "^9.1.1",
"@angular/compiler": "^8.2.14", "@angular/common": "~9.0.5",
"@angular/core": "^8.2.14", "@angular/compiler": "~9.0.5",
"@angular/forms": "^8.2.14", "@angular/core": "~9.0.5",
"@angular/platform-browser": "^8.2.14", "@angular/forms": "~9.0.5",
"@angular/platform-browser-dynamic": "^8.2.14", "@angular/material": "~9.1.1",
"@angular/router": "^8.2.14", "@angular/platform-browser": "~9.0.5",
"@angular/platform-browser-dynamic": "~9.0.5",
"@angular/router": "^9.0.5",
"core-js": "^3.6.4", "core-js": "^3.6.4",
"jquery": "3.4.1",
"rxjs": "^6.5.4", "rxjs": "^6.5.4",
"tslib": "^1.10.0", "tslib": "^1.11.1",
"zone.js": "~0.9.1", "zone.js": "~0.9.1"
"jquery": "3.4.1"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "^0.803.25", "@angular-devkit/build-angular": "^0.900.5",
"@angular/cli": "^8.3.25", "@angular/cli": "^9.0.5",
"@angular/compiler-cli": "^8.2.14", "@angular/compiler-cli": "~9.0.5",
"@angular/language-service": "^8.2.14", "@angular/language-service": "~9.0.5",
"@types/jasmine": "^3.5.3", "@types/jasmine": "^3.5.8",
"@types/jasminewd2": "^2.0.8", "@types/jasminewd2": "^2.0.8",
"@types/node": "^13.7.0", "@types/node": "^13.7.7",
"codelyzer": "^5.0.1", "codelyzer": "^5.0.1",
"jasmine-core": "^3.5.0", "jasmine-core": "^3.5.0",
"jasmine-spec-reporter": "^4.2.1", "jasmine-spec-reporter": "^4.2.1",
@ -45,6 +47,6 @@
"protractor": "^5.4.3", "protractor": "^5.4.3",
"ts-node": "^8.6.2", "ts-node": "^8.6.2",
"tslint": "^5.20.1", "tslint": "^5.20.1",
"typescript": "~3.5.0" "typescript": "~3.6.5"
} }
} }

View File

@ -10,7 +10,7 @@ import { RouterModule } from '@angular/router';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { HttpClientModule } from '@angular/common/http'; import { HttpClientModule } from '@angular/common/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { routing } from './app-routing.module'; import { routing } from './app-routing.module';
@ -20,6 +20,7 @@ import { ElementTypeComponent } from './component/element-type/element-type';
import { ElementGroupComponent } from './component/element-group/element-group'; import { ElementGroupComponent } from './component/element-group/element-group';
import { ElementSaisonComponent } from './component/element-saison/element-saison'; import { ElementSaisonComponent } from './component/element-saison/element-saison';
import { ElementVideoComponent } from './component/element-video/element-video'; import { ElementVideoComponent } from './component/element-video/element-video';
import { CreateTypeComponent } from './component/create-type/create-type';
import { PopInComponent } from './component/popin/popin'; import { PopInComponent } from './component/popin/popin';
import { HelpComponent } from './scene/help/help'; import { HelpComponent } from './scene/help/help';
@ -80,7 +81,8 @@ import { AppComponent } from './app.component';
VideoEditComponent, VideoEditComponent,
SaisonEditComponent, SaisonEditComponent,
GroupEditComponent, GroupEditComponent,
PopInComponent PopInComponent,
CreateTypeComponent
], ],
imports: [ imports: [
BrowserModule, BrowserModule,
@ -89,7 +91,8 @@ import { AppComponent } from './app.component';
BrowserAnimationsModule, BrowserAnimationsModule,
HttpClientModule, HttpClientModule,
FormsModule, FormsModule,
ReactiveFormsModule ReactiveFormsModule,
MatProgressSpinnerModule
], ],
providers: [ providers: [
PopInService, PopInService,

View File

@ -0,0 +1,24 @@
<div>
<popin id="popin-create-type"
popSize="medium"
popTitle="Create a new 'TYPE'"
closeTopRight="true"
closeTitle="Cancel"
validateTitle="Create"
(callback)="eventPopUp($event[0])">
<mat-spinner></mat-spinner>
<p class="expand">
<label class="unselectable">Name: </label><br/>
<input type="text"
placeholder="Name of the Type"
[value]="name"
(input)="onName($event.target.value)"
/>
</p>
<p class="expand">
<label class="unselectable">Description: </label><br/>
<textarea (input)="onDescription($event.target.value)" placeholder="Description of the Type" rows=6>{{description}}</textarea>
</p>
</popin>
</div>

View File

@ -0,0 +1,12 @@
.expand {
width: 100%;
input {
width: 100%;
};
textarea {
width: 100%;
};
}

View File

@ -0,0 +1,62 @@
/** @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 { TypeService } from '../../service/type';
import { PopInService } from '../../service/popin';
@Component({
selector: 'create-type',
templateUrl: './create-type.html',
styleUrls: ['./create-type.less']
})
@Injectable()
export class CreateTypeComponent implements OnInit {
name: string = "";
description: string = "";
constructor(private router: Router,
private typeService: TypeService,
private popInService: PopInService) {
}
OnDestroy() {
}
ngOnInit() {
}
eventPopUp(_event: string): void {
console.log("GET event: " + _event);
this.popInService.close("popin-create-type");
}
updateNeedSend():void {
}
onName(_value:any):void {
if (_value.length == 0) {
this.name = "";
} else {
this.name = _value;
}
this.updateNeedSend();
}
onDescription(_value:any):void {
if (_value.length == 0) {
this.description = "";
} else {
this.description = _value;
}
this.updateNeedSend();
}
}

View File

@ -4,7 +4,7 @@
<label class="unselectable">{{popTitle}}</label> <label class="unselectable">{{popTitle}}</label>
<div class="close"> <div class="close">
<button class="button-close color-shadow-black" (click)="onCloseTop()" type="submit"> <button class="button-close color-shadow-black" (click)="onCloseTop()" type="submit">
<i class="material-icons">close</i> <label class="unselectable"><i class="material-icons">close</i></label>
</button> </button>
</div> </div>
</div> </div>
@ -14,22 +14,22 @@
<div class="footer"> <div class="footer">
<div class="action" *ngIf="validateTitle != null" > <div class="action" *ngIf="validateTitle != null" >
<button class="button color-shadow-black" (click)="onValidate()" type="submit"> <button class="button color-shadow-black" (click)="onValidate()" type="submit">
<i class="material-icons">done</i> {{validateTitle}} <label class="unselectable"><i class="material-icons">done</i> {{validateTitle}}</label>
</button> </button>
</div> </div>
<div class="action" *ngIf="saveTitle != null" > <div class="action" *ngIf="saveTitle != null" >
<button class="button color-shadow-black" (click)="onSave()" type="submit"> <button class="button color-shadow-black" (click)="onSave()" type="submit">
<i class="material-icons">save_alt</i> {{saveTitle}} <label class="unselectable"><i class="material-icons">save_alt</i> {{saveTitle}}</label>
</button> </button>
</div> </div>
<div class="action" *ngIf="otherTitle != null" > <div class="action" *ngIf="otherTitle != null" >
<button class="button color-shadow-black" (click)="onOther()" type="submit"> <button class="button color-shadow-black" (click)="onOther()" type="submit">
<i class="material-icons">star</i> {{otherTitle}} <label class="unselectable"><i class="material-icons">star</i> {{otherTitle}}</label>
</button> </button>
</div> </div>
<div class="action" *ngIf="closeTitle != null" > <div class="action" *ngIf="closeTitle != null" >
<button class="button color-shadow-black" (click)="onClose()" type="submit"> <button class="button color-shadow-black" (click)="onClose()" type="submit">
<i class="material-icons">close</i> {{closeTitle}} <label class="unselectable"><i class="material-icons">close</i> {{closeTitle}}</label>
</button> </button>
</div> </div>
</div> </div>

View File

@ -206,17 +206,7 @@
</p> </p>
</popin> </popin>
<popin id="popin-new-type" <create-type ></create-type>
popSize="medium"
popTitle="Create a new type"
closeTopRight="true"
closeTitle="Cancel"
validateTitle="Create"
(callback)="eventPopUpType($event[0])">
<p>
Name: <input type="text" [(ngModel)]="bodyText" />
</p>
</popin>
<popin id="popin-new-univers" <popin id="popin-new-univers"
popSize="big" popSize="big"

View File

@ -409,7 +409,7 @@ export class VideoEditComponent implements OnInit {
} }
newType(): void { newType(): void {
console.log("Request new Type..."); console.log("Request new Type...");
this.popInService.open("popin-new-type"); this.popInService.open("popin-create-type");
} }
newUnivers() { newUnivers() {
console.log("Request new Univers..."); console.log("Request new Univers...");