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
0466a4d8
authored
Jan 15, 2016
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
redcross for disabled images working
parent
ebae9049
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
71 additions
and
56 deletions
android/Pictogrammar/Pictogrammar.iml
android/Pictogrammar/app/src/main/java/com/yottacode/pictogrammar/Translate.java
sails/src/assets/app/css/main.css
sails/src/assets/app/i18n/en-gb.json
sails/src/assets/app/i18n/es-es.json
sails/src/assets/app/img/redcross.png
sails/src/assets/app/js/controllers/main.js
sails/src/assets/app/js/directives/directives.js
sails/src/assets/app/modules/login/controllers/login.js
sails/src/assets/app/modules/student/controllers/instructions.js
sails/src/assets/app/modules/student/views/collections.html
sails/src/assets/app/modules/student/views/instructions.html
android/Pictogrammar/Pictogrammar.iml
deleted
100644 → 0
View file @
ebae9049
<?xml version="1.0" encoding="UTF-8"?>
<module
external.linked.project.id=
"Pictogrammar"
external.linked.project.path=
"$MODULE_DIR$"
external.root.project.path=
"$MODULE_DIR$"
external.system.id=
"GRADLE"
external.system.module.group=
""
external.system.module.version=
"unspecified"
type=
"JAVA_MODULE"
version=
"4"
>
<component
name=
"FacetManager"
>
<facet
type=
"java-gradle"
name=
"Java-Gradle"
>
<configuration>
<option
name=
"BUILD_FOLDER_PATH"
value=
"$MODULE_DIR$/build"
/>
<option
name=
"BUILDABLE"
value=
"false"
/>
</configuration>
</facet>
</component>
<component
name=
"NewModuleRootManager"
LANGUAGE_LEVEL=
"JDK_1_7"
inherit-compiler-output=
"true"
>
<exclude-output
/>
<content
url=
"file://$MODULE_DIR$"
>
<excludeFolder
url=
"file://$MODULE_DIR$/.gradle"
/>
</content>
<orderEntry
type=
"inheritedJdk"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
</component>
</module>
\ No newline at end of file
android/Pictogrammar/app/src/main/java/com/yottacode/pictogrammar/Translate.java
View file @
0466a4d8
...
...
@@ -18,7 +18,7 @@ package com.yottacode.pictogrammar;
import
java.util.LinkedList
;
import
java.util.Vector
;
import
org.grammaticalframework.PGF
;
//
import org.grammaticalframework.PGF;
import
org.json.JSONException
;
import
org.json.JSONObject
;
...
...
@@ -112,7 +112,7 @@ public class Translate extends Activity implements iVocabularyListener, iImgDown
tts
=
new
TTSHelper
(
this
,
"IVONA Text-to-Speech HQ"
);
tts
=
new
TTSHelper
(
this
);
new
LoadPGFTask
().
execute
();
//
new LoadPGFTask().execute();
mArrayAdapter
=
new
ArrayAdapter
(
this
,
R
.
layout
.
listitem
);
...
...
@@ -216,7 +216,7 @@ public class Translate extends Activity implements iVocabularyListener, iImgDown
/**
* This class is used to load the PGF file asychronously.
* It display a blocking progress dialog while doing so.
*/
*/
/*
private class LoadPGFTask extends AsyncTask<Void, Void, PGF> {
private ProgressDialog progress;
...
...
@@ -244,7 +244,7 @@ public class Translate extends Activity implements iVocabularyListener, iImgDown
this.progress.dismiss(); // Remove loading popup
}
}
*/
/**
* This class is used to parse a sentence asychronously.
* It display a blocking progress dialog while doing so.
...
...
sails/src/assets/app/css/main.css
View file @
0466a4d8
...
...
@@ -424,15 +424,22 @@ textarea.editable{
/* Class for pictos when are deactivated to the student, but are visibles */
.picto
img
.deactivate
{
/*
.picto img.deactivate {
filter
:
url('#grayscale')
;
/
* Versión SVG para IE10, Chrome 17, FF3.5, Safari 5.2 and Opera 11.6 *
/
filter: url('#grayscale'); /
Versión SVG para IE10, Chrome 17, FF3.5, Safari 5.2 and Opera 11.6
/
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter
:
grayscale
(
100%
);
/* Para cuando es estándar funcione en todos */
filter
:
Gray
();
/* IE4-8 and 9 */
filter: grayscale(100%); / Para cuando es estándar funcione en todos /
filter: Gray(); / IE4-8 and 9 /
}*/
.picto
img
.disabled
{
position
:
absolute
;
bottom
:
0px
;
/* position will be on bottom */
left
:
0px
;
width
:
100%
;
}
/* Class for pictos that aren't saw by the student */
...
...
sails/src/assets/app/i18n/en-gb.json
View file @
0466a4d8
...
...
@@ -40,6 +40,7 @@
"click"
:
"Click"
,
"click_login"
:
"Click to login"
,
"collections"
:
"Collections"
,
"confirmation"
:
"Are you sure?"
,
"contact_person"
:
"Contact person"
,
"contact_person"
:
"Contact person"
,
"continue_session"
:
"Resume_session"
,
...
...
sails/src/assets/app/i18n/es-es.json
View file @
0466a4d8
...
...
@@ -40,6 +40,7 @@
"click"
:
"Clic"
,
"click_login"
:
"Clic para iniciar sesión"
,
"collections"
:
"Colecciones"
,
"confirmation"
:
"¿Estás seguro?"
,
"contact_person"
:
"Persona de contacto"
,
"contact_person"
:
"Persona de contacto"
,
"continue_session"
:
"Reanudar sesión"
,
...
...
sails/src/assets/app/img/redcross.png
0 → 100644
View file @
0466a4d8
24.4 KB
sails/src/assets/app/js/controllers/main.js
View file @
0466a4d8
...
...
@@ -12,7 +12,6 @@ String.prototype.hashCode = function() {
return
hash
;
};
// Creamos el módulo dashboardControllers, de donde colgarán todos los controladores
var
dashboardControllers
=
angular
.
module
(
'dashboardControllers'
,
[
'dashboardConfig'
]);
...
...
sails/src/assets/app/js/directives/directives.js
View file @
0466a4d8
...
...
@@ -43,6 +43,26 @@ dashboardDirectives.directive('footerTranslate', function(){
/*-------------------------------------------------------------------------------
*
* Confirmation pop up
*
*/
dashboardDirectives
.
directive
(
'ngConfirmClick'
,
[
function
(){
return
{
link
:
function
(
scope
,
element
,
attr
)
{
var
msg
=
attr
.
ngConfirmClick
||
'Are you sure?'
;
var
clickAction
=
attr
.
confirmedClick
;
element
.
bind
(
'click'
,
function
(
event
)
{
if
(
window
.
confirm
(
msg
)
)
{
scope
.
$eval
(
clickAction
);
}
});
}
};
}])
/*-------------------------------------------------------------------------------
*
* Mouse event related directives
*
*/
...
...
sails/src/assets/app/modules/login/controllers/login.js
View file @
0466a4d8
...
...
@@ -3,7 +3,7 @@
//------------------
// Login Controller
//------------------
dashboardControllers
.
controller
(
'LoginCtrl'
,
function
LoginCtrl
(
$scope
,
$http
,
$window
,
$translate
,
$location
,
config
,
$stateParams
)
{
dashboardControllers
.
controller
(
'LoginCtrl'
,
function
LoginCtrl
(
$scope
,
$http
,
$window
,
$translate
,
$
filter
,
$
location
,
config
,
$stateParams
)
{
// The last parameter, config, is injected from config.js (defined in dashboardConfig module)
$scope
.
credentials
=
{
...
...
@@ -12,6 +12,16 @@ dashboardControllers.controller('LoginCtrl', function LoginCtrl($scope, $http, $
lang
:
'es-es'
};
// Pop-up blocker check
// var popup = window.open('http://yottacode.com','','',true);
// setTimeout( function() {
// if(!popup || popup.outerHeight === 0) {
// alert("cáspita");
// } else {
// popup && popup.close();
// }
// }, 100);
// Array of key terms to translate
$translate
([
'login_success'
,
'login_fail'
]).
then
(
function
(
translations
)
{
//notification_email = translations.email_match;
...
...
sails/src/assets/app/modules/student/controllers/instructions.js
View file @
0466a4d8
...
...
@@ -217,33 +217,29 @@ dashboardControllers.controller('StudentInstructionsCtrl', function StudentInstr
// Delete instruction of a method
$scope
.
delete_instruction
=
function
(
ins
){
var
deleteIns
=
$window
.
confirm
(
'Are you absolutely sure you want to delete?'
);
if
(
deleteIns
){
$http
.
delete
(
config
.
backend
+
'/instruction/'
+
ins
.
id
)
.
success
(
function
(
data
,
status
,
headers
,
config
)
{
console
.
log
(
'Deleted instruction:'
+
JSON
.
stringify
(
data
));
// Buscar method
for
(
var
i
=
0
;
i
<
$scope
.
methods
.
length
;
i
++
)
{
var
m
=
$scope
.
methods
[
i
];
if
(
ins
.
method
==
m
.
id
){
// Buscar la instrucción y eliminar de la vista
for
(
var
j
=
0
;
j
<
m
.
instructions
.
length
;
j
++
)
{
if
(
ins
.
id
==
m
.
instructions
[
j
].
id
){
$scope
.
methods
[
i
].
instructions
.
splice
(
j
,
1
);
break
;
}
$http
.
delete
(
config
.
backend
+
'/instruction/'
+
ins
.
id
)
.
success
(
function
(
data
,
status
,
headers
,
config
)
{
console
.
log
(
'Deleted instruction:'
+
JSON
.
stringify
(
data
));
// Buscar method
for
(
var
i
=
0
;
i
<
$scope
.
methods
.
length
;
i
++
)
{
var
m
=
$scope
.
methods
[
i
];
if
(
ins
.
method
==
m
.
id
){
// Buscar la instrucción y eliminar de la vista
for
(
var
j
=
0
;
j
<
m
.
instructions
.
length
;
j
++
)
{
if
(
ins
.
id
==
m
.
instructions
[
j
].
id
){
$scope
.
methods
[
i
].
instructions
.
splice
(
j
,
1
);
break
;
}
break
;
}
}
}
break
;
}
}
})
.
error
(
function
(
data
,
status
,
headers
,
config
)
{
console
.
log
(
"Error from API: "
+
data
.
error
);
});
}
})
.
error
(
function
(
data
,
status
,
headers
,
config
)
{
console
.
log
(
"Error from API: "
+
data
.
error
);
});
};
// Modal window to open instruction details
...
...
sails/src/assets/app/modules/student/views/collections.html
View file @
0466a4d8
...
...
@@ -46,6 +46,7 @@
<div
ng-repeat=
"row in pcb_cat"
class=
"filaPictos"
>
<div
class=
"picto pull-left"
ng-repeat=
"col in row track by $index"
>
<img
src=
'/app/img/redcross.png'
alt=
''
class=
'disabled'
ng-if=
"col.attributes.status == 'disabled'"
/>
<img
ng-src=
"{{col.picto.uri}}"
class=
"unselectable"
popover=
"{{col.expression.text}}"
popover-trigger=
"mouseenter"
ng-click=
"col.attributes.coord_x != 0 && show_category(col.picto.id, col.expression.text, col.attributes.color)"
ng-class=
"{'novisible': col.attributes.status == 'invisible', 'deactivate': col.attributes.status == 'disabled'}"
ng-style=
"{'background-color': col.attributes.color }"
/>
<div
class=
"picto_options"
ng-if=
"col.picto.uri != '/app/img/empty.gif'"
>
<!--
...
...
sails/src/assets/app/modules/student/views/instructions.html
View file @
0466a4d8
...
...
@@ -76,7 +76,7 @@
'glyphicon-minus': i.status == null
}"
aria-hidden=
"true"
popover=
"{{(i.status || 'nobegin') | translate}}"
popover-trigger=
"mouseenter"
ng-click=
"change_status(i)"
></span>
</td>
<td><a
ng-click=
"delete_instruction(i)
"
class=
"delete_instruction"
><span
class=
"text_medium delete color_red glyphicon glyphicon-remove-circle"
aria-hidden=
"true"
></span></a></td>
<td><a
confirmed-click=
"delete_instruction(i);"
ng-confirm-click=
"{{ 'confirmation' | translate}}
"
class=
"delete_instruction"
><span
class=
"text_medium delete color_red glyphicon glyphicon-remove-circle"
aria-hidden=
"true"
></span></a></td>
</tr>
</table>
...
...
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