add liceo improve

parent eefb575a
......@@ -66,7 +66,8 @@
<div class="col-md-10">
<label for="search">Token:</label>
<div class="input-group">
<input type="text" autocomplete="off" class="form-control" id="servicetoken" [(ngModel)]="servicetoken" [ngModelOptions]="{standalone: true}" >
<input type="password" autocomplete="off" class="form-control" id="servicetokennew" [(ngModel)]="servicetoken" [ngModelOptions]="{standalone: true}" >
<i style="margin-top: 10px;" (mousedown)="mousedown()" (mouseup)="mouseup()" (mouseleave)="mouseup()" [ngClass]="{ 'fa-lg': true, 'eye': true, 'fa': true, 'fa-eye': openeye1, 'fa-eye-slash': !openeye1 }" aria-hidden="true"></i>
</div>
</div>
<div class="col-md-1"></div>
......@@ -92,27 +93,57 @@
<div class="col-md-12">
<table class="table table-hover fixed">
<colgroup>
<col scope="col" width="90px" />
<col scope="col" width="130px" />
<col span="2" scope="col" width="60px" />
<col scope="col" width="30px" />
</colgroup>
<tr *ngFor="let school of schoolList">
<td class="td30" class="smallText">
<span class="{{viewclass[school.order]}}" ><span class="bold">URL Moodle:</span> {{school.moodleuri}}</span>
<input id="moodle{{school.order}}" class="{{editclass[school.order]}} altoFijo" [(ngModel)]="editmoodleuri[school.order]" type="text"/>
<!-- URL Moodle -->
<span class="{{viewclass[school.order]}}">
<span class="bold">URL Moodle:</span> {{school.moodleuri}}
</span>
<span class="{{editclass[school.order]}}">
URL Moodle
<input id="moodle{{school.order}}" class="altoFijo" [(ngModel)]="editmoodleuri[school.order]" type="text"/>
</span>
<br/>
<span class="{{viewclass[school.order]}}" ><span class="bold">Nombre del servicio:</span> {{school.servicename}}</span>
<input class="{{editclass[school.order]}} altoFijo" id="servicename{{school.order}}" [(ngModel)]="editcentroeducativoservicename[school.order]" type="text"/>
<!-- Nombre del servicio -->
<span class="{{viewclass[school.order]}}">
<span class="bold">Nombre del servicio:</span> {{school.servicename}}
</span>
<span class="{{editclass[school.order]}}">
<br/>Nombre del servicio
<input class="altoFijo" id="servicename{{school.order}}" [(ngModel)]="editcentroeducativoservicename[school.order]" type="text"/>
</span>
<br/>
<span class="{{viewclass[school.order]}}"><span class="bold">Nombre del usuario:</span> {{school.moodleapiusername}}</span>
<input class="{{editclass[school.order]}} altoFijo" id="username{{school.order}}" [(ngModel)]="editcentroeducativousername[school.order]" type="text"/>
<!-- Nombre del usuario -->
<span class="{{viewclass[school.order]}}">
<span class="bold">Nombre del usuario:</span> {{school.moodleapiusername}}
</span>
<span class="{{editclass[school.order]}}">
<br/>Nombre del usuario
<input class="altoFijo" id="username{{school.order}}" [(ngModel)]="editcentroeducativousername[school.order]" type="text"/>
</span>
</td>
<td class="td30" class="smallText" colspan="2">
<span class="{{viewclass[school.order]}}"><span class="bold">Nombre del centro educativo:</span> {{school.nombre}}</span>
<input class="{{editclass[school.order]}} altoFijo" id="nombre{{school.order}}" [(ngModel)]="editcentroeducativoname[school.order]" type="text"/>
<!-- Nombre del centro educativo -->
<span class="{{viewclass[school.order]}}">
<span class="bold">Nombre del centro educativo:</span> {{school.nombre}}
</span>
<span class="{{editclass[school.order]}}">
Nombre del centro educativo
<input class="altoFijo" id="nombre{{school.order}}" [(ngModel)]="editcentroeducativoname[school.order]" type="text"/>
</span>
<br/>
<span class="{{viewclass[school.order]}}" ><span class="bold">Token:</span> ******************************** </span>
<input class="{{editclass[school.order]}} altoFijo" id="servicetoken{{school.order}}" [(ngModel)]="editcentroeducativoservicetoken[school.order]" type="text"/>
<!-- Token -->
<span class="{{viewclass[school.order]}}">
<span class="bold">Token:</span> ********************************
</span>
<span class="{{editclass[school.order]}}">
<br/>Token
<input class="altoFijo" id="servicetoken{{school.order}}" [(ngModel)]="editcentroeducativoservicetoken[school.order]" type="password"/>
</span>
</td>
<td class="td30" >
<img class="{{viewclass[school.order]}}" (click)="edit($event, school)" height="20" alt="edit" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAACp5JREFUeJzt3W2MHVUdx/F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ei+RtL3Ax7plJZ9T5mP8vuBfM13iei+TrOO4Dx+2xJ9JU3eNgtuHOP77I41wkX7cA34s9Cd/m4o7d9/0euUZeoxNv51oZBrYSf6NrdGN08mDEQQ0Dm4m/8TXSHnfT4WOtBjUX+DbxbwSN9MY48FEEcC++jhH/RtFIY7wArEP+xyXATuLfOBpxx6PAOciM5gF3AUeJf0NphB37gY0U/HqjiVHc4QQhDpXXiDteBDYBpyONXQjcj78zEzXijSO4d6jORga2BLgVd8Bj7BtWo/0YB7YAGyjgR3N6hXzeuBxYMzFWo4fm1O3BvfDeAvwYd0xecWK+sFqM+7GdUdy7HyMTYwEF/PZdIo7jDkSdHH/GHVC4HfedVSIiItLKfwEBb6I9LgtEHwAAAABJRU5ErkJggg==" alt="edit" />
......
.paddingdivs{
.paddingdivs {
padding: 10px;
}
.midText{font-size: 15px}
.smallText{font-size: 13px}
img{cursor: pointer;}
.midText {
font-size: 15px
}
.smallText {
font-size: 13px
}
.hidden{ display: none }
.visible{ display: inline }
.bold{font-weight: bold;}
img {
cursor: pointer;
}
table.fixed { table-layout:fixed; }
table.fixed td { overflow: hidden; }
.eye {
cursor: pointer;
}
.hidden {
display: none
}
.visible {
display: inline
}
.bold {
font-weight: bold;
}
table.fixed {
table-layout:fixed;
}
table.fixed td {
overflow: hidden;
}
.altoFijo{ padding: 0px 0px; line-height: 10px; width: 100%; margin-top: 5px;}
\ No newline at end of file
.altoFijo {
padding: 0px 0px;
line-height: 10px;
width: 100%;
}
\ No newline at end of file
......@@ -28,9 +28,21 @@ export class IEducativaComponent implements OnInit {
servicename : string
servicetoken : string
username: string
openeye1: boolean = false;
constructor(private centroeducativoservice : CentroEducativo, private authenticationService: AuthenticationService) { }
public mouseup() {
this.openeye1 = false;
let elem: any = document.querySelector('#servicetokennew');
elem.type = 'password';
}
public mousedown() {
this.openeye1 = true;
let elem: any = document.querySelector('#servicetokennew');
elem.type = 'text';
}
resetEditForm(){
this.editmode = []
for (let k = 0 ; k<this.schoolList.length ; k++){
......@@ -54,6 +66,7 @@ export class IEducativaComponent implements OnInit {
ngOnInit() {
this.resetAddcentroeducativoForm();
this.ietiqueta='';
this.iurl='';
this.alertStatus = 'hidden'
......@@ -124,7 +137,6 @@ export class IEducativaComponent implements OnInit {
}
addSchool() {
const data = {"idcentroeducativo": '' , "nombre": this.ietiqueta, "moodleuri": this.iurl,
"servicename" : this.servicename, "servicetoken" : this.servicetoken, "moodleapiusername": this.username};
if (!this.checkData(data))
......@@ -132,7 +144,7 @@ export class IEducativaComponent implements OnInit {
this.centroeducativoservice.agregarNuevoCentroEducativo(data).subscribe(
_ => {
this.showAlert(this.ietiqueta + ' agregado con exito.')
this.showAlert(this.ietiqueta + ' agregado con éxito.')
this.resetAddcentroeducativoForm();
this.getTodosLoscentroeducativos();
},
......@@ -146,7 +158,7 @@ export class IEducativaComponent implements OnInit {
if (confirm("Esta seguro que desea eliminar el centroeducativo: " + centroeducativo.nombre + "?")) {
this.centroeducativoservice.deleteSchool(centroeducativo.idcentroeducativo).subscribe(
_ => {
this.showAlert(centroeducativo.nombre + ' eliminado con exito')
this.showAlert(centroeducativo.nombre + ' eliminado con éxito.')
this.schoolList = this.schoolList.filter((value) => value.idcentroeducativo != centroeducativo.idcentroeducativo );
},
_ => {
......@@ -156,9 +168,12 @@ export class IEducativaComponent implements OnInit {
}
}
edit(event, item){
this.viewclass[item.order] = 'hidden';
this.editclass[item.order] = 'visible';
for (let index in this.viewclass){
this.viewclass[index] = index==item.order ? 'hidden' : 'visible';
this.editclass[index] = index==item.order ? 'visible' : 'hidden';
}
this.editcentroeducativoname[item.order] = item.nombre;
this.editmoodleuri[item.order] = item.moodleuri;
this.editcentroeducativoservicename[item.order] = item.servicename;
......@@ -187,7 +202,7 @@ export class IEducativaComponent implements OnInit {
return;
this.centroeducativoservice.actualizarCentroEducativo(data).subscribe(
_ => {
this.showAlert('centroeducativo ' + item.nombre + ' actualizado con exito.');
this.showAlert('centroeducativo ' + item.nombre + ' actualizado con éxito.');
this.schoolList[item.order].nombre = this.editcentroeducativoname[item.order];
this.schoolList[item.order].moodleuri = this.editmoodleuri[item.order];
this.schoolList[item.order].servicename = this.editcentroeducativoservicename[item.order];
......
#Generated by Maven Integration for Eclipse
#Mon Jul 27 00:36:19 BRT 2020
#Mon Jul 27 12:54:34 BRT 2020
version=0.0.1-SNAPSHOT
groupId=proygrado
m2e.projectName=Servidor JEE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment