[DEV] some update
This commit is contained in:
parent
40092cd8b7
commit
877c514cc9
7635
front/package-lock.json
generated
7635
front/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -12,28 +12,30 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^8.2.14",
|
||||
"@angular/common": "^8.2.14",
|
||||
"@angular/compiler": "^8.2.14",
|
||||
"@angular/core": "^8.2.14",
|
||||
"@angular/forms": "^8.2.14",
|
||||
"@angular/platform-browser": "^8.2.14",
|
||||
"@angular/platform-browser-dynamic": "^8.2.14",
|
||||
"@angular/router": "^8.2.14",
|
||||
"@angular/animations": "~9.0.5",
|
||||
"@angular/cdk": "^9.1.1",
|
||||
"@angular/common": "~9.0.5",
|
||||
"@angular/compiler": "~9.0.5",
|
||||
"@angular/core": "~9.0.5",
|
||||
"@angular/forms": "~9.0.5",
|
||||
"@angular/material": "~9.1.1",
|
||||
"@angular/platform-browser": "~9.0.5",
|
||||
"@angular/platform-browser-dynamic": "~9.0.5",
|
||||
"@angular/router": "^9.0.5",
|
||||
"core-js": "^3.6.4",
|
||||
"jquery": "3.4.1",
|
||||
"rxjs": "^6.5.4",
|
||||
"tslib": "^1.10.0",
|
||||
"zone.js": "~0.9.1",
|
||||
"jquery": "3.4.1"
|
||||
"tslib": "^1.11.1",
|
||||
"zone.js": "~0.9.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^0.803.25",
|
||||
"@angular/cli": "^8.3.25",
|
||||
"@angular/compiler-cli": "^8.2.14",
|
||||
"@angular/language-service": "^8.2.14",
|
||||
"@types/jasmine": "^3.5.3",
|
||||
"@angular-devkit/build-angular": "^0.900.5",
|
||||
"@angular/cli": "^9.0.5",
|
||||
"@angular/compiler-cli": "~9.0.5",
|
||||
"@angular/language-service": "~9.0.5",
|
||||
"@types/jasmine": "^3.5.8",
|
||||
"@types/jasminewd2": "^2.0.8",
|
||||
"@types/node": "^13.7.0",
|
||||
"@types/node": "^13.7.7",
|
||||
"codelyzer": "^5.0.1",
|
||||
"jasmine-core": "^3.5.0",
|
||||
"jasmine-spec-reporter": "^4.2.1",
|
||||
@ -45,6 +47,6 @@
|
||||
"protractor": "^5.4.3",
|
||||
"ts-node": "^8.6.2",
|
||||
"tslint": "^5.20.1",
|
||||
"typescript": "~3.5.0"
|
||||
"typescript": "~3.6.5"
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import { RouterModule } from '@angular/router';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
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 { ElementSaisonComponent } from './component/element-saison/element-saison';
|
||||
import { ElementVideoComponent } from './component/element-video/element-video';
|
||||
import { CreateTypeComponent } from './component/create-type/create-type';
|
||||
import { PopInComponent } from './component/popin/popin';
|
||||
|
||||
import { HelpComponent } from './scene/help/help';
|
||||
@ -80,7 +81,8 @@ import { AppComponent } from './app.component';
|
||||
VideoEditComponent,
|
||||
SaisonEditComponent,
|
||||
GroupEditComponent,
|
||||
PopInComponent
|
||||
PopInComponent,
|
||||
CreateTypeComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
@ -89,7 +91,8 @@ import { AppComponent } from './app.component';
|
||||
BrowserAnimationsModule,
|
||||
HttpClientModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule
|
||||
ReactiveFormsModule,
|
||||
MatProgressSpinnerModule
|
||||
],
|
||||
providers: [
|
||||
PopInService,
|
||||
|
24
front/src/app/component/create-type/create-type.html
Normal file
24
front/src/app/component/create-type/create-type.html
Normal 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>
|
12
front/src/app/component/create-type/create-type.less
Normal file
12
front/src/app/component/create-type/create-type.less
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
.expand {
|
||||
width: 100%;
|
||||
input {
|
||||
width: 100%;
|
||||
};
|
||||
textarea {
|
||||
width: 100%;
|
||||
};
|
||||
}
|
||||
|
62
front/src/app/component/create-type/create-type.ts
Normal file
62
front/src/app/component/create-type/create-type.ts
Normal 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();
|
||||
}
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
<label class="unselectable">{{popTitle}}</label>
|
||||
<div class="close">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@ -14,22 +14,22 @@
|
||||
<div class="footer">
|
||||
<div class="action" *ngIf="validateTitle != null" >
|
||||
<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>
|
||||
</div>
|
||||
<div class="action" *ngIf="saveTitle != null" >
|
||||
<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>
|
||||
</div>
|
||||
<div class="action" *ngIf="otherTitle != null" >
|
||||
<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>
|
||||
</div>
|
||||
<div class="action" *ngIf="closeTitle != null" >
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -206,17 +206,7 @@
|
||||
</p>
|
||||
</popin>
|
||||
|
||||
<popin id="popin-new-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>
|
||||
<create-type ></create-type>
|
||||
|
||||
<popin id="popin-new-univers"
|
||||
popSize="big"
|
||||
|
@ -409,7 +409,7 @@ export class VideoEditComponent implements OnInit {
|
||||
}
|
||||
newType(): void {
|
||||
console.log("Request new Type...");
|
||||
this.popInService.open("popin-new-type");
|
||||
this.popInService.open("popin-create-type");
|
||||
}
|
||||
newUnivers() {
|
||||
console.log("Request new Univers...");
|
||||
|
Loading…
Reference in New Issue
Block a user