bug fixes

parent 45a416ca
......@@ -449,6 +449,9 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
id_grid: $scope.viewingGrid.id
})
.success(function (studentPicto) {
console.log(studentPicto);
placePicto(studentPicto);
io.socket.post('/stu/vocabulary', {
......
......@@ -21,6 +21,8 @@ dashboardControllers.controller('PictoConfigCtrl', function (
// Picto
$scope.studentPicto = JSON.parse(JSON.stringify(studentPicto));
$scope.viewingGrid = viewingGrid;
// Grid list
$scope.gridsList = gridsList;
......
......@@ -122,7 +122,7 @@
<div class="col-xs-2 text-center">
<label>Opciones</label>
<label style="margin-bottom:1em;">Opciones del tablero</label>
<div class="form-group row">
<button type="button" ng-if="!viewingGrid.active" class="btn btn-default" ng-click="viewingGrid.active=true;activate_grid(viewingGrid)" style="min-width:9.5em;">Activar tablero</button>
......@@ -130,7 +130,7 @@
</div>
<div class="form-group row">
<button type="button" class="btn btn-default"ng-click="open_grid_color(viewingGrid)" style="min-width:9.25em;">Cambiar color</button>
<button type="button" class="btn btn-default"ng-click="open_grid_color(viewingGrid)" style="min-width:9.25em;">Configuración</button>
</div>
<div class="form-group row">
......@@ -141,13 +141,22 @@
<hr>
<label>Tableros</label>
<label style="margin-bottom:1em;">Ver tableros</label>
<div class="list-group">
<div class="form-group row">
<select ng-model="grid" ng-change="showGrid(grid,false)" style="min-width:9.5em;">
<option value="{{grid.id}}" ng-repeat="grid in gridsList track by $index" ng-selected="grid.active">
{{grid.name}}
</option>
</select>
</div>
<!--<div class="list-group">
<a class="list-group-item" ng-repeat="grid in gridsList track by $index" ng-click="showGrid(grid.id,false)" ng-class="(grid.id == viewingGrid.id) ? 'active' : ''">
<i class="fa fa-star" aria-hidden="true" ng-if="grid.active"></i> {{ grid.name }}
</a>
</div>
</div>-->
</div>
......
......@@ -3,22 +3,24 @@
<button type="button" class="close" ng-click="cancel()">
<span aria-hidden="true">&times;</span><span class="sr-only" translate>close</span>
</button>
<h4 class="modal-title" id="myModalLabel" translate>Cambiar color del tablero</h4>
<h4 class="modal-title" id="myModalLabel" translate>Configuración del tablero</h4>
</div>
<div class="modal-body">
<div class="form-group row">
<label for="favcolor" class="col-xs-6">Seleccionar color</label>
<div class="col-xs-6">
<label for="favcolor" class="col-xs-3">Color de fondo</label>
<div class="col-xs-3">
<input type="color" class="form-control" value="{{gridColor}}" id="favcolor" ng-model="gridColor">
</div>
<div class="col-xs-6">
<button class="btn btn-default pull-right" ng-click="close('#ffffff')">Eliminar color</button>
</div>
</div>
</div>
<div class="modal-footer text-right">
<button class="btn btn-default pull-left" ng-click="close('#ffffff')">Restablecer color</button>
<button class="btn btn-success" ng-click="close(gridColor)">Guardar</button>
</div>
</div>
......@@ -64,11 +64,11 @@
</div>
<div class="row">
<div class="col-md-6">
<select class="form-control" name="child_grid" id="child_grid" ng-model="studentPicto.id_child_grid">
<option value="" translate>Ninguno</option>
<select class="form-control" ng-model="grid">
<option value="">--- Ninguno ---</option>
<option
ng-repeat="grid in gridsList track by $index"
ng-if="grid.id != studentPicto.id_grid"
ng-if="grid.id != viewingGrid.id"
ng-selected="(grid.id == studentPicto.id_child_grid)"
value="{{ grid.id }}">{{ grid.name }}
</option>
......
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 sign in to comment