Commit ce67549b authored by Benoit Lavenier's avatar Benoit Lavenier

[fix] image file upload, on android build

parent 2afc613d
......@@ -5,6 +5,8 @@
"cacheTimeMs": 60000,
"useLocalStorage": true,
"rememberMe": true,
"useRelative": false,
"decimalCount": 2,
"helptip": {
"enable": false
},
......@@ -25,19 +27,20 @@
"enable": true,
"defaultCurrency": "€",
"homeMessage": "<i class=\"icon ion-location\"></i> Vide-grenier de Villiers-charlemagne",
"defaultAdminPubkeys": [
"CohjkoP5YnqzTV2wwdCFND74BDDmDR7dAQEPGt4tj2Tw" // BLA
],
"defaultTags": [
{
"tag": "vide-grenier",
"tag": "VideGrenier",
"name": "Vide-grenier"
},
{
"tag": "villers-charlemagne-2017",
"tag": "VillersCharlemagne2017",
"name": "Vide-grenier de Villiers-charlemagne"
}
],
"defaultAdminPubkeys": [
"CohjkoP5YnqzTV2wwdCFND74BDDmDR7dAQEPGt4tj2Tw",
"GWAKPVoMdQw1LYqcWW8jckzox9VwNXGt6cQ1L5gNt3E9"
],
"record": {
"type": {
"show": false,
......
<?xml version="0.4.2"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" id="fr.gchange" version="0.4.2">
<name>Gchange</name>
<description>
<?xml version='1.0' encoding='utf-8'?>
<widget id="fr.gchange" version="0.4.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>ğchange</name>
<description>
An unhosted webapp for market with libre currency
</description>
<author email="contact@gchange.fr" href="http://www.gchange.fr">
Gchange team
<author email="contact@gchange.fr" href="http://www.gchange.fr">
ğchange team
</author>
<content src="index.html"/>
<access origin="*"/>
<icon src="resources/android/icon/drawable-xhdpi-icon.png"/>
<preference name="webviewbounce" value="false"/>
<preference name="UIWebViewBounce" value="false"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="android-minSdkVersion" value="16"/>
<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="4000"/>
<allow-navigation href="https://data.gchange.fr/*" />
<allow-navigation href="https://g1.duniter.org/*" />
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar"/>
</feature>
<platform name="android">
<icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/>
<icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/>
<icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/>
<icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/>
<icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/>
<icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/>
<splash src="resources/android/splash/drawable-land-ldpi-screen.png" density="land-ldpi"/>
<splash src="resources/android/splash/drawable-land-mdpi-screen.png" density="land-mdpi"/>
<splash src="resources/android/splash/drawable-land-hdpi-screen.png" density="land-hdpi"/>
<splash src="resources/android/splash/drawable-land-xhdpi-screen.png" density="land-xhdpi"/>
<splash src="resources/android/splash/drawable-land-xxhdpi-screen.png" density="land-xxhdpi"/>
<splash src="resources/android/splash/drawable-land-xxxhdpi-screen.png" density="land-xxxhdpi"/>
<splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/>
<splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/>
<splash src="resources/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/>
<splash src="resources/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/>
<splash src="resources/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/>
<splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/>
</platform>
<platform name="ios">
<preference name="BackupWebStorage" value="local"/>
<icon src="resources/ios/icon/icon.png" width="57" height="57"/>
<icon src="resources/ios/icon/icon@2x.png" width="114" height="114"/>
<icon src="resources/ios/icon/icon-40.png" width="40" height="40"/>
<icon src="resources/ios/icon/icon-40@2x.png" width="80" height="80"/>
<icon src="resources/ios/icon/icon-40@3x.png" width="120" height="120"/>
<icon src="resources/ios/icon/icon-50.png" width="50" height="50"/>
<icon src="resources/ios/icon/icon-50@2x.png" width="100" height="100"/>
<icon src="resources/ios/icon/icon-60.png" width="60" height="60"/>
<icon src="resources/ios/icon/icon-60@2x.png" width="120" height="120"/>
<icon src="resources/ios/icon/icon-60@3x.png" width="180" height="180"/>
<icon src="resources/ios/icon/icon-72.png" width="72" height="72"/>
<icon src="resources/ios/icon/icon-72@2x.png" width="144" height="144"/>
<icon src="resources/ios/icon/icon-76.png" width="76" height="76"/>
<icon src="resources/ios/icon/icon-76@2x.png" width="152" height="152"/>
<icon src="resources/ios/icon/icon-83.5@2x.png" width="167" height="167"/>
<icon src="resources/ios/icon/icon-small.png" width="29" height="29"/>
<icon src="resources/ios/icon/icon-small@2x.png" width="58" height="58"/>
<icon src="resources/ios/icon/icon-small@3x.png" width="87" height="87"/>
<splash src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" height="1136"/>
<splash src="resources/ios/splash/Default-667h.png" width="750" height="1334"/>
<splash src="resources/ios/splash/Default-736h.png" width="1242" height="2208"/>
<splash src="resources/ios/splash/Default-Landscape-736h.png" width="2208" height="1242"/>
<splash src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" height="1536"/>
<splash src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" height="2048"/>
<splash src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" height="768"/>
<splash src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" height="2048"/>
<splash src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" height="2732"/>
<splash src="resources/ios/splash/Default-Portrait~ipad.png" width="768" height="1024"/>
<splash src="resources/ios/splash/Default@2x~iphone.png" width="640" height="960"/>
<splash src="resources/ios/splash/Default~iphone.png" width="320" height="480"/>
</platform>
<platform name="firefoxos">
<icon height="128" src="resources/firefoxos/img/logo_128.png" width="128"/>
<icon height="60" src="resources/firefoxos/img/logo_60.png" width="60"/>
</platform><!--
<platform name="wp8">
<icon src="resources/wp8/icon/ApplicationIcon.png" width="99" height="99"/>
<icon src="resources/wp8/icon/Background.png" width="159" height="159"/>
<splash src="resources/wp8/splash/SplashScreenImage.png" width="768" height="1280"/>
</platform>-->
</widget>
\ No newline at end of file
<content src="index.html" />
<access origin="*" />
<icon src="resources/android/icon/drawable-xhdpi-icon.png" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="16" />
<allow-navigation href="https://data.gchange.fr/*" />
<allow-navigation href="https://g1.duniter.org/*" />
<allow-navigation href="https://g1.duniter.fr/*" />
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar" />
</feature>
<platform name="android">
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
</platform>
<engine name="android" spec="^6.2.3" />
</widget>
......@@ -55,7 +55,7 @@ case "$1" in
dirname=`pwd`
curl -i -u $2 -H 'Content-Type: application/zip' -T $dirname/platforms/web/build/gchange-web-$current.zip $upload_url?name=gchange-v$current-web.zip
#curl -i -u $2 -H 'Content-Type: application/zip' -T $dirname/platforms/firefoxos/build/package.zip $upload_url?name=gchange-v$current-firefoxos.zip
#curl -i -u $2 -H 'Content-Type: application/vnd.android.package-archive' -T $dirname/platforms/android/build/outputs/apk/android-release.apk $upload_url?name=gchange-v$current-android.apk
curl -i -u $2 -H 'Content-Type: application/vnd.android.package-archive' -T $dirname/platforms/android/build/outputs/apk/android-release.apk $upload_url?name=gchange-v$current-android.apk
#curl -i -u $2 -H 'Content-Type: application/x-debian-package' -T $dirname/platforms/ubuntu/native/gchange_${current}_amd64.deb $upload_url?name=gchange-v${current}-ubuntu-amd64.deb
echo "Successfully uploading files"
......
......@@ -18,12 +18,5 @@
"css_plugin",
"watch"
],
"defaultBrowser": "chrome",
"browsers": [
{
"platform": "android",
"browser": "crosswalk",
"version": "12.41.296.5"
}
]
"defaultBrowser": "chrome"
}
\ No newline at end of file
{
"name": "gchange-client",
"version": "0.4.2",
"description": "Unhosted webapp client for Duniter network",
"repository": {
"type": "git",
"url": "git@github.com:duniter-gchange/gchange-client.git"
},
"scripts": {
"postinstall": "bower install",
"install-for-mobile": "ionic state restore",
"start": "ionic serve"
},
"keywords": [
"duniter",
"cesium",
"gchange",
"ionic",
"angular",
"cordova",
"crypto-currency"
],
"author": "Gchange team",
"license": "GPL-3.0",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/duniter-gchange/gchange-client/issues",
"new": "https://github.com/duniter-gchange/gchange-client/issues/new?labels=bug"
},
"dependencies": {
"@ionic/cloud": "^0.16.0",
"bluebird": "^3.5.0",
"cordova-android": "^6.2.3",
"cordova-ios": "^4.4.0",
"cordova-plugin-whitelist": "^1.3.2",
"delete-empty": "^0.1.3",
"gulp": "^3.9.1",
"gulp-bump": "^2.1.0",
"gulp-concat": "^2.2.0",
"gulp-rename": "^1.2.0",
"gulp-sass": "^2.2.0",
"node-sass": "^3.3.3"
},
"devDependencies": {
"bower": "^1.8.0",
"cordova-uglify": "^0.2.3",
"del": "^2.2.0",
"fs": "0.0.2",
"gulp": "^3.9.1",
"gulp-angular-templatecache": "^1.8.0",
"gulp-angular-translate": "^0.1.4",
"gulp-base64": "^0.1.3",
"gulp-clean": "^0.3.2",
"gulp-clean-css": "^2.0.10",
"gulp-css-base64": "^1.3.4",
"gulp-csso": "^2.0.0",
"gulp-filter": "^4.0.0",
"gulp-header": "^1.7.1",
"gulp-html-remove": "^0.1.1",
"gulp-htmlmin": "^2.0.0",
"gulp-jshint": "^2.0.1",
"gulp-ng-annotate": "^2.0.0",
"gulp-ng-constant": "^1.1.0",
"gulp-remove-code": "^1.0.2",
"gulp-replace": "^0.5.4",
"gulp-rev": "^7.0.0",
"gulp-rev-replace": "^0.4.3",
"gulp-sourcemaps": "^1.6.0",
"gulp-uglify": "^1.5.3",
"gulp-useref": "^3.1.0",
"gulp-util": "^2.2.14",
"gulp-zip": "^3.2.0",
"ionic-minify": "^2.0.8",
"jshint": "^2.9.2",
"mv": "^2.1.1",
"playup": "^1.0.2",
"shelljs": "^0.3.0",
"yargs": "^4.3.1"
},
"cordovaPlugins": [
"cordova-plugin-whitelist",
"cordova-plugin-splashscreen",
"cordova-plugin-console",
"ionic-plugin-keyboard",
"cordova-plugin-device",
"cordova-plugin-statusbar",
"cordova-plugin-camera",
"cordova-plugin-websocket",
"cordova-plugin-vibration",
"cordova-plugin-dialogs",
{
"locator": "https://github.com/phonegap/phonegap-plugin-barcodescanner.git",
"id": "phonegap-plugin-barcodescanner"
}
],
"cordovaPlatforms": [
"ios",
"android",
"firefoxos"
]
}
"name": "gchange-client",
"version": "0.4.2",
"description": "Unhosted webapp client for Duniter network",
"repository": {
"type": "git",
"url": "git@github.com:duniter-gchange/gchange-client.git"
},
"scripts": {
"postinstall": "bower install",
"install-for-mobile": "ionic state restore",
"start": "ionic serve"
},
"keywords": [
"duniter",
"cesium",
"gchange",
"ionic",
"angular",
"cordova",
"crypto-currency"
],
"author": "Gchange team",
"license": "GPL-3.0",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/duniter-gchange/gchange-client/issues",
"new": "https://github.com/duniter-gchange/gchange-client/issues/new?labels=bug"
},
"dependencies": {
"@ionic/cloud": "^0.16.0",
"bluebird": "^3.5.0",
"cordova-android": "^6.2.3",
"cordova-ios": "^4.4.0",
"cordova-plugin-whitelist": "^1.3.2",
"delete-empty": "^0.1.3",
"gulp": "^3.9.1",
"gulp-bump": "^2.1.0",
"gulp-concat": "^2.2.0",
"gulp-rename": "^1.2.0",
"gulp-sass": "^2.2.0",
"node-sass": "^3.3.3"
},
"devDependencies": {
"bower": "^1.8.0",
"cordova-uglify": "^0.2.3",
"del": "^2.2.0",
"fs": "0.0.2",
"gulp": "^3.9.1",
"gulp-angular-templatecache": "^1.8.0",
"gulp-angular-translate": "^0.1.4",
"gulp-base64": "^0.1.3",
"gulp-clean": "^0.3.2",
"gulp-clean-css": "^2.0.10",
"gulp-css-base64": "^1.3.4",
"gulp-csso": "^2.0.0",
"gulp-filter": "^4.0.0",
"gulp-header": "^1.7.1",
"gulp-html-remove": "^0.1.1",
"gulp-htmlmin": "^2.0.0",
"gulp-jshint": "^2.0.1",
"gulp-ng-annotate": "^2.0.0",
"gulp-ng-constant": "^1.1.0",
"gulp-remove-code": "^1.0.2",
"gulp-replace": "^0.5.4",
"gulp-rev": "^7.0.0",
"gulp-rev-replace": "^0.4.3",
"gulp-sourcemaps": "^1.6.0",
"gulp-uglify": "^1.5.3",
"gulp-useref": "^3.1.0",
"gulp-util": "^2.2.14",
"gulp-zip": "^3.2.0",
"ionic-minify": "^2.0.8",
"jshint": "^2.9.2",
"mv": "^2.1.1",
"playup": "^1.0.2",
"shelljs": "^0.3.0",
"yargs": "^4.3.1"
},
"cordovaPlatforms": [
"android"
],
"cordova": {
"platforms": [
"android"
]
},
"cordovaPlugins": []
}
\ No newline at end of file
......@@ -678,33 +678,41 @@ $screen-menu: 845px;
display: inline-block;
}
// FIXME: same confg here to min size of CSS
#home .logo {
height: 70px;
background-image: url('../img/logo_64px.png');
background-size: 64px 64px;
}
@media screen and (max-width: $screen-xs-max) {
#home .logo {
/*#home .logo {
height: 70px;
background-image: url('../img/logo_64px.png');
background-size: 64px 64px;
}
} */
#home .footer {
display:none;
}
}
@media screen and (min-width: $screen-sm) and (max-width: $screen-sm-max) {
#home .logo {
/*#home .logo {
height: 144px;
background-image: url('../img/logo_128px.png');
background-size: 128px 128px;
}
}*/
#home .button {
max-width: 350px;
margin-top: 20px;
}
}
@media screen and (min-width: $screen-md) {
#home .logo {
/*#home .logo {
height: 200px;
background-image: url('../img/logo.svg');
background-size: 200px 200px;
}
background-size: 200px 200px;*
}*/
#home .button {
max-width: 350px;
......
......@@ -7,9 +7,9 @@
<title>ğchange</title>
<link rel="icon" href="./img/favicon.ico">
<link rel="apple-touch-icon" href="./img/logo_128px.png">
<link rel="apple-touch-icon" sizes="180x180" href="./img/logo_180px.png">
<!--link rel="apple-touch-icon" sizes="180x180" href="./img/logo_180px.png">
<link rel="apple-touch-icon" sizes="152x152" href="./img/logo_152px.png">
<link rel="apple-touch-icon" sizes="167x167" href="./img/logo_167px.png">
<link rel="apple-touch-icon" sizes="167x167" href="./img/logo_167px.png">-->
<link rel="manifest" href="/manifest.json">
<!-- build:css dist_css/cesium.css -->
<link href="css/ionic.app.css" rel="stylesheet">
......@@ -27,7 +27,7 @@
<!-- endbuild -->
</head>
<body ng-app="cesium" id="cesium" ng-strict-di="" ng-class="{'nobackdrop': $root.tour}">
<body ng-app="cesium" id="cesium" ng-strict-di="">
<ion-nav-view>
<h3 style="text-align: center; margin-top: 44px;">
ğ<b>change</b>
......@@ -53,7 +53,6 @@
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="lib/ionic/js/ionic.cloud.min.js"></script><!-- Ionic I/O-->
<script src="lib/ionic/js/ionic.material.js"></script>
<script src="lib/ionic/js/angular/angular-resource.js"></script>
<script src="lib/ionic/js/angular/angular-translate.js"></script>
......@@ -67,6 +66,14 @@
<script src="lib/ionic/js/angular/angular-idle.js"></script>
<script src="js/vendor/base58.js" async></script>
<!--removeIf(no-device)-->
<script src="js/vendor/sha256.min.js" async></script>
<script src="js/vendor/ng-cordova.min.js"></script>
<!--endRemoveIf(no-device)-->
<!-- endbuild -->
<!-- build:js dist_js/crypto.js -->
<!--removeIf(android)-->
<!--removeIf(ios)-->
<script src="js/vendor/nacl_factory.js" async></script>
......@@ -74,10 +81,6 @@
<script src="js/vendor/base64.js" async></script>
<!--endRemoveIf(ios)-->
<!--endRemoveIf(android)-->
<!--removeIf(no-device)-->
<script src="js/vendor/sha256.min.js" async></script>
<script src="js/vendor/ng-cordova.min.js"></script>
<!--endRemoveIf(no-device)-->
<!-- endbuild -->
<!--removeIf(no-device)-->
......
......@@ -6,14 +6,11 @@
// 'starter.controllers' is found in controllers.js
angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'pascalprecht.translate',
'ngApi', 'angular-cache', 'angular.screenmatch', 'angular.bind.notifier', 'ImageCropper', 'ngFileSaver', 'ngIdle',
//'ui-leaflet',
// removeIf(no-device)
'ngCordova',
'ionic.cloud',
//FIXME android build
// 'ngCordova',
// endRemoveIf(no-device)
// removeIf(no-plugin)
'cesium.plugins',
// endRemoveIf(no-plugin)
'cesium.filters', 'cesium.config', 'cesium.platform', 'cesium.controllers', 'cesium.templates', 'cesium.translations'
])
......@@ -95,14 +92,14 @@ angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'pascalprecht
else console.error(exception);
};
})
/*
.config(function($ionicCloudProvider) {
$ionicCloudProvider.init({
"core": {
"app_id": "23c2212f"
}
});
})
})*/
.run(function($rootScope, $translate, $state, $window, ionicReady, Device, UIUtils, $ionicConfig, PluginService,
csPlatform, csCurrency, csWallet, csSettings, csConfig) {
......
......@@ -14,6 +14,8 @@ angular.module("cesium.config", [])
"cacheTimeMs": 60000,
"useLocalStorage": true,
"rememberMe": true,
"useRelative": false,
"decimalCount": 2,
"helptip": {
"enable": false
},
......@@ -75,7 +77,7 @@ angular.module("cesium.config", [])
}
},
"version": "0.4.2",
"build": "2017-06-24T17:38:14.139Z",
"build": "2017-06-24T18:29:51.430Z",
"newIssueUrl": "https://github.com/duniter-gchange/gchange-client/issues/new?labels=bug"
})
......
......@@ -64,8 +64,8 @@ angular.module('cesium.filters', ['cesium.config', 'cesium.platform', 'pascalpre
})
.filter('formatAmount', function(csConfig, csSettings, csCurrency, $filter) {
var minValue = 1 / Math.pow(10, csConfig.decimalCount || 4);
var format = '0,0.0' + Array(csConfig.decimalCount || 4).join('0');
var minValue = 1 / Math.pow(10, csConfig.decimalCount || 2);
var format = '0,0.0' + Array(csConfig.decimalCount || 2).join('0');
var currencySymbol = $filter('currencySymbol');
function formatRelative(input, options) {
......@@ -104,8 +104,8 @@ angular.module('cesium.filters', ['cesium.config', 'cesium.platform', 'pascalpre
})
.filter('formatAmountNoHtml', function(csConfig, csSettings, csCurrency, $filter) {
var minValue = 1 / Math.pow(10, csConfig.decimalCount || 4);
var format = '0,0.0' + Array(csConfig.decimalCount || 4).join('0');
var minValue = 1 / Math.pow(10, csConfig.decimalCount || 2);
var format = '0,0.0' + Array(csConfig.decimalCount || 2).join('0');
var currencySymbol = $filter('currencySymbolNoHtml');
function formatRelative(input, options) {
......@@ -164,8 +164,8 @@ angular.module('cesium.filters', ['cesium.config', 'cesium.platform', 'pascalpre
.filter('formatDecimal', function(csConfig, csCurrency) {
var minValue = 1 / Math.pow(10, csConfig.decimalCount || 4);
var format = '0,0.0' + Array(csConfig.decimalCount || 4).join('0');
var minValue = 1 / Math.pow(10, csConfig.decimalCount || 2);
var format = '0,0.0' + Array(csConfig.decimalCount || 2).join('0');
return function(input) {
if (input === undefined) return '0';
......
......@@ -17,8 +17,10 @@ angular.module('cesium.device.services', ['ngResource', 'cesium.utils.services',
.factory('Device',
function($translate, $ionicPopup, $q,
// removeIf(no-device)
$cordovaClipboard, $cordovaBarcodeScanner, $cordovaCamera,
// removeIf(android)
//FIXME $cordovaClipboard, $cordovaBarcodeScanner, $cordovaCamera,
// endRemoveIf(no-device)
// endRemoveIf(android)
ionicReady, csSettings) {
'ngInject';
......@@ -29,7 +31,8 @@ angular.module('cesium.device.services', ['ngResource', 'cesium.utils.services',
},
exports = {
// workaround to quickly no is device or not (even before the ready() event)
enable: true
//enable: true TODO: android build
enable: false
};
// removeIf(device)
......@@ -86,7 +89,7 @@ angular.module('cesium.device.services', ['ngResource', 'cesium.utils.services',
options.encodingType = options.encodingType || navigator.camera.EncodingType.PNG;
options.targetWidth = options.targetWidth || CONST.MAX_WIDTH;
options.targetHeight = options.targetHeight || CONST.MAX_HEIGHT;
return $cordovaCamera.getPicture(options);
//FIXME return $cordovaCamera.getPicture(options);
}
function scan(n) {
......@@ -115,7 +118,7 @@ angular.module('cesium.device.services', ['ngResource', 'cesium.utils.services',
return $q.reject('Device disabled');
}
var deferred = $q.defer();
$cordovaClipboard
/*$cordovaClipboard
.copy(text)
.then(function () {
// success
......@@ -126,7 +129,7 @@ angular.module('cesium.device.services', ['ngResource', 'cesium.utils.services',
}, function () {
// error
deferred.reject({message: 'ERROR.COPY_CLIPBOARD'});
});
});*/
return deferred.promise;
}
......
......@@ -2,7 +2,7 @@ angular.module('cesium.utils.services', ['ngResource'])
.factory('UIUtils', function($ionicLoading, $ionicPopup, $ionicConfig, $translate, $q, ionicMaterialInk, ionicMaterialMotion, $window, $timeout,
// removeIf(no-device)
$cordovaToast,
//FIXME $cordovaToast,
// endRemoveIf(no-device)
$ionicPopover, $state, $rootScope, screenmatch, csSettings) {
'ngInject';
......@@ -132,10 +132,10 @@ angular.module('cesium.utils.services', ['ngResource'])
// removeIf(no-device)
// Use the Cordova Toast plugin
if (!!window.cordova) {
/*FIXME if (!!window.cordova) {
$cordovaToast.show(translations[message], duration, position);
return;
}
}*/
// endRemoveIf(no-device)
// removeIf(device)
......
......@@ -32,7 +32,7 @@
<p translate>COMMON.BTN_ADD_PICTURE</p>
</div>
<input type="file" id="pictureFile" accept=".png,.jpeg,.jpg" onchange="angular.element(this).scope().fileChanged(event)"
<input type="file" id="pictureFile" accept="image/*" onchange="angular.element(this).scope().fileChanged(event)"
style="visibility:hidden; position:absolute;"/>
</div>
......@@ -20,8 +20,7 @@
<p translate>PROFILE.MODAL_AVATAR.BTN_SELECT_FILE</p>
</div>
<input type="file" name="fileInput" accept=".png,.jpeg,.jpg" id="fileInput" onchange="angular.element(this).scope().fileChanged(event)"
accept=".png,.jpeg,.jpg"
<input type="file" name="fileInput" accept="image/*" id="fileInput" onchange="angular.element(this).scope().fileChanged(event)"
style="visibility:hidden; position:absolute;"/>
</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 to comment