Commit 356acd67 authored by Benoit Lavenier's avatar Benoit Lavenier

[enh] Add registry (pages)

[enh] Home: change background page randomly
parent 6eb394e9
......@@ -16,15 +16,19 @@ $balanced-active: #80e09b !default;
background-color: $dark-balanced !important;
}
.bg-image-cover {
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
//filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../img/background.jpg', sizingMethod='scale');
//-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../img/background.jpg', sizingMethod='scale')";
}
#home {
ion-content {
background: url(../img/background.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../img/background.jpg', sizingMethod='scale');
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../img/background.jpg', sizingMethod='scale')";
z-index: 0;
}
......
......@@ -102,14 +102,14 @@
"DEVELOPERS": "Développé par :",
"FORUM": "Forum :",
"DEV_WARNING": "Avertissement",
"DEV_WARNING_MESSAGE": "Cette application n'est pas encore stabilisée (développement en cours).<br/>N'hésitez pas à nous remonter les anomalies rencontrées !",
"DEV_WARNING_MESSAGE_SHORT": "Cette App n'est pas encore stabilisée (développement en cours).",
"DEV_WARNING_MESSAGE": "Cette application est toujours en développement.<br/>N'hésitez pas à nous remonter les anomalies rencontrées !",
"DEV_WARNING_MESSAGE_SHORT": "Cette application est toujours en développement.",
"REPORT_ISSUE": "Remonter un problème"
},
"HOME": {
"TITLE": "Cesium",
"MESSAGE": "Bienvenue dans l'application {{'COMMON.APP_NAME'|translate}}.",
"MESSAGE_CURRENCY": "Faites des échanges en monnaie libre {{currency|abbreviate}} !",
"MESSAGE": "Bienvenue sur {{'COMMON.APP_NAME'|translate}} !",
"MESSAGE_CURRENCY": "Échanger en {{currency|abbreviate}} devient... juste simple !",
"BTN_CURRENCY": "Explorer la monnaie {{name|abbreviate}}",
"BTN_ABOUT": "à propos",
"BTN_HELP": "Aide en ligne",
......
......@@ -43,7 +43,7 @@ angular.module("cesium.config", [])
}
},
"version": "0.6.4",
"build": "2017-12-04T16:11:26.513Z",
"build": "2017-12-22T14:01:55.995Z",
"newIssueUrl": "https://github.com/duniter-gchange/gchange-client/issues/new?labels=bug"
})
......
......@@ -45,9 +45,9 @@ angular.module('cesium.app.controllers', ['cesium.services'])
.controller('AppCtrl', AppController)
.controller('HomeCtrl', HomeController)
.controller('HomeCtrl', HomeController)
.controller('PluginExtensionPointCtrl', PluginExtensionPointController)
.controller('PluginExtensionPointCtrl', PluginExtensionPointController)
.controller('EmptyModalCtrl', EmptyModalController)
......@@ -442,8 +442,47 @@ function AppController($scope, $rootScope, $state, $ionicSideMenuDelegate, $q, $
function HomeController($scope, $state, $timeout, $ionicHistory, csPlatform, csCurrency) {
'ngInject';
$scope.loading = true;
function getRandomImage() {
var imageCountByKind = {
'service': 13,
'spring': 7,
'summer': 11,
'autumn': 7,
'winter': 5
};
var kind;
// Or landscape
if (Math.random() < 0.5) {
kind = 'service';
}
else {
var day = moment().format('D');
var month = moment().format('M');
if ((month < 3) || (month == 3 && day < 21) || (month == 12 && day >= 21)) {
kind = 'winter'
}
else if ((month == 3 && day >= 21) || (month < 6) || (month == 6 && day < 21)) {
kind = 'spring'
}
else if ((month == 6 && day >= 21) || (month < 9) || (month == 9 && day < 21)) {
kind = 'summer'
}
else {
kind = 'autumn'
}
}
var imageCount = imageCountByKind[kind];
var imageIndex = Math.floor(Math.random()*imageCount)+1;
console.log(kind, imageIndex);
return './img/bg/{0}-{1}.jpg'.format(kind, imageIndex);
}
$scope.bgImage = getRandomImage();
$scope.enter = function(e, state) {
if (state && state.stateParams && state.stateParams.error) { // Query parameter
$scope.error = state.stateParams.error;
......
......@@ -45,6 +45,7 @@ angular.module('cesium.wallet.services', ['ngApi', 'ngFileSaver', 'cesium.bma.se
data.isMember = false;
data.events = [];
resetKeypair();
resetTxAndSources();
started = false;
......@@ -61,10 +62,17 @@ angular.module('cesium.wallet.services', ['ngApi', 'ngFileSaver', 'cesium.bma.se
}
},
resetKeypair = function(){
data.keypair = {
signSk: null,
signPk: null
};
},
resetTxAndSources = function(){
// reset sources data
data.sources = [];
data.sourcesIndexByKey = {};
data.sources = undefined;
data.sourcesIndexByKey = undefined;
data.balance = 0;
// reset TX data
data.tx = data.tx || {};
......@@ -84,6 +92,8 @@ angular.module('cesium.wallet.services', ['ngApi', 'ngFileSaver', 'cesium.bma.se
},
addSources = function(sources) {
data.sources = data.sources || [];
data.sourcesIndexByKey = data.sourcesIndexByKey || {};
_(sources).forEach(function(src) {
addSource(src, data.sources, data.sourcesIndexByKey);
});
......@@ -143,15 +153,32 @@ angular.module('cesium.wallet.services', ['ngApi', 'ngFileSaver', 'cesium.bma.se
return !!data.pubkey && data.requirements && !data.requirements.needSelf;
},
isDataLoaded = function(options) {
if (options && options.minData) return data.loaded;
return data.loaded; // && data.sources; -- Gchange not use sources
},
isNeverUsed = function() {
if (!data.loaded) return undefined; // undefined if not full loaded
return !data.pubkey ||
(!data.isMember &&
(!data.requirements || (!data.requirements.pendingMembership && !data.requirements.wasMember)) &&
!data.tx.history.length &&
!data.tx.pendings.length);
return !data.pubkey || !(
// Check registration
data.isMember ||
data.requirements.pendingMembership ||
!data.requirements.needSelf ||
data.requirements.wasMember ||
// Check TX history
data.tx.history.length ||
data.tx.pendings.length ||
// Check extended data (name+avatar)
data.name ||
data.avatar
);
},
isNew = function() {return !!data.isNew;},
// If connected and same pubkey
isUserPubkey = function(pubkey) {
return isLogin() && data.pubkey === pubkey;
......@@ -161,11 +188,6 @@ angular.module('cesium.wallet.services', ['ngApi', 'ngFileSaver', 'cesium.bma.se
if (csSettings.data.useLocalStorage) {
if (isLogin() && csSettings.data.rememberMe) {
// FIXME: #372
/*var dataToStore = {
pubkey: data.pubkey,
uid: data.uid
};*/
var dataToStore = {
keypair: data.keypair,
......@@ -399,6 +421,10 @@ angular.module('cesium.wallet.services', ['ngApi', 'ngFileSaver', 'cesium.bma.se
if (data.requirements.pendingMembership) {
addEvent({type:'pending', message: 'ACCOUNT.WAITING_MEMBERSHIP', context: 'requirements'});
}
// If user has send a SELF, ask for membership - fix #625
else if (!data.requirements.needSelf && data.requirements.needMembership){
addEvent({type:'warn', message: 'ACCOUNT.NO_WAITING_MEMBERSHIP', context: 'requirements'});
}
if (data.requirements.needCertificationCount > 0) {
addEvent({type:'warn', message: 'ACCOUNT.WAITING_CERTIFICATIONS', messageParams: data.requirements, context: 'requirements'});
}
......@@ -1447,6 +1473,7 @@ angular.module('cesium.wallet.services', ['ngApi', 'ngFileSaver', 'cesium.bma.se
logout: logout,
isLogin: isLogin,
hasSelf: hasSelf,
isDataLoaded: isDataLoaded,
isNeverUsed: isNeverUsed,
isNew: function() {return !!data.isNew;},
isUserPubkey: isUserPubkey,
......
......@@ -168,6 +168,25 @@
padding-bottom: 8px;
}
/**********
Page view
**********/
/* set 'ion-refresher' background color */
.view-page ion-content.refresher-top-bg:before {
background-color: #f8f8f8 !important;
height: 200px;
}
.view-page .hero {
background-color: #f8f8f8 !important;
}
.view-page .hero .content i.avatar {
border: 1px solid grey;
color: grey !important;
}
/**********
Location search modal
......@@ -212,77 +231,54 @@
}
/**
* Pictures slider
*/
.buttons-block {
display: block;
height: 57px;
}
.modal-pictures {
width: 100% !important;
height: 100%;
top: 0 !important;
left: 0 !important;
background: rgba(0,0,0,0.7);
}
.modal-pictures .transparent {
background: transparent;
}
/**********
Add specific Icons
**********/
.modal-pictures .slider-slide {
background: transparent;
/* Association */
.cion-page-association:before {
font-family: "Ionicons";
content: "\f212";
}
.ion-page-association:before {
font-family: "Ionicons";
content: "\f212";
}
/* institution */
.cion-page-company:before {
font-family: "Cesiumicons";
content: "\e903";
}
.ion-page-company:before {
font-family: "Cesiumicons";
content: "\e903";
}
.modal-pictures .slider {
width: 100%;
height: 100%;
/* institution */
.cion-page-institution:before {
font-family: "Cesiumicons";
content: "\e921";
}
.ion-page-institution:before {
font-family: "Cesiumicons";
content: "\e921";
}
.modal-pictures .image {
width: 100%;
height: 600px;
background-size: contain;
background-repeat: no-repeat;
background-position: center, center;
}
@media screen and (min-width: 768px) {
.modal-pictures .image {
height: 800px;
}
.modal-pictures .bar.bar-header {
height: 80px;
box-shadow: none;
border: 0;
}
.modal-pictures .bar.bar-header h1.title{
margin-top: 20px;
font-size: 35pt;
}
.modal-pictures .bar.bar-header h2{
font-size: 28pt;
}
.modal-pictures .has-header {
top: 80px;
}
.modal-pictures .badge.badge-secondary {
font-size: 20px;
font-style: italic;
top: 90px !important;
}
.modal-pictures .item {
height: 110px;
padding: 0;
}
.modal-pictures .item h1 {
font-size: 45px !important;
line-height: 100px;
height: 110px;
margin: 0;
}
/* shop */
.cion-page-shop:before {
font-family: "Ionicons";
content: "\f110";
}
.ion-page-shop:before {
font-family: "Ionicons";
content: "\f110";
}
......@@ -315,9 +315,7 @@
"UPDATE_REPLY_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has modified his answer to your comment, on the referencing: <b>{{params[2]}}</b>"
}
},
"ES_HTTP": {
"ERROR": {
"MAX_UPLOAD_BODY_SIZE": "The volume of data to be sent exceeds the limit set by the server.<br/><br/>Please try again after, for example, deleting photos."
}
"ERROR": {
"ES_MAX_UPLOAD_BODY_SIZE": "The volume of data to be sent exceeds the limit set by the server.<br/><br/>Please try again after, for example, deleting photos."
}
}
......@@ -315,9 +315,7 @@
"UPDATE_REPLY_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> has modified his answer to your comment, on the referencing: <b>{{params[2]}}</b>"
}
},
"ES_HTTP": {
"ERROR": {
"MAX_UPLOAD_BODY_SIZE": "The volume of data to be sent exceeds the limit set by the server.<br/><br/>Please try again after, for example, deleting photos."
}
"ERROR": {
"ES_MAX_UPLOAD_BODY_SIZE": "The volume of data to be sent exceeds the limit set by the server.<br/><br/>Please try again after, for example, deleting photos."
}
}
......@@ -332,9 +332,7 @@
"UPDATE_REPLY_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> ha modificado la repuesta a su comentario sobre el referencia : <b>{{params[2]}}</b>"
}
},
"ES_HTTP": {
"ERROR": {
"MAX_UPLOAD_BODY_SIZE": "El volumen de datos a enviar excede el límite establecido por el servidor.<br/><br/>Por favor, inténtelo de nuevo después, por ejemplo, borrando fotos."
}
"ERROR": {
"ES_MAX_UPLOAD_BODY_SIZE": "El volumen de datos a enviar excede el límite establecido por el servidor.<br/><br/>Por favor, inténtelo de nuevo después, por ejemplo, borrando fotos."
}
}
......@@ -20,7 +20,7 @@
}
},
"MENU": {
"REGISTRY": "Professionnels",
"REGISTRY": "Pages",
"USER_PROFILE": "Mon profil",
"MESSAGES": "Messages",
"NOTIFICATIONS": "Notifications",
......@@ -50,6 +50,11 @@
"TITLE": "Demander des certifications",
"HELP": "Sélectionner les destinataires"
},
"SEARCH": {
"DIVIDER_PROFILE": "Comptes",
"DIVIDER_PAGE": "Pages",
"DIVIDER_GROUP": "Groupes"
},
"CONFIRM": {
"SUGGEST_CERTIFICATIONS": "Etes-vous sûr de vouloir <b>envoyer ces suggestions de certification</b> ?",
"ASK_CERTIFICATION": "Etes-vous sûr de vouloir <b>envoyer une demande de certification</b> ?",
......@@ -111,7 +116,8 @@
"TITLE": "Message",
"SENDER": "Envoyé par",
"RECIPIENT": "Envoyé à",
"NO_CONTENT": "Message vide"
"NO_CONTENT": "Message vide",
"DELETE": "Supprimer le message"
},
"CONFIRM": {
"REMOVE": "Êtes-vous sûr de vouloir <b>supprimer ce message</b> ?<br/><br/>Cette opération est irréversible.",
......@@ -146,18 +152,31 @@
"LOCATION_DIVIDER": "Adresse",
"SOCIAL_NETWORKS_DIVIDER": "Réseaux sociaux et site web",
"TECHNICAL_DIVIDER": "Informations techniques",
"BTN_SHOW_WOT": "Personnes",
"BTN_SHOW_WOT_HELP": "Rechercher des personnes",
"BTN_SHOW_PAGES": "Pages",
"BTN_SHOW_PAGES_HELP": "Rechercher des pages",
"BTN_NEW": "Créer une page",
"MY_PAGES": "Mes pages",
"NO_PAGE": "Aucune page",
"SEARCH": {
"TITLE": "Pages",
"TITLE_SMALL_DEVICE": "Pages",
"SEARCH_HELP": "Quoi, Qui : restaurant, Chez Marcel, ...",
"BTN_ADD": "Nouveau",
"BTN_LAST_RECORDS": "Pages récentes",
"BTN_ADVANCED_SEARCH": "Recherche avancée",
"BTN_OPTIONS": "Recherche avancée",
"TYPE": "Type de page",
"LOCATION": "Localisation",
"LOCATION_HELP": "Ville",
"LAST_RECORDS": "Derniers enregistrements :",
"RESULTS": "Résultats :"
"LOCATION_HELP": "Où : Ville, Code postal",
"RESULTS": "Résultats",
"RESULT_COUNT_LOCATION": "{{count}} résultat{{count>0?'s':''}}, près de {{location}}",
"RESULT_COUNT": "{{count}} résultat{{count>0?'s':''}}",
"LAST_RECORDS": "Pages récentes",
"LAST_RECORD_COUNT_LOCATION": "{{count}} page{{count>0?'s':''}} récente{{count>0?'s':''}}, près de {{location}}",
"LAST_RECORD_COUNT": "{{count}} page{{count>0?'s':''}} récente{{count>0?'s':''}}",
"POPOVER_FILTERS": {
"BTN_ADVANCED_SEARCH": "Options avancées ?"
}
},
"VIEW": {
"TITLE": "Annuaire",
......@@ -168,7 +187,7 @@
"REMOVE_CONFIRMATION" : "Êtes-vous sûr de vouloir supprimer cette page ?<br/><br/>Cette opération est irréversible."
},
"TYPE": {
"TITLE": "Nouvelle page",
"TITLE": "Types",
"SELECT_TYPE": "Type de page :",
"ENUM": {
"SHOP": "Commerce local",
......@@ -186,13 +205,17 @@
"RECORD_DESCRIPTION": "Description",
"RECORD_DESCRIPTION_HELP": "Description de l'activité",
"RECORD_ADDRESS": "Rue",
"RECORD_ADDRESS_HELP": "Adresse : rue, batiment...",
"RECORD_ADDRESS_HELP": "Rue, batiment...",
"RECORD_CITY": "Ville",
"RECORD_CITY_HELP": "Ville",
"RECORD_SOCIAL_NETWORKS": "Réseaux sociaux et site web",
"RECORD_PUBKEY": "Clé publique",
"RECORD_PUBKEY_HELP": "Clé publique de réception des paiements"
},
"WALLET": {
"REGISTRY_DIVIDER": "Pages",
"REGISTRY_HELP": "Les pages référencent des activités acceptant la monnaie ou la favorisant : commerces, entreprises, associations, institutions."
},
"ERROR": {
"LOAD_CATEGORY_FAILED": "Erreur de chargement de la liste des activités",
"LOAD_RECORD_FAILED": "Erreur lors du chargement de la page",
......@@ -209,6 +232,7 @@
},
"PROFILE": {
"PROFILE_DIVIDER": "Profil ğ<b>change</b>",
"PROFILE_DIVIDER_HELP": "Il s'agit de données annexes, stockées en dehors du réseau de la monnaie.",
"NO_PROFILE_DEFINED": "Aucun profil saisi",
"BTN_ADD": "Saisir mon profil",
"BTN_EDIT": "Editer mon profil",
......@@ -267,9 +291,41 @@
"ADDRESS_LOCATION_FAILED": "Impossible de récupérer la position à partir de l'adresse"
}
},
"DOCUMENT": {
"HASH": "Hash: ",
"LOOKUP": {
"TITLE": "Recherche de documents",
"BTN_ACTIONS": "Actions",
"SEARCH_HELP": "issuer:AAA*, time:1508406169",
"LAST_DOCUMENTS": "Derniers documents",
"SHOW_QUERY": "Voir la requête",
"HIDE_QUERY": "Masquer la requête",
"HEADER_TIME": "Date/Heure",
"HEADER_ISSUER": "Emetteur",
"HEADER_RECIPIENT": "Destinataire",
"READ": "Lu",
"BTN_REMOVE": "Supprimer ce document",
"POPOVER_ACTIONS": {
"TITLE": "Actions",
"REMOVE_ALL": "Supprimer ces documents..."
}
},
"INFO": {
"REMOVED": "Document supprimé"
},
"CONFIRM": {
"REMOVE": "Etes-vous sûr de vouloir <b>supprimer ce document</b> ?",
"REMOVE_ALL": "Etes-vous sûr de vouloir <b>supprimer ces documents</b> ?"
},
"ERROR": {
"REMOVE_FAILED": "Erreur lors de la suppression du document",
"REMOVE_ALL_FAILED": "Erreur lors de la suppression des documents"
}
},
"ES_SETTINGS": {
"PLUGIN_NAME": "Paramètres avancés",
"PLUGIN_NAME_HELP": "Filtrage des notifications, etc.",
"ENABLE_TOGGLE": "Activer l'extension ?",
"ENABLE_MESSAGE_TOGGLE": "Activer les messages privés ?",
"ENABLE_SETTINGS_TOGGLE": "Activer le stockage distant des paramètres ?",
"PEER": "Addresse du nœud de données",
......@@ -287,8 +343,8 @@
"ENABLE_CERT_RECEIVED": "Notifier les <b>certifications reçues</b> ?"
},
"CONFIRM": {
"ASK_ENABLE_TITLE": "Nouvelles fonctionnalités",
"ASK_ENABLE": "De nouvelles fonctionnalités sont disponibles : <ul><li>&nbsp;&nbsp;<b><i class=\"icon ion-person\"></i> Profils</b>;<li>&nbsp;&nbsp;<b><i class=\"icon ion-android-notifications\"></i> Notifications</b>;<li>&nbsp;&nbsp;<b><i class=\"icon ion-email\"></i> Messages privés</b>.</ul><br/>Elles ont été <b>désactivées</b> dans vos paramètres.<br/><br/><b>Souhaitez-vous les activer</b> ?"
"ASK_ENABLE_TITLE": "Fonctionnalités optionnelles",
"ASK_ENABLE": "L'extension Cesium+ est <b>désactivée</b> dans vos paramètres, rendant inactives les fonctionnalités : <ul><li>&nbsp;&nbsp;<b><i class=\"icon ion-person\"></i> Profils Cesium+</b>;<li>&nbsp;&nbsp;<b><i class=\"icon ion-android-notifications\"></i> Notifications</b>;<li>&nbsp;&nbsp;<b><i class=\"icon ion-email\"></i> Messages privés</b>.<li>&nbsp;&nbsp;<b><i class=\"icon ion-location\"></i> Cartes, etc.</b>.</ul><br/><b>Souhaitez-vous la ré-activer</b> l'extension ?"
}
},
"ES_WALLET": {
......@@ -318,9 +374,10 @@
"UPDATE_REPLY_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> a modifié sa réponse à votre commentaire sur le référencement : <b>{{params[2]}}</b>"
}
},
"ES_HTTP": {
"ERROR": {
"MAX_UPLOAD_BODY_SIZE": "Le volume des données à envoyer dépasse la limite fixée par le serveur.<br/>Veuillez ré-essayer après avoir, par exemple, supprimer des photos."
}
"CONFIRM": {
"ES_USE_FALLBACK_NODE": "Nœud de données <b>{{old}}</b> injoignable ou adresse invalide.<br/><br/>Voulez-vous temporairement utiliser le nœud de données <b>{{new}}</b> ?"
},
"ERROR": {
"ES_MAX_UPLOAD_BODY_SIZE": "Le volume des données à envoyer dépasse la limite fixée par le serveur.<br/>Veuillez ré-essayer après avoir, par exemple, supprimer des photos."
}
}
......@@ -246,7 +246,7 @@
"UPDATE_REPLY_COMMENT": "<span ng-class=\"{'gray': !notification.uid, 'positive':notification.uid }\"><i class=\"icon\" ng-class=\"{'ion-person': notification.uid, 'ion-key': !notification.uid}\"></i>&thinsp;{{name||uid||params[1]}}</span> heeft zijn/haar reactie op jouw commentaar bewerkt, op referentie: <b>{{params[2]}}</b>"
}
},
"ES_HTTP": {
"ERROR": {
}
}
......@@ -10,6 +10,7 @@ angular.module('cesium.es.plugin', [
'cesium.es.wallet.controllers',
'cesium.es.profile.controllers',
'cesium.es.message.controllers',
'cesium.es.notification.controllers'
'cesium.es.notification.controllers',
'cesium.es.registry.controllers'
])
;
......@@ -11,6 +11,7 @@ angular.module('cesium.es.services', [
'cesium.es.message.services',
'cesium.es.modal.services',
'cesium.es.wallet.services',
'cesium.es.geo.services'
'cesium.es.geo.services',
'cesium.es.registry.services'
])
;
......@@ -306,7 +306,7 @@ angular.module('cesium.es.http.services', ['ngResource', 'ngApi', 'cesium.servic
.catch(function(err) {
var bodyLength = that.byteCount(obj);
if (bodyLength > constants.MAX_UPLOAD_BODY_SIZE) {
throw {message: 'ES_HTTP.ERROR.MAX_UPLOAD_BODY_SIZE', length: bodyLength};
throw {message: 'ERROR.ES_MAX_UPLOAD_BODY_SIZE', length: bodyLength};
}
throw err;
});
......
angular.module('cesium.es.modal.services', ['cesium.modal.services', 'cesium.es.message.services'])
.factory('esModals', function(ModalUtils, UIUtils) {
.factory('esModals', function($state, ModalUtils, UIUtils, csWallet) {
'ngInject';
function showMessageCompose(parameters) {
......@@ -42,16 +42,27 @@ angular.module('cesium.es.modal.services', ['cesium.modal.services', 'cesium.es.
parameters);
}
function showPictures(parameters, options) {
return ModalUtils.show('plugins/es/templates/common/modal_pictures_slider.html', 'ESPicturesSliderModalCtrl',
parameters, options);
function showNewPage() {
return csWallet.login({minData: true})
.then(function() {
UIUtils.loading.hide();
return ModalUtils.show('plugins/es/templates/registry/modal_record_type.html', undefined, {
title: 'REGISTRY.EDIT.TITLE_NEW'
})
.then(function(type){
if (type) {
$state.go('app.registry_add_record', {type: type});
}
});
});
}
return {
showMessageCompose: showMessageCompose,
showNotifications: showNotificationsPopover,
showNewInvitation: showNewInvitation,
showPictures: showPictures
showNewPage: showNewPage
};
});
<ion-view left-buttons="leftButtons">
<ion-view left-buttons="leftButtons" class="view-page">
<ion-nav-title>