Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d3b355eb
authored
Mar 14, 2017
by
Jose Antonio
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Translate strings fix - load charts without select method
parent
e07b3fdb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
sails/src/assets/app/i18n/en-gb.json
sails/src/assets/app/i18n/es-es.json
sails/src/assets/scripts/modules/student/controllers/reports.js
sails/src/assets/app/i18n/en-gb.json
View file @
d3b355eb
...
...
@@ -25,6 +25,7 @@
"admin_panel"
:
"Admin panel"
,
"alert"
:
"Alert"
,
"all"
:
"All"
,
"all_methods"
:
"All methods"
,
"animation"
:
"Animation"
,
"apply"
:
"Apply"
,
"annual"
:
"Annual"
,
...
...
@@ -75,6 +76,7 @@
"crop_image"
:
"Crop image"
,
"data_no_saved"
:
"Data can't be saved"
,
"data_saved"
:
"Data saved"
,
"date_error"
:
"Filter date to must be greater than since"
,
"day_format"
:
"yyyy/MM/dd"
,
"days"
:
"Days"
,
"days_from_first_session"
:
"days from first session"
,
...
...
sails/src/assets/app/i18n/es-es.json
View file @
d3b355eb
...
...
@@ -25,6 +25,7 @@
"admin_panel"
:
"Panel de administración"
,
"alert"
:
"Alerta"
,
"all"
:
"Todos"
,
"all_methods"
:
"Todos los métodos"
,
"animation"
:
"Animación"
,
"apply"
:
"Aplicar"
,
"annual"
:
"Anual"
,
...
...
@@ -75,6 +76,7 @@
"crop_image"
:
"Recortar imagen"
,
"data_no_saved"
:
"Los datos no se han podido guardar"
,
"data_saved"
:
"Datos guardados"
,
"date_error"
:
"La fecha 'desde' debe ser menor que la fecha 'hasta'"
,
"day_format"
:
"dd/MM/yyyy"
,
"days"
:
"Días"
,
"days_from_first_session"
:
"días desde la primera sesión"
,
...
...
sails/src/assets/scripts/modules/student/controllers/reports.js
View file @
d3b355eb
...
...
@@ -8,6 +8,7 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr
$stateParams
,
$http
,
config
,
ngToast
,
$filter
,
$translate
)
{
...
...
@@ -63,6 +64,7 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr
class
:
"instruction-opt"
,
name
:
"- - "
+
$scope
.
fulldata
.
methods
[
i
].
instructions
[
j
].
name
,
id_method
:
$scope
.
fulldata
.
methods
[
i
].
id
});
}
}
$scope
.
filter
();
})
.
error
(
function
(
data
,
status
,
headers
,
config
)
{
console
.
log
(
"Error from API: "
+
data
.
error
);
...
...
@@ -86,14 +88,16 @@ dashboardControllers.controller('StudentReportsCtrl', function StudentReportsCtr
$scope
.
filter
=
function
(){
if
(
$scope
.
reportDateSince
>
$scope
.
reportDateTo
){
//Mostrar error
$translate
(
'date_error'
).
then
(
function
(
translation
)
{
ngToast
.
danger
({
content
:
translation
});
});
return
;
}
$scope
.
showPrint
=
true
;
$scope
.
reportDateSinceFormat
=
moment
(
$scope
.
reportDateSince
).
format
(
"DD/MM/YYYY"
);
$scope
.
reportDateToFormat
=
moment
(
$scope
.
reportDateTo
).
format
(
"DD/MM/YYYY"
);
if
(
$scope
.
selected_method
==
"-1"
){
$scope
.
printName
=
"All methods"
;
$scope
.
printName
=
$translate
.
instant
(
'all_methods'
)
;
$scope
.
statistics
({
id
:
-
1
,
class
:
"method-opt"
});
}
else
{
$scope
.
printName
=
JSON
.
parse
(
$scope
.
selected_method
).
name
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment