From e2fda1b218d607921776307f8a4c32edaae6a216 Mon Sep 17 00:00:00 2001 From: blavenie <benoit.lavenier@e-is.pro> Date: Tue, 7 Feb 2017 16:19:56 +0100 Subject: [PATCH] JS Hint & HTML error --- www/js/controllers/blockchain-controllers.js | 2 +- www/js/entities/block.js | 16 ++++++++-------- www/templates/blockchain/view_block.html | 10 ++++------ 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/www/js/controllers/blockchain-controllers.js b/www/js/controllers/blockchain-controllers.js index 78ee1cdad..e74e5632a 100644 --- a/www/js/controllers/blockchain-controllers.js +++ b/www/js/controllers/blockchain-controllers.js @@ -205,7 +205,7 @@ function BlockLookupController($scope, $timeout, $focus, $filter, $state, $ancho return; } blocks = blocks.reduce(function(res, json){ - var block = new Block(json) + var block = new Block(json); block.cleanData(); // release arrays content return res.concat(block); }, []); diff --git a/www/js/entities/block.js b/www/js/entities/block.js index b145a6a97..f157ca10c 100644 --- a/www/js/entities/block.js +++ b/www/js/entities/block.js @@ -11,14 +11,14 @@ function Block(json) { }); - this.identitiesCount = this.identities ? this.identities.length : 0;; - this.joinersCount = this.joiners ? this.joiners.length : 0; - this.activesCount = this.actives ? this.actives.length : 0; - this.leaversCount = this.leavers ? this.leavers.length : 0; - this.revokedCount = this.revoked ? this.revoked.length : 0; - this.excludedCount = this.excluded ? this.excluded.length : 0; - this.certificationsCount = this.certifications ? this.certifications.length : 0; - this.transactionsCount = this.transactions ? this.transactions.length : 0; + that.identitiesCount = that.identities ? that.identities.length : 0; + that.joinersCount = that.joiners ? that.joiners.length : 0; + that.activesCount = that.actives ? that.actives.length : 0; + that.leaversCount = that.leavers ? that.leavers.length : 0; + that.revokedCount = that.revoked ? that.revoked.length : 0; + that.excludedCount = that.excluded ? that.excluded.length : 0; + that.certificationsCount = that.certifications ? that.certifications.length : 0; + that.transactionsCount = that.transactions ? that.transactions.length : 0; that.empty = that.isEmpty(); } diff --git a/www/templates/blockchain/view_block.html b/www/templates/blockchain/view_block.html index 522e8e4ca..f0cbc47a5 100644 --- a/www/templates/blockchain/view_block.html +++ b/www/templates/blockchain/view_block.html @@ -276,21 +276,19 @@ </ion-item> <div class="padding-bottom item-icon-left-padding item-icon-right-padding no-padding-xs" ng-if="formData.transactionsCount"> - <div ng-repeat="item in ::formData.transactions" + <div ng-repeat="tx in ::formData.transactions" class="item item-small-height item-border-large"> <div class="row no-padding" style="padding-top: 3px;"> <div class="col col-40 no-padding"> - <ng-repeat ng-repeat="identity in ::item.issuers" - ng-include="'/templates/blockchain/link_identity.html'" - </ng-repeat> + <ng-include ng-repeat="identity in ::tx.issuers" src="'/templates/blockchain/link_identity.html'"></ng-include> </div> <div class="col col-10 gray text-center no-padding"><i class="icon ion-arrow-right-a"></i></div> <!-- recipients --> <div class="col no-padding padding-right no-padding-xs col-text-wrap"> - <ng-repeat ng-repeat="output in ::item.outputs"> + <ng-repeat ng-repeat="output in ::tx.outputs"> <ng-include src="'/templates/blockchain/link_identity.html'" onload="identity=output"></ng-include> <span class="badge badge-balanced" - ng-bind-html="::output.amount | formatAmount:{currency: formData.currency, useRelative: false}"></span> + ng-bind-html="::output.amount | formatAmount:{currency: formData.currency, useRelative: false} "></span> </ng-repeat> </div> </div> -- GitLab