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
4b5f28e0
authored
Nov 29, 2016
by
Fernando Martínez Santiago
Committed by
root
Nov 29, 2016
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
issue #630 closed
parent
01e39acb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
7 deletions
sails/src/assets/scripts/modules/student/controllers/collections.js
sails/src/assets/scripts/modules/student/controllers/pictoconfig.js
sails/src/assets/scripts/modules/student/views/collections.html
sails/src/assets/scripts/modules/student/views/pictoconfig.html
sails/src/assets/scripts/modules/student/controllers/collections.js
View file @
4b5f28e0
...
@@ -43,7 +43,8 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
...
@@ -43,7 +43,8 @@ dashboardControllers.controller('StudentCollectionsCtrl', function StudentCollec
free_category_coord_y
:
null
,
free_category_coord_y
:
null
,
status
:
'invisible'
,
status
:
'invisible'
,
highlight
:
false
,
highlight
:
false
,
color
:
null
color
:
null
,
expression
:
null
}
}
};
};
$scope
.
showFreeCategory
=
!
$scope
.
studentData
.
attributes
.
categories
;
$scope
.
showFreeCategory
=
!
$scope
.
studentData
.
attributes
.
categories
;
...
...
sails/src/assets/scripts/modules/student/controllers/pictoconfig.js
View file @
4b5f28e0
...
@@ -15,6 +15,8 @@ dashboardControllers.controller('PictoConfigCtrl', function ($scope, $modalInsta
...
@@ -15,6 +15,8 @@ dashboardControllers.controller('PictoConfigCtrl', function ($scope, $modalInsta
$scope
.
studentPicto
=
studentPicto
;
$scope
.
studentPicto
=
studentPicto
;
// Input expression
// Input expression
$scope
.
expression
=
(
studentPicto
.
expression
!=
undefined
)
?
studentPicto
.
expression
.
text
:
''
;
$scope
.
expression
=
(
studentPicto
.
expression
!=
undefined
)
?
studentPicto
.
expression
.
text
:
''
;
if
(
$scope
.
studentPicto
.
attributes
.
expression
==
undefined
||
$scope
.
studentPicto
.
attributes
.
expression
==
null
)
$scope
.
studentPicto
.
attributes
.
expression
=
studentPicto
.
expression
.
text
;
// Enable or Disable the button 'change' if the supervisor is the owner of the picto
// Enable or Disable the button 'change' if the supervisor is the owner of the picto
$scope
.
isOwner
=
(
studentPicto
.
picto
.
owner
==
sup
.
id
)
?
true
:
false
;
$scope
.
isOwner
=
(
studentPicto
.
picto
.
owner
==
sup
.
id
)
?
true
:
false
;
...
@@ -39,7 +41,7 @@ dashboardControllers.controller('PictoConfigCtrl', function ($scope, $modalInsta
...
@@ -39,7 +41,7 @@ dashboardControllers.controller('PictoConfigCtrl', function ($scope, $modalInsta
io
.
socket
.
post
(
'/stu/vocabulary'
,
{
io
.
socket
.
post
(
'/stu/vocabulary'
,
{
action
:
'update'
,
action
:
'update'
,
attributes
:
{
attributes
:
{
id_stu
:
student
.
id
,
id_stu
:
$scope
.
stu
.
id
,
stu_picto
:
studentPicto
.
id
stu_picto
:
studentPicto
.
id
}
}
},
function
()
{});
},
function
()
{});
...
@@ -67,7 +69,7 @@ dashboardControllers.controller('PictoConfigCtrl', function ($scope, $modalInsta
...
@@ -67,7 +69,7 @@ dashboardControllers.controller('PictoConfigCtrl', function ($scope, $modalInsta
action
:
'update'
,
action
:
'update'
,
attributes
:
{
attributes
:
{
id_stu
:
$scope
.
stu
.
id
,
id_stu
:
$scope
.
stu
.
id
,
picto
:
data
stu_
picto
:
data
}
}
},
},
function
(
res
)
{
function
(
res
)
{
...
...
sails/src/assets/scripts/modules/student/views/collections.html
View file @
4b5f28e0
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
('empty-' + $index + '-' + $parent.$index)
('empty-' + $index + '-' + $parent.$index)
}}"
}}"
draggable
droppable
drop=
"handleDrop"
draggable
droppable
drop=
"handleDrop"
popover=
"{{studentPicto.
expression.text
}}"
popover=
"{{studentPicto.
attributes.expression==null ? studentPicto.expression.text : studentPicto.attributes.expression
}}"
popover-trigger=
"mouseenter"
popover-trigger=
"mouseenter"
ng-repeat=
"studentPicto in studentPictoRow track by $index"
>
ng-repeat=
"studentPicto in studentPictoRow track by $index"
>
<img
<img
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
<div
<div
class=
"picto pull-left"
class=
"picto pull-left"
ng-repeat=
"studentPicto in studentPictoRow track by $index"
ng-repeat=
"studentPicto in studentPictoRow track by $index"
popover=
"{{studentPicto.
expression.text
}}"
popover=
"{{studentPicto.
attributes.expression==null ? studentPicto.expression.text : studentPicto.attributes.expression
}}"
popover-trigger=
"mouseenter"
>
popover-trigger=
"mouseenter"
>
<img
<img
src=
"/app/img/redcross.png"
src=
"/app/img/redcross.png"
...
@@ -144,7 +144,7 @@
...
@@ -144,7 +144,7 @@
('empty-' + $index + '-' + $parent.$index)
('empty-' + $index + '-' + $parent.$index)
}}"
}}"
draggable
droppable
drop=
"handleDrop"
draggable
droppable
drop=
"handleDrop"
popover=
"{{studentPicto.
expression.text
}}"
popover=
"{{studentPicto.
attributes.expression==null ? studentPicto.expression.text : studentPicto.attributes.expression
}}"
popover-trigger=
"mouseenter"
popover-trigger=
"mouseenter"
ng-repeat=
"studentPicto in studentPictoRow track by $index"
>
ng-repeat=
"studentPicto in studentPictoRow track by $index"
>
<img
<img
...
...
sails/src/assets/scripts/modules/student/views/pictoconfig.html
View file @
4b5f28e0
...
@@ -14,7 +14,8 @@
...
@@ -14,7 +14,8 @@
<form
ng-submit=
"isOwner ? change() : update_properties()"
>
<form
ng-submit=
"isOwner ? change() : update_properties()"
>
<div
id=
"add_label"
class=
"input-group"
>
<div
id=
"add_label"
class=
"input-group"
>
<span
class=
"input-group-addon glyphicon glyphicon-comment"
aria-hidden=
"true"
></span>
<span
class=
"input-group-addon glyphicon glyphicon-comment"
aria-hidden=
"true"
></span>
<input
type=
"text"
class=
"form-control"
ng-model=
"isOwner ? expression : studentPicto.attributes.expression"
/>
<input
type=
"text"
class=
"form-control"
ng-if=
"isOwner"
ng-model=
"expression"
/>
<input
type=
"text"
class=
"form-control"
ng-if=
"!isOwner"
ng-model=
"studentPicto.attributes.expression"
/>
<span
class=
"input-group-btn"
>
<span
class=
"input-group-btn"
>
<button
class=
"btn btn-success"
type=
"submit"
translate
>
save
</button>
<button
class=
"btn btn-success"
type=
"submit"
translate
>
save
</button>
</span>
</span>
...
...
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