Ref ionicPopup. Clear amount view after send

This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-27 16:01:15 -03:00
commit 01d5ba8d9f
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
10 changed files with 22 additions and 48 deletions

View file

@ -820,32 +820,12 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
// An alert dialog
var askPassword = function(name, title, cb) {
var scope = $rootScope.$new(true);
scope.data = [];
var pass = $ionicPopup.show({
template: '<input type="password" ng-model="data.pass">',
title: title,
subTitle: name,
scope: scope,
buttons: [{
text: 'Cancel'
}, {
text: '<b>OK</b>',
type: 'button-positive',
onTap: function(e) {
if (!scope.data.pass) {
//don't allow the user to close unless he enters wifi password
e.preventDefault();
return;
}
return scope.data.pass;
}
}]
});
pass.then(function(res) {
return cb(res);
var opts = {
inputType: 'password'
};
popupService.showPrompt(title, name, opts, function(res) {
if (!res) return cb();
if (res) return cb(res)
});
};