mirror of https://github.com/BTCPrivate/copay.git
fix scaling issue in wp8 and show menu bar when backbutton is pressed on send view
This commit is contained in:
parent
0852250a8e
commit
ecaf2c36df
|
@ -161,6 +161,9 @@ if [ ! -d $PROJECT ]; then
|
|||
cordova plugin add cordova-plugin-screen-orientation
|
||||
checkOK
|
||||
|
||||
cordova plugin add ionic-plugin-keyboard
|
||||
checkOK
|
||||
|
||||
fi
|
||||
|
||||
if $DBGJS
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
-->
|
||||
|
||||
<ion-content id="walletHome" class="walletHome tab-view tab-in" scroll="false" >
|
||||
<ion-content overflow-scroll="true" on-release="index.allowSideBar = true; index.allowPullToRefresh = true;" on-drag-right="index.allowRefresher()">
|
||||
<ion-content overflow-scroll="!isWindowsPhoneApp" on-release="index.allowSideBar = true; index.allowPullToRefresh = true;" on-drag-right="index.allowRefresher()">
|
||||
<ion-refresher
|
||||
ng-if="index.allowPullToRefresh && index.isCordova"
|
||||
on-pulling="index.allowSideBar = false"
|
||||
|
@ -368,7 +368,7 @@
|
|||
<div class="large-12 large-centered columns">
|
||||
<form name="sendForm" novalidate>
|
||||
|
||||
<div ng-hide="home._paypro || home.hideAddress">
|
||||
<div ng-hide="home._paypro">
|
||||
<div class="row collapse">
|
||||
<label for="address" class="left" >
|
||||
<span translate>To</span>
|
||||
|
@ -396,7 +396,7 @@
|
|||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="home._paypro && !home.hideAddress">
|
||||
<div ng-show="home._paypro">
|
||||
<div class="row collapse" ng-click="home.openPPModal(home._paypro)">
|
||||
|
||||
<label for="domain">
|
||||
|
@ -411,7 +411,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-init="home.hideAlternative()" ng-hide="home.hideAmount">
|
||||
<div class="row" ng-init="home.hideAlternative()">
|
||||
<div class="large-12 medium-12 columns">
|
||||
<div class="right" ng-hide="sendForm.amount.$pristine && !sendForm.amount.$modelValue ">
|
||||
<span class="has-error right size-12" ng-if="sendForm.amount.$invalid">
|
||||
|
|
|
@ -104,6 +104,21 @@ _:-ms-fullscreen, :root .main {
|
|||
}
|
||||
}
|
||||
|
||||
@viewport {
|
||||
width:320px;
|
||||
}
|
||||
|
||||
@-ms-viewport {
|
||||
width:320px;
|
||||
zoom-user:fixed;
|
||||
max-zoom:1;
|
||||
min-zoom:1;
|
||||
}
|
||||
|
||||
body, html {
|
||||
-ms-overflow-style: none !important;
|
||||
}
|
||||
|
||||
/* removes 300ms in IE */
|
||||
-ms-touch-action: manipulation; /* IE10 /
|
||||
touch-action: manipulation; /* IE11+ */
|
||||
|
|
|
@ -272,19 +272,16 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
this.hideMenuBar = lodash.debounce(function(hide) {
|
||||
if (hide) {
|
||||
$rootScope.shouldHideMenuBar = true;
|
||||
this.bindTouchDown();
|
||||
} else {
|
||||
$rootScope.shouldHideMenuBar = false;
|
||||
}
|
||||
$rootScope.$digest();
|
||||
}, 100);
|
||||
|
||||
|
||||
this.formFocus = function(what) {
|
||||
if (isCordova && !this.isWindowsPhoneApp) {
|
||||
if (isCordova && this.isWindowsPhoneApp) {
|
||||
this.hideMenuBar(what);
|
||||
}
|
||||
|
||||
var self = this;
|
||||
if (isCordova && !this.isWindowsPhoneApp && what == 'address') {
|
||||
getClipboard(function(value) {
|
||||
|
@ -297,24 +294,6 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (!this.isWindowsPhoneApp) return
|
||||
|
||||
if (!what) {
|
||||
this.hideAddress = false;
|
||||
this.hideAmount = false;
|
||||
|
||||
} else {
|
||||
if (what == 'amount') {
|
||||
this.hideAddress = true;
|
||||
} else if (what == 'msg') {
|
||||
this.hideAddress = true;
|
||||
this.hideAmount = true;
|
||||
}
|
||||
}
|
||||
$timeout(function() {
|
||||
$rootScope.$digest();
|
||||
}, 1);
|
||||
};
|
||||
|
||||
this.setSendFormInputs = function() {
|
||||
|
@ -402,10 +381,8 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
|
||||
this.resetError();
|
||||
|
||||
if (isCordova && this.isWindowsPhoneApp) {
|
||||
this.hideAddress = false;
|
||||
this.hideAmount = false;
|
||||
}
|
||||
if (isCordova && this.isWindowsPhoneApp)
|
||||
$rootScope.shouldHideMenuBar = true;
|
||||
|
||||
var form = $scope.sendForm;
|
||||
var comment = form.comment.$modelValue;
|
||||
|
|
|
@ -536,6 +536,17 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
$ionicPlatform.ready(function() {
|
||||
if (platformInfo.isCordova) {
|
||||
|
||||
window.addEventListener('native.keyboardhide', function() {
|
||||
$timeout(function() {
|
||||
$rootScope.shouldHideMenuBar = false; //show menu bar when keyboard is hidden with back button action on send screen
|
||||
}, 300);
|
||||
});
|
||||
|
||||
window.addEventListener('native.keyboardshow', function() {
|
||||
$rootScope.shouldHideMenuBar = true; //hide menu bar when keyboard opens with back button action on send screen
|
||||
$rootScope.$digest();
|
||||
});
|
||||
|
||||
$ionicPlatform.registerBackButtonAction(function(event) {
|
||||
event.preventDefault();
|
||||
}, 100);
|
||||
|
|
Loading…
Reference in New Issue