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
e3b77e36
authored
Apr 10, 2017
by
Jose Antonio
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
addpicto ARASAAC B&W buttons
parent
48dc267d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
42 deletions
sails/src/assets/app/i18n/en-gb.json
sails/src/assets/app/i18n/es-es.json
sails/src/assets/scripts/modules/student/controllers/addpicto.js
sails/src/assets/scripts/modules/student/views/addpicto.html
sails/src/config/routes.js
sails/src/assets/app/i18n/en-gb.json
View file @
e3b77e36
...
...
@@ -43,6 +43,7 @@
"background"
:
"Background"
,
"beep"
:
"Beep"
,
"birthdate"
:
"Birthdate"
,
"black_and_white"
:
"B&W"
,
"cancel"
:
"Cancel"
,
"cannot_delete_method"
:
"Method could not be deleted, maybe due to existing recorded sessions."
,
"cannot_delete_instruction"
:
"Instruction could not be deleted, maybe due to existing recorded sessions."
,
...
...
sails/src/assets/app/i18n/es-es.json
View file @
e3b77e36
...
...
@@ -43,6 +43,7 @@
"background"
:
"Fondo"
,
"beep"
:
"Pitido"
,
"birthdate"
:
"Fecha de nacimiento"
,
"black_and_white"
:
"ByN"
,
"cancel"
:
"Cancelar"
,
"cannot_delete_method"
:
"No se pudo eliminar el método, tal vez porque existen sesiones asociadas."
,
"cannot_delete_instruction"
:
"No se pudo eliminar la instrucción, tal vez porque existen sesiones asociadas."
,
...
...
sails/src/assets/scripts/modules/student/controllers/addpicto.js
View file @
e3b77e36
...
...
@@ -94,10 +94,9 @@ dashboardControllers.controller('AddPictoCtrl', function (
if
(
!
$scope
.
showArasaacLicense
){
$scope
.
loadingCatPictos
=
true
;
var
request
=
""
;
//Request page X from all pictos (symbolstx)
request
=
config
.
backend
+
'/picto/'
+
student
.
lang
+
'/pic_fromArasaac/page/'
+
$scope
.
page
+
'/limit/'
+
$scope
.
limit
;
'/pic_fromArasaac/page/'
+
$scope
.
page
+
'/limit/'
+
$scope
.
limit
+
'/source/3'
;
$http
.
get
(
request
)
.
success
(
function
(
data
)
{
...
...
@@ -116,6 +115,34 @@ dashboardControllers.controller('AddPictoCtrl', function (
}
};
$scope
.
load_arasaac_byn_pictos
=
function
()
{
$scope
.
pictos
=
[];
$scope
.
page
=
1
;
if
(
!
$scope
.
showArasaacLicense
){
$scope
.
loadingCatPictos
=
true
;
var
request
=
""
;
//Request page X from all pictos (symbolstx)
request
=
config
.
backend
+
'/picto/'
+
student
.
lang
+
'/pic_fromArasaac/page/'
+
$scope
.
page
+
'/limit/'
+
$scope
.
limit
+
'/source/4'
;
$http
.
get
(
request
)
.
success
(
function
(
data
)
{
if
(
data
&&
$scope
.
source
==
'arasaac_byn'
){
$scope
.
pictos
=
data
;
}
$scope
.
loadingCatPictos
=
false
;
setTimeout
(
function
()
{
$scope
.
$apply
();
});
})
.
error
(
function
()
{
$translate
(
'error_loading_pictos'
).
then
(
function
(
translation
)
{
ngToast
.
danger
({
content
:
translation
});
});
$scope
.
loadingCatPictos
=
false
;
});
}
};
//
// Load pictos owned by the actual supervisor
//
...
...
sails/src/assets/scripts/modules/student/views/addpicto.html
View file @
e3b77e36
...
...
@@ -16,7 +16,7 @@
<div
class=
"row"
>
<div
class=
"col-xs-
6
"
>
<div
class=
"col-xs-
8
"
>
<div
class=
"btn-group"
ng-show=
"!onlyOwn"
>
<button
class=
"btn btn-default"
btn-radio=
"'symbolstx'"
ng-model=
"source"
ng-click=
"open_category_from_bc('0')"
>
<span
class=
"glyphicon glyphicon-th"
></span>
SymbolStix
...
...
@@ -24,6 +24,9 @@
<button
class=
"btn btn-default"
btn-radio=
"'arasaac'"
ng-model=
"source"
ng-click=
"load_arasaac_pictos()"
>
<i
class=
"fa fa-th"
aria-hidden=
"true"
></i>
ARASAAC
</button>
<button
class=
"btn btn-default"
btn-radio=
"'arasaac_byn'"
ng-model=
"source"
ng-click=
"load_arasaac_byn_pictos()"
>
<i
class=
"fa fa-th"
aria-hidden=
"true"
></i>
ARASAAC {{ 'black_and_white' | translate}}
</button>
<button
class=
"btn btn-default"
btn-radio=
"'ownpictos'"
ng-model=
"source"
ng-click=
"load_own_pictos()"
>
<span
class=
"glyphicon glyphicon-picture"
></span>
{{ 'own_pictos' | translate }}
</button>
...
...
@@ -31,7 +34,7 @@
</div>
<!-- Filter form -->
<div
class=
"col-xs-
6
"
>
<div
class=
"col-xs-
4
"
>
<form
ng-submit=
"search()"
>
<div
class=
"input-group"
id=
"search_pictos_box"
>
<input
type=
"text"
class=
"form-control"
placeholder=
"{{ 'filter' | translate }}"
...
...
@@ -46,41 +49,6 @@
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-xs-6"
>
<div
class=
"btn-group btn-group-justified"
role=
"group"
>
<div
class=
"btn-group"
role=
"group"
>
<button
type=
"button"
btn-radio=
"'color'"
ng-model=
"color"
ng-click=
"update_color()"
class=
"btn btn-default"
>
{{'color' | translate}}
</button>
</div>
<div
class=
"btn-group"
role=
"group"
>
<button
type=
"button"
btn-radio=
"'byn'"
ng-model=
"color"
ng-click=
"update_color()"
class=
"btn btn-default"
>
{{'black_and_white' | translate}}
</button>
</div>
</div>
</div>
<!-- <div class="col-xs-4">
<div class="input-group">
<span class="input-group-addon">
<input type="radio" id="arasaac_color" ng-model="color" ng-value="3" ng-change="update_color()" class="ng-pristine ng-valid" value="3" >
</span>
<span class="form-control ng-binding" for="arasaac_color">
{{'color' | translate}}
</span>
</div>
</div>
<div class="col-xs-4">
<div class="input-group">
<span class="input-group-addon">
<input type="radio" id="arasaac_byn" ng-model="color" ng-value="4" ng-change="update_color()" class="ng-pristine ng-valid" value="4">
</span>
<span class="form-control ng-binding" for="arasaac_color">
{{'black_and_white' | translate}}
</span>
</div>
</div> -->
</div>
<hr>
...
...
@@ -110,7 +78,7 @@
<!-- Collections row -->
<div
class=
"row"
>
<div
id=
"arasaac_agreement"
class=
"col-md-12"
ng-show=
"showArasaacLicense &&
source == 'arasaac'
"
>
<div
id=
"arasaac_agreement"
class=
"col-md-12"
ng-show=
"showArasaacLicense &&
(source == 'arasaac' || source == 'arasaac_byn')
"
>
<div
class=
"panel panel-warning"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
ARASAAC
</h3>
...
...
@@ -154,7 +122,7 @@
</div>
<!-- /modal-body -->
<div
class=
"modal-footer"
>
<div
class=
"arasaac_license"
ng-show=
"source == 'arasaac'"
>
<div
class=
"arasaac_license"
ng-show=
"source == 'arasaac'
|| source == 'arasaac_byn'
"
>
<p><small>
{{'arasaac_license' | translate}}
</small></p>
</div>
<button
class=
"btn btn-success pull-left"
ng-show=
"source == 'ownpictos'"
ngf-select
ng-model=
"picFile"
accept=
"image/*"
ngf-change=
"addOwnPicto()"
>
...
...
sails/src/config/routes.js
View file @
e3b77e36
...
...
@@ -62,7 +62,7 @@ module.exports.routes = {
'GET /picto/:lang/pic_categories/:id_cat'
:
'PictoController.categories'
,
'GET /picto/:lang/pic_fromcategory/:id_cat'
:
'PictoController.fromcategory'
,
'GET /picto/:lang/pic_fromSymbolStx/page/:page/limit/:limit'
:
'PictoController.fromSymbolStx'
,
'GET /picto/:lang/pic_fromArasaac/page/:page/limit/:limit'
:
'PictoController.fromArasaac'
,
'GET /picto/:lang/pic_fromArasaac/page/:page/limit/:limit
/source/:source
'
:
'PictoController.fromArasaac'
,
'GET /picto/:lang/pic_fromCatSubcat/category/:id_cat/page/:page/limit/:limit'
:
'PictoController.fromCatSubcat'
,
'GET /picto/:lang/:id_sup/pic_fromSearch/:text/category/:id_cat/source/:source'
:
'PictoController.fromSearch'
,
...
...
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