From 8dc91bc4a4ede5c91a78e894a02a8b869ed17b28 Mon Sep 17 00:00:00 2001 From: BastiRehm Date: Sun, 1 Mar 2015 16:55:13 +1000 Subject: [PATCH] Added alert functionality to IonPopup --- components/ionPopup/ionPopup.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/components/ionPopup/ionPopup.js b/components/ionPopup/ionPopup.js index 25d4439..a81ee40 100644 --- a/components/ionPopup/ionPopup.js +++ b/components/ionPopup/ionPopup.js @@ -37,6 +37,24 @@ IonPopup = { $popup.addClass('popup-showing active'); }, + 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() { + return true; + } + } + ] + }); + }, + close: function () { var $backdrop = $(this.view.firstNode()); var $popup = $backdrop.find('.popup-container');