mirror of https://github.com/BTCPrivate/copay.git
commit
5581f8184f
|
@ -13,17 +13,17 @@
|
|||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
<div class="large-12 columns" ng-hide="create.hideWalletName">
|
||||
<label><span translate>Wallet name</span>
|
||||
<div class="input">
|
||||
<input type="text" placeholder="{{'Family vacation funds'|translate}}" class="form-control" name="walletName" ng-model="walletName" ng-required="true">
|
||||
<input type="text" placeholder="{{'Family vacation funds'|translate}}" class="form-control" name="walletName" ng-model="walletName" ng-required="true" ng-blur="create.formFocus(false)">
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="large-12 columns" ng-show="totalCopayers != 1">
|
||||
<label><span translate>Your nickname</span>
|
||||
<div class="input">
|
||||
<input type="text" placeholder="{{'John'|translate}}" class="form-control" name="myName" ng-model="myName" ng-required="totalCopayers != 1" ng-disabled="totalCopayers == 1">
|
||||
<input type="text" placeholder="{{'John'|translate}}" class="form-control" name="myName" ng-model="myName" ng-required="totalCopayers != 1" ng-disabled="totalCopayers == 1" ng-focus="create.formFocus('my-name')" ng-blur="create.formFocus(false)">
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
</div>
|
||||
|
||||
<div class="input">
|
||||
<input type="text" id="address" name="address" ng-disabled="send.blockUx || send.lockAddress" ng-attr-placeholder="{{'Bitcoin address'|translate}}" ng-model="_address" valid-address required ng-blur="send.formFocus(false)">
|
||||
<input type="text" id="address" name="address" ng-disabled="send.blockUx || send.lockAddress" ng-attr-placeholder="{{'Bitcoin address'|translate}}" ng-model="_address" valid-address required ng-focus="send.formFocus('address')" ng-blur="send.formFocus(false)">
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="send._paypro && !send.hideAddress">
|
||||
|
@ -102,7 +102,7 @@
|
|||
</label>
|
||||
|
||||
<div class="input">
|
||||
<input type="number" id="amount" ng-disabled="send.blockUx || send.lockAmount" name="amount" ng-attr-placeholder="{{'Amount'|translate}}" ng-minlength="0.00000001" ng-maxlength="10000000000" ng-model="_amount" valid-amount required autocomplete="off" ng-blur="send.formFocus(false)">
|
||||
<input type="number" id="amount" ng-disabled="send.blockUx || send.lockAmount" name="amount" ng-attr-placeholder="{{'Amount'|translate}}" ng-minlength="0.00000001" ng-maxlength="10000000000" ng-model="_amount" valid-amount required autocomplete="off" ng-focus="send.formFocus('amount')" ng-blur="send.formFocus(false)">
|
||||
<a class="postfix" ng-click="showAlternative = true">{{send.unitName}}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -110,7 +110,7 @@
|
|||
<label for="alternative"><span translate>Amount in</span> {{ send.alternativeName }}
|
||||
</label>
|
||||
<div class="input">
|
||||
<input type="number" id="alternative" ng-disabled="send.blockUx || !send.isRateAvailable || send.lockAmount" name="alternative" ng-attr-placeholder="{{'Amount'|translate}}" ng-model="_alternative" requiredautocomplete="off" ng-blur="send.formFocus(false)">
|
||||
<input type="number" id="alternative" ng-disabled="send.blockUx || !send.isRateAvailable || send.lockAmount" name="alternative" ng-attr-placeholder="{{'Amount'|translate}}" ng-model="_alternative" requiredautocomplete="off" ng-focus="send.formFocus('amount')" ng-blur="send.formFocus(false)">
|
||||
<a class="postfix" ng-click="showAlternative = false"> {{ send.alternativeIsoCode }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -124,7 +124,7 @@
|
|||
</label>
|
||||
<div class="input">
|
||||
<textarea id="comment" ng-disabled="send.blockUx" name="comment"
|
||||
ng-maxlength="100" ng-model="_comment"
|
||||
ng-maxlength="100" ng-model="_comment" ng-focus="send.formFocus('msg')"
|
||||
ng-blur="send.formFocus(false)"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('createController',
|
||||
function($scope, $rootScope, $location, $timeout, $log, lodash, go, profileService, configService, isCordova) {
|
||||
function($scope, $rootScope, $location, $timeout, $log, lodash, go, profileService, configService, isMobile, isCordova) {
|
||||
|
||||
var self = this;
|
||||
var defaults = configService.getDefaults();
|
||||
this.isWindowsPhoneApp = isMobile.Windows() && isCordova;
|
||||
|
||||
/* For compressed keys, m*73 + n*34 <= 496 */
|
||||
var COPAYER_PAIR_LIMITS = {
|
||||
|
@ -69,6 +70,20 @@ angular.module('copayApp.controllers').controller('createController',
|
|||
}, 100);
|
||||
};
|
||||
|
||||
this.formFocus = function(what) {
|
||||
if (!this.isWindowsPhoneApp) return
|
||||
|
||||
if (what && what == 'my-name') {
|
||||
this.hideWalletName = true;
|
||||
}
|
||||
else {
|
||||
this.hideWalletName = false;
|
||||
}
|
||||
$timeout(function() {
|
||||
$rootScope.$digest();
|
||||
}, 1);
|
||||
};
|
||||
|
||||
$scope.$on("$destroy", function() {
|
||||
$rootScope.hideWalletNavigation = false;
|
||||
});
|
||||
|
|
|
@ -55,12 +55,10 @@ angular.module('copayApp.controllers').controller('sendController',
|
|||
if (!this.isWindowsPhoneApp) return
|
||||
|
||||
if (!what) {
|
||||
$rootScope.wpInputFocused = false;
|
||||
this.hideAddress = false;
|
||||
this.hideAmount = false;
|
||||
|
||||
} else {
|
||||
$rootScope.wpInputFocused = true;
|
||||
if (what == 'amount') {
|
||||
this.hideAddress = true;
|
||||
} else if (what == 'msg') {
|
||||
|
|
Loading…
Reference in New Issue