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

- Network/block list: add search button (link to ES blockchain search)

- Block screen: fix TX input/output alignment
parent a1bd2e82
No related branches found
No related tags found
No related merge requests found
......@@ -635,6 +635,7 @@ $screen-menu: 845px;
.button-text.button-small {
@extend .button-small;
padding: 5px 2px;
font-size: 12px !important;
}
.button-text-positive {
......
......@@ -14135,7 +14135,8 @@ a {
font-size: 12px; }
 
.button-text.button-small {
padding: 5px 2px; }
padding: 5px 2px;
font-size: 12px !important; }
 
.button-text-positive {
color: #387ef5 !important; }
......
This diff is collapsed.
......@@ -125,6 +125,7 @@
<script src="dist/dist_js/plugins/es/js/controllers/message-controllers.js"></script>
<script src="dist/dist_js/plugins/es/js/controllers/notification-controllers.js"></script>
<script src="dist/dist_js/plugins/es/js/controllers/blockchain-controllers.js"></script>
<script src="dist/dist_js/plugins/es/js/controllers/network-controllers.js"></script>
<!--endRemoveIf(no-plugin)-->
......
......@@ -9,7 +9,7 @@ function Block(json) {
/*Object.keys(json).forEach(function (key) {
that[key] = json[key];
});*/
["currency", "issuer", "medianTime", "number", "dividend", "membersCount", "hash", "identities", "joiners", "actives", "leavers", "revoked", "excluded", "certifications", "transactions"].forEach(function (key) {
["currency", "issuer", "medianTime", "number", "version", "powMin", "dividend", "membersCount", "hash", "identities", "joiners", "actives", "leavers", "revoked", "excluded", "certifications", "transactions"].forEach(function (key) {
that[key] = json[key];
});
......
angular.module('cesium.es.blockchain.controllers', ['cesium.es.services'])
.config(function($stateProvider) {
.config(function($stateProvider, PluginServiceProvider, csConfig) {
'ngInject';
$stateProvider
......@@ -26,11 +26,28 @@ angular.module('cesium.es.blockchain.controllers', ['cesium.es.services'])
}
})
;
var enable = csConfig.plugins && csConfig.plugins.es;
if (enable) {
PluginServiceProvider.extendState('app.network', {
points: {
'buttons': {
templateUrl: "plugins/es/templates/blockchain/view_network_extend.html",
controller: 'ESNetworkViewCtrl'
}
}
})
;
}
})
.controller('ESBlockLookupCtrl', ESBlockLookupController)
.controller('ESNetworkViewExtendCtrl', ESNetworkViewExtendController)
;
......@@ -142,3 +159,9 @@ function ESBlockLookupController($scope, $timeout, $focus, $filter, $state, $anc
};
}
function ESNetworkViewExtendController($scope, PluginService) {
'ngInject';
$scope.extensionPoint = PluginService.extensions.points.current.get();
}
angular.module('cesium.es.network.controllers', ['cesium.es.services'])
.config(function(PluginServiceProvider, csConfig) {
'ngInject';
var enable = csConfig.plugins && csConfig.plugins.es;
if (enable) {
PluginServiceProvider.extendState('app.network', {
points: {
'buttons': {
templateUrl: "plugins/es/templates/network/view_network_extend.html",
controller: 'ESNetworkViewExtendCtrl'
}
}
})
;
}
})
.controller('ESNetworkViewExtendCtrl', ESNetworkViewExtendController)
;
function ESNetworkViewExtendController($scope, PluginService, csSettings) {
'ngInject';
$scope.extensionPoint = PluginService.extensions.points.current.get();
$scope.updateView = function() {
$scope.enable = csSettings.data.plugins && csSettings.data.plugins.es ?
csSettings.data.plugins.es.enable :
!!csSettings.data.plugins.host;
};
csSettings.api.data.on.changed($scope, function() {
$scope.updateView();
});
$scope.updateView();
}
......@@ -10,6 +10,7 @@ angular.module('cesium.es.plugin', [
'cesium.es.user.controllers',
'cesium.es.message.controllers',
'cesium.es.notification.controllers',
'cesium.es.blockchain.controllers'
'cesium.es.blockchain.controllers',
'cesium.es.network.controllers'
])
;
<!-- Buttons section -->
<ng-if ng-if="enable && extensionPoint === 'buttons'">
<a class="button button-text button-small ink"
ui-sref="app.blockchain_search" >
<i class="icon ion-android-search"></i>
<span>{{'COMMON.BTN_SEARCH'|translate}}</span>
</a>
</ng-if>
......@@ -10,7 +10,13 @@
<b class="ion-arrow-up-b" style="position: absolute; top: 10px; left: 4px; font-size: 8px;"></b>
<span>{{'BLOCKCHAIN.LOOKUP.BTN_COMPACT'|translate}}</span>
</a>
<!-- Allow extension here -->
<cs-extension-point name="buttons"></cs-extension-point>
</div>
</div>
<div class="text-center" ng-if="search.loading">
......
......@@ -278,7 +278,7 @@
<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 col-center no-padding list">
<div class="col col-40 col-center no-padding list no-margin">
<div ng-repeat="identity in ::tx.issuers" class="item no-padding item-small-height">
<ng-include src="'templates/blockchain/link_identity.html'"></ng-include>
</div>
......@@ -287,10 +287,9 @@
<h2><i class="icon ion-arrow-right-a"></i></h2>
</div>
<!-- recipients -->
<div class="col no-padding padding-right no-padding-xs col-text-wrap list">
<div class="col no-padding padding-right no-padding-xs col-text-wrap list no-margin">
<div ng-repeat="output in ::tx.outputs" class="item no-padding item-small-height">
<ng-include src="'templates/blockchain/link_identity.html'" onload="identity=output"></ng-include>
<br/>
<span class="badge badge-balanced"
ng-bind-html="::output.amount | formatAmount:{currency: formData.currency, useRelative: false} "></span>
</div>
......
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