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
029bf19d
authored
Feb 15, 2017
by
Fernando Martínez Santiago
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
implementada funcion de modificación completa
parent
0c68ed09
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
55 deletions
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/net/PictoUploader.java
android/Pictogram/supervisor_tablet/supervisor_tablet.iml
android/Pictogram/tabletlibrary/src/main/res/layout/edit_picto_layout.xml
android/Pictogram/tabletlibrary/tabletlibrary.iml
android/Pictogram/yotta_tablet/yotta_tablet.iml
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/net/PictoUploader.java
View file @
029bf19d
...
@@ -135,7 +135,7 @@ public class PictoUploader {
...
@@ -135,7 +135,7 @@ public class PictoUploader {
public
void
result
(
JSONObject
result
)
{
public
void
result
(
JSONObject
result
)
{
Log
.
i
(
LOG_TAG
,
" Attributes uploaded: "
+
result
.
toString
());
Log
.
i
(
LOG_TAG
,
" Attributes uploaded: "
+
result
.
toString
());
listener
.
success
(
true
,
result
.
toString
());
listener
.
success
(
true
,
result
.
toString
());
uploadTranslation
(
picto
.
get_id
(),
listener
);
}
}
@Override
@Override
public
void
error
(
RestapiWrapper
.
HTTPException
e
)
{
public
void
error
(
RestapiWrapper
.
HTTPException
e
)
{
...
@@ -170,6 +170,7 @@ public class PictoUploader {
...
@@ -170,6 +170,7 @@ public class PictoUploader {
public
void
result
(
JSONObject
result
)
{
public
void
result
(
JSONObject
result
)
{
Log
.
i
(
LOG_TAG
,
"Uploaded translation result: "
+
result
.
toString
());
Log
.
i
(
LOG_TAG
,
"Uploaded translation result: "
+
result
.
toString
());
listener
.
success
(
true
,
result
.
toString
());
listener
.
success
(
true
,
result
.
toString
());
uploadAttributes
(
picto
.
get_id
(),
listener
);
}
}
@Override
@Override
...
@@ -206,7 +207,7 @@ public class PictoUploader {
...
@@ -206,7 +207,7 @@ public class PictoUploader {
String
str
=
"Picto "
+
id_stupicto
+
" deleted"
;
String
str
=
"Picto "
+
id_stupicto
+
" deleted"
;
Log
.
i
(
LOG_TAG
,
str
);
Log
.
i
(
LOG_TAG
,
str
);
listener
.
success
(
true
,
str
);
listener
.
success
(
true
,
str
);
upload
Attributes
(
picto
.
get_id
(),
listener
);
upload
Translation
(
picto
.
get_id
(),
listener
);
}
}
@Override
@Override
...
@@ -221,8 +222,8 @@ public class PictoUploader {
...
@@ -221,8 +222,8 @@ public class PictoUploader {
*Try to Upload local picto. It requires:
*Try to Upload local picto. It requires:
* i) if the picto exists, to delete the remote previous one
* i) if the picto exists, to delete the remote previous one
* ii) to upload the image,
* ii) to upload the image,
* iii) to upload the
attributes
* iii) to upload the
expression
* iv) to upload the
expression
* iv) to upload the
attributes
*
*
**/
**/
public
void
upload
()
throws
IOException
{
public
void
upload
()
throws
IOException
{
...
@@ -232,17 +233,17 @@ public class PictoUploader {
...
@@ -232,17 +233,17 @@ public class PictoUploader {
int
elements_to_be_uploaded
=
2
;
int
elements_to_be_uploaded
=
2
;
if
(
stupicto_id
!=
Picto
.
STUPICTO_NULL
)
if
(
stupicto_id
!=
Picto
.
STUPICTO_NULL
)
elements_to_be_uploaded
++;
elements_to_be_uploaded
++;
else
return
;
Log
.
i
(
LOG_TAG
,
"Local Picto to be uploaded:"
+
this
.
picto
.
get_translation
()+
"(localID:"
+
local_id
+
", new remoteID:"
+
this
.
picto
.
get_id
()+
Log
.
i
(
LOG_TAG
,
"Local Picto to be uploaded:"
+
this
.
picto
.
get_translation
()+
"(localID:"
+
local_id
+
", new remoteID:"
+
this
.
picto
.
get_id
()+
(
stupicto_id
!=
Picto
.
STUPICTO_NULL
?
", stupicto to be deleted:"
+
stupicto_id
+
")"
:
" .New picto"
));
(
stupicto_id
!=
Picto
.
STUPICTO_NULL
?
", stupicto to be deleted:"
+
stupicto_id
+
")"
:
" .New picto"
));
iPictoUploaderListener
listener
=
new
PictoUploaderListener
(
local_id
,
elements_to_be_uploaded
);
iPictoUploaderListener
listener
=
new
PictoUploaderListener
(
local_id
,
elements_to_be_uploaded
);
if
(
imgUpload_success
)
{
if
(
imgUpload_success
)
{
if
(
stupicto_id
!=
Picto
.
STUPICTO_NULL
)
{
if
(
stupicto_id
!=
Picto
.
STUPICTO_NULL
)
{
Log
.
i
(
LOG_TAG
,
"Remote Picto to be deleted:"
+
this
.
picto
.
get_translation
()+
"("
+
stupicto_id
+
")"
);
Log
.
i
(
LOG_TAG
,
"Remote Picto to be deleted:"
+
this
.
picto
.
get_translation
()+
"("
+
stupicto_id
+
")"
);
deletePicto
(
stupicto_id
,
listener
);
deletePicto
(
stupicto_id
,
listener
);
}
else
}
else
uploadAttributes
(
picto
.
get_id
(),
listener
);
uploadTranslation
(
picto
.
get_id
(),
listener
);
}
}
else
{
else
{
GUITools
.
show_alert
(
PCBcontext
.
getActivityContext
(),
R
.
string
.
upload_error
,
PictoUploader
.
this
.
picto
.
get_translation
());
GUITools
.
show_alert
(
PCBcontext
.
getActivityContext
(),
R
.
string
.
upload_error
,
PictoUploader
.
this
.
picto
.
get_translation
());
...
@@ -318,6 +319,7 @@ public class PictoUploader {
...
@@ -318,6 +319,7 @@ public class PictoUploader {
if
(
elements_uploaded
==
elements_to_be_uploaded
)
{
if
(
elements_uploaded
==
elements_to_be_uploaded
)
{
PCBcontext
.
getPcbdb
().
deletePicto
(
local_img_id
);
PCBcontext
.
getPcbdb
().
deletePicto
(
local_img_id
);
PictoUploader
.
this
.
picto
.
delete_bitmap
(
PCBcontext
.
getContext
());
PictoUploader
.
this
.
picto
.
delete_bitmap
(
PCBcontext
.
getContext
());
PCBcontext
.
getVocabulary
().
addPicto
(
picto
);
PCBcontext
.
getRoom
().
emit
(
new
VocabularyAction
(
VocabularyAction
.
ADD
,
PictoUploader
.
this
.
picto
));
PCBcontext
.
getRoom
().
emit
(
new
VocabularyAction
(
VocabularyAction
.
ADD
,
PictoUploader
.
this
.
picto
));
GUITools
.
show_alert
(
PCBcontext
.
getContext
(),
R
.
string
.
upload_ok
,
PictoUploader
.
this
.
picto
.
get_translation
());
GUITools
.
show_alert
(
PCBcontext
.
getContext
(),
R
.
string
.
upload_ok
,
PictoUploader
.
this
.
picto
.
get_translation
());
}
}
...
...
android/Pictogram/supervisor_tablet/supervisor_tablet.iml
View file @
029bf19d
...
@@ -105,14 +105,6 @@
...
@@ -105,14 +105,6 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/jni"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/jni"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/assets"
type=
"java-test-resource"
/>
...
@@ -121,7 +113,18 @@
...
@@ -121,7 +113,18 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/shaders"
isTestSource=
"true"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/assets"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/blame"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/blame"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/classes"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/dependency-cache"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/24.2.1/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/24.2.1/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/24.2.1/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/24.2.1/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-compat/24.2.1/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-compat/24.2.1/jars"
/>
...
@@ -132,11 +135,17 @@
...
@@ -132,11 +135,17 @@
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/24.2.1/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/24.2.1/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/24.2.1/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/24.2.1/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/incremental"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/incremental"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/incremental-safeguard"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/jniLibs"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/manifests"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/manifests"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/pre-dexed"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/res"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/res"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/rs"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/rs"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/shaders"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/symbols"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/symbols"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/transforms"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/outputs"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/outputs"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/tmp"
/>
</content>
</content>
<orderEntry
type=
"jdk"
jdkName=
"Android API 24 Platform"
jdkType=
"Android SDK"
/>
<orderEntry
type=
"jdk"
jdkName=
"Android API 24 Platform"
jdkType=
"Android SDK"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
...
...
android/Pictogram/tabletlibrary/src/main/res/layout/edit_picto_layout.xml
View file @
029bf19d
...
@@ -139,4 +139,3 @@
...
@@ -139,4 +139,3 @@
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
android/Pictogram/tabletlibrary/tabletlibrary.iml
View file @
029bf19d
...
@@ -66,14 +66,6 @@
...
@@ -66,14 +66,6 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/jni"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/jni"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/assets"
type=
"java-test-resource"
/>
...
@@ -82,6 +74,14 @@
...
@@ -82,6 +74,14 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/jni"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/shaders"
isTestSource=
"true"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/annotations"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/annotations"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/blame"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/blame"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/bundles"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/bundles"
/>
...
...
android/Pictogram/yotta_tablet/yotta_tablet.iml
View file @
029bf19d
This diff is collapsed.
Click to expand it.
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