Skip to content
Snippets Groups Projects
Commit 569c124e authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

- fix build web (include all deps in git)

- crypto: allow to use FullJS implementation on device (e.g. firefoxos)
parent 415bedc8
No related branches found
No related tags found
No related merge requests found
/* Some of these styles you can override, things like colors,
* however some styles are required for the structure, and are critical to this module behaving properly!
*/
/* Core component styles */
.ng-image-crop {
text-align: center;
margin: 0 auto;
position: relative;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
/* Each of the 3 steps in the process are contained within sections */
.ng-image-crop > section {
background: #ccc;
}
/* The cropping button */
.ng-image-crop button {
margin-top: 10px;
}
/* The dashed cropping guideline */
.ng-image-crop .cropping-guide {
display: block;
background: rgba(255, 255, 255, .3);
border: 2px dashed white;
position: absolute;
pointer-events: none;
}
/* The circular themed cropping guideline */
.ng-image-crop--circle .cropping-guide {
border-radius: 50%;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-ms-border-radius: 50%;
-o-border-radius: 50%;
}
/* The canvas where the user positions the image via dragging and zooming */
.ng-image-crop .cropping-canvas {
background: rgba(255, 255, 255, .3);
margin: 0 auto;
cursor: move;
}
/* The overlayed draggable zoom handle in the corner of the module */
.ng-image-crop .zoom-handle {
display: block;
position: absolute;
bottom: 1px;
left: 1px;
background: rgba(255,255,255,0.7);
width: 80px;
height: 80px;
cursor: move;
border-radius: 200px 50px;
}
/* The text within the zoom handle */
.ng-image-crop .zoom-handle > span {
color: rgba(0, 0, 0, 0.5);
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
display: block;
position: relative;
top: 32px;
}
\ No newline at end of file
......@@ -10,9 +10,9 @@
<!-- build:css dist_css/cesium.css -->
<link href="css/ionic.app.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="css/angular-image-crop.css" rel="stylesheet">
<!--removeIf(device)-->
<link href="lib/angular-image-crop/image-crop-styles.css" rel="stylesheet">
<link href="css/style-no-device.css" rel="stylesheet">
<!--endRemoveIf(device)-->
......@@ -42,7 +42,7 @@
<script src="lib/ionic/js/angular/angular-cache.js"></script>
<script src="lib/ionic/js/angular/angular-screenmatch.min.js"></script>
<script src="lib/ionic/js/angular/angular-bind-notifier.min.js"></script>
<script src="lib/angular-image-crop/image-crop.js"></script>
<script src="lib/ionic/js/angular/angular-image-crop.js"></script>
<script src="js/vendor/base58.js" async></script>
<!--removeIf(device)-->
<script src="js/vendor/nacl_factory.js" async></script>
......
......@@ -5,9 +5,8 @@
// the 2nd parameter is an array of 'requires'
// 'starter.controllers' is found in controllers.js
angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'pascalprecht.translate',
'ngApi', 'angular-cache', 'angular.screenmatch', 'angular.bind.notifier',
'ngApi', 'angular-cache', 'angular.screenmatch', 'angular.bind.notifier', 'ImageCropper',
// removeIf(device)
'ImageCropper',
// endRemoveIf(device)
// removeIf(no-device)
'ngCordova',
......
......@@ -606,23 +606,28 @@ angular.module('cesium.crypto.services', ['ngResource', 'cesium.device.services'
// Use cordova implementation, when possible
var service;
if (Device.enable) {
service = new CordovaServiceFactory();
}
else {
service = new FullJSServiceFactory();
}
var service = new CryptoAbstractService();
Device.ready().then(function() {
var now = new Date().getTime();
var serviceImpl;
if (Device.enable) {
serviceImpl = new CordovaServiceFactory();
}
else {
serviceImpl = new FullJSServiceFactory();
}
// Load (async lib)
service.load()
serviceImpl.load()
.catch(function(err) {
//console.error(err);
throw err;
})
.then(function() {
service.copy(serviceImpl);
console.debug('[crypto] Loaded \'{0}\' implementation in {1}ms'.format(service.id, new Date().getTime() - now));
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment