fixes one-page

This commit is contained in:
Matias Alejo Garcia 2015-04-23 14:37:44 -03:00
commit 4f60626710
7 changed files with 13 additions and 15 deletions

View file

@ -27,7 +27,6 @@
<div notifications="right top"></div> <div notifications="right top"></div>
<div ng-include="'views/includes/offline.html'" ng-if="index.isOffline"></div> <div ng-include="'views/includes/offline.html'" ng-if="index.isOffline"></div>
<div ng-include="'views/includes/clientError.html'" ng-if="index.clientError"></div> <div ng-include="'views/includes/clientError.html'" ng-if="index.clientError"></div>
<div ng-include="'views/includes/password.html'" ng-if="index.askPassword" <div ng-include="'views/includes/password.html'" ng-if="index.askPassword"

View file

@ -4,10 +4,8 @@
<i class="fi-alert"></i> <i class="fi-alert"></i>
</div> </div>
<div class="dr-notification-content"> <div class="dr-notification-content">
<h3 class="dr-notification-title" translate>Wallet Service Error</h3> <h3 class="dr-notification-title">Wallet Service Error</h3>
<div class="dr-notification-text ellipsis"> <div class="dr-notification-text ellipsis">{{index.clientError.message || index.clientError}}</div>
{{index.clientError.error || index.clientError.message || index.clientError}}
</div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -333,8 +333,6 @@ history
--> -->
<div id="history" class="history tab-view"> <div id="history" class="history tab-view">
<div>
<div class="row m20t" ng-show="!index.txHistory[0]"> <div class="row m20t" ng-show="!index.txHistory[0]">
<div class="large-12 columns"> <div class="large-12 columns">
<div class="oh text-center"> <div class="oh text-center">
@ -398,7 +396,6 @@ history
</div> </div>
</div> </div>
</div> </div>
</div>

View file

@ -625,6 +625,12 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.updateTxHistory(); self.updateTxHistory();
}); });
$rootScope.$on('Local/SetTab', function(event, tab) {
self.setTab(tab);
});
$rootScope.$on('Local/NeedsPassword', function(event, isSetup, cb) { $rootScope.$on('Local/NeedsPassword', function(event, isSetup, cb) {
self.askPassword = { self.askPassword = {
isSetup: isSetup, isSetup: isSetup,

View file

@ -21,7 +21,7 @@ angular.module('copayApp.controllers').controller('topbarController', function($
}, 100); }, 100);
alert('Scanning error'); alert('Scanning error');
}); });
go.send(); $scope.$emit('Local/SetTab', 'send');
}; };
var modalOpenScanner = function() { var modalOpenScanner = function() {
@ -79,7 +79,7 @@ angular.module('copayApp.controllers').controller('topbarController', function($
$scope.init = function() { $scope.init = function() {
setScanner(); setScanner();
$timeout(function() { $timeout(function() {
go.send(); $scope.$emit('Local/SetTab', 'send');
canvas = document.getElementById('qr-canvas'); canvas = document.getElementById('qr-canvas');
context = canvas.getContext('2d'); context = canvas.getContext('2d');

View file

@ -1,6 +1,6 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $timeout, $filter, $modal, notification, txStatus, isCordova, profileService, lodash, configService, rateService, storageService) { angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $timeout, $filter, $modal, $log, notification, txStatus, isCordova, profileService, lodash, configService, rateService, storageService, bitcore, isChromeApp) {
var self = this; var self = this;
$rootScope.hideMenuBar = false; $rootScope.hideMenuBar = false;
@ -25,11 +25,13 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
this.isMobile = isMobile.any(); this.isMobile = isMobile.any();
var disableScannerListener = $rootScope.$on('dataScanned', function(event, data) { var disableScannerListener = $rootScope.$on('dataScanned', function(event, data) {
$scope.$emit('Local/SetTab', 'send');
self.setForm(data); self.setForm(data);
}); });
var disablePaymentUriListener = $rootScope.$on('paymentUri', function(event, uri) { var disablePaymentUriListener = $rootScope.$on('paymentUri', function(event, uri) {
$timeout(function() { $timeout(function() {
$scope.$emit('Local/SetTab', 'send');
self.setForm(uri); self.setForm(uri);
}, 100); }, 100);
}); });

View file

@ -66,10 +66,6 @@ angular.module('copayApp.services').factory('go', function($window, $rootScope,
$state.go('add'); $state.go('add');
}; };
root.send = function() {
$state.go('send');
};
root.preferences = function() { root.preferences = function() {
$state.go('preferences'); $state.go('preferences');
}; };