Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions components/ionActionSheet/ionActionSheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
<div class="action-sheet-backdrop">
<div class="action-sheet-wrapper">
<div class="action-sheet">
<div class="action-sheet-group">
{{#each navButtons}}
<button class="button" data-index="{{index}}">{{{text}}}</button>
{{/each}}
</div>
<div class="action-sheet-group">
{{#if titleText}}
<div class="action-sheet-title">
Expand Down
14 changes: 12 additions & 2 deletions components/ionActionSheet/ionActionSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ IonActionSheet = {
index: i
});
}

var navButtons = [];
for (var i = 0; i < options.navButtons.length; i++) {
var button = options.navButtons[i];
navButtons.push({
text: button.text,
index: i
});
}
var data = {
titleText: options.titleText,
destructiveText: options.destructiveText,
Expand Down Expand Up @@ -100,7 +107,10 @@ Template.ionActionSheet.events({
var index = $(event.target).data('index');
IonActionSheet.buttonClicked(index);
},

'click [data-index]': function (event, template) {
var index = $(event.target).data('index');
IonActionSheet.navButtonClicked(index);
},
'click [data-destructive]': function (event, template) {
IonActionSheet.destructiveButtonClicked();
},
Expand Down