Commit fa66af21 authored by Benoit Lavenier's avatar Benoit Lavenier

[fix] Do not try to login using empty credentials, when creating new page - fix #50

parent 741a1fcd
......@@ -653,7 +653,15 @@ function ESRegistryLookupController($scope, $focus, $timeout, $filter, $controll
$scope.showNewPageModal = function() {
$scope.hidePopovers();
return esModals.showNewPage();
return $scope.loadWallet()
.then(function(walletData) {
UIUtils.loading.hide();
if (walletData) {
return esModals.showNewPage();
}
});
};
/* -- popovers -- */
......
......@@ -43,19 +43,16 @@ angular.module('cesium.es.modal.services', ['cesium.modal.services', 'cesium.es.
}
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});
}
});
});
// Fix #50 - avoid to login and fake account, when creating a new page
//return csWallet.login({minData: true})
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 {
......
......@@ -136,7 +136,8 @@ angular.module('cesium.es.settings.services', ['cesium.services', 'cesium.es.htt
var settings = JSON.parse(json || '{}');
settings.time = record.time;
console.debug('[ES] [settings] Loaded user settings in '+ (new Date().getTime()-now) +'ms');
console.debug(settings);
//console.debug(settings);
return settings;
})
// if error: skip stored content
......
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