Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions js/src/admin/AdminApplication.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export default class AdminApplication extends Application {
* @inheritdoc
*/
mount() {
m.mount(document.getElementById('app-navigation'), Navigation.component({className: 'App-backControl', drawer: true}));
m.mount(document.getElementById('header-navigation'), Navigation.component());
m.mount(document.getElementById('app-navigation'), Navigation.component({back: false, className: 'App-backControl', drawer: true}));
m.mount(document.getElementById('header-navigation'), Navigation.component({back: true, drawer: false}));
m.mount(document.getElementById('header-primary'), HeaderPrimary.component());
m.mount(document.getElementById('header-secondary'), HeaderSecondary.component());
m.mount(document.getElementById('admin-navigation'), AdminNav.component());
Expand Down
6 changes: 4 additions & 2 deletions js/src/common/components/Navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default class Navigation extends Component {
onmouseenter={pane && pane.show.bind(pane)}
onmouseleave={pane && pane.onmouseleave.bind(pane)}>
{history.canGoBack()
? [this.getBackButton(), this.getPaneButton()]
? [this.getBackButton(), this.getPaneButton(), this.getDrawerButton()]
: this.getDrawerButton()}
</div>
);
Expand All @@ -45,7 +45,9 @@ export default class Navigation extends Component {
* @return {Object}
* @protected
*/
getBackButton() {
getBackButton() {
if (!this.props.back) return '';

const {history} = app;
const previous = history.getPrevious() || {};

Expand Down
4 changes: 2 additions & 2 deletions js/src/forum/ForumApplication.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ export default class ForumApplication extends Application {
this.routes[defaultAction].path = '/';
this.history.push(defaultAction, this.translator.trans('core.forum.header.back_to_index_tooltip'), '/');

m.mount(document.getElementById('app-navigation'), Navigation.component({className: 'App-backControl', drawer: true}));
m.mount(document.getElementById('header-navigation'), Navigation.component());
m.mount(document.getElementById('app-navigation'), Navigation.component({back: false, className: 'App-backControl', drawer: true}));
m.mount(document.getElementById('header-navigation'), Navigation.component({back: true, drawer: false}));
m.mount(document.getElementById('header-primary'), HeaderPrimary.component());
m.mount(document.getElementById('header-secondary'), HeaderSecondary.component());

Expand Down