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
adfb45a7
authored
Jan 16, 2018
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
changed apply in ws connections
parent
88830a9a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
sails/src/assets/scripts/modules/student/controllers/student.js
sails/src/assets/scripts/modules/student/controllers/student.js
View file @
adfb45a7
...
@@ -59,8 +59,8 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl(
...
@@ -59,8 +59,8 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl(
io
.
socket
.
on
(
'disconnect'
,
function
()
{
io
.
socket
.
on
(
'disconnect'
,
function
()
{
$scope
.
studentData
.
pcb_count
=
0
;
$scope
.
studentData
.
pcb_count
=
0
;
$scope
.
studentData
.
pdb_count
=
0
;
$scope
.
studentData
.
pdb_count
=
0
;
$scope
.
$apply
();
ngToast
.
warning
(
$translate
.
instant
(
'no_subscribed'
));
ngToast
.
warning
(
$translate
.
instant
(
'no_subscribed'
));
$scope
.
$apply
();
});
});
io
.
socket
.
on
(
'reconnect'
,
function
()
{
io
.
socket
.
on
(
'reconnect'
,
function
()
{
...
@@ -77,8 +77,8 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl(
...
@@ -77,8 +77,8 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl(
if
(
data
.
room
.
search
(
'student'
)
!=
-
1
)
{
if
(
data
.
room
.
search
(
'student'
)
!=
-
1
)
{
$scope
.
studentData
.
pcb_count
=
data
.
pcb_count
;
$scope
.
studentData
.
pcb_count
=
data
.
pcb_count
;
$scope
.
studentData
.
pdb_count
=
data
.
pdb_count
==
0
?
1
:
data
.
pdb_count
;
// because subscription is fastar than counter update
$scope
.
studentData
.
pdb_count
=
data
.
pdb_count
==
0
?
1
:
data
.
pdb_count
;
// because subscription is fastar than counter update
$scope
.
$apply
();
ngToast
.
success
(
$translate
.
instant
(
'subscribed'
));
ngToast
.
success
(
$translate
.
instant
(
'subscribed'
));
$scope
.
$apply
();
}
}
});
});
});
});
...
...
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