solved some problems

This commit is contained in:
quique 2019-06-28 08:41:16 +02:00
parent f4adccf7e4
commit eaba29185a
32 changed files with 124 additions and 64 deletions

View File

@ -46,13 +46,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/res" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/resources" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/assets" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/assets" type="java-test-resource" />
@ -60,18 +53,18 @@
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/java" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/rs" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/shaders" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/res" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/assets" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src" 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/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" />
@ -79,6 +72,13 @@
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/test/java" 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/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/generated/not_namespaced_r_class_sources" /> <excludeFolder url="file://$MODULE_DIR$/build/generated/not_namespaced_r_class_sources" />
<excludeFolder url="file://$MODULE_DIR$/build/generated/source/r" /> <excludeFolder url="file://$MODULE_DIR$/build/generated/source/r" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/aapt_friendly_merged_manifests" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/aapt_friendly_merged_manifests" />

View File

@ -12,8 +12,9 @@
<exclude-output /> <exclude-output />
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" /> <excludeFolder url="file://$MODULE_DIR$/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/build" />
</content> </content>
<orderEntry type="inheritedJdk" /> <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
</component> </component>
</module> </module>

View File

@ -131,5 +131,6 @@
<orderEntry type="library" name="Gradle: :barcodescanner-release-2.1.5:@aar" level="project" /> <orderEntry type="library" name="Gradle: :barcodescanner-release-2.1.5:@aar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.core:common:1.1.0@jar" level="project" /> <orderEntry type="library" name="Gradle: android.arch.core:common:1.1.0@jar" level="project" />
<orderEntry type="module" module-name="CordovaLib" /> <orderEntry type="module" module-name="CordovaLib" />
<orderEntry type="module" module-name="CordovaLib" />
</component> </component>
</module> </module>

View File

@ -3,7 +3,7 @@
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" /> <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<application android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true"> <application android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize"> <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize" android:screenOrientation="portrait">
<intent-filter android:label="@string/launcher_name"> <intent-filter android:label="@string/launcher_name">
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />

View File

@ -174,6 +174,21 @@ spam{
font-size: 1.2em; font-size: 1.2em;
padding-top: 14px; padding-top: 14px;
} }
.btnsalix{
margin-bottom: 10px;
background-color: rgba(0,0,0,.150);
background-image: url(../img/salix.png);
background-repeat: no-repeat;
background-size: 25px;
background-position-y: center;
background-position-x: 10px;
width: 100%;
height: 50px;
border-radius: 15px;
padding-left: 43px;
font-size: 1.2em;
padding-top: 14px;
}
label{ label{
font-size: 1.5em; font-size: 1.5em;
margin-bottom: 5px; margin-bottom: 5px;

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -9,7 +9,7 @@ var maxCroppedHeight = 2688;
var ratio = 1; var ratio = 1;
var maxAspectRatio = 1.5; var maxAspectRatio = 1.5;
var image; var image;
var saveToPhotoAlbum = true;
var cropper; var cropper;
@ -70,6 +70,13 @@ $(document).ready(function () {
window.location = "index.html"; window.location = "index.html";
}); });
$(".btnsalix").on("click", function () {
var target = "_system";
var options = "location=no";
var url = "https://salix.verdnatura.es";
var ref = cordova.InAppBrowser.open(url, target, options);
});
}); });
function setManualMode() { function setManualMode() {
@ -80,7 +87,7 @@ function setManualMode() {
'Article: ' + idArticulo, // message 'Article: ' + idArticulo, // message
onConfirm, // callback to invoke with index of button pressed onConfirm, // callback to invoke with index of button pressed
'Verdnatura says:', // title 'Verdnatura says:', // title
['¡Take a picture!', '¡Library!', Other!'] // buttonLabels ['¡Take a picture!', '¡Library!', Close!'] // buttonLabels
); );
} else { } else {
navigator.notification.alert("Insert manual id or scan article", null, "Verdnatura says:", "¡ups!"); navigator.notification.alert("Insert manual id or scan article", null, "Verdnatura says:", "¡ups!");
@ -166,7 +173,7 @@ function scanBarcode() {
'Article: ' + result.text, // message 'Article: ' + result.text, // message
onConfirm, // callback to invoke with index of button pressed onConfirm, // callback to invoke with index of button pressed
'Verdnatura says:', // title 'Verdnatura says:', // title
['¡Take a picture!', '¡Library!', Other!'] // buttonLabels ['¡Take a picture!', '¡Library!', Close!'] // buttonLabels
); );
}, },
@ -203,16 +210,36 @@ function onError() {
} }
function showCamera() { function showCamera() {
var srcType = Camera.PictureSourceType.CAMERA; var srcType = Camera.PictureSourceType.CAMERA;
saveToPhotoAlbum = true;
var options = setOptions(srcType); var options = {
saveToPhotoAlbum: true,
quality: 80,
destinationType: Camera.DestinationType.FILE_URI,
sourceType: srcType,
encodingType: Camera.EncodingType.JPEG,
mediaType: Camera.MediaType.PICTURE,
allowEdit: false,
correctOrientation: true
};
navigator.camera.getPicture(cameraSuccess, cameraError, options); navigator.camera.getPicture(cameraSuccess, cameraError, options);
} }
function showLibrary() { function showLibrary() {
var srcType = Camera.PictureSourceType.PHOTOLIBRARY; var srcType = Camera.PictureSourceType.PHOTOLIBRARY;
saveToPhotoAlbum = false;
var options = setOptions(srcType); var options = {
saveToPhotoAlbum: false,
quality: 80,
destinationType: Camera.DestinationType.FILE_URI,
sourceType: srcType,
encodingType: Camera.EncodingType.JPEG,
mediaType: Camera.MediaType.PICTURE,
allowEdit: false,
correctOrientation: true
};
navigator.camera.getPicture(cameraSuccess, cameraError, options); navigator.camera.getPicture(cameraSuccess, cameraError, options);
} }

View File

@ -34,13 +34,15 @@
<div class="btnlogout"></div> <div class="btnlogout"></div>
<img id="logo" src="img/logo.png" alt="verdnatura"/> <img id="logo" src="img/logo.png" alt="verdnatura"/>
<br> <br>
<label>insert manual id:</label>
<div class="input"> <div class="input">
<img src="img/article.png" alt="verdnatura"/> <img src="img/article.png" alt="verdnatura"/>
<input type="text" id="txtarticle" placeholder="article id" value=""/> <input type="text" id="txtarticle" placeholder="article id" value=""/>
</div> </div>
<label>or scan id:</label>
<div class="btnbarcode">Scan</div> <div class="btnbarcode">Scan</div>
<div class="btnsalix">Salix</div>
<div class="btn loginbtn" id="btntakepicture"> <div class="btn loginbtn" id="btntakepicture">
¡Go! ¡Go!
</div> </div>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_background" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_background" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_background" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_background" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_background" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_background" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

View File

@ -174,6 +174,21 @@ spam{
font-size: 1.2em; font-size: 1.2em;
padding-top: 14px; padding-top: 14px;
} }
.btnsalix{
margin-bottom: 10px;
background-color: rgba(0,0,0,.150);
background-image: url(../img/salix.png);
background-repeat: no-repeat;
background-size: 25px;
background-position-y: center;
background-position-x: 10px;
width: 100%;
height: 50px;
border-radius: 15px;
padding-left: 43px;
font-size: 1.2em;
padding-top: 14px;
}
label{ label{
font-size: 1.5em; font-size: 1.5em;
margin-bottom: 5px; margin-bottom: 5px;

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -9,7 +9,7 @@ var maxCroppedHeight = 2688;
var ratio = 1; var ratio = 1;
var maxAspectRatio = 1.5; var maxAspectRatio = 1.5;
var image; var image;
var saveToPhotoAlbum = true;
var cropper; var cropper;
@ -70,6 +70,13 @@ $(document).ready(function () {
window.location = "index.html"; window.location = "index.html";
}); });
$(".btnsalix").on("click", function () {
var target = "_system";
var options = "location=no";
var url = "https://salix.verdnatura.es";
var ref = cordova.InAppBrowser.open(url, target, options);
});
}); });
function setManualMode() { function setManualMode() {
@ -80,7 +87,7 @@ function setManualMode() {
'Article: ' + idArticulo, // message 'Article: ' + idArticulo, // message
onConfirm, // callback to invoke with index of button pressed onConfirm, // callback to invoke with index of button pressed
'Verdnatura says:', // title 'Verdnatura says:', // title
['¡Take a picture!', '¡Library!', Other!'] // buttonLabels ['¡Take a picture!', '¡Library!', Close!'] // buttonLabels
); );
} else { } else {
navigator.notification.alert("Insert manual id or scan article", null, "Verdnatura says:", "¡ups!"); navigator.notification.alert("Insert manual id or scan article", null, "Verdnatura says:", "¡ups!");
@ -166,7 +173,7 @@ function scanBarcode() {
'Article: ' + result.text, // message 'Article: ' + result.text, // message
onConfirm, // callback to invoke with index of button pressed onConfirm, // callback to invoke with index of button pressed
'Verdnatura says:', // title 'Verdnatura says:', // title
['¡Take a picture!', '¡Library!', Other!'] // buttonLabels ['¡Take a picture!', '¡Library!', Close!'] // buttonLabels
); );
}, },
@ -203,16 +210,36 @@ function onError() {
} }
function showCamera() { function showCamera() {
var srcType = Camera.PictureSourceType.CAMERA; var srcType = Camera.PictureSourceType.CAMERA;
saveToPhotoAlbum = true;
var options = setOptions(srcType); var options = {
saveToPhotoAlbum: true,
quality: 80,
destinationType: Camera.DestinationType.FILE_URI,
sourceType: srcType,
encodingType: Camera.EncodingType.JPEG,
mediaType: Camera.MediaType.PICTURE,
allowEdit: false,
correctOrientation: true
};
navigator.camera.getPicture(cameraSuccess, cameraError, options); navigator.camera.getPicture(cameraSuccess, cameraError, options);
} }
function showLibrary() { function showLibrary() {
var srcType = Camera.PictureSourceType.PHOTOLIBRARY; var srcType = Camera.PictureSourceType.PHOTOLIBRARY;
saveToPhotoAlbum = false;
var options = setOptions(srcType); var options = {
saveToPhotoAlbum: false,
quality: 80,
destinationType: Camera.DestinationType.FILE_URI,
sourceType: srcType,
encodingType: Camera.EncodingType.JPEG,
mediaType: Camera.MediaType.PICTURE,
allowEdit: false,
correctOrientation: true
};
navigator.camera.getPicture(cameraSuccess, cameraError, options); navigator.camera.getPicture(cameraSuccess, cameraError, options);
} }

View File

@ -34,13 +34,15 @@
<div class="btnlogout"></div> <div class="btnlogout"></div>
<img id="logo" src="img/logo.png" alt="verdnatura"/> <img id="logo" src="img/logo.png" alt="verdnatura"/>
<br> <br>
<label>insert manual id:</label>
<div class="input"> <div class="input">
<img src="img/article.png" alt="verdnatura"/> <img src="img/article.png" alt="verdnatura"/>
<input type="text" id="txtarticle" placeholder="article id" value=""/> <input type="text" id="txtarticle" placeholder="article id" value=""/>
</div> </div>
<label>or scan id:</label>
<div class="btnbarcode">Scan</div> <div class="btnbarcode">Scan</div>
<div class="btnsalix">Salix</div>
<div class="btn loginbtn" id="btntakepicture"> <div class="btn loginbtn" id="btntakepicture">
¡Go! ¡Go!
</div> </div>