|
|
|
@ -187,7 +187,8 @@ define([
|
|
|
|
|
dialog.tabs = function (tabs) {
|
|
|
|
|
var contents = [];
|
|
|
|
|
var titles = [];
|
|
|
|
|
tabs.forEach(function (tab) {
|
|
|
|
|
var active = 0;
|
|
|
|
|
tabs.forEach(function (tab, i) {
|
|
|
|
|
if (!tab.content || !tab.title) { return; }
|
|
|
|
|
var content = h('div.alertify-tabs-content', tab.content);
|
|
|
|
|
var title = h('span.alertify-tabs-title', tab.title);
|
|
|
|
@ -203,10 +204,11 @@ define([
|
|
|
|
|
});
|
|
|
|
|
titles.push(title);
|
|
|
|
|
contents.push(content);
|
|
|
|
|
if (tab.active) { active = i; }
|
|
|
|
|
});
|
|
|
|
|
if (contents.length) {
|
|
|
|
|
$(contents[0]).addClass('alertify-tabs-content-active');
|
|
|
|
|
$(titles[0]).addClass('alertify-tabs-active');
|
|
|
|
|
$(contents[active]).addClass('alertify-tabs-content-active');
|
|
|
|
|
$(titles[active]).addClass('alertify-tabs-active');
|
|
|
|
|
}
|
|
|
|
|
return h('div.alertify-tabs', [
|
|
|
|
|
h('div.alertify-tabs-titles', titles),
|
|
|
|
|