this._container = container;
this._containers = new Dictionary();
this._isLegacy = null;
+ this._store = null;
this._tabs = new Dictionary();
}
}
if (!selectTab) {
- var preselect = elData(this._container, 'preselect');
+ var preselect = elData(this._container, 'preselect') || elData(this._container, 'active');
if (preselect === "true" || !preselect) preselect = true;
if (preselect === true) {
this.select(null, selectTab, true);
}
+
+ var store = elData(this._container, 'store');
+ if (store) {
+ var input = elCreate('input');
+ input.type = 'hidden';
+ input.name = store;
+
+ this._container.appendChild(input);
+
+ this._store = input;
+ }
}
return returnValue;
newContent.classList.remove('hidden');
}
+ if (this._store) {
+ this._store.value = name;
+ }
+
if (!disableEvent) {
EventHandler.fire('com.woltlab.wcf.simpleTabMenu_' + this._container.id, 'select', {
active: tab,