loleaflet/dist/toolbar/toolbar.js | 4 ---- loleaflet/src/control/Control.Menubar.js | 24 +++++++++++++++++------- 2 files changed, 17 insertions(+), 11 deletions(-)
New commits: commit d0fb736a5b11998ddca902ee11c5914dd6ace293 Author: Pranav Kant <[email protected]> Date: Fri Jun 24 23:47:05 2016 +0530 loleaflet: Ask my host to show revision-history Change-Id: If1ed5fc03c6504e22c565b0278983bb168bb6fc8 diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 9fda481..6b4fec6 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -8,8 +8,9 @@ L.Control.Menubar = L.Control.extend({ options: { text: [ {name: _('File'), type: 'menu', menu: [{name: _('Save'), type: 'unocommand', uno: '.uno:Save'}, - {name: _('Print'), id: 'print', type: 'action'}, - {name: _('Download as'), type: 'menu', menu: [{name: _('PDF Document (.pdf)'), id: 'downloadas-pdf', type: 'action'}, + {name: _('Print'), id: 'print', type: 'action'}, + {name: _('See revision history'), id: 'rev-history', type: 'action'}, + {name: _('Download as'), type: 'menu', menu: [{name: _('PDF Document (.pdf)'), id: 'downloadas-pdf', type: 'action'}, {name: _('ODF text document (.odt)'), id: 'downloadas-odt', type: 'action'}, {name: _('Microsoft Word 2003 (.doc)'), id: 'downloadas-doc', type: 'action'}, {name: _('Microsoft Word (.docx)'), id: 'downloadas-docx', type: 'action'}]}] @@ -53,8 +54,9 @@ L.Control.Menubar = L.Control.extend({ presentation: [ {name: _('File'), type: 'menu', menu: [{name: _('Save'), type: 'unocommand', uno: '.uno:Save'}, - {name: _('Print'), id: 'print', type: 'action'}, - {name: _('Download as'), type: 'menu', menu: [{name: _('PDF Document (.pdf)'), id: 'downloadas-pdf', type: 'action'}, + {name: _('Print'), id: 'print', type: 'action'}, + {name: _('See revision history'), id: 'rev-history', type: 'action'}, + {name: _('Download as'), type: 'menu', menu: [{name: _('PDF Document (.pdf)'), id: 'downloadas-pdf', type: 'action'}, {name: _('ODF presentation (.odp)'), id: 'downloadas-odp', type: 'action'}, {name: _('Microsoft Powerpoint 2003 (.ppt)'), id: 'downloadas-ppt', type: 'action'}, {name: _('Microsoft Powerpoint (.pptx)'), id: 'downloadas-pptx', type: 'action'}]}] @@ -98,8 +100,9 @@ L.Control.Menubar = L.Control.extend({ spreadsheet: [ {name: _('File'), type: 'menu', menu: [{name: _('Save'), type: 'unocommand', uno: '.uno:Save'}, - {name: _('Print'), id: 'print', type: 'action'}, - {name: _('Download as'), type: 'menu', menu: [{name: _('PDF Document (.pdf)'), id: 'downloadas-pdf', type: 'action'}, + {name: _('Print'), id: 'print', type: 'action'}, + {name: _('See revision history'), id: 'rev-history', type: 'action'}, + {name: _('Download as'), type: 'menu', menu: [{name: _('PDF Document (.pdf)'), id: 'downloadas-pdf', type: 'action'}, {name: _('ODF spreadsheet (.ods)'), id: 'downloadas-ods', type: 'action'}, {name: _('Microsoft Excel 2003 (.xls)'), id: 'downloadas-xls', type: 'action'}, {name: _('Microsoft Excel (.xlsx)'), id: 'downloadas-xlsx', type: 'action'}]}] @@ -305,6 +308,12 @@ L.Control.Menubar = L.Control.extend({ map.showLOAboutDialog(); } else if (id === 'keyboard-shortcuts') { map.showLOKeyboardHelp(); + } else if (id === 'rev-history') { + // if we are being loaded inside an iframe, ask + // our host to show revision history mode + if (window.top !== window.self) { + window.parent.postMessage('rev-history', '*'); + } } }, commit da38ed2cc7d2d93038af6b290a825560f2059ffe Author: Pranav Kant <[email protected]> Date: Fri Jun 24 23:39:34 2016 +0530 Remove invalid placeholder This is no longer valid since context menus are implemented in loleaflet already. Change-Id: Ic2e21a92c5fdd87a2f3c34a3ff16628337184e1d diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 5d6629f..e0a4255 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -1103,10 +1103,6 @@ map.on('mouseup keypress', function() { } }); -map.on('locontextmenu', function () { - // TODO: context menu handling... -}); - map.on('statusindicator', function (e) { if (e.statusType === 'loleafletloaded') { var data = ['']; commit 2162f2c9d704f1079c05298b03132b9237e97db0 Author: Pranav Kant <[email protected]> Date: Fri Jun 24 23:32:46 2016 +0530 loleaflet: Allow 'about', 'keyboard-shortcuts' in non-edit modes Change-Id: I2def7a17d05ec7834290b94a51edfd589f6187ed diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 9052e40..9fda481 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -140,7 +140,8 @@ L.Control.Menubar = L.Control.extend({ allowedViewModeActions: ['downloadas-pdf', 'downloadas-odt', 'downloadas-doc', 'downloadas-docx', 'downloadas-odp', 'downloadas-ppt', 'downloadas-pptx', 'downloadas-ods', 'downloadas-xls', 'downloadas-xlsx', - 'fullscreen', 'zoomin', 'zoomout', 'zoomreset'] + 'fullscreen', 'zoomin', 'zoomout', 'zoomreset', + 'about', 'keyboard-shortcuts'] }, onAdd: function (map) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
