* Create tabs container and set theme * * @param {Element} rootEl Container element for tabs * @param {String} theme Theme for the tab
(rootEl, theme)
| 16 | */ |
| 17 | |
| 18 | constructor(rootEl, theme) { |
| 19 | this.container = $(rootEl).tabs({ |
| 20 | activate: (event, ui) => { |
| 21 | this.activeTabEl = ui.newTab |
| 22 | this.activeTabId = ui.newTab.data('tab') |
| 23 | } |
| 24 | }) |
| 25 | this.tabBar = this.container.find('#tab-header') |
| 26 | this.tabs = [] |
| 27 | this.totalTabsCreated = 0 // Counter for unique tab ids |
| 28 | this.theme = theme |
| 29 | this.init() |
| 30 | } |
| 31 | |
| 32 | /** |
| 33 | * Binds a listener to the new tab button and creates first tab |