Fix confirm dialogs and popupService. Fix delete amount in amazon view. Fix ionic topbar
This commit is contained in:
parent
53a7a2ff05
commit
74c6e2e3b7
4 changed files with 17 additions and 11 deletions
|
|
@ -44,6 +44,7 @@
|
||||||
max="500"
|
max="500"
|
||||||
ng-model="fiat"
|
ng-model="fiat"
|
||||||
ng-pattern="/^[0-9]+(\.[0-9]{1,2})?$/"
|
ng-pattern="/^[0-9]+(\.[0-9]{1,2})?$/"
|
||||||
|
step="0.01"
|
||||||
autocomplete="off" ignore-mouse-wheel required>
|
autocomplete="off" ignore-mouse-wheel required>
|
||||||
<a class="postfix">USD</a>
|
<a class="postfix">USD</a>
|
||||||
</label>
|
</label>
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,9 @@ angular.module('copayApp.controllers').controller('buyAmazonController',
|
||||||
};
|
};
|
||||||
|
|
||||||
this.confirm = function() {
|
this.confirm = function() {
|
||||||
var title = gettextCatalog.getString('Confirm Amazon.com Gift Card purchase for ${{amount}} USD', {amount: $scope.fiat});
|
var message = gettextCatalog.getString('Amazon.com Gift Card purchase for ${{amount}} USD', {amount: $scope.fiat});
|
||||||
var ok = gettextCatalog.getString('Buy');
|
var ok = gettextCatalog.getString('Buy');
|
||||||
popupService.showConfirm(title, null, ok, null, function(res) {
|
popupService.showConfirm(null, message, ok, null, function(res) {
|
||||||
if (res) self.createTx();
|
if (res) self.createTx();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.services').service('popupService', function($log, $ionicPopup, platformInfo) {
|
angular.module('copayApp.services').service('popupService', function($log, $ionicPopup, platformInfo, gettextCatalog) {
|
||||||
|
|
||||||
var isCordova = platformInfo.isCordova;
|
var isCordova = platformInfo.isCordova;
|
||||||
|
|
||||||
|
|
@ -10,7 +10,7 @@ angular.module('copayApp.services').service('popupService', function($log, $ioni
|
||||||
if (!cb) cb = function() {};
|
if (!cb) cb = function() {};
|
||||||
$ionicPopup.alert({
|
$ionicPopup.alert({
|
||||||
title: title,
|
title: title,
|
||||||
template: message,
|
subTitle: message,
|
||||||
okType: 'button-clear button-positive'
|
okType: 'button-clear button-positive'
|
||||||
}).then(cb);
|
}).then(cb);
|
||||||
};
|
};
|
||||||
|
|
@ -18,7 +18,7 @@ angular.module('copayApp.services').service('popupService', function($log, $ioni
|
||||||
var _ionicConfirm = function(title, message, okText, cancelText, cb) {
|
var _ionicConfirm = function(title, message, okText, cancelText, cb) {
|
||||||
$ionicPopup.confirm({
|
$ionicPopup.confirm({
|
||||||
title: title,
|
title: title,
|
||||||
template: message,
|
subTitle: message,
|
||||||
cancelText: cancelText,
|
cancelText: cancelText,
|
||||||
cancelType: 'button-clear button-positive',
|
cancelType: 'button-clear button-positive',
|
||||||
okText: okText,
|
okText: okText,
|
||||||
|
|
@ -53,6 +53,8 @@ angular.module('copayApp.services').service('popupService', function($log, $ioni
|
||||||
if (buttonIndex == 1) return cb(true);
|
if (buttonIndex == 1) return cb(true);
|
||||||
else return cb(false);
|
else return cb(false);
|
||||||
}
|
}
|
||||||
|
okText = okText || gettextCatalog.getString('OK');
|
||||||
|
cancelText = cancelText || gettextCatalog.getString('Cancel');
|
||||||
navigator.notification.confirm(message, onConfirm, title, [okText, cancelText]);
|
navigator.notification.confirm(message, onConfirm, title, [okText, cancelText]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -67,8 +69,8 @@ angular.module('copayApp.services').service('popupService', function($log, $ioni
|
||||||
/**
|
/**
|
||||||
* Show a simple alert popup
|
* Show a simple alert popup
|
||||||
*
|
*
|
||||||
* @param {String} Title
|
* @param {String} Title (optional)
|
||||||
* @param {String} Message (optional)
|
* @param {String} Message
|
||||||
* @param {Callback} Function (optional)
|
* @param {Callback} Function (optional)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -85,10 +87,10 @@ angular.module('copayApp.services').service('popupService', function($log, $ioni
|
||||||
/**
|
/**
|
||||||
* Show a simple confirm popup
|
* Show a simple confirm popup
|
||||||
*
|
*
|
||||||
* @param {String} Title
|
* @param {String} Title (optional)
|
||||||
* @param {String} Message
|
* @param {String} Message
|
||||||
* @param {String} okText
|
* @param {String} okText (optional)
|
||||||
* @param {String} cancelText
|
* @param {String} cancelText (optional)
|
||||||
* @param {Callback} Function
|
* @param {Callback} Function
|
||||||
* @returns {Callback} OK: true, Cancel: false
|
* @returns {Callback} OK: true, Cancel: false
|
||||||
*/
|
*/
|
||||||
|
|
@ -105,7 +107,7 @@ angular.module('copayApp.services').service('popupService', function($log, $ioni
|
||||||
/**
|
/**
|
||||||
* Show a simple prompt popup
|
* Show a simple prompt popup
|
||||||
*
|
*
|
||||||
* @param {String} Title
|
* @param {String} Title (optional)
|
||||||
* @param {String} Message
|
* @param {String} Message
|
||||||
* @param {Object} Object{ inputType, inputPlaceholder, defaultText } (optional)
|
* @param {Object} Object{ inputType, inputPlaceholder, defaultText } (optional)
|
||||||
* @param {Callback} Function
|
* @param {Callback} Function
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,9 @@ $royal: #1e3186;
|
||||||
$soft-blue: rgb(100,124,232);
|
$soft-blue: rgb(100,124,232);
|
||||||
$base-background-color: #f5f5f5;
|
$base-background-color: #f5f5f5;
|
||||||
|
|
||||||
|
/* Ionic Workaround */
|
||||||
|
|
||||||
|
ion-nav-bar.hide { display: block !important; }
|
||||||
|
|
||||||
|
|
||||||
@import "../../bower_components/ionic/scss/ionic";
|
@import "../../bower_components/ionic/scss/ionic";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue