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
3bda1c1b
authored
Feb 08, 2017
by
Sebastián Collado Montañez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
undo changes #876
parent
3fbe6fef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
63 deletions
sails/src/assets/scripts/modules/supervisor/controllers/supervisor.js
sails/src/assets/scripts/modules/supervisor/views/header.html
sails/src/assets/scripts/modules/supervisor/views/own_pictos.html
sails/src/assets/scripts/modules/supervisor/controllers/supervisor.js
View file @
3bda1c1b
...
...
@@ -33,61 +33,4 @@ dashboardControllers.controller('SupervisorCtrl', function SupervisorCtrl($scope
}
});
//
// Own Pictos
//
$scope
.
own_pictos
=
function
()
{
console
.
log
();
var
modalInstance
=
$modal
.
open
({
animation
:
true
,
templateUrl
:
'modules/supervisor/views/own_pictos.html'
,
controller
:
'AddPictoCtrl'
,
size
:
'lg'
,
resolve
:
{
student
:
function
()
{
return
$scope
.
studentData
;
},
supervisor
:
function
()
{
return
$scope
.
user
;
}
}
});
// Returned data from the modal window
modalInstance
.
result
.
then
(
function
(
pictoId
)
{
// Send the picto to the server
$http
.
post
(
config
.
backend
+
'/stu/'
+
$scope
.
studentData
.
id
+
'/picto/'
+
pictoId
,
{
attributes
:
{
id_cat
:
$scope
.
showFreeCategory
?
null
:
$scope
.
getCategoryId
(
$scope
.
selectedCategory
),
coord_x
:
$scope
.
showFreeCategory
?
null
:
col
,
coord_y
:
$scope
.
showFreeCategory
?
null
:
row
,
status
:
'enabled'
,
free_category_coord_x
:
$scope
.
showFreeCategory
?
col
:
null
,
free_category_coord_y
:
$scope
.
showFreeCategory
?
row
:
null
}
})
.
success
(
function
(
studentPicto
)
{
console
.
log
(
studentPicto
);
placePicto
(
studentPicto
);
io
.
socket
.
post
(
'/stu/vocabulary'
,
{
action
:
'add'
,
attributes
:
{
id_stu
:
$scope
.
studentData
.
id
,
stu_picto
:
studentPicto
}
},
function
()
{});
})
.
error
(
function
(
err
)
{
if
(
err
.
code
&&
err
.
code
==
1
)
// codes are in sails/config/pictogram.js
ngToast
.
danger
({
content
:
$translate
.
instant
(
'error_duplicated_picto'
)
});
else
ngToast
.
danger
({
content
:
$translate
.
instant
(
'error_adding_picto'
)
});
});
// not needed
// $scope.loadPictos();
});
};
});
sails/src/assets/scripts/modules/supervisor/views/header.html
View file @
3bda1c1b
...
...
@@ -44,12 +44,6 @@
</a>
</li>
<li>
<a
ng-click=
"own_pictos()"
class=
"pointer"
role=
"menuitem"
tabindex=
"0"
href=
""
>
<i
class=
"glyphicon glyphicon-picture"
aria-hidden=
"true"
></i>
{{ 'own_pictos' | translate }}
</a>
</li>
<li>
<a
class=
"pointer"
role=
"menuitem"
tabindex=
"0"
href=
"/app/#/setup"
>
<i
class=
"glyphicon glyphicon-cog"
aria-hidden=
"true"
></i>
{{ 'setup' | translate }}
...
...
sails/src/assets/scripts/modules/supervisor/views/own_pictos.html
deleted
100644 → 0
View file @
3fbe6fef
File mode changed
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