loleaflet/src/control/Control.Menubar.js | 57 +++++++++++++++------------ loleaflet/src/control/Control.Toolbar.js | 13 ------ loleaflet/src/layer/tile/CalcTileLayer.js | 2 loleaflet/src/layer/tile/ImpressTileLayer.js | 4 - loleaflet/src/layer/tile/WriterTileLayer.js | 4 - 5 files changed, 34 insertions(+), 46 deletions(-)
New commits: commit ec85fa7550738609bfaeca04da7d019a0dcf76e8 Author: Michael Meeks <michael.me...@collabora.com> AuthorDate: Tue Oct 8 11:56:47 2019 +0100 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Tue Oct 8 12:01:38 2019 +0100 mobile: disable more irrelevant items. Change-Id: I929eaa4d855a2723ee19762ff74e8501b16443f9 diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 5ebadeb57..a37a555d2 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -62,19 +62,18 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:EditStyle'} ]}, {name: _UNO('.uno:ViewMenu', 'text'), id: 'view', type: 'menu', menu: [ - {name: _UNO('.uno:FullScreen', 'text'), id: 'fullscreen', type: 'action', mobileapp: false}, + {name: _UNO('.uno:FullScreen', 'text'), id: 'fullscreen', type: 'action', mobileapp: false, mobile: false}, {type: 'separator', mobileapp: false}, - {name: _UNO('.uno:ZoomPlus', 'text'), id: 'zoomin', type: 'action'}, - {name: _UNO('.uno:ZoomMinus', 'text'), id: 'zoomout', type: 'action'}, - {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}, + {name: _UNO('.uno:ZoomPlus', 'text'), id: 'zoomin', type: 'action', mobile: false}, + {name: _UNO('.uno:ZoomMinus', 'text'), id: 'zoomout', type: 'action', mobile: false}, + {name: _('Reset zoom'), id: 'zoomreset', type: 'action', mobile:false }, {name: _('Show Ruler'), id: 'showruler', type: 'action'}, - {type: 'separator'}, + {type: 'separator', mobile: false}, {uno: '.uno:ControlCodes'}, - {type: 'separator'}, + {type: 'separator', mobile: false}, {name: _UNO('.uno:ShowResolvedAnnotations', 'text'), id: 'showresolved', type: 'action'}, {type: 'separator'}, {uno: '.uno:Sidebar', mobile: false}, - {id: 'mobile-wizard', type: 'action', name: _('Mobile Wizard'), mobile: true, desktop: false} ] }, {name: _UNO('.uno:InsertMenu', 'text'), id: 'insert', mobile: false, type: 'menu', menu: [ @@ -284,13 +283,12 @@ L.Control.Menubar = L.Control.extend({ ]}, {name: _UNO('.uno:ViewMenu', 'presentation'), id: 'view', type: 'menu', menu: [ {name: _UNO('.uno:FullScreen', 'presentation'), id: 'fullscreen', type: 'action', mobileapp: false}, - {type: 'separator', mobileapp: false}, - {name: _UNO('.uno:ZoomPlus', 'presentation'), id: 'zoomin', type: 'action'}, - {name: _UNO('.uno:ZoomMinus', 'presentation'), id: 'zoomout', type: 'action'}, - {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}, - {uno: '.uno:Sidebar'}, - {id: 'mobile-wizard', type: 'action', name: _('Mobile Wizard'), mobile: true, desktop: false}] - }, + {type: 'separator', mobileapp: false, mobile: false}, + {name: _UNO('.uno:ZoomPlus', 'presentation'), id: 'zoomin', type: 'action', mobile: false }, + {name: _UNO('.uno:ZoomMinus', 'presentation'), id: 'zoomout', type: 'action', mobile: false}, + {name: _('Reset zoom'), id: 'zoomreset', type: 'action', mobile: false}, + {uno: '.uno:Sidebar', mobile: false} + ]}, {name: _UNO('.uno:InsertMenu', 'presentation'), id: 'insert', mobile: false, type: 'menu', menu: [ {name: _('Local Image...'), id: 'insertgraphic', type: 'action'}, {name: _UNO('.uno:InsertGraphic', 'presentation'), id: 'insertgraphicremote', type: 'action'}, @@ -303,7 +301,7 @@ L.Control.Menubar = L.Control.extend({ {type: 'separator'}, {uno: '.uno:HeaderAndFooter'}] }, - {name: _UNO('.uno:FormatMenu', 'presentation'), id: 'format', type: 'menu', menu: [ + {name: _UNO('.uno:FormatMenu', 'presentation'), id: 'format', mobile: false, type: 'menu', menu: [ {uno: '.uno:FontDialog'}, {uno: '.uno:ParagraphDialog'}, {uno: '.uno:PageSetup'}, @@ -335,13 +333,13 @@ L.Control.Menubar = L.Control.extend({ {name: _('Fullscreen presentation'), id: 'fullscreen-presentation', type: 'action'}] }, {name: _UNO('.uno:ToolsMenu', 'presentation'), id: 'tools', type: 'menu', menu: [ - {uno: '.uno:SpellDialog'}, + {uno: '.uno:SpellDialog', mobile: false}, {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'}]} ]}, {name: _UNO('.uno:HelpMenu', 'presentation'), id: 'help', type: 'menu', menu: [ - {name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action', mobileapp: false}, + {name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action', mobileapp: false, mobile: false}, {name: _('About'), id: 'about', type: 'action'}] }, {name: _('Last modification'), id: 'last-mod', type: 'action', mobile: false, tablet: false} @@ -383,7 +381,6 @@ L.Control.Menubar = L.Control.extend({ {name: _UNO('.uno:FullScreen', 'spreadsheet'), id: 'fullscreen', type: 'action', mobileapp: false}, {type: 'separator', mobileapp: false}, {uno: '.uno:Sidebar', mobile: false}, - {id: 'mobile-wizard', type: 'action', name: _('Mobile Wizard'), mobile: true, desktop: false} ]}, {name: _UNO('.uno:InsertMenu', 'spreadsheet'), id: 'insert', mobile: false, type: 'menu', menu: [ {name: _('Local Image...'), id: 'insertgraphic', type: 'action'}, @@ -434,10 +431,10 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:DataSort'}, {uno: '.uno:SortAscending'}, {uno: '.uno:SortDescending'}, - {uno: '.uno:Validation'}, + {uno: '.uno:Validation', mobile: false }, {type: 'separator'}, {uno: '.uno:DataFilterAutoFilter'}, - {name: _UNO('.uno:FilterMenu', 'spreadsheet'), type: 'menu', menu: [ + {name: _UNO('.uno:FilterMenu', 'spreadsheet'), mobile: false, type: 'menu', menu: [ {uno: '.uno:DataFilterStandardFilter'}, {uno: '.uno:DataFilterSpecialFilter'}, {type: 'separator'}, @@ -454,14 +451,14 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:ShowDetail'}]} ]}, {name: _UNO('.uno:ToolsMenu', 'spreadsheet'), id: 'tools', type: 'menu', menu: [ - {uno: '.uno:SpellDialog'}, + {uno: '.uno:SpellDialog', mobile: false}, {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'}]}, - {uno: '.uno:GoalSeekDialog'} + {uno: '.uno:GoalSeekDialog', mobile: false} ]}, {name: _UNO('.uno:HelpMenu', 'spreadsheet'), id: 'help', type: 'menu', menu: [ - {name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action', mobileapp: false}, + {name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action', mobileapp: false, mobile: false}, {name: _('About'), id: 'about', type: 'action'}] }, {name: _('Last modification'), id: 'last-mod', type: 'action', mobile: false, tablet: false} commit 43037b47c461c63d6e776c3c972d42d087d61f0a Author: Michael Meeks <michael.me...@collabora.com> AuthorDate: Tue Oct 8 11:45:58 2019 +0100 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Tue Oct 8 11:57:35 2019 +0100 mobile: use shape dialog for shape insertion. Change-Id: Iac49161ea7b4c231f8c36bee8946af6358dd1faa diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index a2a2fc5d9..5ebadeb57 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -105,7 +105,8 @@ L.Control.Menubar = L.Control.extend({ {uno: '.uno:InsertPagebreak'}, {uno: '.uno:InsertColumnBreak'}, {type: 'separator'}, - {name: _UNO('.uno:HyperlinkDialog'), id: 'inserthyperlink', type: 'action'}, + {name: _UNO('.uno:HyperlinkDialog'), id: 'hyperlink', type: 'action'}, + {name: _('Insert Shape'), id: 'insertshape', desktop: false, mobile: true, type: 'action' }, {uno: '.uno:InsertSymbol', mobile: false}, {name: _UNO('.uno:FormattingMarkMenu', 'text'), type: 'menu', menu: [ {uno: '.uno:InsertNonBreakingSpace'}, @@ -832,6 +833,15 @@ L.Control.Menubar = L.Control.extend({ }); }, + _openInsertShapesDialog: function() { + vex.open({ + unsafeContent: '<div id="insertshape-wrapper"><div id="insertshape-popup" class="insertshape-pop ui-widget ui-corner-all"><div class="insertshape-grid"></div></div></div>', + afterOpen: function() { + window.insertShapes(true); + } + }); + }, + _executeAction: function(item, id) { if (!id) id = $(item).data('id'); @@ -880,6 +890,8 @@ L.Control.Menubar = L.Control.extend({ this._map.fire('fullscreen'); } else if (id === 'insertpage') { this._map.insertPage(); + } else if (id === 'insertshape') { + this._openInsertShapesDialog(); } else if (id === 'duplicatepage') { this._map.duplicatePage(); } else if (id === 'deletepage') { diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js index b5571e387..d2543bc4e 100644 --- a/loleaflet/src/control/Control.Toolbar.js +++ b/loleaflet/src/control/Control.Toolbar.js @@ -659,7 +659,7 @@ function insertShapes(mobile) { click: function(e) { map.sendUnoCommand('.uno:' + $(e.target).data().uno); if (mobile) - vex.close(); + vex.closeAll(); else closePopup(); } @@ -736,15 +736,6 @@ function createToolbar() { } } -function openInsertShapesDialog() { - vex.open({ - content: '<div id="insertshape-wrapper"><div id="insertshape-popup" class="insertshape-pop ui-widget ui-corner-all"><div class="insertshape-grid"></div></div></div>', - afterOpen: function() { - insertShapes(true); - } - }); -} - function initNormalToolbar() { var toolItems = [ {type: 'button', id: 'closemobile', img: 'closemobile', desktop: false, mobile: false, tablet: true, hidden: true}, @@ -874,8 +865,6 @@ function initNormalToolbar() { {type: 'button', id: 'insertobjectchart', img: 'insertobjectchart', hint: _UNO('.uno:InsertObjectChart', '', true), uno: 'InsertObjectChart'}, {type: 'drop', id: 'insertshapes', img: 'basicshapes_ellipse', hint: _('Insert shapes'), overlay: {onShow: insertShapes}, html: '<div id="insertshape-wrapper"><div id="insertshape-popup" class="insertshape-pop ui-widget ui-corner-all"><div class="insertshape-grid"></div></div></div>'}, - {type: 'button', id: 'insertshapesMobile', img: 'basicshapes_ellipse', desktop: false, mobile: true, tablet: true, hint: _('Insert shapes'), onClick: openInsertShapesDialog}, - {type: 'button', id: 'link', img: 'link', hint: _UNO('.uno:HyperlinkDialog', '', true), disabled: true}, {type: 'button', id: 'insertsymbol', img: 'insertsymbol', hint: _UNO('.uno:InsertSymbol', '', true), uno: 'InsertSymbol'}, {type: 'spacer'}, diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js index 47992eb4c..6045d5ba1 100644 --- a/loleaflet/src/layer/tile/CalcTileLayer.js +++ b/loleaflet/src/layer/tile/CalcTileLayer.js @@ -91,8 +91,6 @@ L.CalcTileLayer = L.TileLayer.extend({ {type: 'button', id: 'numberformatincdecimals', img: 'numberformatincdecimals', hint: _UNO('.uno:NumberFormatIncDecimals', 'spreadsheet', true), hidden: true, uno: 'NumberFormatIncDecimals', disabled: true}, {type: 'button', id: 'sum', img: 'autosum', hint: _('Sum')}, {type: 'break', id: 'break-number'}, - {type: 'drop', id: 'insertshapes', img: 'basicshapes_ellipse', hint: _('Insert shapes'), overlay: {onShow: window.insertShapes}, - html: '<div id="insertshape-wrapper"><div id="insertshape-popup" class="insertshape-pop ui-widget ui-corner-all"><div class="insertshape-grid"></div></div></div>'}, ]; var toolbar = $('#toolbar-up'); diff --git a/loleaflet/src/layer/tile/ImpressTileLayer.js b/loleaflet/src/layer/tile/ImpressTileLayer.js index e0938732c..2e04bfcbe 100644 --- a/loleaflet/src/layer/tile/ImpressTileLayer.js +++ b/loleaflet/src/layer/tile/ImpressTileLayer.js @@ -116,10 +116,6 @@ L.ImpressTileLayer = L.TileLayer.extend({ {type: 'break', id: 'breakbullet'}, {type: 'drop', id: 'inserttable', img: 'inserttable', hint: _('Insert table'), hidden: true, overlay: {onShow: window.insertTable}, html: '<div id="inserttable-wrapper"><div id="inserttable-popup" class="inserttable-pop ui-widget ui-corner-all"><div class="inserttable-grid"></div><div id="inserttable-status" class="loleaflet-font" style="padding: 5px;"><br/></div></div></div>'}, - {type: 'drop', id: 'insertshapes', img: 'basicshapes_ellipse', hint: _('Insert shapes'), overlay: {onShow: window.insertShapes}, - html: '<div id="insertshape-wrapper"><div id="insertshape-popup" class="insertshape-pop ui-widget ui-corner-all"><div class="insertshape-grid"></div></div></div>'}, - - {type: 'break', id: 'breaksidebar'} ]; var toolbar = $('#toolbar-up'); diff --git a/loleaflet/src/layer/tile/WriterTileLayer.js b/loleaflet/src/layer/tile/WriterTileLayer.js index 4725a6e14..ffc1cee12 100644 --- a/loleaflet/src/layer/tile/WriterTileLayer.js +++ b/loleaflet/src/layer/tile/WriterTileLayer.js @@ -79,10 +79,6 @@ L.WriterTileLayer = L.TileLayer.extend({ {type: 'break', id: 'breakindent'}, {type: 'drop', id: 'inserttable', img: 'inserttable', hint: _('Insert table'), hidden: true, overlay: {onShow: window.insertTable}, html: '<div id="inserttable-wrapper"><div id="inserttable-popup" class="inserttable-pop ui-widget ui-corner-all"><div class="inserttable-grid"></div><div id="inserttable-status" class="loleaflet-font" style="padding: 5px;"><br/></div></div></div>'}, - {type: 'drop', id: 'insertshapes', img: 'basicshapes_ellipse', hint: _('Insert shapes'), overlay: {onShow: window.insertShapes}, - html: '<div id="insertshape-wrapper"><div id="insertshape-popup" class="insertshape-pop ui-widget ui-corner-all"><div class="insertshape-grid"></div></div></div>'}, - - {type: 'spacer'} ]; var toolbar = $('#toolbar-up'); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits