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
94c96c39
authored
Feb 20, 2017
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
issue #937 fixed
parent
60f5c141
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
33 deletions
sails/src/assets/app/i18n/en-gb.json
sails/src/assets/app/i18n/es-es.json
sails/src/assets/scripts/modules/student/controllers/setup.js
sails/src/assets/app/i18n/en-gb.json
View file @
94c96c39
...
...
@@ -59,6 +59,8 @@
"close_session"
:
"Close session"
,
"collections"
:
"Collections"
,
"confirmation"
:
"Are you sure?"
,
"confirm_unlink_therapist"
:
"Unlik {{ name }} from {{ student }} as therapist?"
,
"confirm_unlink_tutor"
:
"Unlik {{ name }} from {{ student }} as tutor?"
,
"contact_person"
:
"Contact person"
,
"contact_person"
:
"Contact person"
,
"continue_session"
:
"Resume_session"
,
...
...
sails/src/assets/app/i18n/es-es.json
View file @
94c96c39
...
...
@@ -59,6 +59,8 @@
"close_session"
:
"Cerrar sesion"
,
"collections"
:
"Colecciones"
,
"confirmation"
:
"¿Estás seguro?"
,
"confirm_unlink_therapist"
:
"¿Desligar {{ name }} de {{ student }} como terapeuta?"
,
"confirm_unlink_tutor"
:
"¿Desligar {{ name }} de {{ student }} como tutor?"
,
"contact_person"
:
"Persona de contacto"
,
"contact_person"
:
"Persona de contacto"
,
"continue_session"
:
"Reanudar sesión"
,
...
...
sails/src/assets/scripts/modules/student/controllers/setup.js
View file @
94c96c39
...
...
@@ -27,7 +27,7 @@ dashboardControllers.controller('StudentSetupCtrl', function StudentSetupCtrl(
$scope
.
supsForm
=
{};
$scope
.
section
=
'account'
;
$scope
.
changeImg
=
function
()
{
$scope
.
progress
=
0
;
...
...
@@ -218,27 +218,25 @@ dashboardControllers.controller('StudentSetupCtrl', function StudentSetupCtrl(
// Delete tutor
$scope
.
delete_sup
=
function
(
id_sup
)
{
var
deleteSup
=
$window
.
confirm
(
'Are you absolutely sure you want to delete?'
);
//Se recorre el array de objetos json para buscarlo
var
i
;
for
(
i
=
0
;
i
<
$scope
.
studentSupervisors
.
length
&&
id_sup
!==
$scope
.
studentSupervisors
[
i
].
id
;
i
++
);
var
deleteSup
=
$window
.
confirm
(
$translate
.
instant
(
'confirm_unlink_therapist'
,
{
name
:
$scope
.
studentSupervisors
[
i
].
name
,
student
:
$scope
.
studentData
.
name
}
));
if
(
deleteSup
)
{
$http
.
delete
(
config
.
backend
+
'/stu/'
+
$scope
.
studentData
.
id
+
'/sup/'
+
id_sup
)
.
success
(
function
()
{
var
i
;
// Eliminar de la vista: Se recorre el array de objetos json para buscarlo
for
(
i
=
0
;
i
<
$scope
.
studentSupervisors
.
length
;
i
++
)
{
if
(
id_sup
===
$scope
.
studentSupervisors
[
i
].
id
)
{
$scope
.
studentSupervisors
.
splice
(
i
,
1
);
}
}
$translate
(
'supervisor_deleted'
).
then
(
function
(
translation
)
{
ngToast
.
success
({
content
:
translation
});
});
// Eliminar de la vista
$scope
.
studentSupervisors
.
splice
(
i
,
1
);;
ngToast
.
success
({
content
:
$translate
.
instant
(
'supervisor_deleted'
)
});
})
.
error
(
function
()
{
$translate
(
'sup_not_deleted'
).
then
(
function
(
translation
)
{
ngToast
.
error
({
content
:
translation
});
});
ngToast
.
danger
({
content
:
$translate
.
instant
(
'supervisor_not_deleted'
)
});
});
}
};
...
...
@@ -309,28 +307,25 @@ dashboardControllers.controller('StudentSetupCtrl', function StudentSetupCtrl(
// Delete tutor
$scope
.
delete_tutor
=
function
(
id_sup
)
{
var
deleteTutor
=
$window
.
confirm
(
'Are you absolutely sure you want to delete?'
);
//Se recorre el array de objetos json para buscarlo
var
i
;
for
(
i
=
0
;
i
<
$scope
.
studentTutors
.
length
&&
id_sup
!==
$scope
.
studentTutors
[
i
].
id
;
i
++
);
var
deleteTutor
=
$window
.
confirm
(
$translate
.
instant
(
'confirm_unlink_tutor'
,
{
name
:
$scope
.
studentTutors
[
i
].
name
,
student
:
$scope
.
studentData
.
name
}
));
if
(
deleteTutor
)
{
$http
.
delete
(
config
.
backend
+
'/stu/'
+
$scope
.
studentData
.
id
+
'/sup/'
+
id_sup
)
.
success
(
function
()
{
var
i
;
// Eliminar de la vista: Se recorre el array de objetos json para buscarlo
for
(
i
=
0
;
i
<
$scope
.
studentTutors
.
length
;
i
++
)
{
if
(
id_sup
===
$scope
.
studentTutors
[
i
].
id
)
{
$scope
.
studentTutors
.
splice
(
i
,
1
);
}
}
$translate
(
'tutor_deleted'
).
then
(
function
(
translation
)
{
ngToast
.
success
({
content
:
translation
});
});
// Eliminar de la vista
$scope
.
studentTutors
.
splice
(
i
,
1
);
ngToast
.
success
({
content
:
$translate
.
instant
(
'tutor_deleted'
)
});
})
.
error
(
function
()
{
$translate
(
'tutor_not_deleted'
).
then
(
function
(
translation
)
{
ngToast
.
danger
({
content
:
translation
});
});
ngToast
.
danger
({
content
:
$translate
.
instant
(
'tutor_not_deleted'
)
});
});
}
};
...
...
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