This commit is contained in:
Javier 2016-12-27 16:55:48 -03:00
commit 0d3f2bc802
7 changed files with 29 additions and 29 deletions

View file

@ -98,6 +98,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
}; };
$scope.sendMax = function() { $scope.sendMax = function() {
$scope.showSendMax = false;
$state.transitionTo('tabs.send.confirm', { $state.transitionTo('tabs.send.confirm', {
isWallet: $scope.isWallet, isWallet: $scope.isWallet,
toAmount: null, toAmount: null,

View file

@ -1,14 +1,14 @@
'use strict'; 'use strict';
angular.module('copayApp.directives') angular.module('copayApp.directives')
.directive('sendMax', function($timeout) { .directive('itemSelector', function($timeout) {
return { return {
restrict: 'E', restrict: 'E',
templateUrl: 'views/includes/sendMax.html', templateUrl: 'views/includes/itemSelector.html',
transclude: true, transclude: true,
scope: { scope: {
show: '=sendMaxShow', show: '=itemSelectorShow',
onSelect: '=sendMaxOnSelect' onSelect: '=itemSelectorOnSelect'
}, },
link: function(scope, element, attrs) { link: function(scope, element, attrs) {
scope.hide = function() { scope.hide = function() {

View file

@ -1,4 +1,4 @@
send-max-selector { item-selector {
$border-color: #EFEFEF; $border-color: #EFEFEF;
@ -7,18 +7,18 @@ send-max-selector {
padding-right: .75rem; padding-right: .75rem;
} }
.send-max-selector { .item-selector {
.option { .option {
border: 0; border: 0;
padding-right: 0; padding-right: 0;
padding-top: 0; padding-top: 0;
padding-left: 65px;
padding-bottom: 0; padding-bottom: 0;
margin-bottom: 1px; margin-bottom: 1px;
overflow: visible; overflow: visible;
> i { > i {
padding: 0; color: #647ce8;
padding: 0 0 5px 0;
margin-left: -5px; margin-left: -5px;
> img { > img {
@ -28,7 +28,7 @@ send-max-selector {
} }
} }
} }
.send-max-inner { .item-selector-inner {
display: flex; display: flex;
position: relative; position: relative;
padding-top: 16px; padding-top: 16px;
@ -49,10 +49,10 @@ send-max-selector {
padding: 0 1.2rem; padding: 0 1.2rem;
} }
} }
.send-max-details { .item-selector-details {
flex-grow: 1; flex-grow: 1;
.send-max-name { .item-selector-name {
padding-bottom: 5px; padding-bottom: 5px;
} }
} }

View file

@ -39,6 +39,7 @@
@import "includes/tx-details"; @import "includes/tx-details";
@import "includes/txp-details"; @import "includes/txp-details";
@import "includes/tx-status"; @import "includes/tx-status";
@import "includes/itemSelector";
@import "includes/walletSelector"; @import "includes/walletSelector";
@import "integrations/coinbase"; @import "integrations/coinbase";
@import "integrations/glidera"; @import "integrations/glidera";

View file

@ -120,8 +120,8 @@
</div> </div>
</div> </div>
</ion-content> </ion-content>
<send-max <item-selector
send-max-show="showSendMax" item-selector-show="showSendMax"
send-max-on-select="sendMax"> item-selector-on-select="sendMax">
</send-max> </item-selector>
</ion-view> </ion-view>

View file

@ -0,0 +1,12 @@
<action-sheet action-sheet-show="show" class="item-selector">
<img class="back-arrow" src="img/icon-back-arrow.svg" ng-click="hide()">
<div class="header">{{title}}</div>
<a class="item item-icon-left option no-border" ng-click="onSelect()">
<i class="icon ion-ios-speedometer-outline"></i>
<div class="item-selector-inner">
<div class="item-selector-details">
<div class="item-selector-name" translate>Send max amount</div>
</div>
</div>
</a>
</action-sheet>

View file

@ -1,14 +0,0 @@
<action-sheet action-sheet-show="show" class="send-max-selector">
<img class="back-arrow" src="img/icon-back-arrow.svg" ng-click="hide()">
<a class="item item-icon-left item-big-icon-left item-icon-right send-max no-border" ng-click="onSelect()">
<i class="icon ion-ios-speedometer-outline"></i>
<div class="send-max-inner">
<div class="send-max-details">
<div class="send-max-name" translate>Send max amount</div>
</div>
<i class="icon">
<img class="check" src="img/icon-check-selected.svg">
</i>
</div>
</a>
</action-sheet>