Commit a763dfc5 by Jose Antonio

Merged branch develop into develop

parents 2a7a0ad9 8f3ae2c9
/* /*
SET FOREIGN_KEY_CHECKS = 0;
ALTER TABLE stu_picto DROP FOREIGN KEY stu_picto_scene_fk; ALTER TABLE stu_picto DROP FOREIGN KEY stu_picto_scene_fk;
ALTER TABLE stu_picto DROP COLUMN id_scene;
ALTER TABLE stu_picto DROP id_scene; ALTER TABLE stu_picto DROP id_scene;
DROP TABLE scene; DROP TABLE scene;
SET FOREIGN_KEY_CHECKS = 1;
*/ */
DELIMITER $$ DELIMITER $$
...@@ -13,7 +14,8 @@ CREATE PROCEDURE scene_adapt() ...@@ -13,7 +14,8 @@ CREATE PROCEDURE scene_adapt()
BEGIN BEGIN
DECLARE _id_stu INT; DECLARE _id_stu INT;
DECLARE _id_sup INT; DECLARE _id_sup INT;
DECLARE cat_active BOOLEAN; DECLARE _cat_status CHAR(10);
DECLARE _cat_active BOOLEAN;
DECLARE done INT DEFAULT FALSE; DECLARE done INT DEFAULT FALSE;
DECLARE LID INT; DECLARE LID INT;
...@@ -31,14 +33,19 @@ BEGIN ...@@ -31,14 +33,19 @@ BEGIN
LEAVE read_loop; LEAVE read_loop;
END IF; END IF;
SELECT attributes->"$.categories" INTO cat_active FROM student WHERE id = _id_stu; SELECT CAST(attributes->"$.categories" as CHAR(10)) INTO _cat_status FROM student WHERE id = _id_stu;
SET cat_active = 0;
SELECT CONCAT('active: ', cat_active); IF (_cat_status LIKE '%on%') THEN
SELECT CONCAT('active: ', NOT cat_active); SET _cat_active = 1;
/*SELECT CONCAT('active: ', _cat_active);*/
ELSE
SET _cat_active = 0;
/*SELECT CONCAT('active: ', NOT _cat_active);*/
END IF;
/* FIRST SCENE, ACTIVE, WITH CATEGORIES */ /* FIRST SCENE, ACTIVE, WITH CATEGORIES*/
INSERT INTO `scene` (name, active, categories, id_stu) INSERT INTO `scene` (name, active, categories, id_stu)
VALUES ('with_categories', cat_active, 1, _id_stu); VALUES ('with_categories', _cat_active, 1, _id_stu);
SET LID = LAST_INSERT_ID(); SET LID = LAST_INSERT_ID();
...@@ -48,9 +55,9 @@ BEGIN ...@@ -48,9 +55,9 @@ BEGIN
AND attributes->"$.free_category_coord_x" IS NULL AND attributes->"$.free_category_coord_x" IS NULL
AND attributes->"$.free_category_coord_y" IS NULL; AND attributes->"$.free_category_coord_y" IS NULL;
/* SECOND SCENE, NOT ACTIVE, NO CATEGORIES */ /* SECOND SCENE, NOT ACTIVE, NO CATEGORIES*/
INSERT INTO `scene` (name, active, categories, id_sup, id_stu) INSERT INTO `scene` (name, active, categories, id_sup, id_stu)
VALUES ('no_categories', NOT cat_active, 0, _id_sup, _id_stu); VALUES ('no_categories', NOT _cat_active, 0, _id_sup, _id_stu);
SET LID = LAST_INSERT_ID(); SET LID = LAST_INSERT_ID();
......
...@@ -190,7 +190,7 @@ INSERT IGNORE INTO `student` ( ...@@ -190,7 +190,7 @@ INSERT IGNORE INTO `student` (
NULL, NULL,
'es-es', 'es-es',
(SELECT id from office WHERE email='belen.perez@autismojaen.es'), (SELECT id from office WHERE email='belen.perez@autismojaen.es'),
'{"stu-att":[{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}]}' '{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}'
), ( ), (
'alumno2', 'alumno2',
'$2a$10$RUv25u.C/waYE4xxbfTWTe/IBNQfIFFP5dKPTJsqYznbkS3QCvqq2', '$2a$10$RUv25u.C/waYE4xxbfTWTe/IBNQfIFFP5dKPTJsqYznbkS3QCvqq2',
...@@ -203,7 +203,7 @@ INSERT IGNORE INTO `student` ( ...@@ -203,7 +203,7 @@ INSERT IGNORE INTO `student` (
NULL, NULL,
'es-es', 'es-es',
(SELECT id from office WHERE email='belen.perez@autismojaen.es'), (SELECT id from office WHERE email='belen.perez@autismojaen.es'),
'{"stu-att":[{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}]}' '{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}'
), ( ), (
'alumno3', 'alumno3',
'$2a$10$Ei9E2Pz8sJ4aojbMPsdfZ.xz.LrWG4op1koC4LwCxHr.A0MgeP4m6', '$2a$10$Ei9E2Pz8sJ4aojbMPsdfZ.xz.LrWG4op1koC4LwCxHr.A0MgeP4m6',
...@@ -216,7 +216,7 @@ INSERT IGNORE INTO `student` ( ...@@ -216,7 +216,7 @@ INSERT IGNORE INTO `student` (
NULL, NULL,
'es-es', 'es-es',
(SELECT id from office WHERE email='belen.perez@autismojaen.es'), (SELECT id from office WHERE email='belen.perez@autismojaen.es'),
'{"stu-att":[{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}]}' '{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}'
-- 'manuel', -- 'manuel',
-- '$2a$06$SaAswfsdqGpSo/bE.Cks8.CJnpqHGjixdRLGGpdOHWVFJR2w0fTaS', -- '$2a$06$SaAswfsdqGpSo/bE.Cks8.CJnpqHGjixdRLGGpdOHWVFJR2w0fTaS',
...@@ -229,7 +229,7 @@ INSERT IGNORE INTO `student` ( ...@@ -229,7 +229,7 @@ INSERT IGNORE INTO `student` (
-- NULL, -- NULL,
-- 'es-es', -- 'es-es',
-- (SELECT id from office WHERE email='belen.perez@autismojaen.es'), -- (SELECT id from office WHERE email='belen.perez@autismojaen.es'),
-- '{"stu-att":[{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}]}' -- '{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}'
-- ), ( -- ), (
-- 'jose', -- 'jose',
-- '$2a$06$WtRXXLwFrEdDzB7r0r54RuY5A9wX3aysUIM8AHAGPpfVxhbNISBIa', -- '$2a$06$WtRXXLwFrEdDzB7r0r54RuY5A9wX3aysUIM8AHAGPpfVxhbNISBIa',
...@@ -242,7 +242,7 @@ INSERT IGNORE INTO `student` ( ...@@ -242,7 +242,7 @@ INSERT IGNORE INTO `student` (
-- NULL, -- NULL,
-- 'es-es', -- 'es-es',
-- (SELECT id from office WHERE email='belen.perez@autismojaen.es'), -- (SELECT id from office WHERE email='belen.perez@autismojaen.es'),
-- '{"stu-att":[{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}]}' -- '{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}'
-- ), ( -- ), (
-- 'carmen', -- 'carmen',
-- '$2a$06$2c4zNE1Bkc24AXiXATbn8OfgkM/r9DJzUfnJ8qHrDUxBkMQd8rUIG', -- '$2a$06$2c4zNE1Bkc24AXiXATbn8OfgkM/r9DJzUfnJ8qHrDUxBkMQd8rUIG',
...@@ -255,7 +255,7 @@ INSERT IGNORE INTO `student` ( ...@@ -255,7 +255,7 @@ INSERT IGNORE INTO `student` (
-- NULL, -- NULL,
-- 'es-es', -- 'es-es',
-- (SELECT id from office WHERE email='belen.perez@autismojaen.es'), -- (SELECT id from office WHERE email='belen.perez@autismojaen.es'),
-- '{"stu-att":[{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}]}' -- '{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}'
); );
-- --
......
...@@ -223,7 +223,7 @@ INSERT INTO `student` ( ...@@ -223,7 +223,7 @@ INSERT INTO `student` (
'test_caja_juan.jpg', 'test_caja_juan.jpg',
NULL, NULL,
'es-es', 'es-es',
'{"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "es" }]}' '{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "es" }'
), ( ), (
'faf0002', 'faf0002',
'$2a$10$FOJ2fmJaHyI5sWe1tQojFuhoPpqHSTVPwvHPTpWEftFPI28VdyYNq', '$2a$10$FOJ2fmJaHyI5sWe1tQojFuhoPpqHSTVPwvHPTpWEftFPI28VdyYNq',
...@@ -235,7 +235,7 @@ INSERT INTO `student` ( ...@@ -235,7 +235,7 @@ INSERT INTO `student` (
'test_caja_kate.jpg', 'test_caja_kate.jpg',
NULL, NULL,
'en-gb', 'en-gb',
'{"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }]}' '{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }'
), ( ), (
'mam0001', 'mam0001',
'$2a$10$zygC/WviDviyZQsMsNqK8.tSUI4Qr/dLlLrw0i5kR1bbN4SeU5ACq', '$2a$10$zygC/WviDviyZQsMsNqK8.tSUI4Qr/dLlLrw0i5kR1bbN4SeU5ACq',
...@@ -247,7 +247,7 @@ INSERT INTO `student` ( ...@@ -247,7 +247,7 @@ INSERT INTO `student` (
'test_caja_carlos.jpg', 'test_caja_carlos.jpg',
NULL, NULL,
'es-es', 'es-es',
'{"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "es" }]}' '{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "es" }'
), ( ), (
'mam0002', 'mam0002',
'$2a$10$xbyNUhf9rqhdXDBrvUSiOuJIzUVOyyz9ToQMCByFThiiiPwO0PWgK', '$2a$10$xbyNUhf9rqhdXDBrvUSiOuJIzUVOyyz9ToQMCByFThiiiPwO0PWgK',
...@@ -259,7 +259,7 @@ INSERT INTO `student` ( ...@@ -259,7 +259,7 @@ INSERT INTO `student` (
'test_caja_rocio.jpg', 'test_caja_rocio.jpg',
NULL, NULL,
'es-es', 'es-es',
'{"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }]}' '{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }'
), ( ), (
'aaa0001', 'aaa0001',
'$2a$10$koWKIn42UNSi1N67akxjpOuJNwpXJ/vOe6biD2xkjrUz6dr3g.Wa.', '$2a$10$koWKIn42UNSi1N67akxjpOuJNwpXJ/vOe6biD2xkjrUz6dr3g.Wa.',
...@@ -271,7 +271,7 @@ INSERT INTO `student` ( ...@@ -271,7 +271,7 @@ INSERT INTO `student` (
'test_caja_samuel.jpg', 'test_caja_samuel.jpg',
NULL, NULL,
'es-es', 'es-es',
'{"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "es" }]}' '{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "es" }'
), ( ), (
'aaa0002', 'aaa0002',
'$2a$10$ffAjZjWN0UKja0JO7ko6qup4x2phbY3VpC66TmpMnGdWUutBFeWY2', '$2a$10$ffAjZjWN0UKja0JO7ko6qup4x2phbY3VpC66TmpMnGdWUutBFeWY2',
...@@ -283,7 +283,7 @@ INSERT INTO `student` ( ...@@ -283,7 +283,7 @@ INSERT INTO `student` (
'test_caja_adela.jpg', 'test_caja_adela.jpg',
NULL, NULL,
'es-es', 'es-es',
'{"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }]}' '{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }'
), ( ), (
'aaa0003', 'aaa0003',
'$2a$10$glc5A6vyPve5.4407Vdkau5CHF3GOpA0Uo6rxMDdIopIWTJK0nBse', '$2a$10$glc5A6vyPve5.4407Vdkau5CHF3GOpA0Uo6rxMDdIopIWTJK0nBse',
...@@ -295,7 +295,7 @@ INSERT INTO `student` ( ...@@ -295,7 +295,7 @@ INSERT INTO `student` (
'test_caja_adela.jpg', 'test_caja_adela.jpg',
NULL, NULL,
'es-es', 'es-es',
'{"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }]}' '{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }'
), ( ), (
'aaa0004', 'aaa0004',
'$2a$10$tezK07jq5ZMdQbCboubEBeHiXWJisZPAbgN301n5kRLXkq8xOlb4O', '$2a$10$tezK07jq5ZMdQbCboubEBeHiXWJisZPAbgN301n5kRLXkq8xOlb4O',
...@@ -307,7 +307,7 @@ INSERT INTO `student` ( ...@@ -307,7 +307,7 @@ INSERT INTO `student` (
'test_caja_juan.jpg', 'test_caja_juan.jpg',
NULL, NULL,
'es-es', 'es-es',
'{"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }]}' '{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }'
), ( ), (
'jaj0001', 'jaj0001',
'$2a$10$UQYGXOOE8mxxOjvgo8cjwOpsv5jCtRXpMTLpbD3TzMBiUIv3hXlnO', '$2a$10$UQYGXOOE8mxxOjvgo8cjwOpsv5jCtRXpMTLpbD3TzMBiUIv3hXlnO',
...@@ -319,7 +319,7 @@ INSERT INTO `student` ( ...@@ -319,7 +319,7 @@ INSERT INTO `student` (
'test_caja_adela.jpg', 'test_caja_adela.jpg',
NULL, NULL,
'es-es', 'es-es',
'{"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }]}' '{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }'
), ( ), (
'jaj0002', 'jaj0002',
'$2a$10$tVy3Wfu35l4B6bFpnjJCE.ckjncq6YCKMGW4B9abesbiFVeyGu2Dy', '$2a$10$tVy3Wfu35l4B6bFpnjJCE.ckjncq6YCKMGW4B9abesbiFVeyGu2Dy',
...@@ -331,7 +331,7 @@ INSERT INTO `student` ( ...@@ -331,7 +331,7 @@ INSERT INTO `student` (
'test_caja_samuel.jpg', 'test_caja_samuel.jpg',
NULL, NULL,
'es-es', 'es-es',
'{"stu-att" : [{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }]}' '{ "categories" : "on", "input feedback" : [ "vibration", "tts" ], "input selection" : "click", "pictogram size" : "medium", "tts engine" : "IVONA Text-to-Speech HQ", "tts voice": "en" }'
); );
-- --
......
...@@ -74,7 +74,7 @@ INSERT IGNORE INTO `student` ( ...@@ -74,7 +74,7 @@ INSERT IGNORE INTO `student` (
NULL, NULL,
'es-es', 'es-es',
(SELECT id from office WHERE email='centrodestrezas@gmail.com'), (SELECT id from office WHERE email='centrodestrezas@gmail.com'),
'{"stu-att":[{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}]}' '{"categories":"on","input feedback":["vibration","tts"],"input selection":"click","pictogram size":"medium"}'
); );
INSERT IGNORE INTO `stu_picto` ( INSERT IGNORE INTO `stu_picto` (
......
...@@ -58,6 +58,14 @@ ...@@ -58,6 +58,14 @@
target: "{{ server_path }}/{{ database_files_relative_path }}/test-{{ item }}.sql" target: "{{ server_path }}/{{ database_files_relative_path }}/test-{{ item }}.sql"
with_items: "{{ database_tests }}" with_items: "{{ database_tests }}"
- name: Create scenes for existing stu_picto
mysql_db:
login_user: "{{ database_user }}"
login_password: "{{ database_user_passwd }}"
name: "{{ database_name }}"
state: import
target: "{{ server_path }}/{{ database_files_relative_path }}/scene_adapt.sql"
- name: Creates triggers - name: Creates triggers
mysql_db: mysql_db:
login_user: "{{ database_user }}" login_user: "{{ database_user }}"
......
<!-- Collection tab--> <!-- Collection tab-->
<div class="panel panel-default student_tab_panel"> <div class="panel panel-default student_tab_panel">
<div class="panel-body"> <div class="panel-body">
<!-- <!--
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<a class="btn btn-success btn-sm" role="button" ng-click="open()"> <a class="btn btn-success btn-sm" role="button" ng-click="open()">
...@@ -10,60 +10,147 @@ ...@@ -10,60 +10,147 @@
</a> </a>
</div> </div>
</div> </div>
--> -->
<div <div class="col-xs-10"><!-- col-xs-10 -->
id="student_collection" <div id="student_collection"
class="student-collection" class="student-collection"
ng-class="{ 'student-collection-loading': loadingPictos }" ng-class="{ 'student-collection-loading': loadingPictos }"
data-loading="{{ 'loading_pictos' | translate }}"> data-loading="{{ 'loading_pictos' | translate }}">
<!-- No categories grid --> <!-- No categories grid -->
<div
ng-if="showFreeCategory"
class="picto-grid picto-free-grid">
<div <div
ng-repeat="studentPictoRow in freeCategoryPictos" ng-if="showFreeCategory"
ng-init="rowIndex = $index" class="picto-grid picto-free-grid">
class="picto-grid__row">
<div <div
class="picto pull-left ng-class:{'picto-out': studentData.attributes.size == 'large' && (rowIndex > 3 || colIndex > 7)};" ng-repeat="studentPictoRow in freeCategoryPictos"
data-row="{{ rowIndex }}" ng-init="rowIndex = $index"
data-column="{{ colIndex }}" class="picto-grid__row">
id="student-picto-{{
studentPicto.id ||
('empty-' + colIndex + '-' + rowIndex)
}}"
draggable droppable drop="handleDrop"
popover="{{studentPicto != emptyStudentPicto ? studentPicto.attributes.expression : ''}}"
popover-trigger="mouseenter"
ng-init="colIndex = $index"
ng-repeat="studentPicto in studentPictoRow track by $index">
<!-- picto-legend -->
<div <div
class="picto-legend-normal" class="picto pull-left ng-class:{'picto-out': studentData.attributes.size == 'large' && (rowIndex > 3 || colIndex > 7)};"
ng-if="studentPicto.attributes.legend == 'normal'"> data-row="{{ rowIndex }}"
{{ studentPicto.attributes.expression }} data-column="{{ colIndex }}"
</div> id="student-picto-{{
<div studentPicto.id ||
class="picto-legend-full" ('empty-' + colIndex + '-' + rowIndex)
ng-if="studentPicto.attributes.legend == 'full'"> }}"
{{ studentPicto.attributes.expression }} draggable droppable drop="handleDrop"
popover="{{studentPicto != emptyStudentPicto ? studentPicto.attributes.expression : ''}}"
popover-trigger="mouseenter"
ng-init="colIndex = $index"
ng-repeat="studentPicto in studentPictoRow track by $index">
<!-- picto-legend -->
<div
class="picto-legend-normal"
ng-if="studentPicto.attributes.legend == 'normal'">
{{ studentPicto.attributes.expression }}
</div>
<div
class="picto-legend-full"
ng-if="studentPicto.attributes.legend == 'full'">
{{ studentPicto.attributes.expression }}
</div>
<!-- /.picto-legend -->
<img
src="/app/img/redcross.png"
class="red-cross-visibility disabled"
ng-if="studentPicto.attributes.status == 'disabled'"/>
<img
ng-src="{{studentPicto.picto.uri}}"
class="unselectable"
ng-class="{
'novisible': studentPicto.attributes.status == 'invisible',
'deactivate': studentPicto.attributes.status == 'disabled'
}"
ng-style="{
'background-color': studentPicto.attributes.color || '#ffffff'
}"/>
<div
class="picto_options"
ng-if="studentPicto == emptyStudentPicto">
<a
ng-click="open_add(rowIndex, colIndex)"
class="picto_add"
title="{{ 'add_picto' | translate}}">
<i class="color_green glyphicon glyphicon-plus-sign" aria-hidden="true"></i>
</a>
</div>
<div
class="picto_options"
ng-if="studentPicto !== emptyStudentPicto">
<a
ng-click="deleteFreePicto(studentPicto)"
class="picto_remove"
title="{{ 'delete' | translate}}">
<i class="color_red glyphicon glyphicon-remove-circle" aria-hidden="true"></i>
</a>
<a ng-click="view_picto(studentPicto)" class="picto_ok" >
<i ng-class="{
color_green: studentPicto.attributes.status == 'invisible',
color_black: studentPicto.attributes.status == 'enabled'
}"
class="glyphicon glyphicon-eye-open"
aria-hidden="true"
title="{{ studentPicto.attributes.status | translate}}">
</i>
</a>
<a
class="picto_tags"
ng-click="open_tags(studentPicto)">
<i class="glyphicon glyphicon-tags" aria-hidden="true"></i>
</a>
<a
class="picto_config"
ng-click="open_config(studentPicto)">
<i class="glyphicon glyphicon-cog" aria-hidden="true"></i>
</a>
</div>
</div> </div>
<!-- /.picto-legend --> <div class="clearfix"></div>
<img </div>
src="/app/img/redcross.png" </div>
class="red-cross-visibility disabled" <!-- / No categories grid -->
ng-if="studentPicto.attributes.status == 'disabled'"/> <!-- Main categories grid -->
<img <div
ng-src="{{studentPicto.picto.uri}}" ng-if="!showFreeCategory"
class="unselectable" class="picto-grid picto-main-grid">
ng-class="{ <div
'novisible': studentPicto.attributes.status == 'invisible', ng-repeat="studentPictoRow in studentPictos[getCategoryId(emptyStudentPicto)]"
'deactivate': studentPicto.attributes.status == 'disabled' ng-init="rowIndex = $index"
}" class="picto-grid__row">
ng-style="{
'background-color': studentPicto.attributes.color || '#ffffff'
}"/>
<div <div
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-init="colIndex = $index"
popover="{{ studentPicto != emptyStudentPicto ? studentPicto.attributes.expression : ''}}"
popover-trigger="mouseenter">
<!-- picto-legend -->
<div
class="picto-legend-normal"
ng-if="studentPicto.attributes.legend == 'normal'">
{{ studentPicto.attributes.expression }}
</div>
<div
class="picto-legend-full"
ng-if="studentPicto.attributes.legend == 'full'">
{{ studentPicto.attributes.expression }}
</div>
<!-- /.picto-legend -->
<img
src="/app/img/redcross.png"
class="red-cross-visibility disabled"
ng-if="studentPicto.attributes.status == 'disabled'"/>
<img
ng-src="{{studentPicto.picto.uri}}"
class="unselectable"
ng-click="show_category(studentPicto)"
ng-class="{
'novisible': studentPicto.attributes.status == 'invisible',
'deactivate': studentPicto.attributes.status == 'disabled'
}"
ng-style="{
'background-color': studentPicto.attributes.color
}"/>
<div
class="picto_options" class="picto_options"
ng-if="studentPicto == emptyStudentPicto"> ng-if="studentPicto == emptyStudentPicto">
<a <a
...@@ -72,250 +159,197 @@ ...@@ -72,250 +159,197 @@
title="{{ 'add_picto' | translate}}"> title="{{ 'add_picto' | translate}}">
<i class="color_green glyphicon glyphicon-plus-sign" aria-hidden="true"></i> <i class="color_green glyphicon glyphicon-plus-sign" aria-hidden="true"></i>
</a> </a>
</div>
<div
class="picto_options"
ng-if="studentPicto !== emptyStudentPicto && studentPicto.attributes.coord_y != '0'">
<a ng-click="view_picto(studentPicto)" class="picto_ok" >
<i
ng-class="{
color_green: studentPicto.attributes.status == 'invisible',
color_black: studentPicto.attributes.status == 'enabled'
}"
class="glyphicon glyphicon-eye-open"
aria-hidden="true"
title="{{ studentPicto.attributes.status | translate}}"></i>
</a>
<a
ng-click="change_category(studentPicto)"
ng-if="studentPicto !== emptyStudentPicto && studentPicto.attributes.coord_y != '0'"
class="picto_cat_edit">
<i
class="glyphicon glyphicon-picture" aria-hidden="true"
title="{{ 'change_cat_picto' | translate}}">
</i>
</a>
</div>
<div
class="picto_options"
ng-if="studentPicto !== emptyStudentPicto && studentPicto.attributes.coord_y == '0'">
<a
ng-click="delete_picto(studentPicto)"
class="picto_remove"
title="{{ 'delete' | translate}}">
<i class="color_red glyphicon glyphicon-remove-circle" aria-hidden="true"></i>
</a>
<a ng-click="view_picto(studentPicto)" class="picto_ok" >
<i ng-class="{
color_green: studentPicto.attributes.status == 'invisible',
color_black: studentPicto.attributes.status == 'enabled'
}"
class="glyphicon glyphicon-eye-open"
aria-hidden="true"
title="{{ studentPicto.attributes.status | translate}}">
</i>
</a>
<a
class="picto_tags"
ng-click="open_tags(studentPicto)">
<i class="glyphicon glyphicon-tags" aria-hidden="true"></i>
</a>
<a
class="picto_config"
ng-click="open_config(studentPicto)">
<i class="glyphicon glyphicon-cog" aria-hidden="true"></i>
</a>
</div>
</div> </div>
<div <div class="clearfix"></div>
class="picto_options"
ng-if="studentPicto !== emptyStudentPicto">
<a
ng-click="deleteFreePicto(studentPicto)"
class="picto_remove"
title="{{ 'delete' | translate}}">
<i class="color_red glyphicon glyphicon-remove-circle" aria-hidden="true"></i>
</a>
<a ng-click="view_picto(studentPicto)" class="picto_ok" >
<i ng-class="{
color_green: studentPicto.attributes.status == 'invisible',
color_black: studentPicto.attributes.status == 'enabled'
}"
class="glyphicon glyphicon-eye-open"
aria-hidden="true"
title="{{ studentPicto.attributes.status | translate}}">
</i>
</a>
<a
class="picto_tags"
ng-click="open_tags(studentPicto)">
<i class="glyphicon glyphicon-tags" aria-hidden="true"></i>
</a>
<a
class="picto_config"
ng-click="open_config(studentPicto)">
<i class="glyphicon glyphicon-cog" aria-hidden="true"></i>
</a>
</div>
</div> </div>
<div class="clearfix"></div>
</div> </div>
</div> <!-- / Main categories grid -->
<!-- / No categories grid --> <!-- Category grid -->
<!-- Main categories grid --> <a name="picto-category-grid"/>
<div
ng-if="!showFreeCategory"
class="picto-grid picto-main-grid">
<div <div
ng-repeat="studentPictoRow in studentPictos[getCategoryId(emptyStudentPicto)]" id="picto-category-grid"
ng-init="rowIndex = $index" class="picto-grid picto-category-grid"
class="picto-grid__row"> ng-if="selectedCategory !== emptyStudentPicto && !showFreeCategory"
ng-style="{ 'background-color': shadeColor(selectedCategory.attributes.color, 0.3) }">
<h3 class="picto-category-grid__title">{{ selectedCategory.attributes.expression }}</h3>
<div <div
class="picto pull-left ng-class:{'picto-out': studentData.attributes.size == 'large' && (rowIndex > 3 || colIndex > 7)};" ng-repeat="studentPictoRow in studentPictos[getCategoryId(selectedCategory)]"
ng-repeat="studentPicto in studentPictoRow track by $index" ng-init="rowIndex = $index"
ng-init="colIndex = $index" class="picto-grid__row">
popover="{{ studentPicto != emptyStudentPicto ? studentPicto.attributes.expression : ''}}"
popover-trigger="mouseenter">
<!-- picto-legend -->
<div <div
class="picto-legend-normal" class="picto pull-left ng-class:{'picto-out': studentData.attributes.size == 'large' && (rowIndex > 3 || colIndex > 7)};"
ng-if="studentPicto.attributes.legend == 'normal'"> data-row="{{ rowIndex }}"
{{ studentPicto.attributes.expression }} data-column="{{ colIndex }}"
id="student-picto-{{
studentPicto.id ||
('empty-' + colIndex + '-' + rowIndex)
}}"
draggable droppable drop="handleDrop"
popover="{{ studentPicto != emptyStudentPicto ? studentPicto.attributes.expression : '' }}"
popover-trigger="mouseenter"
ng-repeat="studentPicto in studentPictoRow track by $index"
ng-init="colIndex = $index">
<!-- picto-legend -->
<div
class="picto-legend-normal"
ng-if="studentPicto.attributes.legend == 'normal'">
{{ studentPicto.attributes.expression }}
</div>
<div
class="picto-legend-full"
ng-if="studentPicto.attributes.legend == 'full'">
{{ studentPicto.attributes.expression }}
</div>
<!-- /.picto-legend -->
<img
src="/app/img/redcross.png"
class="red-cross-visibility disabled"
ng-if="studentPicto.attributes.status == 'disabled'"/>
<img
ng-src="{{studentPicto.picto.uri}}"
class="unselectable"
ng-class="{
'novisible': studentPicto.attributes.status == 'invisible',
'deactivate': studentPicto.attributes.status == 'disabled'
}"
ng-style="{
'background-color': studentPicto.attributes.color || '#ffffff'
}"
/>
<div
class="picto_options"
ng-if="studentPicto == emptyStudentPicto">
<a
ng-click="open_add(rowIndex, colIndex)"
class="picto_add"
title="{{ 'add_picto' | translate}}">
<i class="color_green glyphicon glyphicon-plus-sign" aria-hidden="true"></i>
</a>
</div>
<div
class="picto_options"
ng-if="studentPicto !== emptyStudentPicto">
<a
ng-click="delete_picto(studentPicto)"
class="picto_remove"
title="{{ 'delete' | translate}}">
<i class="color_red glyphicon glyphicon-remove-circle" aria-hidden="true"></i>
</a>
<a ng-click="view_picto(studentPicto)" class="picto_ok" >
<i ng-class="{
color_green: studentPicto.attributes.status == 'invisible',
color_black: studentPicto.attributes.status == 'enabled'
}"
class="glyphicon glyphicon-eye-open"
aria-hidden="true"
title="{{ studentPicto.attributes.status | translate}}">
</i>
</a>
<a
class="picto_tags"
ng-click="open_tags(studentPicto)">
<i class="glyphicon glyphicon-tags" aria-hidden="true"></i>
</a>
<a
class="picto_config"
ng-click="open_config(studentPicto)">
<i class="glyphicon glyphicon-cog" aria-hidden="true"></i>
</a>
</div>
</div> </div>
<div <div class="clearfix"></div>
class="picto-legend-full"
ng-if="studentPicto.attributes.legend == 'full'">
{{ studentPicto.attributes.expression }}
</div>
<!-- /.picto-legend -->
<img
src="/app/img/redcross.png"
class="red-cross-visibility disabled"
ng-if="studentPicto.attributes.status == 'disabled'"/>
<img
ng-src="{{studentPicto.picto.uri}}"
class="unselectable"
ng-click="show_category(studentPicto)"
ng-class="{
'novisible': studentPicto.attributes.status == 'invisible',
'deactivate': studentPicto.attributes.status == 'disabled'
}"
ng-style="{
'background-color': studentPicto.attributes.color
}"/>
<div
class="picto_options"
ng-if="studentPicto == emptyStudentPicto">
<a
ng-click="open_add(rowIndex, colIndex)"
class="picto_add"
title="{{ 'add_picto' | translate}}">
<i class="color_green glyphicon glyphicon-plus-sign" aria-hidden="true"></i>
</a>
</div>
<div
class="picto_options"
ng-if="studentPicto !== emptyStudentPicto && studentPicto.attributes.coord_y != '0'">
<a ng-click="view_picto(studentPicto)" class="picto_ok" >
<i
ng-class="{
color_green: studentPicto.attributes.status == 'invisible',
color_black: studentPicto.attributes.status == 'enabled'
}"
class="glyphicon glyphicon-eye-open"
aria-hidden="true"
title="{{ studentPicto.attributes.status | translate}}"></i>
</a>
<a
ng-click="change_category(studentPicto)"
ng-if="studentPicto !== emptyStudentPicto && studentPicto.attributes.coord_y != '0'"
class="picto_cat_edit">
<i
class="glyphicon glyphicon-picture" aria-hidden="true"
title="{{ 'change_cat_picto' | translate}}">
</i>
</a>
</div>
<div
class="picto_options"
ng-if="studentPicto !== emptyStudentPicto && studentPicto.attributes.coord_y == '0'">
<a
ng-click="delete_picto(studentPicto)"
class="picto_remove"
title="{{ 'delete' | translate}}">
<i class="color_red glyphicon glyphicon-remove-circle" aria-hidden="true"></i>
</a>
<a ng-click="view_picto(studentPicto)" class="picto_ok" >
<i ng-class="{
color_green: studentPicto.attributes.status == 'invisible',
color_black: studentPicto.attributes.status == 'enabled'
}"
class="glyphicon glyphicon-eye-open"
aria-hidden="true"
title="{{ studentPicto.attributes.status | translate}}">
</i>
</a>
<a
class="picto_tags"
ng-click="open_tags(studentPicto)">
<i class="glyphicon glyphicon-tags" aria-hidden="true"></i>
</a>
<a
class="picto_config"
ng-click="open_config(studentPicto)">
<i class="glyphicon glyphicon-cog" aria-hidden="true"></i>
</a>
</div>
</div> </div>
<div class="clearfix"></div>
</div> </div>
<!-- / Category grid -->
</div> </div>
<!-- / Main categories grid --> </div><!--/. col-xs-10 -->
<!-- Category grid -->
<a name="picto-category-grid"/>
<div
id="picto-category-grid"
class="picto-grid picto-category-grid"
ng-if="selectedCategory !== emptyStudentPicto && !showFreeCategory"
ng-style="{ 'background-color': shadeColor(selectedCategory.attributes.color, 0.3) }">
<h3 class="picto-category-grid__title">{{ selectedCategory.attributes.expression }}</h3>
<div
ng-repeat="studentPictoRow in studentPictos[getCategoryId(selectedCategory)]"
ng-init="rowIndex = $index"
class="picto-grid__row">
<div
class="picto pull-left ng-class:{'picto-out': studentData.attributes.size == 'large' && (rowIndex > 3 || colIndex > 7)};"
data-row="{{ rowIndex }}"
data-column="{{ colIndex }}"
id="student-picto-{{
studentPicto.id ||
('empty-' + colIndex + '-' + rowIndex)
}}"
draggable droppable drop="handleDrop"
popover="{{ studentPicto != emptyStudentPicto ? studentPicto.attributes.expression : '' }}"
popover-trigger="mouseenter"
ng-repeat="studentPicto in studentPictoRow track by $index"
ng-init="colIndex = $index">
<!-- picto-legend -->
<div
class="picto-legend-normal"
ng-if="studentPicto.attributes.legend == 'normal'">
{{ studentPicto.attributes.expression }}
</div> <div class="col-xs-2">
<div <div class="text-center">
class="picto-legend-full" <h4>{{ viewingScene.name }}<h4>
ng-if="studentPicto.attributes.legend == 'full'"> <a style="text-decoration:none" popover="Escena ya activada" popover-trigger="mouseenter"><span class="label label-success" ng-if="viewingScene.active"><i class="fa fa-star" aria-hidden="true"></i> Escena activa</span></a>
{{ studentPicto.attributes.expression }} <a style="text-decoration:none" popover="Activar escena" popover-trigger="mouseenter"><span class="label label-default" ng-if="!viewingScene.active" ng-click="update_scene(viewingScene)"><i class="fa fa-star-o" aria-hidden="true"></i> Escena inactiva</span></a>
</div> </div>
<!-- /.picto-legend -->
<img <hr>
src="/app/img/redcross.png"
class="red-cross-visibility disabled" <div class="list-group">
ng-if="studentPicto.attributes.status == 'disabled'"/> <a class="list-group-item" ng-repeat="scene in scenesList" ng-click="showScene(scene.id)" ng-class="(scene.id == viewingScene.id) ? 'active' : ''">
<img <i class="fa fa-star" aria-hidden="true" ng-if="scene.active"></i> {{ scene.name }}
ng-src="{{studentPicto.picto.uri}}" </a>
class="unselectable" </div>
ng-class="{
'novisible': studentPicto.attributes.status == 'invisible', <hr>
'deactivate': studentPicto.attributes.status == 'disabled'
}" <div class="text-center">
ng-style="{ <div class="btn-group text-left">
'background-color': studentPicto.attributes.color || '#ffffff' <button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
}" <i class="fa fa-plus" aria-hidden="true"></i>
/> </button>
<div <ul class="dropdown-menu">
class="picto_options" <li><a href="#">Nueva escena con categorías</a></li>
ng-if="studentPicto == emptyStudentPicto"> <li><a href="#">Nueva escena sin categorías</a></li>
<a </ul>
ng-click="open_add(rowIndex, colIndex)"
class="picto_add"
title="{{ 'add_picto' | translate}}">
<i class="color_green glyphicon glyphicon-plus-sign" aria-hidden="true"></i>
</a>
</div>
<div
class="picto_options"
ng-if="studentPicto !== emptyStudentPicto">
<a
ng-click="delete_picto(studentPicto)"
class="picto_remove"
title="{{ 'delete' | translate}}">
<i class="color_red glyphicon glyphicon-remove-circle" aria-hidden="true"></i>
</a>
<a ng-click="view_picto(studentPicto)" class="picto_ok" >
<i ng-class="{
color_green: studentPicto.attributes.status == 'invisible',
color_black: studentPicto.attributes.status == 'enabled'
}"
class="glyphicon glyphicon-eye-open"
aria-hidden="true"
title="{{ studentPicto.attributes.status | translate}}">
</i>
</a>
<a
class="picto_tags"
ng-click="open_tags(studentPicto)">
<i class="glyphicon glyphicon-tags" aria-hidden="true"></i>
</a>
<a
class="picto_config"
ng-click="open_config(studentPicto)">
<i class="glyphicon glyphicon-cog" aria-hidden="true"></i>
</a>
</div>
</div>
<div class="clearfix"></div>
</div> </div>
<button type="button" class="btn btn-primary"><i class="fa fa-files-o" aria-hidden="true"></i></button>
<button type="button" class="btn btn-danger"><i class="fa fa-trash" aria-hidden="true"></i></button>
</div> </div>
<!-- / Category grid -->
</div> </div>
</div> </div>
</div> </div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment