Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[framework] fixed window fix bar in development mode #1632

Merged
merged 1 commit into from Jan 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/framework/assets/js/admin/components/fixedBar.js
Expand Up @@ -14,6 +14,11 @@ export default class FixedBar {
static init () {
SymfonyToolbarSupport.registerOnToolbarShow(FixedBar.onSymfonyToolbarShow);
SymfonyToolbarSupport.registerOnToolbarHide(FixedBar.onSymfonyToolbarHide);

// condition copied from: vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig
if (typeof Sfjs !== 'undefined' && Sfjs.getPreference('toolbar/displayState') !== 'none') {
SymfonyToolbarSupport.notifyOnToolbarShow();
}
}
}

Expand Down
Expand Up @@ -35,11 +35,6 @@ export default class SymfonyToolbarSupport {
$('.sf-toolbar').on('click', '[id^="sfToolbarMainContent-"] > a.hide-button', () => {
SymfonyToolbarSupport.notifyOnToolbarHide();
});

// condition copied from: vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig
if (typeof Sfjs !== 'undefined' && Sfjs.getPreference('toolbar/displayState') !== 'none') {
SymfonyToolbarSupport.notifyOnToolbarShow();
}
}
}

Expand Down