issue #929 fixed

parent 6963462e
...@@ -299,9 +299,9 @@ ...@@ -299,9 +299,9 @@
"serial_not_created": "Serial number couldn't be created", "serial_not_created": "Serial number couldn't be created",
"server_error": "An error has been reported when connecting to the server.", "server_error": "An error has been reported when connecting to the server.",
"session": "Session", "session": "Session",
"sessions": "Sessions",
"session_mean_length": "Session mean length: {{hours}} hours", "session_mean_length": "Session mean length: {{hours}} hours",
"session_notes": "Session notes", "session_notes": "Session notes",
"session_closed": "Pending session is now closed",
"sessions": "Sessions", "sessions": "Sessions",
"sessions_of": "Sessions of", "sessions_of": "Sessions of",
"setup": "Setup", "setup": "Setup",
......
...@@ -300,11 +300,11 @@ ...@@ -300,11 +300,11 @@
"serial_not_created": "No se ha podido crear el número de serie", "serial_not_created": "No se ha podido crear el número de serie",
"server_error": "No se ha podido conectar con el servidor.", "server_error": "No se ha podido conectar con el servidor.",
"session": "Sesión", "session": "Sesión",
"sessions": "Sesiones",
"session_mean_length": "Duración media de sesión: {{hours}} horas", "session_mean_length": "Duración media de sesión: {{hours}} horas",
"session_notes": "Notas de sesión", "session_notes": "Notas de sesión",
"sessions": "Sesiones", "session_closed": "La sesión abierta está ahora cerrada",
"sessions_of": "Sesiones de", "sessions_of": "Sesiones de",
"sessions": "Sesiones",
"setup": "Configuración", "setup": "Configuración",
"sexo": "Sexo", "sexo": "Sexo",
"show": "Mostrar", "show": "Mostrar",
......
...@@ -168,7 +168,9 @@ dashboardControllers.controller('AddPictoCtrl', function ( ...@@ -168,7 +168,9 @@ dashboardControllers.controller('AddPictoCtrl', function (
progress: () => {return $scope.progress;} progress: () => {return $scope.progress;}
} }
}); });
modalInstance.result.then(function () {$scope.picFile=null;}); modalInstance.result.then(function () {
$scope.picFile=null;
});
}; };
/** /**
...@@ -196,13 +198,14 @@ dashboardControllers.controller('AddPictoCtrl', function ( ...@@ -196,13 +198,14 @@ dashboardControllers.controller('AddPictoCtrl', function (
$scope.pictos.push(picto); $scope.pictos.push(picto);
$scope.load_own_pictos(); $scope.load_own_pictos();
cb(); cb();
$scope.close(picto.id);
}); });
}); });
}, },
function (res) { function (res) {
if (res.status < 0) if (res.status < 0)
ngToast.danger($translate.instant('picto_upload_error')); ngToast.danger($translate.instant('picto_upload_error'));
cb(); cb();
}, },
function (evt) { function (evt) {
$scope.progress = parseInt(100.0 * evt.loaded / evt.total); $scope.progress = parseInt(100.0 * evt.loaded / evt.total);
...@@ -369,8 +372,8 @@ dashboardControllers.controller('AddPictoCtrl', function ( ...@@ -369,8 +372,8 @@ dashboardControllers.controller('AddPictoCtrl', function (
$scope.load_own_pictos(); $scope.load_own_pictos();
} }
else { else {
$scope.load_category(0); $scope.load_category(0);
$scope.load_pictos(0); $scope.load_pictos(0);
} }
}); });
...@@ -158,6 +158,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr ...@@ -158,6 +158,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
,function(data, status, headers, config) { ,function(data, status, headers, config) {
} }
); );
ngToast.success($translate.instant('session_closed'));
}; };
// //
......
...@@ -82,10 +82,10 @@ ...@@ -82,10 +82,10 @@
<div id="clearfix-infiniteScroll-parent" infinite-scroll="scroll()" infinite-scroll-container="'#collections'"> <div id="clearfix-infiniteScroll-parent" infinite-scroll="scroll()" infinite-scroll-container="'#collections'">
<div class="picto_peq pull-left" ng-repeat="p in pictos" > <div class="picto_peq pull-left" ng-repeat="p in pictos" >
<img ng-src="{{p.uri}}" popover="{{p.expressions[0].text}}" popover-trigger="mouseenter" /> <img ng-src="{{p.uri}}" popover="{{p.expressions[0].text}}" popover-trigger="mouseenter" style="z-index:9000"/>
<!-- Options to remove picto (Only for own pictos) --> <!-- Options to remove picto (Only for own pictos) -->
<div class="picto_options"> <div class="picto_options">
<a ng-click="remove_own_picto(p.id)" class="picto_remove" title="{{ 'delete' | translate}}" ng-show="source == 'ownpictos'"> <a ng-click="remove_own_picto(p.id)" class="picto_remove" title="{{ 'delete' | translate }}" ng-show="source == 'ownpictos'">
<span class="color_red glyphicon glyphicon-remove-circle" aria-hidden="true"></span> <span class="color_red glyphicon glyphicon-remove-circle" aria-hidden="true"></span>
</a> </a>
<a ng-show="!onlyOwn" <a ng-show="!onlyOwn"
......
...@@ -103,7 +103,6 @@ ...@@ -103,7 +103,6 @@
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
<span class="sr-only">Error:</span> <span class="sr-only">Error:</span>
{{ 'warning_last_session_bad' | translate }} {{ 'warning_last_session_bad' | translate }}
<button class="btn btn-warning btn-sm" type="button" ng-click="close_ws()" translate>close_session</button>
</div> </div>
<!-- running try --> <!-- running try -->
...@@ -187,11 +186,11 @@ ...@@ -187,11 +186,11 @@
<!-- / running try --> <!-- / running try -->
<!-- sessions list --> <!-- sessions list -->
<div class="list-group pre-scrollable" ng-show="showSessions && section == 'previous' || showLastTry && wsessions.length > 0 && ws_recover || tryRunning"> <div class="list-group pre-scrollable" ng-show="showSessions && section == 'previous' || showLastTry && wsessions.length > 0 || ws_recover || tryRunning">
<div ng-repeat="s in wsessions | orderBy: '-begin'"> <div ng-repeat="s in wsessions | orderBy: '-begin'">
<!-- div class="list-group-item" ng-repeat="s in wsessions | orderBy: '-begin' | limitTo: numPerPage:(currentPage-1)*numPerPage" --> <!-- div class="list-group-item" ng-repeat="s in wsessions | orderBy: '-begin' | limitTo: numPerPage:(currentPage-1)*numPerPage" -->
<div class="list-group-item" ng-show="section == 'previous' || ws.id==s.id"> <div class="list-group-item" ng-show="section == 'previous' || ws.id==s.id || ws_recover">
<div ng-show="showLastTry && wsessions.length > 0"> <div ng-show="showLastTry && wsessions.length > 0">
<h4><strong>{{ 'last_session' | translate }}</strong>: {{ studentData.current_method }}, {{ studentData.current_instruction }}</h4> <h4><strong>{{ 'last_session' | translate }}</strong>: {{ studentData.current_method }}, {{ studentData.current_instruction }}</h4>
...@@ -204,7 +203,7 @@ ...@@ -204,7 +203,7 @@
</p> </p>
<!-- show/hide tries button --> <!-- show/hide tries button -->
<div class="form-group pull-right" ng-show="ws.id != s.id"> <div class="form-group pull-right" ng-show="ws.id != s.id && !ws_recover">
<span class="control-label"> {{ s.tries.length }} {{ 'tries' | translate }}</span> <span class="control-label"> {{ s.tries.length }} {{ 'tries' | translate }}</span>
<button ng-click="showTries = !showTries" class="btn btn-default btn-sm"> <button ng-click="showTries = !showTries" class="btn btn-default btn-sm">
<div ng-show="!showTries"> <div ng-show="!showTries">
...@@ -220,8 +219,10 @@ ...@@ -220,8 +219,10 @@
<textarea type="editable title" rows="2" id="ins_desc_ws" placeholder=" {{ 'session_notes' | translate }}" ng-model="s.description" <textarea type="editable title" rows="2" id="ins_desc_ws" placeholder=" {{ 'session_notes' | translate }}" ng-model="s.description"
ng-model-options="{ updateOn: 'blur' }" ng-change="update_ws(s)" cols="80"></textarea> ng-model-options="{ updateOn: 'blur' }" ng-change="update_ws(s)" cols="80"></textarea>
<button ng-show="ws_recover" class="btn btn-warning btn-sm pull-right" type="button" ng-click="close_ws()" translate>close_session</button>
<!-- tries list --> <!-- tries list -->
<div class="sessionTries" ng-show="showTries || ws.id == s.id"> <div class="sessionTries" ng-show="showTries || ws.id == s.id || ws_recover">
<div class="try" ng-repeat="t in s.tries"> <div class="try" ng-repeat="t in s.tries">
<div ng-show="!is_currentOpenTry(t)"> <div ng-show="!is_currentOpenTry(t)">
<table width="100%"> <table width="100%">
......
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