mirror of https://github.com/xwiki-labs/cryptpad
add optional icon to modal tabs
This commit is contained in:
parent
339030a84e
commit
d38f5a16c2
|
@ -191,6 +191,10 @@ define([
|
||||||
if (!tab.content || !tab.title) { return; }
|
if (!tab.content || !tab.title) { return; }
|
||||||
var content = h('div.alertify-tabs-content', tab.content);
|
var content = h('div.alertify-tabs-content', tab.content);
|
||||||
var title = h('span.alertify-tabs-title', tab.title);
|
var title = h('span.alertify-tabs-title', tab.title);
|
||||||
|
if (tab.icon) {
|
||||||
|
var icon = h('i', {class: 'fa ' + tab.icon});
|
||||||
|
$(title).prepend(' ').prepend(icon);
|
||||||
|
};
|
||||||
$(title).click(function () {
|
$(title).click(function () {
|
||||||
titles.forEach(function (t) { $(t).removeClass('alertify-tabs-active'); });
|
titles.forEach(function (t) { $(t).removeClass('alertify-tabs-active'); });
|
||||||
contents.forEach(function (c) { $(c).removeClass('alertify-tabs-content-active'); });
|
contents.forEach(function (c) { $(c).removeClass('alertify-tabs-content-active'); });
|
||||||
|
|
Loading…
Reference in New Issue