mirror of
https://github.com/donl/meteor-ionic.git
synced 2026-06-30 06:12:08 -06:00
Added confirm functionality to IonPopup
This commit is contained in:
parent
8dc91bc4a4
commit
ed3d3f17bf
1 changed files with 28 additions and 0 deletions
|
|
@ -38,6 +38,25 @@ IonPopup = {
|
|||
},
|
||||
|
||||
alert: function (options) {
|
||||
IonPopup.show({
|
||||
title: options.title,
|
||||
subTitle: options.subtitle,
|
||||
template: options.template,
|
||||
templateName: options.templateName,
|
||||
buttons: [
|
||||
{
|
||||
text: options.okText ? options.okText : 'Ok',
|
||||
type: options.okType ? options.okType : 'button-positive',
|
||||
onTap: function(event) {
|
||||
options.onOk(event);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
},
|
||||
|
||||
confirm: function (options) {
|
||||
IonPopup.show({
|
||||
title: options.title,
|
||||
subTitle: options.subtitle,
|
||||
|
|
@ -48,6 +67,15 @@ IonPopup = {
|
|||
text: options.okText ? options.okText : 'Ok',
|
||||
type: options.okType ? options.okType : 'button-positive',
|
||||
onTap: function() {
|
||||
if (options.onOk) options.onOk(event);
|
||||
return true;
|
||||
}
|
||||
},
|
||||
{
|
||||
text: options.cancelText ? options.cancelText : 'Cancel',
|
||||
type: options.cancelType ? options.cancelType : 'button-default',
|
||||
onTap: function() {
|
||||
if (options.onCancel) options.onCancel(event);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue