Shortcuts-bar remove menubar

all commands from menubar was added to the notebookbar
so no need for the hamburger menubar button

Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: Icb283b40c269d2f92a29ad16dba8dda9d0f860d2
This commit is contained in:
andreas kainz 2022-02-23 20:22:55 +01:00 committed by pedropintosilva
parent a4f53abac2
commit a2935d55e1
4 changed files with 0 additions and 153 deletions

View file

@ -243,12 +243,6 @@ L.Control.Notebookbar = L.Control.extend({
'id': 'shortcutstoolbox', 'id': 'shortcutstoolbox',
'type': 'toolbox', 'type': 'toolbox',
'children': [ 'children': [
{
'id': 'menu',
'type': 'toolitem',
'text': _('Menu'),
'command': '.uno:Menubar'
},
{ {
'id': 'save', 'id': 'save',
'type': 'toolitem', 'type': 'toolitem',

View file

@ -54,7 +54,6 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({
this._toolitemHandlers['.uno:shareas'] = this._shareAsControl; this._toolitemHandlers['.uno:shareas'] = this._shareAsControl;
this._toolitemHandlers['.uno:Print'] = this._printControl; this._toolitemHandlers['.uno:Print'] = this._printControl;
this._toolitemHandlers['.uno:rev-history'] = this._revHistoryControl; this._toolitemHandlers['.uno:rev-history'] = this._revHistoryControl;
this._toolitemHandlers['.uno:Menubar'] = this._menubarControl;
this._toolitemHandlers['.uno:InsertPageHeader'] = this._headerFooterControl; this._toolitemHandlers['.uno:InsertPageHeader'] = this._headerFooterControl;
this._toolitemHandlers['.uno:InsertPageFooter'] = this._headerFooterControl; this._toolitemHandlers['.uno:InsertPageFooter'] = this._headerFooterControl;
this._toolitemHandlers['.uno:Text'] = this._insertTextBoxControl; this._toolitemHandlers['.uno:Text'] = this._insertTextBoxControl;
@ -968,140 +967,6 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({
return false; return false;
}, },
_menubarControl: function(parentContainer, data, builder) {
var control = builder._unoToolButton(parentContainer, data, builder);
$(control.container).unbind('click.toolbutton');
$(control.container).tooltip({disabled: true});
$(control.container).addClass('sm sm-simple lo-menu');
var disabledMacros = window.enableMacrosExecution === 'false';
var menu = {
text: [
{id: 'nb-hamburger', name: _('Menu'), type: 'menu', menu: [
{uno: '.uno:SelectAll'},
{name: _('Show Ruler'), id: 'showruler', type: 'action'},
{type: 'separator'},
{name: _UNO('.uno:ChangesMenu', 'text'), id: 'changesmenu', type: 'menu', menu: [
{uno: '.uno:TrackChanges'},
{uno: '.uno:ShowTrackedChanges'},
{type: 'separator'},
{uno: '.uno:AcceptTrackedChanges'},
{uno: '.uno:AcceptAllTrackedChanges'},
{uno: '.uno:RejectAllTrackedChanges'},
{uno: '.uno:PreviousTrackedChange'},
{uno: '.uno:NextTrackedChange'}
]},
{uno: '.uno:SearchDialog'},
{type: 'separator'},
{name: _('Repair'), id: 'repair', type: 'action'},
{name: _UNO('.uno:ToolsMenu', 'text'), id: 'tools', type: 'menu', menu: [
{uno: '.uno:SpellingAndGrammarDialog'},
{uno: '.uno:SpellOnline'},
{uno: '.uno:ThesaurusDialog'},
{uno: '.uno:WordCountDialog'},
{uno: '.uno:LineNumberingDialog'},
{type: 'separator'},
{uno: '.uno:RunMacro', hidden: disabledMacros},
{type: 'separator', hidden: disabledMacros},
{name: _UNO('.uno:AutoFormatMenu', 'text'), type: 'menu', menu: [
{uno: '.uno:OnlineAutoFormat'}]}
]}
]}
],
spreadsheet: [
{id: 'nb-hamburger', name: _('Menu'), type: 'menu', menu: [
{uno: '.uno:SelectAll'},
{type: 'separator'},
{uno: '.uno:SearchDialog'},
{type: 'separator'},
{name: _('Repair'), id: 'repair', type: 'action'},
{name: _UNO('.uno:ToolsMenu', 'spreadsheet'), id: 'tools', type: 'menu', menu: [
{uno: '.uno:SpellDialog'},
{uno: '.uno:SpellOnline'},
{uno: '.uno:GoalSeekDialog'},
{type: 'separator', hidden: disabledMacros},
{uno: '.uno:RunMacro', hidden: disabledMacros}
]}
]}
],
presentation: [
{id: 'nb-hamburger', name: _('Menu'), type: 'menu', menu: [
{uno: '.uno:SelectAll'},
{type: 'separator'},
{uno: '.uno:SlideMasterPage'},
{type: 'separator'},
{uno: '.uno:ModifyPage'},
{uno: '.uno:SlideChangeWindow'},
{uno: '.uno:CustomAnimation'},
{uno: '.uno:MasterSlidesPanel'},
{type: 'separator'},
{uno: '.uno:SearchDialog'},
{type: 'separator'},
{name: _('Repair'), id: 'repair', type: 'action'},
{name: _UNO('.uno:ToolsMenu', 'presentation'), id: 'tools', type: 'menu', menu: [
{uno: '.uno:SpellDialog'},
{uno: '.uno:SpellOnline'},
{type: 'separator', hidden: disabledMacros},
{uno: '.uno:RunMacro', hidden: disabledMacros}
]},
]}
],
drawing: [
{id: 'nb-hamburger', name: _('Menu'), type: 'menu', menu: [
{type: 'separator'},
{uno: '.uno:SearchDialog'},
{type: 'separator'},
{name: _('Repair'), id: 'repair', type: 'action'},
{name: _UNO('.uno:ToolsMenu', 'presentation'), id: 'tools', type: 'menu', menu: [
{uno: '.uno:SpellDialog'},
{uno: '.uno:SpellOnline'},
{name: _UNO('.uno:LanguageMenu'), type: 'menu', menu: [
{name: _('None (Do not check spelling)'), id: 'nonelanguage', uno: '.uno:LanguageStatus?Language:string=Default_LANGUAGE_NONE'}]},
]},
]}
]
};
var menubar = L.control.menubar({allowedReadonlyMenus: ['nb-hamburger']});
menubar._map = builder.map;
var docType = builder.map.getDocType();
var menuHtml = menubar._createMenu(menu[docType]);
document.getElementById('Menubar').setAttribute('role', 'menu');
$(control.container).html(menuHtml);
$(control.container).smartmenus({
hideOnClick: true,
showOnClick: true,
hideTimeout: 0,
hideDuration: 0,
hideFunction: null,
showDuration: 0,
showFunction: null,
showTimeout: 0,
collapsibleHideDuration: 0,
collapsibleHideFunction: null,
subIndicatorsPos: 'append',
subIndicatorsText: '&#8250;'
});
$(menuHtml[0]).children('a').html('<img class="ui-content unobutton" src="' + L.LOUtil.getImageURL('lc_hamburger.svg') + '" id="Hamburgerimg" alt="Menu">');
$(menuHtml[0]).children('a').click(function () {
$(control.container).smartmenus('menuHideAll');
});
$(control.container).bind('beforeshow.smapi', {self: menubar}, menubar._beforeShow);
$(control.container).bind('click.smapi', {self: menubar}, menubar._onClicked);
$(control.container).bind('select.smapi', {self: menubar}, menubar._onItemSelected);
$(control.container).bind('mouseenter.smapi', {self: menubar}, menubar._onMouseEnter);
$(control.container).bind('mouseleave.smapi', {self: menubar}, menubar._onMouseLeave);
$(control.container).bind('keydown', {self: menubar}, menubar._onKeyDown);
$(control.container).bind('hideAll.smapi', {self: menubar}, menubar._onMouseOut);
},
buildControl: function(parent, data) { buildControl: function(parent, data) {
var type = data.type; var type = data.type;
var handler = this._controlHandlers[type]; var handler = this._controlHandlers[type];

View file

@ -12,12 +12,6 @@ L.Control.NotebookbarDraw = L.Control.NotebookbarImpress.extend({
'id': 'shortcutstoolbox', 'id': 'shortcutstoolbox',
'type': 'toolbox', 'type': 'toolbox',
'children': [ 'children': [
{
'id': 'menu',
'type': 'toolitem',
'text': _('Menu'),
'command': '.uno:Menubar'
},
{ {
'id': 'save', 'id': 'save',
'type': 'toolitem', 'type': 'toolitem',

View file

@ -12,12 +12,6 @@ L.Control.NotebookbarImpress = L.Control.NotebookbarWriter.extend({
'id': 'shortcutstoolbox', 'id': 'shortcutstoolbox',
'type': 'toolbox', 'type': 'toolbox',
'children': [ 'children': [
{
'id': 'menu',
'type': 'toolitem',
'text': _('Menu'),
'command': '.uno:Menubar'
},
{ {
'id': 'save', 'id': 'save',
'type': 'toolitem', 'type': 'toolitem',