From 86a8175d3aa3f005f7dce4c0f3c8ecbed0f64532 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Thu, 1 Oct 2015 18:11:25 -0400 Subject: [PATCH] chore(popup): Adding ability to pass cssClass References #183 --- ionic/components/popup/popup.ts | 12 ++++++++---- ionic/components/popup/test/basic/index.ts | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ionic/components/popup/popup.ts b/ionic/components/popup/popup.ts index 7ddd6afbbc..60d877fb7b 100644 --- a/ionic/components/popup/popup.ts +++ b/ionic/components/popup/popup.ts @@ -8,7 +8,7 @@ import * as util from 'ionic/util'; /** - * @name ionPopup + * @name Popup * @description * The Ionic Popup service allows programmatically creating and showing popup windows that require the user to respond in order to continue. * @@ -77,6 +77,7 @@ export class Popup extends Overlay { * @returns {TODO} TODO */ alert(context={}, opts={}) { + console.log(context, opts); if (typeof context === 'string') { context = { title: context @@ -84,6 +85,7 @@ export class Popup extends Overlay { } let button = { text: context.okText || 'OK', + type: context.okType || 'primary', onTap: (event, popupRef) => { // Allow it to close //resolve(); @@ -115,12 +117,14 @@ export class Popup extends Overlay { } let okButton = { text: context.okText || 'OK', + type: context.okType || 'primary', onTap: (event, popupRef) => { // Allow it to close } } let cancelButton = { text: context.cancelText || 'Cancel', + type: context.cancelType || 'primary', isCancel: true, onTap: (event, popupRef) => { // Allow it to close @@ -150,7 +154,7 @@ export class Popup extends Overlay { } let okButton = { text: context.okText || 'OK', - type: context.okType, + type: context.okType || 'primary', onTap: (event, popupRef) => { // Allow it to close } @@ -158,7 +162,7 @@ export class Popup extends Overlay { let cancelButton = { text: context.cancelText || 'Cancel', - type: context.cancelType, + type: context.cancelType || 'primary', isCancel: true, onTap: (event, popupRef) => { // Allow it to close @@ -202,7 +206,7 @@ const OVERLAY_TYPE = 'popup'; @View({ template: '' + - '' + + '' + '