ion refresher, ion infinite scroll and balance collapse

This commit is contained in:
Gabriel Bazán 2016-05-17 11:10:16 -03:00 committed by Javier
commit dae55abceb
9 changed files with 213 additions and 187 deletions

View file

@ -14,7 +14,6 @@
.row {
display: inherit;
padding: 0;
}
button, .button {

View file

@ -16,7 +16,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
ret.isWindowsPhoneApp = platformInfo.isWP;
ret.onGoingProcess = {};
ret.historyShowLimit = 10;
ret.historyShowMoreLimit = 100;
ret.historyShowMoreLimit = 10;
ret.isSearching = false;
ret.prevState = 'walletHome';
@ -322,6 +322,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
};
self.updateAll = function(opts, initStatusHash, tries) {
$scope.$broadcast('scroll.refreshComplete');
tries = tries || 0;
opts = opts || {};
var fc = profileService.focusedClient;
@ -985,6 +986,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.historyShowMore = false;
}
self.nextTxHistory += self.historyShowMoreLimit;
$scope.$broadcast('scroll.infiniteScrollComplete');
}, 100);
};

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $interval, $timeout, $filter, $modal, $log, $ionicModal, notification, txStatus, profileService, lodash, configService, rateService, storageService, bitcore, gettext, gettextCatalog, platformInfo, addressService, ledger, bwsError, confirmDialog, txFormatService, animationService, addressbookService, go, feeService, walletService, fingerprintService, nodeWebkit) {
angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $ionicScrollDelegate, $rootScope, $interval, $timeout, $filter, $modal, $log, $ionicModal, notification, txStatus, profileService, lodash, configService, rateService, storageService, bitcore, gettext, gettextCatalog, platformInfo, addressService, ledger, bwsError, confirmDialog, txFormatService, animationService, addressbookService, go, feeService, walletService, fingerprintService, nodeWebkit) {
var isCordova = platformInfo.isCordova;
var isWP = platformInfo.isWP;
@ -32,6 +32,13 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
ret.sendMaxInfo = {};
var vanillaScope = ret;
$scope.getScrollPosition = function() {
$scope.shouldCollapse = $ionicScrollDelegate.$getByHandle('transactions').getScrollPosition().top > 50;
$timeout(function() {
$scope.$apply();
});
}
var disableScannerListener = $rootScope.$on('dataScanned', function(event, data) {
self.setForm(data);
$rootScope.$emit('Local/SetTab', 'send');

View file

@ -100,7 +100,7 @@ h4.title a {
}
.walletHome h4.title {
padding: 0 0 10px 15px;
padding: 20px 0 10px 15px;
margin: 5px 0 5px 0;
font-size: 16px;
}
@ -620,6 +620,14 @@ ul.manage li {
margin-top: 20px;
}
.m50t {
margin-top: 50px;
}
.m150t {
margin-top: 150px;
}
.m20tp {
margin-top: 20%;
}
@ -1575,6 +1583,13 @@ input.ng-invalid-match {
margin-bottom: 25px;
}
.amountcollapsed {
width: 100%;
text-align: center;
color: #fff;
height: 50px;
}
.alternative-amount {
height: 25px;
text-align: center;
@ -1615,7 +1630,7 @@ input.ng-invalid-match {
text-align: center;
border-radius: 5px;
}
.wallet-info {
.walletinfo {
position: absolute;
top: inherit;
left: 10px;
@ -1623,6 +1638,14 @@ input.ng-invalid-match {
font-size: 20px;
color: #fff;
}
.walletinfocollapsed {
position: absolute;
top: inherit;
left: 10px;
bottom: 0px;
font-size: 20px;
color: #fff;
}
}
.camera-icon a {
@ -2144,4 +2167,3 @@ body.modal-open {
color: #2C3E50;
}
}