diff --git a/app/config.json b/app/config.json index 239a3c43eb17b871f7d1c31b8ec268b70d6f7474..8a1212051d14c46b860bc1692e0f5f0395376098 100644 --- a/app/config.json +++ b/app/config.json @@ -1,31 +1,25 @@ { "default": { "APP_CONFIG": { - "UCOIN_NODE": "metab.ucoin.io" + "UCOIN_NODE": "cgeek.fr:9330" } }, - "ucoin-io": { + "cgeek-fr": { "APP_CONFIG": { - "UCOIN_NODE": "metab.ucoin.io" - } - }, - - "twiced-fr": { - "APP_CONFIG": { - "UCOIN_NODE": "twiced.fr:9330" + "UCOIN_NODE": "cgeek.fr:9330" } }, "duniter-fr": { "APP_CONFIG": { - "UCOIN_NODE": "test-net.duniter.fr" + "UCOIN_NODE": "test-net.duniter.fr:9201" } }, "duniter-fr-es": { "APP_CONFIG": { - "UCOIN_NODE": "test-net.duniter.fr", + "UCOIN_NODE": "test-net.duniter.fr:9201", "UCOIN_NODE_ES": "data.duniter.fr" } }, diff --git a/www/i18n/locale-en.json b/www/i18n/locale-en.json index 2fd7a9e96a44960c2afd0ca8f9a14e413fd97aa6..97cb8a5a8c2141da658eaad8538991493cdc8859 100644 --- a/www/i18n/locale-en.json +++ b/www/i18n/locale-en.json @@ -16,7 +16,9 @@ "LOADING": "Loading...", "FROM": "From", "TO": "To", - "COPY": "Copy" + "COPY": "Copy", + "BTN_PICTURE_DELETE": "Delete", + "BTN_PICTURE_FAVORISE": "Default" }, "SYSTEM": { "PICTURE_CHOOSE_TYPE": "Choose picture source :", @@ -138,7 +140,8 @@ "CATEGORIES": "Categories", "ISSUER": "Issuer", "PRICE": "Price", - "BTN_BUY": "Buy" + "BTN_BUY": "Buy", + "BTN_NEW_AD": "New ad" }, "SEARCH": { "TITLE": "Market", @@ -156,13 +159,17 @@ }, "EDIT": { "TITLE": "Edit", - "BTN_ADD_PICTURES": "Add pictures", "RECORD_TITLE": "Title", "RECORD_TITLE_HELP": "Title", "RECORD_DESCRIPTION": "Description", "RECORD_DESCRIPTION_HELP": "Description", "RECORD_LOCATION": "Localization", - "RECORD_LOCATION_HELP": "Address, City" + "RECORD_LOCATION_HELP": "Address, City", + "RECORD_PRICE": "Price", + "RECORD_PRICE_HELP": "Price (optional)", + "BTN_ADD_PICTURES": "Add pictures", + "BTN_PUBLISH": "Publish", + "BTN_SAVE": "Save" }, "ERROR": { "LOAD_CATEGORY_FAILED": "Error while loading market categories", @@ -173,7 +180,8 @@ "COMMON": { "CATEGORY": "Category", "CATEGORIES": "Categories", - "ISSUER": "Issuer" + "ISSUER": "Issuer", + "BTN_NEW": "Add" }, "SEARCH": { "TITLE": "Registry", @@ -196,17 +204,21 @@ }, "EDIT": { "TITLE": "Edit", - "BTN_ADD_PICTURES": "Add pictures", "RECORD_TITLE": "Name", "RECORD_TITLE_HELP": "Name", "RECORD_DESCRIPTION": "About me", "RECORD_DESCRIPTION_HELP": "Something about me", - "RECORD_PRICE": "Price", - "RECORD_PRICE_HELP": "Price (optional)", "RECORD_LOCATION": "Localization", "RECORD_LOCATION_HELP": "Localization (address, city)", "RECORD_SOCIAL_NETWORKS": "Social networks", - "RECORD_PUBKEY": "Public key" + "RECORD_PUBKEY": "Public key", + "BTN_ADD_PICTURES": "Add pictures", + "BTN_PUBLISH": "Publish", + "BTN_SAVE": "Save" + }, + "ERROR": { + "LOAD_RECORD_FAILED": "Chargement impossible", + "SAVE_RECORD_FAILED": "Erreur de la sauvegarde" } }, "ERROR": { @@ -233,7 +245,8 @@ "LOAD_WALLET_DATA_ERROR": "Error while loading wallet data", "COPY_CLIPBOARD_FAILED": "Could not copy to clipboard", "TAKE_PICTURE_FAILED": "Could not get picture", - "SCAN_FAILED": "Could not scan QR code" + "SCAN_FAILED": "Could not scan QR code", + "WOT_LOOKUP_FAILED": "Search failed" }, "INFO": { "POPUP_TITLE": "Information", diff --git a/www/i18n/locale-fr-FR.json b/www/i18n/locale-fr-FR.json index 6637dd34a7a33ac4ae5e4ff4ed2e558d56324c8e..3f2789c01d913febeae73a328519f5a513c1d7e8 100644 --- a/www/i18n/locale-fr-FR.json +++ b/www/i18n/locale-fr-FR.json @@ -16,7 +16,9 @@ "LOADING": "Veuillez patienter...", "FROM": "De", "TO": "A", - "COPY": "Copier" + "COPY": "Copier", + "BTN_PICTURE_DELETE": "Supprimer", + "BTN_PICTURE_FAVORISE": "Principale" }, "SYSTEM": { "PICTURE_CHOOSE_TYPE": "Choisir la source :", @@ -138,7 +140,8 @@ "CATEGORIES": "Catégories", "ISSUER": "Soumis par", "PRICE": "Prix", - "BTN_BUY": "Acheter" + "BTN_BUY": "Acheter", + "BTN_NEW_AD": "Nouvelle annonce" }, "SEARCH": { "TITLE": "Annonces", @@ -156,15 +159,17 @@ }, "EDIT": { "TITLE": "Edition", - "BTN_ADD_PICTURES": "Ajouter des photos", "RECORD_TITLE": "Titre", "RECORD_TITLE_HELP": "Titre", "RECORD_DESCRIPTION": "Description", "RECORD_DESCRIPTION_HELP": "Description", + "RECORD_LOCATION": "Ville", + "RECORD_LOCATION_HELP": "Adresse, Ville", "RECORD_PRICE": "Prix", "RECORD_PRICE_HELP": "Prix (optionnel)", - "RECORD_LOCATION": "Ville", - "RECORD_LOCATION_HELP": "Adresse, Ville" + "BTN_ADD_PICTURES": "Ajouter des photos", + "BTN_PUBLISH": "Publier", + "BTN_SAVE": "Sauvegarder" }, "ERROR": { "LOAD_CATEGORY_FAILED": "Erreur d'initialisation des catégories", @@ -175,7 +180,8 @@ "COMMON": { "CATEGORY": "Catégorie", "CATEGORIES": "Catégories", - "ISSUER": "Soumis par" + "ISSUER": "Soumis par", + "BTN_NEW": "Ajouter" }, "SEARCH": { "TITLE": "Annuaire", @@ -192,23 +198,27 @@ }, "NEW": { "TITLE": "Nouveau", - "SELECT_TYPE": "Type d'ajout :", + "SELECT_TYPE": "Type de référencement :", "TYPE_PARTICULAR": "Particulier", "TYPE_COMPANY": "Entreprise, organisme ou institution" }, "EDIT": { "TITLE": "Edition", - "BTN_ADD_PICTURES": "Ajouter des photos", "RECORD_TITLE": "Nom", "RECORD_TITLE_HELP": "Nom", "RECORD_DESCRIPTION": "À propos de moi", "RECORD_DESCRIPTION_HELP": "À propos de moi", - "RECORD_PRICE": "Prix", - "RECORD_PRICE_HELP": "Prix (optionnel)", "RECORD_LOCATION": "Localisation", "RECORD_LOCATION_HELP": "Localisation (adresse, ville)", "RECORD_SOCIAL_NETWORKS": "Réseaux sociaux", - "RECORD_PUBKEY": "Clé publique" + "RECORD_PUBKEY": "Clé publique", + "BTN_ADD_PICTURES": "Ajouter des photos", + "BTN_PUBLISH": "Publier", + "BTN_SAVE": "Sauvegarder" + }, + "ERROR": { + "LOAD_RECORD_FAILED": "Chargement impossible", + "SAVE_RECORD_FAILED": "Erreur lors de la sauvegarde" } }, "ERROR": { @@ -235,7 +245,8 @@ "LOAD_WALLET_DATA_ERROR": "Echec du chargement des données du portefeuille", "COPY_CLIPBOARD_FAILED": "Copie de la valeur impossible", "TAKE_PICTURE_FAILED": "Echec de la récupération de la photo", - "SCAN_FAILED": "Echec du scan de QR Code" + "SCAN_FAILED": "Echec du scan de QR Code", + "WOT_LOOKUP_FAILED": "Echec de la recherche", }, "INFO": { "POPUP_TITLE": "Information", diff --git a/www/js/config.js b/www/js/config.js index e16144cee8e4e32439e1245f9bb8ff8915634b95..6dd5b6ebc87ce3c153b86c36c6af23fe2207b500 100644 --- a/www/js/config.js +++ b/www/js/config.js @@ -9,9 +9,10 @@ angular.module("cesium.config", []) .constant("APP_CONFIG", { - "UCOIN_NODE": "test-net.duniter.fr", + "UCOIN_NODE": "test-net.duniter.fr:9201", + "UCOIN_NODE_ES": "data.duniter.fr", "VERSION": "0.0.1", - "BUILD_DATE": "2016-04-29T14:44:12.535Z" + "BUILD_DATE": "2016-04-30T12:37:51.728Z" }) ; \ No newline at end of file diff --git a/www/js/controllers/app-controllers.js b/www/js/controllers/app-controllers.js index 9013eeddd84fef07c59817eebf3b023ff4542a2b..ee435e93ed433238adc3be9819b47151ad7b0148 100644 --- a/www/js/controllers/app-controllers.js +++ b/www/js/controllers/app-controllers.js @@ -28,10 +28,15 @@ angular.module('cesium.app.controllers', ['cesium.services']) .controller('AppCtrl', AppController) ; -function LoginModalController($scope, $ionicModal, Wallet, CryptoUtils, UIUtils, $q, $state, $timeout, $ionicSideMenuDelegate, $ionicHistory) { +function LoginModalController($scope, $rootScope, $ionicModal, Wallet, CryptoUtils, UIUtils, $q, $state, $timeout, $ionicSideMenuDelegate, $ionicHistory) { // Login modal $scope.loginModal = null; $scope.loginData = {}; + $rootScope.viewFirstEnter = false; + + $scope.$on('$ionicView.enter', function(e, $state) { + $rootScope.viewFirstEnter = true; + }); // Create the login modal that we will use later $ionicModal.fromTemplateUrl('templates/login.html', { @@ -66,13 +71,14 @@ function LoginModalController($scope, $ionicModal, Wallet, CryptoUtils, UIUtils, if (!Wallet.isLogin()) { $timeout(function() { $scope.login(function() { + $rootScope.viewFirstEnter = false; Wallet.loadData() .then(function(walletData){ resolve(walletData); }) .catch(UIUtils.onError('ERROR.LOAD_WALLET_DATA_ERROR', reject)); }); - }, 2000); + }, $rootScope.viewFirstEnter ? 10 : 2000); } else if (!Wallet.data.loaded) { Wallet.loadData() @@ -181,7 +187,7 @@ function LoginModalController($scope, $ionicModal, Wallet, CryptoUtils, UIUtils, } -function AppController($scope, $ionicModal, $state, $ionicSideMenuDelegate, UIUtils, $q, $timeout, +function AppController($scope, $rootScope, $ionicModal, $state, $ionicSideMenuDelegate, UIUtils, $q, $timeout, CryptoUtils, BMA, Wallet, Registry, Market, APP_CONFIG, $ionicHistory, System ) { @@ -200,7 +206,7 @@ function AppController($scope, $ionicModal, $state, $ionicSideMenuDelegate, UIUt } }; - LoginModalController.call(this, $scope, $ionicModal, Wallet, CryptoUtils, UIUtils, $q, $state, $timeout, $ionicSideMenuDelegate, $ionicHistory); + LoginModalController.call(this, $scope, $rootScope, $ionicModal, Wallet, CryptoUtils, UIUtils, $q, $state, $timeout, $ionicSideMenuDelegate, $ionicHistory); TransferModalController.call(this, $scope, $ionicModal, $state, BMA, Wallet, UIUtils, $timeout, System); diff --git a/www/js/controllers/market-controllers.js b/www/js/controllers/market-controllers.js index dd57d3fd3daab11c6b26c2820e9882a44358cbac..2401f6972b39fefaa9fb1824eb488fed618e33de 100644 --- a/www/js/controllers/market-controllers.js +++ b/www/js/controllers/market-controllers.js @@ -353,7 +353,7 @@ function MarketRecordViewController($scope, $ionicModal, Wallet, Market, UIUtils function MarketRecordEditController($scope, $ionicModal, Wallet, Market, UIUtils, $state, CryptoUtils, $q, $ionicPopup, System, $timeout) { - MarketCategoryModalController.call(this, $scope, Market, $state, $ionicModal); + MarketCategoryModalController.call(this, $scope, Market, $state, $ionicModal, UIUtils); $scope.walletData = {}; $scope.formData = {}; @@ -385,7 +385,7 @@ function MarketRecordEditController($scope, $ionicModal, Wallet, Market, UIUtils Market.record.get({id: id}) .then(function (hit) { $scope.formData = hit._source; - $scope.category = categories[hit._source.category]; + $scope.category = categories[hit._source.category.id]; $scope.id= hit._id; if (hit._source.pictures) { $scope.pictures = hit._source.pictures.reduce(function(res, pic) { @@ -445,7 +445,7 @@ function MarketRecordEditController($scope, $ionicModal, Wallet, Market, UIUtils $scope.selectCategory = function(cat) { if (!cat.parent) return; $scope.category = cat; - $scope.formData.category = cat.id; + $scope.formData.category = cat; $scope.closeCategoryModal(); }; diff --git a/www/js/controllers/registry-controllers.js b/www/js/controllers/registry-controllers.js index 22f9910a24ddd7a842eac3739d37b5b2b43a8ed5..aaa8b5ec65048226d5d5bf86141a7dd4426523da 100644 --- a/www/js/controllers/registry-controllers.js +++ b/www/js/controllers/registry-controllers.js @@ -332,7 +332,9 @@ function RegistryRecordViewController($scope, $ionicModal, Wallet, Registry, UIU Registry.record.get({id: id}) .then(function (hit) { $scope.formData = hit._source; - $scope.category = categories[hit._source.category]; + if (hit._source.category && hit._source.category.id){ + $scope.category = categories[hit._source.category.id]; + } $scope.id= hit._id; if (hit._source.pictures) { $scope.pictures = hit._source.pictures.reduce(function(res, pic) { @@ -357,7 +359,18 @@ function RegistryRecordViewController($scope, $ionicModal, Wallet, Registry, UIU $scope.hasSelf = ($scope.identity.uid && $scope.identity.sigDate && $scope.identity.sig); UIUtils.loading.hide(); }) - .catch(UIUtils.onError('ERROR.LOAD_IDENTITY_FAILED')); + .catch(function(err) { + if (err && err.ucode == 2001) { + $scope.identity = { + pub: $scope.formData.issuer + }; + $scope.hasSelf = false; + UIUtils.loading.hide(); + } + else { + UIUtils.onError('ERROR.WOT_LOOKUP_FAILED')(err); + } + }); } else { $scope.hasSelf = false; @@ -378,7 +391,7 @@ function RegistryRecordViewController($scope, $ionicModal, Wallet, Registry, UIU } }); }) - ]).catch(UIUtils.onError('Could not load registry')); + ]).catch(UIUtils.onError('REGISTRY.ERROR.LOAD_RECORD_FAILED')); }; // Edit click @@ -407,7 +420,8 @@ function RegistryRecordViewController($scope, $ionicModal, Wallet, Registry, UIU } -function RegistryRecordEditController($scope, $ionicModal, Wallet, Registry, UIUtils, $state, CryptoUtils, $q, $ionicPopup, $translate, System) { +function RegistryRecordEditController($scope, $ionicModal, Wallet, Registry, UIUtils, $state, CryptoUtils, $q, $ionicPopup, $translate, System, + $ionicHistory, $ionicViewService) { RegistryCategoryModalController.call(this, $scope, Registry, $state, $ionicModal, UIUtils); @@ -448,7 +462,9 @@ function RegistryRecordEditController($scope, $ionicModal, Wallet, Registry, UIU Registry.record.get({id: id}) .then(function (hit) { $scope.recordData = hit._source; - $scope.category = categories[hit._source.category]; + if (hit._source.category && hit._source.category.id){ + $scope.category = categories[hit._source.category.id]; + } $scope.id= hit._id; if (hit._source.pictures) { $scope.pictures = hit._source.pictures.reduce(function(res, pic) { @@ -459,7 +475,7 @@ function RegistryRecordEditController($scope, $ionicModal, Wallet, Registry, UIU }); }) ]) - .catch(UIUtils.onError('Could not load registry')); + .catch(UIUtils.onError('REGISTRY.ERROR.LOAD_RECORD_FAILED')); }; $scope.save = function() { @@ -475,7 +491,7 @@ function RegistryRecordEditController($scope, $ionicModal, Wallet, Registry, UIU $state.go('app.registry_view_record', {id: id}); resolve(); }) - .catch(UIUtils.onError('Could not save registry')); + .catch(UIUtils.onError('REGISTRY.ERROR.SAVE_RECORD_FAILED')); } else { // Update Registry.record.update($scope.recordData, {id: $scope.id}, $scope.walletData.keypair) @@ -484,7 +500,7 @@ function RegistryRecordEditController($scope, $ionicModal, Wallet, Registry, UIU $state.go('app.registry_view_record', {id: $scope.id}); resolve(); }) - .catch(UIUtils.onError('Could not update registry')); + .catch(UIUtils.onError('REGISTRY.ERROR.SAVE_RECORD_FAILED')); } }); }; @@ -511,14 +527,9 @@ function RegistryRecordEditController($scope, $ionicModal, Wallet, Registry, UIU var file = event.target.files[0]; System.image.resize(file) .then(function(imageData) { - if ($scope.pictures.length === 0) { - $scope.pictures.push({src: imageData}); - } - else { - $scope.pictures[0] = {src: imageData}; - } + $scope.pictures.push({src: imageData}); UIUtils.loading.hide(); - $scope.$apply(); + //$scope.$apply(); resolve(); }); }); @@ -528,6 +539,14 @@ function RegistryRecordEditController($scope, $ionicModal, Wallet, Registry, UIU $scope.pictures.splice(index, 1); }; + $scope.favoritePicture = function(index){ + if (index > 0) { + var item = $scope.pictures[index]; + $scope.pictures.splice(index, 1); + $scope.pictures.splice(0, 0, item); + } + }; + $scope.auth = function() { $scope.loadWallet() .then(function(walletData) { @@ -542,6 +561,11 @@ function RegistryRecordEditController($scope, $ionicModal, Wallet, Registry, UIU }) .catch(onError('Could not computed authentication token')); }; + + $scope.goBack = function() { + //var backView = $ionicHistory.backView(); + $ionicViewService.getBackView().go(); + }; } function RegistryNewRecordWizardController($scope, $ionicModal, $state, UIUtils, $q, $timeout, Registry) { diff --git a/www/js/controllers/wot-controllers.js b/www/js/controllers/wot-controllers.js index b9de427ebfd9b4280f32f5b45b7427b5e523de62..d4eb1af248ec85f3aa1f5c6859d147eec73179c5 100644 --- a/www/js/controllers/wot-controllers.js +++ b/www/js/controllers/wot-controllers.js @@ -48,9 +48,14 @@ function WotLookupController($scope, BMA, $state, UIUtils, $timeout, System) { $scope.search.results = idties; $scope.search.looking = false; }) - .catch(function() { - $scope.search.results = []; - $scope.search.looking = false; + .catch(function(err) { + if (err && err.ucode == 2001) { + $scope.search.results = []; + $scope.search.looking = false; + } + else { + UIUtils.onError('ERROR.WOT_LOOKUP_FAILED')(err); + } }); } }; @@ -67,7 +72,7 @@ function WotLookupController($scope, BMA, $state, UIUtils, $timeout, System) { $scope.search.text = result.text; } }) - .catch(UIUtils.alert.error('ERROR.SCAN_FAILED')); + .catch(UIUtils.onError('ERROR.SCAN_FAILED')); } }; } diff --git a/www/js/services/registry-services.js b/www/js/services/registry-services.js index eb51ecd20f8cb8f5763e847d25b1920e462cd34f..c81f35ac6b7b2aeb27c2859b63fec7b00310cd41 100644 --- a/www/js/services/registry-services.js +++ b/www/js/services/registry-services.js @@ -255,8 +255,8 @@ angular.module('cesium.registry.services', ['ngResource', 'cesium.services']) avatar: getAvatar }, currency: { - all: getResource('http://' + server + '/currency/simple/_search?_source=currencyName,peers.host,peers.port'), - get: getResource('http://' + server + '/currency/simple/:id/_source') + all: getResource('http://' + server + '/registry/currency/_search?_source=currencyName,peers.host,peers.port'), + get: getResource('http://' + server + '/registry/currency/:id/_source') } }; } diff --git a/www/js/services/utils-services.js b/www/js/services/utils-services.js index 016f6024d3fba9f6b8a95af3eae3444db6496889..886e9fd3737417638bc3c3615a9b306de72e176b 100644 --- a/www/js/services/utils-services.js +++ b/www/js/services/utils-services.js @@ -193,40 +193,43 @@ angular.module('cesium.utils.services', ['ngResource']) var reader = new FileReader(); - reader.addEventListener("load", function () { + reader.onload = function(event){ var img = document.createElement("img"); - img.src = reader.result; - var width = img.width; - var height = img.height; + img.onload = function(event) { + var width = event.target.width; + var height = event.target.height; - if (width > height) { - if (width > CONST.MAX_WIDTH) { - height *= CONST.MAX_WIDTH / width; - width = CONST.MAX_WIDTH; - } - } else { - if (height > CONST.MAX_HEIGHT) { - width *= CONST.MAX_HEIGHT / height; - height = CONST.MAX_HEIGHT; + if (width > height) { + if (width > CONST.MAX_WIDTH) { + height *= CONST.MAX_WIDTH / width; + width = CONST.MAX_WIDTH; + } + } else { + if (height > CONST.MAX_HEIGHT) { + width *= CONST.MAX_HEIGHT / height; + height = CONST.MAX_HEIGHT; + } } - } - var canvas = document.createElement("canvas"); - canvas.width = width; - canvas.height = height; - var ctx = canvas.getContext("2d"); - ctx.drawImage(img, 0, 0, width, height); + var canvas = document.createElement("canvas"); + canvas.width = width; + canvas.height = height; + var ctx = canvas.getContext("2d"); + ctx.drawImage(event.target, 0, 0, canvas.width, canvas.height); + + var dataurl = canvas.toDataURL(); - var dataurl = canvas.toDataURL("image/png"); + resolve(dataurl); + }; - resolve(dataurl); - }, false); + img.src = event.target.result; + }; if (file) { reader.readAsDataURL(file); } else { - reject("Not a file"); + //reject("Not a file"); } }); } diff --git a/www/templates/home/home.html b/www/templates/home/home.html index e7e872c3fc8ebab5825e3b02b9c37a52498288cd..cfcc68448b04928ea4635e8f0ecdcb688fe4c760 100644 --- a/www/templates/home/home.html +++ b/www/templates/home/home.html @@ -17,7 +17,7 @@ class="button button-block button-stable button-raised icon icon-left ion-ios-world-outline ink-dark" ui-sref="app.currency_lookup" translate>HOME.BTN_CURRENCIES</button> <button type="button" - class="button button-block button-stable button-raised icon icon-left ion-locked ink-dark" + class="button button-block button-positive button-raised icon icon-left ion-locked ink-dark" ng-click="login()" ng-show="!isLogged()" translate>COMMON.BTN_LOGIN</button> <button type="button" class="button button-block button-light ink button-clear" diff --git a/www/templates/login.html b/www/templates/login.html index 1995951b8b5166e4356db75f77372c4084768259..183d43261f978714ccd837a8e92ecbb2311fd97e 100644 --- a/www/templates/login.html +++ b/www/templates/login.html @@ -1,4 +1,4 @@ -<ion-modal-view class="login"> +<ion-modal-view class="login modal slide-in-up ng-enter active ng-enter-active"> <ion-header-bar class="bar-positive"> <button class="button button-clear visible-xs" ng-click="cancelLogin()" translate>COMMON.BTN_CANCEL </button> @@ -8,6 +8,7 @@ <button class="button button-positive button-icon button-clear icon ion-android-done visible-xs" ng-click="doLogin()"> </button> </span></div> + </ion-header-bar> <ion-content > @@ -67,9 +68,9 @@ </div> <div class="padding hidden-xs text-right"> - <button class="button button-small button-clear button-dark ink" ng-click="cancelLogin()" type="button" translate>COMMON.BTN_CANCEL + <button class="button button-clear button-dark ink" ng-click="cancelLogin()" type="button" translate>COMMON.BTN_CANCEL </button> - <button class="button button-small button-positive ink" type="submit"> + <button class="button button-positive ink" type="submit"> {{'COMMON.BTN_LOGIN' | translate}} </button> </div> diff --git a/www/templates/market/edit_record.html b/www/templates/market/edit_record.html index c7578a80859c17faa6e6de386da413cf1941b8ef..70bf4cf751ee7e77cb6d5bde506155ef74e334b6 100644 --- a/www/templates/market/edit_record.html +++ b/www/templates/market/edit_record.html @@ -1,6 +1,6 @@ <ion-view view-title="{{'MARKET.EDIT.TITLE'|translate}}" left-buttons="leftButtons"> <ion-nav-buttons side="secondary"> - <button class="button button-clear button-icon icon" + <button class="button button-clear button-icon icon visible-xs visible-sm" ng-class="{'ion-android-send':!id, 'ion-android-done': id}" ng-click="save()"> </button> @@ -11,20 +11,20 @@ <div class="list gallery" ng-if="pictures && pictures.length>0" > <div ng-repeat="picture in pictures" class="item card card-gallery"> - <div class="ink"> - <h2>{{picture.title}}</h2> + <div> + <h2 ng-if="picture.title">{{picture.title}}</h2> <img ng-src="{{picture.src}}" ></img> </div> <div class="item tabs tabs-secondary tabs-icon-left"> <a class="tab-item stable-bg assertive-900" ng-click="removePicture($index)"> <i class="icon ion-close"></i> - Delete + {{'COMMON.BTN_PICTURE_DELETE'|translate}} </a> <a class="tab-item stable-bg" ng-click="favoritePicture($index)" ng-class="{'dark': $index !== 0, 'positive-900': $index === 0}"> <i class="icon ion-star"></i> - Default + {{'COMMON.BTN_PICTURE_FAVORISE'|translate}} </a> </div> </div> @@ -95,8 +95,22 @@ </div> </div> - <div class="scroll-bar scroll-bar-v"></div> + + <div class="padding hidden-xs hidden-sm text-right"> + <button class="button button-clear button-dark ink" ng-click="goBack()" type="button" translate>COMMON.BTN_CANCEL + </button> + <!--<button class="button button-small button-stable ink" ng-click="saveAsDirty()">--> + <!--{{'MARKET.EDIT.BTN_SAVE' | translate}}--> + <!--</button>--> + <button class="button button-positive button-raised ink" ng-click="save()" ng-show="!id"> + {{'MARKET.EDIT.BTN_PUBLISH' | translate}} + </button> + <button class="button button-positive button-raised ink" ng-click="save()" ng-show="id"> + {{'MARKET.EDIT.BTN_SAVE' | translate}} + </button> + </div> </div> + <div class="scroll-bar scroll-bar-v"></div> </ion-content> diff --git a/www/templates/market/lookup.html b/www/templates/market/lookup.html index ec3018f284bfbe53894d52d11d4d097a2fe539fa..690b7bb05ab2bd08788710f3892c2c2dd1c71a3a 100644 --- a/www/templates/market/lookup.html +++ b/www/templates/market/lookup.html @@ -7,6 +7,8 @@ </ion-nav-buttons> <ion-content class="lookupForm padding no-padding-xs"> + + <form ng-submit="doSearch()"> <label class="item item-input"> <i class="icon ion-search placeholder-icon"></i> @@ -55,24 +57,34 @@ </span> </form> + <div class="row no-padding"> + <div class="col"> + <h4 + ng-if="!search.looking && search.lastRecords && search.results.length > 0" translate> + MARKET.SEARCH.LAST_RECORDS + </h4> + <h4 + ng-if="!search.looking && !search.lastRecords && search.results.length > 0" translate> + MARKET.SEARCH.RESULTS + </h4> + </div> + + <div class="col col-25 hidden-xs hidden-sm padding" style="text-align:right"> + <button class="button button-raised button-full button-calm ink" + ui-sref="app.market_add_record"> + {{'MARKET.COMMON.BTN_NEW_AD' | translate}} + </button> + </div> + </div> + <label class="center" ng-if="search.looking"> <ion-spinner icon="android"></ion-spinner> </label> - <h4 - ng-if="!search.looking && search.lastRecords && search.results.length > 0" translate> - MARKET.SEARCH.LAST_RECORDS - </h4> - <h4 - ng-if="!search.looking && !search.lastRecords && search.results.length > 0" translate> - MARKET.SEARCH.RESULTS - </h4> - - <label class="center assertive animate-fade-slide-in-right" ng-if="!search.looking && search.results.length==0 && search.options != null" translate> + <label class="center assertive animate-fade-slide-in-right" ng-if="!search.looking && search.results.length===0 && search.options != null" translate> COMMON.SEARCH_NO_RESULT </label> - <div class="list animate-fade-slide-in-right" ng-if="!search.looking && search.results && search.results.length > 0"> @@ -95,9 +107,9 @@ </span> </h4> </div> - <div class="visible-xs item-text-wrap"> + <!--<div class="visible-xs item-text-wrap"> <p ng-bind-html="found.description"></p> - </div> + </div>--> <div class="row row-record hidden-xs"> <div class="col item-text-wrap item-thumbnail-left-padding" @@ -128,4 +140,8 @@ </div> </ion-content> + + <button class="button button-fab button-fab-bottom-right button-assertive icon ion-plus hidden-md hidden-lg" + ui-sref="app.market_add_record"> + </button> </ion-view> diff --git a/www/templates/registry/edit_record.html b/www/templates/registry/edit_record.html index 85603007822c59cd10ba45774bc31bff807ef346..4d6e3f5f65204f3d7959fea8f54d27fcee9ad097 100644 --- a/www/templates/registry/edit_record.html +++ b/www/templates/registry/edit_record.html @@ -11,6 +11,17 @@ <ng-include src="'templates/registry/record_form.html'"></ng-include> <div class="scroll-bar scroll-bar-v"></div> </div> + + <div class="padding hidden-xs hidden-sm text-right"> + <button class="button button-clear button-dark ink" ng-click="goBack()" type="button" translate>COMMON.BTN_CANCEL + </button> + <button class="button button-positive button-raised ink" ng-click="save()" ng-show="!id"> + {{'REGISTRY.EDIT.BTN_PUBLISH' | translate}} + </button> + <button class="button button-positive button-raised ink" ng-click="save()" ng-show="id"> + {{'REGISTRY.EDIT.BTN_SAVE' | translate}} + </button> + </div> </ion-content> diff --git a/www/templates/registry/lookup.html b/www/templates/registry/lookup.html index 6edf7ee2dbb3cb316643dd4312014446d8bfe0f5..3a61054bf88881704fceb62f1a0699b21eafaca9 100644 --- a/www/templates/registry/lookup.html +++ b/www/templates/registry/lookup.html @@ -1,12 +1,13 @@ <ion-view view-title="{{'REGISTRY.SEARCH.TITLE'|translate}}" left-buttons="leftButtons"> <ion-nav-buttons side="secondary"> - <button class="button button-positive button-icon button-clear visible-xs" + <!--<button class="button button-positive button-icon button-clear visible-xs" ng-click="newRecord()"> <i class="icon ion-plus"></i> - </button> + </button>--> </ion-nav-buttons> <ion-content class="lookupForm padding no-padding-xs"> + <form ng-submit="doSearch()"/> <label class="item item-input"> <i class="icon ion-search placeholder-icon"></i> @@ -47,37 +48,52 @@ </form> - <label class="center" ng-if="search.looking"> - <ion-spinner icon="android"></ion-spinner> - </label> + <div class="row no-padding"> + <div class="col"> + <h4 + ng-if="!search.looking && search.lastRecords && search.results.length > 0" translate> + REGISTRY.SEARCH.LAST_RECORDS + </h4> + <h4 + ng-if="!search.looking && !search.lastRecords && search.results.length > 0" translate> + REGISTRY.SEARCH.RESULTS + </h4> + </div> + + <div class="col col-25 hidden-xs hidden-sm" style="text-align:right"> + <button class="button button-full button-raised button-calm ink" + ng-click="newRecord()"> + {{'REGISTRY.COMMON.BTN_NEW' | translate}} + </button> + </div> + </div> - <h4 - ng-if="!search.looking && search.lastRecords && search.results.length > 0" translate> - REGISTRY.SEARCH.LAST_RECORDS - </h4> - <h4 - ng-if="!search.looking && !search.lastRecords && search.results.length > 0" translate> - REGISTRY.SEARCH.RESULTS - </h4> + <label class="center" ng-if="search.looking"> + <ion-spinner icon="android"></ion-spinner> + </label> - <label class="center assertive animate-fade-slide-in-right" ng-if="!search.looking && search.results.length==0 && search.options != null" translate> - COMMON.SEARCH_NO_RESULT - </label> + <label class="center assertive animate-fade-slide-in-right" ng-if="!search.looking && search.results.length===0 && search.options != null" translate> + COMMON.SEARCH_NO_RESULT + </label> - <div class="list animate-fade-slide-in-right" - ng-if="!search.looking && search.results && search.results.length > 0"> + <div class="list animate-fade-slide-in-right" + ng-if="!search.looking && search.results && search.results.length > 0"> - <a ng-repeat="found in search.results" - class="item item-avatar ink" - ui-sref="app.registry_view_record({id: found.id, title: found.title})"> + <a ng-repeat="found in search.results" + class="item item-avatar ink" + ui-sref="app.registry_view_record({id: found.id, title: found.title})"> - <img ng-src="{{found.pictures[0].src}}" ng-if="found.pictures && found.pictures.length > 0"> - <h2 class="item-text-wrap" ng-bind-html="found.title"></h2> - <h4 class="gray" ng-bind="found.location" ng-if="found.location"></h4> - <p class="gray item-text-wrap" ng-bind-html="found.description" ng-if="found.description"></p> - <span class="badge" ng-if="!found.isCompany">{{found.issuer | formatPubkey}}</span> - </a> + <img ng-src="{{found.pictures[0].src}}" ng-if="found.pictures && found.pictures.length > 0"> + <h2 class="item-text-wrap" ng-bind-html="found.title"></h2> + <h4 class="gray" ng-bind="found.location" ng-if="found.location"></h4> + <p class="gray item-text-wrap" ng-bind-html="found.description" ng-if="found.description"></p> + <span class="badge" ng-if="!found.isCompany">{{found.issuer | formatPubkey}}</span> + </a> - </div> + </div> </ion-content> + + <button class="button button-fab button-fab-bottom-right button-assertive icon ion-plus hidden-md hidden-lg" + ng-click="newRecord()"> + </button> </ion-view> diff --git a/www/templates/registry/new_record_wizard.html b/www/templates/registry/new_record_wizard.html index 0025ceccf34d35794da0f788c341a65129938f38..7ea08c9251345833e1e9b2692f62de49ced6bba2 100644 --- a/www/templates/registry/new_record_wizard.html +++ b/www/templates/registry/new_record_wizard.html @@ -1,4 +1,4 @@ -<ion-view class="modal slide-in-up ng-enter active ng-enter-active"> +<ion-modal-view class="modal slide-in-up ng-enter active ng-enter-active"> <ion-header-bar class="bar-positive"> @@ -28,7 +28,7 @@ </ion-content> </ion-slide-page> </ion-slides> -</ion-view> +</ion-modal-view> <script type="text/ng-template" id="error-messages"> <div class="error" ng-message="required"> diff --git a/www/templates/registry/record_form.html b/www/templates/registry/record_form.html index 30c05570cb772f044a8affe1be4ab2b772977f71..f58dd1ad0a44ccee73a47741f127b62f1bd2ff1c 100644 --- a/www/templates/registry/record_form.html +++ b/www/templates/registry/record_form.html @@ -5,16 +5,20 @@ <div class="list gallery" ng-if="pictures && pictures.length>0" > <div ng-repeat="picture in pictures" class="item card card-gallery"> - <div class="ink"> - <img ng-src="{{picture.src}}" ng-if="!picture.loading"></img> - <ion-spinner icon="android" ng-if="picture.loading"></ion-spinner> + <div> + <h2 ng-if="picture.title">{{picture.title}}</h2> + <img ng-src="{{picture.src}}" ></img> </div> <div class="item tabs tabs-secondary tabs-icon-left"> <a class="tab-item stable-bg assertive-900" ng-click="removePicture($index)"> <i class="icon ion-close"></i> - Delete + {{'COMMON.BTN_PICTURE_DELETE'|translate}} </a> - <a class="tab-item stable-bg"> + <a class="tab-item stable-bg" + ng-click="favoritePicture($index)" + ng-class="{'dark': $index !== 0, 'positive-900': $index === 0}"> + <i class="icon ion-star"></i> + {{'COMMON.BTN_PICTURE_FAVORISE'|translate}} </a> </div> </div> diff --git a/www/templates/wallet/modal_transfer.html b/www/templates/wallet/modal_transfer.html index 31c4d2c8a7c48dd13015ea2a30c9a04eed88e55c..33be62b291e2fd11b924a8c75f4ba914b4064843 100644 --- a/www/templates/wallet/modal_transfer.html +++ b/www/templates/wallet/modal_transfer.html @@ -6,7 +6,10 @@ </button> </ion-header-bar> - <ion-content scroll="false"> - <ng-include src="'templates/wallet/transfer_form.html'"></ng-include> + <ion-content scroll="true"> + <!--<div class="scroll">--> + <ng-include src="'templates/wallet/transfer_form.html'"></ng-include> + + <!--</div> --> </ion-content> </ion-modal-view>