added focusme directive
This commit is contained in:
parent
412ef86358
commit
ec877a6efa
2 changed files with 17 additions and 2 deletions
15
src/js/directives/focusMe.js
Normal file
15
src/js/directives/focusMe.js
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
angular.module('copayApp.directives').directive('focusMe', ['$timeout', function ($timeout) {
|
||||||
|
return {
|
||||||
|
link: function (scope, element, attrs) {
|
||||||
|
if (attrs.focusMeDisable === true) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$timeout(function () {
|
||||||
|
element[0].focus();
|
||||||
|
if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
|
||||||
|
window.cordova.plugins.Keyboard.show(); //open keyboard manually
|
||||||
|
}
|
||||||
|
}, 350);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}])
|
||||||
|
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
<div ng-if="shapeshiftOrderId">
|
<div ng-if="shapeshiftOrderId">
|
||||||
Minimum amount: {{minShapeshiftAmount}} <br/>
|
Minimum amount: {{minShapeshiftAmount}} <br/>
|
||||||
Maximum amount: {{maxShapeshiftAmount}}
|
Maximum amount: {{maxShapeshiftAmount}} <br/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="amount">
|
<div class="amount">
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div ng-show="isAndroid || isIos" class="amount__editable" ng-class="{'amount__editable--minimize': smallFont, 'amount__editable--standard': !smallFont, 'amount__editable--placeholder': !amountModel.amount}">
|
<div ng-show="isAndroid || isIos" class="amount__editable" ng-class="{'amount__editable--minimize': smallFont, 'amount__editable--standard': !smallFont, 'amount__editable--placeholder': !amountModel.amount}">
|
||||||
<span style="display:inline;">
|
<span style="display:inline;">
|
||||||
<input class="amount__number" style="float:left;" type="number" ng-model="amountModel.amount" ng-change="processAmount()" placeholder="Enter amount">
|
<input class="amount__number" style="float:left;" type="number" ng-model="amountModel.amount" ng-change="processAmount()" placeholder="Enter amount" focus-me>
|
||||||
<a class="amount__currency-toggle" style="float:left;" ng-click="changeUnit()">{{unit}}</a>
|
<a class="amount__currency-toggle" style="float:left;" ng-click="changeUnit()">{{unit}}</a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue