Commit 9208e3b2 authored by Romain Casati's avatar Romain Casati
Browse files

Menubar and toolbar now get properly triggered.

parent 9be11c7e
Pipeline #399863 passed with stages
in 3 minutes and 5 seconds
......@@ -600,16 +600,9 @@ define([
cmd: i18n.msg._('toggle header'),
help: i18n.msg._('switch between showing and hiding the header'),
handler : function(env) {
var value = !env.notebook.header;
if (value === true) {
$('#header-container').show();
$('.header-bar').show();
} else if (value === false) {
$('#header-container').hide();
$('.header-bar').hide();
}
$('#header-container').toggle();
$('.header-bar').toggle();
events.trigger('resize-header.Page');
env.notebook.header = value;
}
},
'show-header':{
......@@ -619,7 +612,6 @@ define([
$('#header-container').show();
$('.header-bar').show();
events.trigger('resize-header.Page');
env.notebook.header = true;
}
},
'hide-header':{
......@@ -629,7 +621,6 @@ define([
$('#header-container').hide();
$('.header-bar').hide();
events.trigger('resize-header.Page');
env.notebook.header = false;
}
},
'toggle-menubar':{
......@@ -657,14 +648,8 @@ define([
cmd: i18n.msg._('toggle toolbar'),
help: i18n.msg._('switch between showing and hiding the toolbar'),
handler : function(env) {
var value = !env.notebook.toolbar;
if (value === true) {
$('div#maintoolbar').show();
} else if (value === false) {
$('div#maintoolbar').hide();
}
$('div#maintoolbar').toggle();
events.trigger('resize-header.Page');
env.notebook.toolbar = value;
}
},
'show-toolbar':{
......@@ -673,7 +658,6 @@ define([
handler : function(env) {
$('div#maintoolbar').show();
events.trigger('resize-header.Page');
env.notebook.toolbar = true;
}
},
'hide-toolbar':{
......@@ -682,7 +666,6 @@ define([
handler : function(env) {
$('div#maintoolbar').hide();
events.trigger('resize-header.Page');
env.notebook.toolbar = false;
}
},
'close-pager': {
......
Markdown is supported
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