From 572af75c01c561da511d3082e4c190692670b110 Mon Sep 17 00:00:00 2001 From: blavenie <benoit.lavenier@e-is.pro> Date: Mon, 25 Apr 2016 12:37:56 +0200 Subject: [PATCH] Fix syntax errors --- www/js/app.js | 2 +- www/js/config.js | 2 +- www/js/controllers/app-controllers.js | 4 ++-- www/js/controllers/market-controllers.js | 2 +- www/js/controllers/registry-controllers.js | 2 +- www/js/controllers/wot-controllers.js | 4 ++-- www/js/services/registry-services.js | 6 +++--- www/js/services/utils-services.js | 13 ++++--------- 8 files changed, 15 insertions(+), 20 deletions(-) diff --git a/www/js/app.js b/www/js/app.js index ac97d8b4..5d77a2a6 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -118,7 +118,7 @@ angular.module('cesium', ['ionic', 'ngCordova', 'ionic-material', 'ngMessages', }); element.bind('hold', function () { if (System.clipboard.enable && this.value) { - System.clipboard.copy(this.value) + System.clipboard.copy(this.value); } }); } diff --git a/www/js/config.js b/www/js/config.js index 278c6311..105e5423 100644 --- a/www/js/config.js +++ b/www/js/config.js @@ -12,7 +12,7 @@ angular.module("cesium.config", []) "UCOIN_NODE": "twiced.fr:9330", "UCOIN_NODE_ES": "es.ucoin.fr", "VERSION": "0.0.1", - "BUILD_DATE": "2016-04-20T15:40:09.886Z" + "BUILD_DATE": "2016-04-25T10:30:45.161Z" }) ; \ No newline at end of file diff --git a/www/js/controllers/app-controllers.js b/www/js/controllers/app-controllers.js index 6b186d6a..9013eedd 100644 --- a/www/js/controllers/app-controllers.js +++ b/www/js/controllers/app-controllers.js @@ -30,7 +30,7 @@ angular.module('cesium.app.controllers', ['cesium.services']) function LoginModalController($scope, $ionicModal, Wallet, CryptoUtils, UIUtils, $q, $state, $timeout, $ionicSideMenuDelegate, $ionicHistory) { // Login modal - $scope.loginModal; + $scope.loginModal = null; $scope.loginData = {}; // Create the login modal that we will use later @@ -49,7 +49,7 @@ function LoginModalController($scope, $ionicModal, Wallet, CryptoUtils, UIUtils, // Open login modal $scope.login = function(callback) { if ($scope.loginModal) { - UIUtils.loading.hide() + UIUtils.loading.hide(); $scope.loginModal.show(); $scope.loginData.callback = callback; } diff --git a/www/js/controllers/market-controllers.js b/www/js/controllers/market-controllers.js index a1830540..dd57d3fd 100644 --- a/www/js/controllers/market-controllers.js +++ b/www/js/controllers/market-controllers.js @@ -334,7 +334,7 @@ function MarketRecordViewController($scope, $ionicModal, Wallet, Market, UIUtils .catch(function(err) { if (!$scope.secondTry) { $scope.secondTry = true; - $q(new function() { + $q(function() { $scope.load(id); // loop once }, 100); } diff --git a/www/js/controllers/registry-controllers.js b/www/js/controllers/registry-controllers.js index 9d6dd6ec..ccdaaa0a 100644 --- a/www/js/controllers/registry-controllers.js +++ b/www/js/controllers/registry-controllers.js @@ -369,7 +369,7 @@ function RegistryRecordViewController($scope, $ionicModal, Wallet, Registry, UIU // Retry (ES could have error) if (!$scope.secondTry) { $scope.secondTry = true; - $q(new function() { + $q(function() { $scope.load(id); }, 100); } diff --git a/www/js/controllers/wot-controllers.js b/www/js/controllers/wot-controllers.js index 8c7bca96..867b1eb2 100644 --- a/www/js/controllers/wot-controllers.js +++ b/www/js/controllers/wot-controllers.js @@ -156,7 +156,7 @@ function IdentityController($scope, $state, BMA, Wallet, UIUtils, $q, $timeout, if (value && System.clipboard.enable) { System.clipboard.copy(value); } - } + }; $scope.selectText = function(elementId) { var el = document.getElementById(elementId); @@ -165,7 +165,7 @@ function IdentityController($scope, $state, BMA, Wallet, UIUtils, $q, $timeout, var sel = UIUtils.selection.get(); alert(sel); } - } + }; $scope.$parent.clearFabs(); UIUtils.ink(); diff --git a/www/js/services/registry-services.js b/www/js/services/registry-services.js index e2591e51..eb51ecd2 100644 --- a/www/js/services/registry-services.js +++ b/www/js/services/registry-services.js @@ -177,12 +177,12 @@ angular.module('cesium.registry.services', ['ngResource', 'cesium.services']) } function addRecord(record, keypair) { - return sendRecord(record, keypair, addRecordRequest) - }; + return sendRecord(record, keypair, addRecordRequest); + } function updateRecord(record, params, keypair) { return sendRecord(record, keypair, updateRecordRequest, params); - }; + } var postAvatar = postResource('http://' + server + '/registry/record/_search'); diff --git a/www/js/services/utils-services.js b/www/js/services/utils-services.js index 759a105b..016f6024 100644 --- a/www/js/services/utils-services.js +++ b/www/js/services/utils-services.js @@ -108,11 +108,11 @@ angular.module('cesium.utils.services', ['ngResource']) } function getSelectionText(){ - var selectedText = "" + var selectedText = ""; if (window.getSelection){ // all modern browsers and IE9+ - selectedText = $window.getSelection().toString() + selectedText = $window.getSelection().toString(); } - return selectedText + return selectedText; } return { @@ -226,14 +226,9 @@ angular.module('cesium.utils.services', ['ngResource']) reader.readAsDataURL(file); } else { - reject("Not a file") + reject("Not a file"); } }); - - img.src = imageData; - reader.readAsDataURL(file); - - } camera.takePicture = function(sourceType) { -- GitLab