2015-01-11 15:02:46 -05:00
|
|
|
ReactiveTabs.createInterface({
|
2015-01-11 16:55:54 -05:00
|
|
|
template: 'teacherTabs',
|
2015-01-11 15:02:46 -05:00
|
|
|
onChange: function (slug, template) {
|
|
|
|
|
// This callback runs every time a tab changes.
|
|
|
|
|
// The `template` instance is unique per {{#basicTabs}} block.
|
|
|
|
|
console.log('[tabs] Tab has changed! Current tab:', slug);
|
|
|
|
|
console.log('[tabs] Template instance calling onChange:', template);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Template.teacher.helpers({
|
|
|
|
|
tabs: function () {
|
|
|
|
|
// Every tab object MUST have a name and a slug!
|
|
|
|
|
return [
|
|
|
|
|
{ name: 'Single', slug: 'single' },
|
|
|
|
|
{ name: 'Carts', slug: 'carts' }
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
});
|