mirror of https://github.com/BTCPrivate/copay.git
rename controllers and views
This commit is contained in:
parent
9066e77511
commit
505ac5b5c6
|
@ -1,14 +1,13 @@
|
|||
'use strict';
|
||||
var bitcore = require('bitcore');
|
||||
|
||||
angular.module('copayApp.controllers').controller('TransactionsController',
|
||||
angular.module('copayApp.controllers').controller('HistoryController',
|
||||
function($scope, $rootScope, $timeout, controllerUtils, notification, rateService) {
|
||||
controllerUtils.redirIfNotComplete();
|
||||
|
||||
|
||||
var w = $rootScope.wallet;
|
||||
|
||||
$rootScope.title = 'History';
|
||||
$scope.loading = false;
|
||||
$scope.lastShowed = false;
|
||||
|
|
@ -1,11 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('AddressesController',
|
||||
angular.module('copayApp.controllers').controller('ReceiveController',
|
||||
function($scope, $rootScope, $timeout, $modal, controllerUtils) {
|
||||
controllerUtils.redirIfNotComplete();
|
||||
|
||||
$rootScope.title = 'Addresses';
|
||||
|
||||
$scope.loading = false;
|
||||
$scope.showAll = false;
|
||||
|
|
@ -35,11 +35,11 @@ angular
|
|||
logged: true
|
||||
})
|
||||
.when('/receive', {
|
||||
templateUrl: 'views/addresses.html',
|
||||
templateUrl: 'views/receive.html',
|
||||
logged: true
|
||||
})
|
||||
.when('/history', {
|
||||
templateUrl: 'views/transactions.html',
|
||||
templateUrl: 'views/history.html',
|
||||
logged: true
|
||||
})
|
||||
.when('/send', {
|
||||
|
|
|
@ -132,25 +132,25 @@ describe("Unit: Controllers", function() {
|
|||
|
||||
});
|
||||
|
||||
describe('Address Controller', function() {
|
||||
var addressCtrl;
|
||||
describe('Receive Controller', function() {
|
||||
var c;
|
||||
beforeEach(inject(function($controller, $rootScope) {
|
||||
scope = $rootScope.$new();
|
||||
addressCtrl = $controller('AddressesController', {
|
||||
c = $controller('ReceiveController', {
|
||||
$scope: scope,
|
||||
});
|
||||
}));
|
||||
|
||||
it('should have a AddressesController controller', function() {
|
||||
it('should have a ReceiveController controller', function() {
|
||||
expect(scope.loading).equal(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Transactions Controller', function() {
|
||||
describe('History Controller', function() {
|
||||
var transactionsCtrl;
|
||||
beforeEach(inject(function($controller, $rootScope) {
|
||||
scope = $rootScope.$new();
|
||||
transactionsCtrl = $controller('TransactionsController', {
|
||||
transactionsCtrl = $controller('HistoryController', {
|
||||
$scope: scope,
|
||||
});
|
||||
}));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="transactions" data-ng-controller="TransactionsController" data-ng-init="update()">
|
||||
<div class="transactions" data-ng-controller="HistoryController" data-ng-init="update()">
|
||||
<div ng-show='$root.wallet.isReady()'>
|
||||
<h2 ng-show="wallet.isShared()">
|
||||
<span translate>Transaction Proposals</span> <small>({{txs.length}})</small></h2>
|
|
@ -1,6 +1,6 @@
|
|||
<div class="addresses" ng-controller="AddressesController">
|
||||
<div class="addresses" ng-controller="ReceiveController">
|
||||
<div ng-show='$root.wallet.isReady()'>
|
||||
<h1 class="hide-for-large-up">{{$root.title}}</h1>
|
||||
<h1 translate class="hide-for-large-up">Receive</h1>
|
||||
<div ng-show="!addresses[0]">
|
||||
<i class="fi-bitcoin-circle icon-rotate spinner"></i>
|
||||
</div>
|
Loading…
Reference in New Issue