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

[fix] fix wot identity tx access

[fix] restore certification access (using a ng-click) - need for help tour
parent 7b636632
No related branches found
No related tags found
No related merge requests found
source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -458,6 +458,24 @@ function WalletController($scope, $rootScope, $q, $ionicPopup, $timeout, $state,
UIUtils.motion.toggleOn({selector: '#wallet #'+id+'.qrcode'}, timeout || 1100);
};
$scope.showCertifications = function() {
// Warn: do not use a simple link here (a ng-click is mandatory for help tour)
$state.go(UIUtils.screen.isSmall() ? 'app.wallet_cert' : 'app.wallet_cert_lg', {
pubkey: $scope.formData.pubkey,
uid: $scope.formData.name || $scope.formData.uid,
type: 'received'
});
};
$scope.showGivenCertifications = function() {
// Warn: do not use a simple link here (a ng-click is mandatory for help tour)
$state.go(UIUtils.screen.isSmall() ? 'app.wallet_cert' : 'app.wallet_cert_lg', {
pubkey: $scope.formData.pubkey,
uid: $scope.formData.name || $scope.formData.uid,
type: 'given'
});
};
$scope.showActionsPopover = function(event) {
if (!$scope.actionsPopover) {
$ionicPopover.fromTemplateUrl('templates/wallet/popover_actions.html', {
......
......@@ -812,6 +812,42 @@ function WotIdentityAbstractController($scope, $rootScope, $state, $translate, $
}
};
/* -- open screens -- */
$scope.showCertifications = function() {
// Warn: do not use a simple link here (a ng-click is mandatory for help tour)
if (UIUtils.screen.isSmall() ) {
$state.go('app.wot_cert', {
pubkey: $scope.formData.pubkey,
uid: $scope.formData.uid,
type: 'received'
});
}
else {
$state.go('app.wot_cert_lg', {
pubkey: $scope.formData.pubkey,
uid: $scope.formData.uid
});
}
};
$scope.showGivenCertifications = function() {
// Warn: do not use a simple link here (a ng-click is mandatory for help tour)
if (UIUtils.screen.isSmall() ) {
$state.go('app.wot_cert', {
pubkey: $scope.formData.pubkey,
uid: $scope.formData.uid,
type: 'given'
});
}
else {
$state.go('app.wot_cert_lg', {
pubkey: $scope.formData.pubkey,
uid: $scope.formData.uid
});
}
};
$scope.showSharePopover = function(event) {
var title = $scope.formData.name || $scope.formData.uid || $scope.formData.pubkey;
// Use rootPath (fix #390)
......@@ -920,12 +956,11 @@ function WotIdentityTxViewController($scope, $timeout, csSettings, $controller,
// Load account TX data
csTx.load($scope.pubkey)
.then(function(result) {
console.log(result); // Allow to discover data structure
if (result && result.tx && result.tx.history) {
$scope.tx = result.tx;
$scope.history = result.tx.history;
}
$scope.balance = result.balance;
if (result && result.tx && result.tx.history) {
$scope.tx = result.tx;
$scope.history = result.tx.history;
}
$scope.balance = result.balance;
$scope.load($scope.pubkey, true, $scope.uid)
.then(function(){
$scope.motion.show();
......@@ -940,9 +975,9 @@ function WotIdentityTxViewController($scope, $timeout, csSettings, $controller,
csTx.downloadHistoryFile($scope.pubkey, options);
};
//TODO : Manque l'actualisation des transaction + afficher plus/tout + bouton statistiques du compte
//TODO : Manque l'actualisation des transactions + afficher plus/tout + bouton statistiques du compte
};
}
/**
......
......@@ -77,20 +77,11 @@
<h4 class="gray" translate>WOT.NOT_MEMBER_ACCOUNT_HELP</h4>
</div>
<!-- Account transaction -->
<a class="item item-icon-left item-icon-right ink"
ng-if="!loading"
ui-sref="app.wot_identity_tx_uid({uid:formData.uid,pubkey:formData.pubkey})">
<i class="icon ion-card"></i>
<span translate>WOT.ACCOUNT_OPERATIONS</span>
<i class="gray icon ion-ios-arrow-right"></i>
</a>
<!-- Received certifications count -->
<a id="helptip-wot-view-certifications"
class="item item-icon-left item-text-wrap item-icon-right ink"
ng-if=":rebind:formData.hasSelf"
ui-sref="app.wot_cert({pubkey:formData.pubkey,uid:formData.uid, type:'received'})">
ng-click="showCertifications()">
<i class="icon ion-ribbon-b"></i>
<b ng-if=":rebind:formData.requirements.isSentry" class="ion-star icon-secondary" style="color: yellow; font-size: 16px; left: 25px; top: -7px;"></b>
<span translate>ACCOUNT.CERTIFICATION_COUNT</span>
......@@ -105,7 +96,7 @@
<!-- Signature stock -->
<a class="item item-icon-left item-text-wrap item-icon-right ink visible-xs visible-sm"
ng-if=":rebind:formData.hasSelf && formData.isMember"
ui-sref="app.wot_cert({pubkey:formData.pubkey,uid:formData.uid, type:'given'})">
ng-click="showGivenCertifications()">
<i class="icon ion-ribbon-a"></i>
<span translate>WOT.GIVEN_CERTIFICATIONS.SENT</span>
<cs-badge-given-certification identity="formData"
......@@ -122,6 +113,15 @@
<span class="badge badge-balanced">{{:rebind:formData.sigDate | formatFromNow}}</span>
</ion-item>
<!-- Account transaction -->
<a class="item item-icon-left item-icon-right ink"
ng-if="!loading"
ui-sref="app.wot_identity_tx_uid({uid:formData.uid,pubkey:formData.pubkey})">
<i class="icon ion-card"></i>
<span translate>WOT.ACCOUNT_OPERATIONS</span>
<i class="gray icon ion-ios-arrow-right"></i>
</a>
<div
class="item item-text-wrap item-icon-left item-wallet-event assertive"
ng-repeat="event in :rebind:formData.events | filter: {type: 'error'}">
......
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