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
efad6d91
authored
Mar 13, 2017
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fixed
#74
and a problem with lost rooms
parent
553c6402
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
sails/src/api/hooks/rooms.js
sails/src/assets/scripts/modules/student/controllers/collections.js
sails/src/api/hooks/rooms.js
View file @
efad6d91
...
...
@@ -168,7 +168,8 @@ module.exports = function roomsHook (sails) {
* Call from config/sockets.js after a socket disconnects
*/
disconnect
:
function
(
socket
)
{
var
rooms
=
socketRooms
[
sails
.
sockets
.
getId
(
socket
)];
var
rooms
=
socketRooms
[
sails
.
sockets
.
getId
(
socket
)];
if
(
!
rooms
)
return
;
for
(
var
i
=
0
;
i
<
rooms
.
length
;
i
++
)
sails
.
hooks
.
rooms
.
unsubscribeFromRoom
(
rooms
[
i
].
room
,
socket
);
}
...
...
sails/src/assets/scripts/modules/student/controllers/collections.js
View file @
efad6d91
...
...
@@ -322,7 +322,10 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
// Returned data from the modal window
modalInstance
.
result
.
then
(
function
(
pictoId
)
{
// Send the picto to the server
if
(
!
pictoId
)
return
;
// Send the picto to the server
$http
.
put
(
config
.
backend
+
'/stu/'
+
$scope
.
studentData
.
id
+
'/cat'
,
{
prev_id_stu_pic
:
picto_cat
.
id
,
new_id_pic
:
pictoId
...
...
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