diff --git a/www/index.html b/www/index.html index 1ec716fed206d777fdfdd7f3b2a7aa96726313aa..cd60b90a02877fea5a398b600c4a7058a39d0c46 100644 --- a/www/index.html +++ b/www/index.html @@ -36,7 +36,9 @@ <script src="js/vendor/socket-io.js"></script> <script src="js/vendor/underscore.js"></script> <script src="js/vendor/qrcode.min.js"></script> + <!--removeIf(ubuntu)--> <!-- FIXME: issue #463 --> <script src="js/vendor/Chart.js"></script> + <!--endRemoveIf(ubuntu)--> <!-- ionic/angularjs js --> <script src="lib/ionic/js/ionic.bundle.js"></script> @@ -50,8 +52,10 @@ <script src="lib/ionic/js/angular/angular-bind-notifier.min.js"></script> <script src="lib/ionic/js/angular/angular-image-crop.js"></script> <script src="lib/ionic/js/angular/angular-file-saver.bundle.js"></script> - <script src="lib/ionic/js/angular/angular-chart.min.js"></script> <script src="lib/ionic/js/angular/angular-idle.js"></script> + <!--removeIf(ubuntu)--> <!-- FIXME: issue #463 --> + <script src="lib/ionic/js/angular/angular-chart.min.js"></script> + <!--endRemoveIf(ubuntu)--> <script src="js/vendor/base58.js" async></script> <!--removeIf(android)--> @@ -157,7 +161,9 @@ <script src="dist/dist_js/plugins/es/js/controllers/invitation-controllers.js"></script> <script src="dist/dist_js/plugins/es/js/controllers/subscription-controllers.js"></script> + <!-- Graph plugin --> + <!--removeIf(ubuntu)--> <!-- FIXME: issue #463 --> <script src="dist/dist_js/plugins/graph/js/plugin.js"></script> <script src="dist/dist_js/plugins/graph/js/services.js"></script> <script src="dist/dist_js/plugins/graph/js/services/data-services.js"></script> @@ -167,6 +173,7 @@ <script src="dist/dist_js/plugins/graph/js/controllers/network-controllers.js"></script> <script src="dist/dist_js/plugins/graph/js/controllers/currency-controllers.js"></script> <script src="dist/dist_js/plugins/graph/js/controllers/account-controllers.js"></script> + <!--endRemoveIf(ubuntu)--> <!-- RML9 plugin --> <!--<script src="dist/dist_js/plugins/rml9/plugin.js"></script>--> diff --git a/www/js/plugins.js b/www/js/plugins.js index 8b94165cfc097714124d7edefc4f703d358ab9e5..a2d66860e7f974a0a2e707f1166b4f6d72e94015 100644 --- a/www/js/plugins.js +++ b/www/js/plugins.js @@ -1,14 +1,22 @@ angular.module('cesium.plugins', [ + /* -- Generated plugin's modules -- */ + 'cesium.plugins.translations', 'cesium.plugins.templates', - // Plugins - 'cesium.es.plugin' + /* -- Plugins -- */ + + // Graph plugin: // removeIf(ubuntu) - ,'cesium.graph.plugin' + // FIXME: issue #463 + 'cesium.graph.plugin', // endRemoveIf(ubuntu) - //,'cesium.rml9.plugin' + // RML9 plugin: + //'cesium.rml9.plugin', + + // ES plugin (Cesium+): + 'cesium.es.plugin' ]) ; diff --git a/www/plugins/graph/js/controllers/blockchain-controllers.js b/www/plugins/graph/js/controllers/blockchain-controllers.js index f1befd6b58af37a47f69fec8aefc8e1d0af35d6b..165d0fe0a65a92344d1b3d0c3c27d92d286f5573 100644 --- a/www/plugins/graph/js/controllers/blockchain-controllers.js +++ b/www/plugins/graph/js/controllers/blockchain-controllers.js @@ -37,6 +37,16 @@ function GpBlockchainTxCountController($scope, $controller, $q, $state, $filter, // Initialize the super class and extend it. angular.extend(this, $controller('GpCurrencyAbstractCtrl', {$scope: $scope})); + $scope.init = function(e, state) { + if (state && state.stateParams) { + + // get the pubkey + if (!$scope.formData.issuer && state && state.stateParams && state.stateParams.pubkey) { // Currency parameter + $scope.formData.issuer = state.stateParams.pubkey; + } + } + }; + $scope.load = function(updateTimePct) { var formData = $scope.formData; diff --git a/www/plugins/graph/js/controllers/network-controllers.js b/www/plugins/graph/js/controllers/network-controllers.js index 5610d4a28989bcb2b8cff2dc6e721558fb5c074a..603a22a39e9b978671c5f063b9d6a0c8fe265209 100644 --- a/www/plugins/graph/js/controllers/network-controllers.js +++ b/www/plugins/graph/js/controllers/network-controllers.js @@ -33,7 +33,7 @@ angular.module('cesium.graph.network.controllers', ['chart.js', 'cesium.graph.se views: { 'menuContent': { templateUrl: "plugins/graph/templates/network/view_peer_stats.html", - controller: 'GpPeerStatsCtrl' + controller: 'GpBlockchainTxCountCtrl' } } }); @@ -44,7 +44,6 @@ angular.module('cesium.graph.network.controllers', ['chart.js', 'cesium.graph.se .controller('GpPeerViewExtendCtrl', GpPeerViewExtendController) - .controller('GpPeerStatsCtrl', GpPeerStatsController) ; @@ -114,43 +113,3 @@ function GpPeerViewExtendController($scope, $timeout, PluginService, esSettings, }); }; } - -function GpPeerStatsController($scope, $controller, csCurrency) { - 'ngInject'; - - // Initialize the super class and extend it. - angular.extend(this, $controller('GpBlockchainTxCountCtrl', {$scope: $scope})); - - $scope.txOptions = $scope.txOptions || {}; - $scope.node = $scope.node || {}; - - $scope.enter = function(e, state) { - if ($scope.loading) { - - if (!$scope.currency && state && state.stateParams && state.stateParams.currency) { // Currency parameter - $scope.currency = state.stateParams.currency; - } - - // Make sure there is currency, or load it not - if (!$scope.currency) { - return csCurrency.get() - .then(function(currency) { - $scope.currency = currency ? currency.name : null; - return $scope.enter(e, state); - }); - } - - if (!$scope.txOptions.issuer && state && state.stateParams && state.stateParams.pubkey) { // Pubkey parameter - // Add option to filter on issuer pubkey - $scope.txOptions.issuer = state.stateParams.pubkey; - } - - return $scope.load() - .then(function() { - $scope.loading = false; - }); - } - }; - $scope.$on('$ionicView.enter', $scope.enter); - -}