mirror of
https://github.com/donl/meteor-ionic.git
synced 2026-05-26 14:22:19 -06:00
cleanup
This commit is contained in:
parent
fd6de068f1
commit
aff9268cc7
2 changed files with 32 additions and 24 deletions
|
|
@ -2,14 +2,16 @@
|
|||
<div class="backdrop">
|
||||
<div class="popup-container">
|
||||
<div class="popup">
|
||||
<div class="popup-head">
|
||||
{{#if title}}
|
||||
<h3 class="popup-title">{{title}}</h3>
|
||||
{{/if}}
|
||||
{{#if subTitle}}
|
||||
<h5 class="popup-sub-title">{{subTitle}}</h5>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if hasHead}}
|
||||
<div class="popup-head">
|
||||
{{#if title}}
|
||||
<h3 class="popup-title">{{title}}</h3>
|
||||
{{/if}}
|
||||
{{#if subTitle}}
|
||||
<h5 class="popup-sub-title">{{subTitle}}</h5>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if template}}
|
||||
<div class="popup-body">
|
||||
{{{template}}}
|
||||
|
|
|
|||
|
|
@ -63,14 +63,6 @@ IonPopup = {
|
|||
template: options.template,
|
||||
templateName: options.templateName,
|
||||
buttons: [
|
||||
{
|
||||
text: options.okText ? options.okText : 'Ok',
|
||||
type: options.okType ? options.okType : 'button-positive',
|
||||
onTap: function (event, template) {
|
||||
if (options.onOk) options.onOk(event, template);
|
||||
return true;
|
||||
}
|
||||
},
|
||||
{
|
||||
text: options.cancelText ? options.cancelText : 'Cancel',
|
||||
type: options.cancelType ? options.cancelType : 'button-default',
|
||||
|
|
@ -78,6 +70,14 @@ IonPopup = {
|
|||
if (options.onCancel) options.onCancel(event, template);
|
||||
return true;
|
||||
}
|
||||
},
|
||||
{
|
||||
text: options.okText ? options.okText : 'Ok',
|
||||
type: options.okType ? options.okType : 'button-positive',
|
||||
onTap: function (event, template) {
|
||||
if (options.onOk) options.onOk(event, template);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
|
@ -100,6 +100,14 @@ IonPopup = {
|
|||
subTitle: options.subTitle,
|
||||
template: template,
|
||||
buttons: [
|
||||
{
|
||||
text: options.cancelText ? options.cancelText : 'Cancel',
|
||||
type: options.cancelType ? options.cancelType : 'button-default',
|
||||
onTap: function (event, template) {
|
||||
if (options.onCancel) options.onCancel(event, template);
|
||||
return true;
|
||||
}
|
||||
},
|
||||
{
|
||||
text: options.okText ? options.okText : 'Ok',
|
||||
type: options.okType ? options.okType : 'button-positive',
|
||||
|
|
@ -108,14 +116,6 @@ IonPopup = {
|
|||
if (options.onOk) options.onOk(event, inputVal);
|
||||
return true;
|
||||
}
|
||||
},
|
||||
{
|
||||
text: options.cancelText ? options.cancelText : 'Cancel',
|
||||
type: options.cancelType ? options.cancelType : 'button-default',
|
||||
onTap: function (event, template) {
|
||||
if (options.onCancel) options.onCancel(event, template);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
|
@ -168,3 +168,9 @@ Template.ionPopup.events({
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
Template.ionPopup.helpers({
|
||||
hasHead: function() {
|
||||
return this.title || this.subTitle;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue