mirror of https://github.com/BTCPrivate/copay.git
Added a directive to focus the first input fields
This commit is contained in:
parent
b554c4c7ea
commit
527c3beab1
|
@ -124,8 +124,7 @@ angular.module('copayApp.directives')
|
|||
ctrl.$parsers.unshift(validator);
|
||||
}
|
||||
};
|
||||
}
|
||||
)
|
||||
})
|
||||
.directive('loading', function() {
|
||||
return {
|
||||
restrict: 'A',
|
||||
|
@ -270,6 +269,16 @@ angular.module('copayApp.directives')
|
|||
}
|
||||
}
|
||||
])
|
||||
.directive('autoFocus', function($timeout) {
|
||||
return {
|
||||
restrict: 'AC',
|
||||
link: function(_scope, _element) {
|
||||
$timeout(function() {
|
||||
_element[0].focus();
|
||||
}, 0);
|
||||
}
|
||||
};
|
||||
})
|
||||
.directive('match', function() {
|
||||
return {
|
||||
require: 'ngModel',
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<div class="large-12 columns">
|
||||
<div class="panel">
|
||||
<label><span translate>Wallet name</span>
|
||||
<input type="text" placeholder="{{'Family vacation funds'|translate}}" class="form-control" ng-model="walletName">
|
||||
<input type="text" placeholder="{{'Family vacation funds'|translate}}" class="form-control" ng-model="walletName" auto-focus>
|
||||
</label>
|
||||
<div class="row">
|
||||
<div class="large-6 medium-6 columns">
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<span class="icon-input right" ng-show="!profileForm.email.$invalid &&
|
||||
!profileForm.email.$pristine || error"><i class="fi-check"></i></span>
|
||||
<input type="email" ng-model="email" class="form-control fi-email"
|
||||
name="email" placeholder="Email" required>
|
||||
name="email" placeholder="Email" required auto-focus>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
</p>
|
||||
|
||||
<input type="email" ng-model="email" class="form-control"
|
||||
name="email" placeholder="Email" required>
|
||||
name="email" placeholder="Email" required auto-focus>
|
||||
<input type="password" ng-model="password" class="form-control"
|
||||
name="password" placeholder="Password" required>
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
|
||||
<div class="pr">
|
||||
<input id="connectionId" type="text" class="columns" placeholder="{{'Paste wallet secret here'|translate}}" name="connectionId" ng-model="connectionId" wallet-secret required>
|
||||
<input id="connectionId" type="text" class="columns" placeholder="{{'Paste wallet secret here'|translate}}" name="connectionId" ng-model="connectionId" wallet-secret required auto-focus>
|
||||
<div ng-hide="showScanner || disableScanner">
|
||||
<a class="postfix button black" ng-click="openScanner()"><i class="fi-camera"> </i></a>
|
||||
</div>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
<div class="pr">
|
||||
<input class="columns" type="text" id="address" name="address" ng-disabled="loading || !!$root.merchant"
|
||||
placeholder="{{'Bitcoin address'|translate}}" ng-model="address" ng-change="onChanged()" valid-address required>
|
||||
placeholder="{{'Bitcoin address'|translate}}" ng-model="address" ng-change="onChanged()" valid-address required auto-focus>
|
||||
<div ng-hide="showScanner || disableScanner">
|
||||
<button class="postfix button black" ng-click="openScanner()"><i class="fi-camera size-24"></i></button>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue