[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/css loleaflet/images loleaflet/js loleaflet/src

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon May 6 18:15:52 UTC 2019


 loleaflet/css/toolbar.css                |    1 +
 loleaflet/images/lc_formproperties.svg   |    1 +
 loleaflet/js/toolbar.js                  |    6 ++++--
 loleaflet/src/control/Control.Menubar.js |    8 ++++++--
 loleaflet/src/map/Map.js                 |    2 +-
 loleaflet/src/unocommands.js             |    1 +
 6 files changed, 14 insertions(+), 5 deletions(-)

New commits:
commit 212290a35dc4e87439e5d4d41b16224281c8d27d
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sat May 4 15:30:11 2019 -0400
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Mon May 6 20:15:33 2019 +0200

    leaflet: Add sidebar commands in toolbar and menu
    
    Change-Id: Icac459849196a70b62ac0e2a558882d8cc199e6c
    Reviewed-on: https://gerrit.libreoffice.org/71840
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index b60a95806..881707038 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -612,6 +612,7 @@ button.leaflet-control-search-next
 .w2ui-icon.fullscreen{ background: url('images/lc_fullscreen.svg') no-repeat center !important; }
 .w2ui-icon.closemobile{ background: url('images/lc_closedocmobile.svg') no-repeat center !important; }
 .w2ui-icon.closetoolbar{ background: url('images/close_toolbar.svg') no-repeat center !important; }
+.w2ui-icon.sidebar_modify_page{ background: url('images/lc_formproperties.svg') no-repeat center !important; }
 
 .w2ui-icon.vereign{ background: url('images/vereign.png') no-repeat center !important; }
 
diff --git a/loleaflet/images/lc_formproperties.svg b/loleaflet/images/lc_formproperties.svg
new file mode 100644
index 000000000..75c2b7b52
--- /dev/null
+++ b/loleaflet/images/lc_formproperties.svg
@@ -0,0 +1 @@
+<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m3 6h18v15h-18z" fill="#fff"/><path d="m3 2c-.554 0-1 .446-1 1v18c0 .554.446 1 1 1h18c.554 0 1-.446 1-1v-18c0-.554-.446-1-1-1zm0 4h18v15h-18z" fill="#808080"/><rect fill="#808080" height="1" ry=".5" width="12" x="6" y="11"/><rect fill="#4d82b8" height="1" ry=".5" width="4" x="6" y="15"/><path d="m10.5 14a1.5 1.5 0 0 0 -1.5 1.5 1.5 1.5 0 0 0 1.5 1.5 1.5 1.5 0 0 0 1.5-1.5 1.5 1.5 0 0 0 -1.5-1.5zm0 1a.5.5 0 0 1 .5.5.5.5 0 0 1 -.5.5.5.5 0 0 1 -.5-.5.5.5 0 0 1 .5-.5z" fill="#4d82b8"/><path d="m13.5 10c-.828427 0-1.5.671573-1.5 1.5s.671573 1.5 1.5 1.5 1.5-.671573 1.5-1.5-.671573-1.5-1.5-1.5z" fill="#808080"/><rect fill="#4d82b8" height="1" ry=".491011" width="7" x="11" y="15"/><g fill="#808080"><rect height="1" ry=".5" width="4" x="6" y="15"/><path d="m10.5 14a1.5 1.5 0 0 0 -1.5 1.5 1.5 1.5 0 0 0 1.5 1.5 1.5 1.5 0 0 0 1.5-1.5 1.5 1.5 0 0 0 -1.5-1.5zm0 1a.5.5 0 0 1 .5.5.5.5 0 0 1 -.5.5.5.5 0 0 1 -.5-.5.5.5 0 0 1 .5-.5z"/>
 <rect height="1" ry=".491011" width="7" x="11" y="15"/></g></svg>
\ No newline at end of file
diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index 68cddbd22..9c9863595 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -814,6 +814,8 @@ function createToolbar() {
 		{type: 'button',  id: 'insertsymbol', img: 'insertsymbol', hint: _UNO('.uno:InsertSymbol', '', true), uno: 'InsertSymbol'},
 		{type: 'spacer'},
 		{type: 'button',  id: 'edit',  img: 'edit'},
+		{type: 'button',  id: 'sidebar', img: 'sidebar_modify_page', hint: _UNO('.uno:Sidebar', '', true), uno: '.uno:Sidebar', hidden: true},
+		{type: 'break', id: 'breaksidebar', hidden: true},
 		{type: 'button',  id: 'fold',  img: 'fold', desktop: true, mobile: false, hidden: true},
 		{type: 'button',  id: 'hamburger-tablet',  img: 'hamburger', desktop: false, mobile: false, tablet: true, hidden: true}
 	];
@@ -1569,7 +1571,7 @@ function onDocLayerInit() {
 		toolbarUp.show('textalign', 'wraptext', 'breakspacing', 'insertannotation', 'conditionalformaticonset',
 			'numberformatcurrency', 'numberformatpercent',
 			'numberformatincdecimals', 'numberformatdecdecimals', 'break-number', 'togglemergecells', 'breakmergecells',
-			'setborderstyle', 'sortascending', 'sortdescending', 'breaksorting');
+			'setborderstyle', 'sortascending', 'sortdescending', 'breaksorting', 'breaksidebar', 'sidebar');
 		toolbarUp.remove('styles');
 
 		statusbar.remove('prev', 'next', 'prevnextbreak');
@@ -1636,7 +1638,7 @@ function onDocLayerInit() {
 	case 'text':
 		toolbarUp.show('leftpara', 'centerpara', 'rightpara', 'justifypara', 'breakpara', 'linespacing',
 			'breakspacing', 'defaultbullet', 'defaultnumbering', 'breakbullet', 'incrementindent', 'decrementindent',
-			'breakindent', 'inserttable', 'insertannotation');
+			'breakindent', 'inserttable', 'insertannotation', 'breaksidebar', 'sidebar');
 
 		if (!_inMobileMode()) {
 			statusbar.insert('left', [
diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index f58b457ed..676cf8047 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -62,7 +62,9 @@ L.Control.Menubar = L.Control.extend({
 				{name: _UNO('.uno:ZoomMinus', 'text'), id: 'zoomout', type: 'action'},
 				{name: _('Reset zoom'), id: 'zoomreset', type: 'action'},
 				{type: 'separator'},
-				{uno: '.uno:ControlCodes'}
+				{uno: '.uno:ControlCodes'},
+				{type: 'separator'},
+				{uno: '.uno:Sidebar'}
 			]
 			},
 			{name: _UNO('.uno:InsertMenu', 'text'), type: 'menu', menu: [
@@ -347,7 +349,9 @@ L.Control.Menubar = L.Control.extend({
 				{uno: '.uno:SearchDialog'}
 			]},
 			{name: _UNO('.uno:ViewMenu', 'spreadsheet'), id: 'view', type: 'menu', mobileapp: false, menu: [
-				{name: _UNO('.uno:FullScreen', 'spreadsheet'), id: 'fullscreen', type: 'action'}
+				{name: _UNO('.uno:FullScreen', 'spreadsheet'), id: 'fullscreen', type: 'action'},
+				{type: 'separator'},
+				{uno: '.uno:Sidebar'}
 			]},
 			{name: _UNO('.uno:InsertMenu', 'spreadsheet'), type: 'menu', menu: [
 				{name: _('Local Image...'), id: 'insertgraphic', type: 'action'},
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 9771e38d2..95facb614 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -238,7 +238,7 @@ L.Map = L.Evented.extend({
                     // This triggers all sidebar decks, so they would
                     // be loaded and show rather quickly on first use.
                     // Also, triggers sidebar window creation in the client.
-					map._socket.sendMessage('uno .uno:ViewSidebarStyles');
+					map._socket.sendMessage('uno .uno:Sidebar');
 					map._socket.sendMessage('uno .uno:Sidebar');
 				}, 200);
 			}
diff --git a/loleaflet/src/unocommands.js b/loleaflet/src/unocommands.js
index 225ce5d79..ebbce32de 100644
--- a/loleaflet/src/unocommands.js
+++ b/loleaflet/src/unocommands.js
@@ -221,6 +221,7 @@ var unoCommandsArray = {
 	ShowRow:{spreadsheet:{context:_('Sho~w Rows'),menu:_('~Show'),},},
 	ShowTrackedChanges:{text:{menu:_('~Show'),},},
 	Shrink:{global:{menu:_('Decrease Size'),},},
+	Sidebar:{global:{menu:_('Sidebar'),},},
 	SlideMenu:{presentation:{menu:_('S~lide'),},},
 	SmallCaps:{global:{menu:_('Small capitals'),},},
 	SortAscending:{spreadsheet:{menu:_('Sort Ascending'),},},


More information about the Libreoffice-commits mailing list