Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
44c1209a
Commit
44c1209a
authored
Feb 18, 2016
by
Rafael Ostertag
Browse files
QfqPage.js: do not expect page having tabs.
parent
474593a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
javascript/src/QfqPage.js
View file @
44c1209a
...
...
@@ -23,7 +23,25 @@ if (!QfqNS) {
},
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
{
this
.
qfqForm
=
new
QfqNS
.
QfqForm
(
this
.
settings
.
formId
,
this
.
settings
.
submitTo
,
this
.
settings
.
deleteUrl
);
this
.
qfqForm
.
setBsTabs
(
this
.
bsTabs
);
...
...
@@ -31,17 +49,6 @@ if (!QfqNS) {
QfqNS
.
Log
.
error
(
e
.
message
);
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
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment