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
8921f54c
authored
Dec 05, 2016
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
new core categories shown properly
parent
8deb8e35
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
5 deletions
sails/src/api/controllers/SupervisorController.js
sails/src/api/models/Student.js
sails/src/assets/scripts/modules/student/controllers/collections.js
sails/src/assets/scripts/modules/supervisor/controllers/students.js
sails/src/assets/styles/picto-grid.less
sails/src/api/controllers/SupervisorController.js
View file @
8921f54c
...
...
@@ -79,7 +79,7 @@ module.exports = {
});
var
office
=
Office
.
findOne
({
id
:
supervisor
.
office
})
.
then
(
function
(
office
)
{
.
then
(
function
(
office
)
{
return
office
;
});
...
...
@@ -95,6 +95,8 @@ module.exports = {
if
(
!
supervisor
.
isSupAdmin
&&
!
stuSup
)
throw
new
Error
(
"User without students linked to"
);
return
res
.
ok
({
user
:
supervisor
,
server_time
:
(
new
Date
()).
getTime
(),
...
...
@@ -405,7 +407,7 @@ module.exports = {
var
students
=
[];
async
.
each
(
stuSups
,
function
(
stuSup
,
cb
)
{
// Filter logically deleted students
if
(
stuSup
.
student
.
office
==
null
)
cb
();
...
...
sails/src/api/models/Student.js
View file @
8921f54c
...
...
@@ -169,6 +169,7 @@ module.exports = {
},
legend
:
false
,
legend_size
:
'normal'
,
pic
:
"defaultAvatar.jpg"
,
size
:
'normal'
,
picto_background
:
'#0000ff'
,
tape_background
:
'#00ffff'
,
...
...
@@ -194,6 +195,9 @@ module.exports = {
}
});
}
if
(
typeof
validAttributes
.
pic
!==
'string'
)
{
delete
validAttributes
.
pic
;
}
if
(
typeof
validAttributes
.
input_selection
!==
'object'
)
{
delete
validAttributes
.
input_selection
;
}
else
{
...
...
sails/src/assets/scripts/modules/student/controllers/collections.js
View file @
8921f54c
...
...
@@ -57,7 +57,7 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
$scope
.
isCategory
=
function
(
studentPicto
)
{
return
studentPicto
.
attributes
.
id_cat
===
null
&&
studentPicto
.
attributes
.
coord_
x
!==
0
&&
studentPicto
.
attributes
.
coord_
y
!==
0
&&
typeof
studentPicto
.
attributes
.
free_category_coord_x
!==
'number'
&&
typeof
studentPicto
.
attributes
.
free_category_coord_y
!==
'number'
;
};
...
...
sails/src/assets/scripts/modules/supervisor/controllers/students.js
View file @
8921f54c
...
...
@@ -24,7 +24,7 @@ dashboardControllers.controller('StudentsCtrl', function StudentsCtrl(
gender
:
'F'
,
lang
:
'es-es'
,
notes
:
''
,
pic
:
'
/app/img/default
.jpg'
,
pic
:
'
defaultAvatar
.jpg'
,
office
:
$scope
.
user
.
office
||
{
name
:
''
}
};
...
...
sails/src/assets/styles/picto-grid.less
View file @
8921f54c
...
...
@@ -62,7 +62,7 @@
&__title {
margin-top: 0;
color:
white
;
color:
black
;
text-transform: capitalize;
}
}
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