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
739c69d1
authored
Dec 08, 2016
by
Fernando Martínez Santiago
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'develop' of
http://scm.ujaen.es/softuno/pictogram
into develop
parents
4afc617a
089dbfaf
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
58 additions
and
57 deletions
sails/src/api/models/StuPicto.js
sails/src/api/models/Student.js
sails/src/assets/app/i18n/en-gb.json
sails/src/assets/app/i18n/es-es.json
sails/src/assets/scripts/modules/student/views/collections.html
sails/src/assets/scripts/modules/student/views/setup.html
sails/src/assets/styles/main.css
sails/src/assets/styles/picto-grid.less
sails/src/api/models/StuPicto.js
View file @
739c69d1
...
@@ -68,6 +68,9 @@ module.exports = {
...
@@ -68,6 +68,9 @@ module.exports = {
* free_category_coord_y: 0 .. 9 or null,
* free_category_coord_y: 0 .. 9 or null,
* status: '[invisible]/enabled/disabled',
* status: '[invisible]/enabled/disabled',
* highlight: true/[false],
* highlight: true/[false],
* legend: true/[false],
* legend_size: '[small]/large',
* expression: 'custom expression',
* color: any valid HEX color or [null]
* color: any valid HEX color or [null]
* }
* }
* @return {Object} Validated attributes that can be safetly stored.
* @return {Object} Validated attributes that can be safetly stored.
...
...
sails/src/api/models/Student.js
View file @
739c69d1
...
@@ -138,7 +138,7 @@ module.exports = {
...
@@ -138,7 +138,7 @@ module.exports = {
* }
* }
* legend: true/[false] Show or hide picto's name on the grid
* legend: true/[false] Show or hide picto's name on the grid
* legend_size: "small/[normal]/large" How big the legend should be respect to the picto
* legend_size: "small/[normal]/large" How big the legend should be respect to the picto
* size: "
[normal]/large"
* size: "
small/[large]" How big pictos are: 'small' -> a grid of 5x10, 'large' -> a grid of 4x8
* picto_background: [#0000ff] Can be any valid HEX color. May be overriden by the
* picto_background: [#0000ff] Can be any valid HEX color. May be overriden by the
* category color
* category color
* tape_background: [#ff0000] Can be any valid HEX color
* tape_background: [#ff0000] Can be any valid HEX color
...
@@ -157,8 +157,8 @@ module.exports = {
...
@@ -157,8 +157,8 @@ module.exports = {
categories
:
true
,
categories
:
true
,
input_feedback
:
{
input_feedback
:
{
vibration
:
true
,
vibration
:
true
,
click
:
false
,
read
:
false
,
read
:
false
,
beep
:
false
,
highlight
:
false
,
highlight
:
false
,
},
},
input_selection
:
{
input_selection
:
{
...
@@ -170,7 +170,7 @@ module.exports = {
...
@@ -170,7 +170,7 @@ module.exports = {
legend
:
false
,
legend
:
false
,
legend_size
:
'normal'
,
legend_size
:
'normal'
,
pic
:
"defaultAvatar.jpg"
,
pic
:
"defaultAvatar.jpg"
,
size
:
'
normal
'
,
size
:
'
large
'
,
picto_background
:
'#0000ff'
,
picto_background
:
'#0000ff'
,
tape_background
:
'#00ffff'
,
tape_background
:
'#00ffff'
,
};
};
...
@@ -189,7 +189,7 @@ module.exports = {
...
@@ -189,7 +189,7 @@ module.exports = {
if
(
typeof
validAttributes
.
input_feedback
!==
'object'
)
{
if
(
typeof
validAttributes
.
input_feedback
!==
'object'
)
{
delete
validAttributes
.
input_feedback
;
delete
validAttributes
.
input_feedback
;
}
else
{
}
else
{
[
'vibration'
,
'
click'
,
'read'
,
'highlight
'
].
forEach
((
attribute
)
=>
{
[
'vibration'
,
'
read'
,
'highlight'
,
'beep
'
].
forEach
((
attribute
)
=>
{
if
(
typeof
validAttributes
.
input_feedback
[
attribute
]
!==
'boolean'
)
{
if
(
typeof
validAttributes
.
input_feedback
[
attribute
]
!==
'boolean'
)
{
delete
validAttributes
.
input_feedback
[
attribute
];
delete
validAttributes
.
input_feedback
[
attribute
];
}
}
...
@@ -213,7 +213,7 @@ module.exports = {
...
@@ -213,7 +213,7 @@ module.exports = {
if
(
!
((
/^
(
small|normal|large
)
$/
).
test
(
validAttributes
.
legend_size
)))
{
if
(
!
((
/^
(
small|normal|large
)
$/
).
test
(
validAttributes
.
legend_size
)))
{
delete
validAttributes
.
legend_size
;
delete
validAttributes
.
legend_size
;
}
}
if
(
!
((
/^
(
norma
l|large
)
$/
).
test
(
validAttributes
.
size
)))
{
if
(
!
((
/^
(
smal
l|large
)
$/
).
test
(
validAttributes
.
size
)))
{
delete
validAttributes
.
size
;
delete
validAttributes
.
size
;
}
}
if
(
!
((
/^#
([
0-9a-f
]{3}){1,2}
$/i
).
test
(
validAttributes
.
picto_background
)))
{
if
(
!
((
/^#
([
0-9a-f
]{3}){1,2}
$/i
).
test
(
validAttributes
.
picto_background
)))
{
...
...
sails/src/assets/app/i18n/en-gb.json
View file @
739c69d1
...
@@ -196,6 +196,7 @@
...
@@ -196,6 +196,7 @@
"picto_behavior"
:
"Behavior of a pictogram when it is selected (without phrase tape)"
,
"picto_behavior"
:
"Behavior of a pictogram when it is selected (without phrase tape)"
,
"picto_labels"
:
"Pictogram labels"
,
"picto_labels"
:
"Pictogram labels"
,
"picto_removed"
:
"Picto has been removed from vocabulary"
,
"picto_removed"
:
"Picto has been removed from vocabulary"
,
"picto_size"
:
"Pictograms size"
,
"picto_style"
:
"Pictogram style"
,
"picto_style"
:
"Pictogram style"
,
"picto_upload_error"
:
"Error uploading picto"
,
"picto_upload_error"
:
"Error uploading picto"
,
"picto_upload_limit"
:
"Image size is too large"
,
"picto_upload_limit"
:
"Image size is too large"
,
...
...
sails/src/assets/app/i18n/es-es.json
View file @
739c69d1
...
@@ -196,6 +196,7 @@
...
@@ -196,6 +196,7 @@
"picto_behavior"
:
"Comportamiento de un pictograma al seleccionarlo (sin cinta de frase)"
,
"picto_behavior"
:
"Comportamiento de un pictograma al seleccionarlo (sin cinta de frase)"
,
"picto_labels"
:
"Etiquetas del pictograma"
,
"picto_labels"
:
"Etiquetas del pictograma"
,
"picto_removed"
:
"El pictograma se ha eliminado del vocabulario"
,
"picto_removed"
:
"El pictograma se ha eliminado del vocabulario"
,
"picto_size"
:
"Tamaño pictogramas"
,
"picto_style"
:
"Aspecto de los pictogramas"
,
"picto_style"
:
"Aspecto de los pictogramas"
,
"picto_upload_error"
:
"Hubo un error al guardar el picto"
,
"picto_upload_error"
:
"Hubo un error al guardar el picto"
,
"picto_upload_limit"
:
"El tamaño del picto es demasiado grande"
,
"picto_upload_limit"
:
"El tamaño del picto es demasiado grande"
,
...
@@ -251,7 +252,7 @@
...
@@ -251,7 +252,7 @@
"state_spontaneous"
:
"Espontáneo"
,
"state_spontaneous"
:
"Espontáneo"
,
"state_supervised"
:
"Guiado"
,
"state_supervised"
:
"Guiado"
,
"student_added"
:
"Estudiante añadido"
,
"student_added"
:
"Estudiante añadido"
,
"student_already_exists"
:
"Ya existe un estudiante con ese nombre de usuario. Por favor, inténtelo de nuevo con algo diferente."
,
"student_already_exists"
:
"Ya existe un estudiante con ese nombre de usuario. Por favor, inténtelo de nuevo con algo diferente."
,
"student_deleted"
:
"Estudiante eliminado"
,
"student_deleted"
:
"Estudiante eliminado"
,
"student_not_added"
:
"Estudiante no añadido"
,
"student_not_added"
:
"Estudiante no añadido"
,
"student_not_deleted"
:
"No se ha podido eliminar el estudiante"
,
"student_not_deleted"
:
"No se ha podido eliminar el estudiante"
,
...
...
sails/src/assets/scripts/modules/student/views/collections.html
View file @
739c69d1
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
ng-init=
"rowIndex = $index"
ng-init=
"rowIndex = $index"
class=
"picto-grid__row"
>
class=
"picto-grid__row"
>
<div
<div
class=
"picto pull-left"
class=
"picto pull-left
ng-class:{'picto-out': studentData.attributes.size == 'large' && (rowIndex > 3 || colIndex > 7)};
"
data-row=
"{{ rowIndex }}"
data-row=
"{{ rowIndex }}"
data-column=
"{{ colIndex }}"
data-column=
"{{ colIndex }}"
id=
"student-picto-{{
id=
"student-picto-{{
...
@@ -103,10 +103,12 @@
...
@@ -103,10 +103,12 @@
class=
"picto-grid picto-main-grid"
>
class=
"picto-grid picto-main-grid"
>
<div
<div
ng-repeat=
"studentPictoRow in studentPictos[getCategoryId(emptyStudentPicto)]"
ng-repeat=
"studentPictoRow in studentPictos[getCategoryId(emptyStudentPicto)]"
ng-init=
"rowIndex = $index"
class=
"picto-grid__row"
>
class=
"picto-grid__row"
>
<div
<div
class=
"picto pull-left"
class=
"picto pull-left
ng-class:{'picto-out': studentData.attributes.size == 'large' && (rowIndex > 3 || colIndex > 7)};
"
ng-repeat=
"studentPicto in studentPictoRow track by $index"
ng-repeat=
"studentPicto in studentPictoRow track by $index"
ng-init=
"colIndex = $index"
popover=
"{{studentPicto.attributes.expression==null ? studentPicto.expression.text : studentPicto.attributes.expression}}"
popover=
"{{studentPicto.attributes.expression==null ? studentPicto.expression.text : studentPicto.attributes.expression}}"
popover-trigger=
"mouseenter"
>
popover-trigger=
"mouseenter"
>
<div
class=
"picto-description"
>
{{ studentData.attributes.legend?studentPicto.expression.text:'' }}
</div>
<div
class=
"picto-description"
>
{{ studentData.attributes.legend?studentPicto.expression.text:'' }}
</div>
...
@@ -157,7 +159,7 @@
...
@@ -157,7 +159,7 @@
ng-init=
"rowIndex = $index"
ng-init=
"rowIndex = $index"
class=
"picto-grid__row"
>
class=
"picto-grid__row"
>
<div
<div
class=
"picto pull-left"
class=
"picto pull-left
ng-class:{'picto-out': studentData.attributes.size == 'large' && (rowIndex > 3 || colIndex > 7)};
"
data-row=
"{{ rowIndex }}"
data-row=
"{{ rowIndex }}"
data-column=
"{{ colIndex }}"
data-column=
"{{ colIndex }}"
id=
"student-picto-{{
id=
"student-picto-{{
...
@@ -167,8 +169,8 @@
...
@@ -167,8 +169,8 @@
draggable
droppable
drop=
"handleDrop"
draggable
droppable
drop=
"handleDrop"
popover=
"{{studentPicto.attributes.expression==null ? studentPicto.expression.text : studentPicto.attributes.expression}}"
popover=
"{{studentPicto.attributes.expression==null ? studentPicto.expression.text : studentPicto.attributes.expression}}"
popover-trigger=
"mouseenter"
popover-trigger=
"mouseenter"
ng-
init=
"colIndex =
$index"
ng-
repeat=
"studentPicto in studentPictoRow track by
$index"
ng-
repeat=
"studentPicto in studentPictoRow track by
$index"
>
ng-
init=
"colIndex =
$index"
>
<div
class=
"picto-description"
>
{{ studentData.attributes.legend?studentPicto.expression.text:'' }}
</div>
<div
class=
"picto-description"
>
{{ studentData.attributes.legend?studentPicto.expression.text:'' }}
</div>
<img
<img
src=
"/app/img/redcross.png"
src=
"/app/img/redcross.png"
...
...
sails/src/assets/scripts/modules/student/views/setup.html
View file @
739c69d1
...
@@ -184,8 +184,35 @@
...
@@ -184,8 +184,35 @@
</span>
</span>
<label
class=
"form-control"
for=
"studentSetupUseCategories"
>
{{ 'use_categories' | translate }}
</label>
<label
class=
"form-control"
for=
"studentSetupUseCategories"
>
{{ 'use_categories' | translate }}
</label>
</div>
</div>
<legend>
{{ 'picto_style' | translate }}
</legend>
<div
class=
"form-group"
>
<h4>
{{ 'size' | translate }}
</h4>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
>
<input
type=
"radio"
value=
"normal"
id=
"studentSetupPictoSizeNormal"
ng-model=
"studentData.attributes.size"
ng-change=
"update_attributes()"
>
</span>
<label
class=
"form-control"
for=
"studentSetupPictoSizeNormal"
>
{{ 'small' | translate }}
</label>
</div>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
>
<input
type=
"radio"
value=
"large"
id=
"studentSetupPictoSizeLarge"
ng-model=
"studentData.attributes.size"
ng-change=
"update_attributes()"
>
</span>
<label
class=
"form-control"
for=
"studentSetupPictoSizeLarge"
>
{{ 'large' | translate }}
</label>
</div>
</div>
</fieldset>
</fieldset>
<!-- DISABLED, NOT IMPLEMENTED YET
<fieldset>
<fieldset>
<legend>
{{ 'feedback_picto' | translate }}
</legend>
<legend>
{{ 'feedback_picto' | translate }}
</legend>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
...
@@ -200,11 +227,11 @@
...
@@ -200,11 +227,11 @@
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
>
<span
class=
"input-group-addon"
>
<input
type=
"checkbox"
<input
type=
"checkbox"
id="studentSetup
Click
OnTouch"
id=
"studentSetup
Beep
OnTouch"
ng-model="studentData.attributes.input_feedback.
click
"
ng-model=
"studentData.attributes.input_feedback.
beep
"
ng-change=
"update_attributes()"
>
ng-change=
"update_attributes()"
>
</span>
</span>
<label class="form-control" for="studentSetup
ClickOnTouch">{{ 'click
' | translate }}</label>
<label
class=
"form-control"
for=
"studentSetup
BeepOnTouch"
>
{{ 'beep
' | translate }}
</label>
</div>
</div>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
>
<span
class=
"input-group-addon"
>
...
@@ -227,6 +254,7 @@
...
@@ -227,6 +254,7 @@
</label>
</label>
</div>
</div>
</fieldset>
</fieldset>
<!-- DISABLED, NOT IMPLEMENTED YET
<fieldset>
<fieldset>
<legend>{{ 'input_selection' | translate }}</legend>
<legend>{{ 'input_selection' | translate }}</legend>
<div class="input-group">
<div class="input-group">
...
@@ -275,46 +303,6 @@
...
@@ -275,46 +303,6 @@
</div>
</div>
</fieldset>
</fieldset>
<fieldset>
<fieldset>
<legend>{{ 'picto_style' | translate }}</legend>
<div class="form-group">
<h4>{{ 'size' | translate }}</h4>
<div class="input-group">
<span class="input-group-addon">
<input type="radio"
value="small"
id="studentSetupPictoSizeSmall"
ng-model="studentData.attributes.size"
ng-change="update_attributes()">
</span>
<label class="form-control" for="studentSetupPictoSizeSmall">
{{ 'small' | translate }}
</label>
</div>
<div class="input-group">
<span class="input-group-addon">
<input type="radio"
value="normal"
id="studentSetupPictoSizeNormal"
ng-model="studentData.attributes.size"
ng-change="update_attributes()">
</span>
<label class="form-control" for="studentSetupPictoSizeNormal">
{{ 'normal' | translate }}
</label>
</div>
<div class="input-group">
<span class="input-group-addon">
<input type="radio"
value="large"
id="studentSetupPictoSizeLarge"
ng-model="studentData.attributes.size"
ng-change="update_attributes()">
</span>
<label class="form-control" for="studentSetupPictoSizeLarge">
{{ 'large' | translate }}
</label>
</div>
</div>
<div class="input-group">
<div class="input-group">
<span class="input-group-addon">
<span class="input-group-addon">
<input type="color"
<input type="color"
...
...
sails/src/assets/styles/main.css
View file @
739c69d1
...
@@ -310,12 +310,16 @@ textarea.editable{
...
@@ -310,12 +310,16 @@ textarea.editable{
margin
:
0.4%
;
margin
:
0.4%
;
width
:
80px
;
width
:
80px
;
height
:
80px
;
height
:
80px
;
border
:
1px
solid
#
bbb
;
border
:
1px
solid
#
555
;
border-radius
:
4px
;
border-radius
:
4px
;
padding
:
2px
;
padding
:
2px
;
position
:
relative
;
/* Para posicionar después las opciones de forma absoluta dentro de este div */
position
:
relative
;
/* Para posicionar después las opciones de forma absoluta dentro de este div */
cursor
:
pointer
;
cursor
:
pointer
;
transition
:
all
0.2s
ease
;
transition
:
all
0.2s
ease
;
}
.picto-out
{
/* pictogram out of bounds */
border
:
1px
dotted
#ccc
;
}
}
...
@@ -369,6 +373,7 @@ textarea.editable{
...
@@ -369,6 +373,7 @@ textarea.editable{
.picto_cat
.panel-body
{
.picto_cat
.panel-body
{
padding
:
0px
;
padding
:
0px
;
margin
:
0
auto
;
}
}
.picto_cat
.panel-body
.picto_peq
{
.picto_cat
.panel-body
.picto_peq
{
...
...
sails/src/assets/styles/picto-grid.less
View file @
739c69d1
...
@@ -59,6 +59,7 @@
...
@@ -59,6 +59,7 @@
margin-top: @spacingUnit * 2;
margin-top: @spacingUnit * 2;
border-radius: @roundness;
border-radius: @roundness;
transition: background-color ease 0.3s 0.25s;
transition: background-color ease 0.3s 0.25s;
width: 900px;
&__title {
&__title {
margin-top: 0;
margin-top: 0;
...
...
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