Commit 3c5f6014 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge remote-tracking branch 'origin/raos_work' into Typo3integrated

JS code to support forems with or without pills
parents 9f3b69f9 44c1209a
...@@ -23,7 +23,25 @@ if (!QfqNS) { ...@@ -23,7 +23,25 @@ if (!QfqNS) {
}, settings }, settings
); );
this.bsTabs = new QfqNS.BSTabs(this.settings.tabsId); try {
this.bsTabs = new QfqNS.BSTabs(this.settings.tabsId);
var currentState = this.settings.pageState.getPageState();
if (currentState !== "") {
this.bsTabs.activateTab(currentState);
QfqNS.PageTitle.setSubTitle(this.bsTabs.getTabName(currentState));
} else {
this.settings.pageState.setPageState(this.bsTabs.getCurrentTab(), QfqNS.PageTitle.get());
}
this.bsTabs.addTabShowHandler(this.tabShowHandler.bind(this));
this.settings.pageState.addStateActivationHandler(this.popStateHandler.bind(this));
} catch (e) {
QfqNS.Log.message(e.message);
this.bsTabs = null;
}
try { try {
this.qfqForm = new QfqNS.QfqForm(this.settings.formId, this.settings.submitTo, this.settings.deleteUrl); this.qfqForm = new QfqNS.QfqForm(this.settings.formId, this.settings.submitTo, this.settings.deleteUrl);
this.qfqForm.setBsTabs(this.bsTabs); this.qfqForm.setBsTabs(this.bsTabs);
...@@ -31,17 +49,6 @@ if (!QfqNS) { ...@@ -31,17 +49,6 @@ if (!QfqNS) {
QfqNS.Log.error(e.message); QfqNS.Log.error(e.message);
this.qfqForm = null; this.qfqForm = null;
} }
var currentState = this.settings.pageState.getPageState();
if (currentState !== "") {
this.bsTabs.activateTab(currentState);
QfqNS.PageTitle.setSubTitle(this.bsTabs.getTabName(currentState));
} else {
this.settings.pageState.setPageState(this.bsTabs.getCurrentTab(), QfqNS.PageTitle.get());
}
this.bsTabs.addTabShowHandler(this.tabShowHandler.bind(this));
this.settings.pageState.addStateActivationHandler(this.popStateHandler.bind(this));
}; };
n.QfqPage.prototype.tabShowHandler = function (bsTabs) { n.QfqPage.prototype.tabShowHandler = function (bsTabs) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment