[Libreoffice-commits] online.git: 2 commits - loleaflet/css loleaflet/reference.html loleaflet/src

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Tue Jun 4 07:10:19 UTC 2019


 loleaflet/css/leaflet.css                |   12 ++++++------
 loleaflet/reference.html                 |   17 ++++++++++++++++-
 loleaflet/src/control/Control.Toolbar.js |    2 +-
 loleaflet/src/map/handler/Map.WOPI.js    |   15 +++++++++++++++
 4 files changed, 38 insertions(+), 8 deletions(-)

New commits:
commit 43f09f284ca9be50913a3799c0c98137a1fdf42c
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Tue May 28 15:39:48 2019 +0200
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Tue Jun 4 09:10:12 2019 +0200

    Use LO branding colors for loading progress bar
    
    From https://wiki.documentfoundation.org/Marketing/Branding
    
    Change-Id: I7d3d5932ef67ae5c1a522d03e1d1a0a8960b0816
    Reviewed-on: https://gerrit.libreoffice.org/73107
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/loleaflet/css/leaflet.css b/loleaflet/css/leaflet.css
index 4ddd1cdf4..74cdc3418 100644
--- a/loleaflet/css/leaflet.css
+++ b/loleaflet/css/leaflet.css
@@ -729,14 +729,14 @@ input.clipboard {
 	margin: 0 -1px;
 	height: 100%;
 	text-align: right;
-	background: #5c3dcc;
+	background: #18A303;
 	border: 1px solid;
-	border-color: #4422bf #5435c4;
+	border-color: #106802;
 	border-radius: 10px;
-	background-image: -webkit-linear-gradient(top, #745dc6, #6549cc 70%, #5c3dcc);
-	background-image: -moz-linear-gradient(top, #745dc6, #6549cc 70%, #5c3dcc);
-	background-image: -o-linear-gradient(top, #745dc6, #6549cc 70%, #5c3dcc);
-	background-image: linear-gradient(to bottom, #745dc6, #6549cc 70%, #5c3dcc);
+	background-image: -webkit-linear-gradient(top, #92E285, #43C330 70%, #18A303);
+	background-image: -moz-linear-gradient(top, #92E285, #43C330 70%, #18A303);
+	background-image: -o-linear-gradient(top, #92E285, #43C330 70%, #18A303);
+	background-image: linear-gradient(to bottom, #92E285, #43C330 70%, #18A303);
 	-webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
 	box-shadow: inset 0 1px rgba(255, 255, 255, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
 	}
commit 3f31de251edc2df7df9bf8a94e3e38852686a8b2
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Thu May 23 14:52:11 2019 +0200
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Tue Jun 4 09:10:00 2019 +0200

    Add API method to remove elements from statusbar
    
    Change-Id: Ie45d67e642fdd72afb79391cce88c9e25f0b53b8
    Reviewed-on: https://gerrit.libreoffice.org/72851
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/loleaflet/reference.html b/loleaflet/reference.html
index 7cb520ab9..4bcaaeb67 100644
--- a/loleaflet/reference.html
+++ b/loleaflet/reference.html
@@ -3177,6 +3177,16 @@ Editor to WOPI host
 		</td>
 	</tr>
 	<tr>
+		<td><code><b>Remove_Statusbar_Element</b></code></td>
+		<td>
+			<code><nobr>id: <string></nobr></code>
+		</td>
+		<td>
+			Removes an element from the statusbar.<br/>
+		    <code>id</code> is the element ID (see <a href="#statusbar-element-ids">Finding statusbar element IDs</a>).
+		</td>
+	</tr>
+	<tr>
 		<td><code><b>Hide_Menubar</b></code></td>
 		<td></td>
 		<td>
@@ -3194,7 +3204,12 @@ Editor to WOPI host
 
 <h5><a name="toolbar-button-ids">Finding toolbar button IDs</a></h5>
 <p>Toolbar button IDs are defined in the <a href="https://opengrok.libreoffice.org/search?project=online&q=&defs=createToolbar">createToolbar</a>
-function in <a href="https://opengrok.libreoffice.org/xref/online/loleaflet/js/toolbar.js">loleaflet/js/toolbar.js</a>.
+function in <a href="https://opengrok.libreoffice.org/xref/online/loleaflet/src/control/Control.Toolbar.js">Control.Toolbar.js</a>.
+Note that they usually don't change but there is no guarantee that they are stable.</p>
+
+<h5><a name="statusbar-element-ids">Finding statusbar element IDs</a></h5>
+<p>Statusbar button IDs are defined in the <a href="https://opengrok.libreoffice.org/search?project=online&q=&defs=onDocLayerInit">onDocLayerInit</a>
+function in <a href="https://opengrok.libreoffice.org/xref/online/loleaflet/src/control/Control.Toolbar.js">Control.Toolbar.js</a>.
 Note that they usually don't change but there is no guarantee that they are stable.</p>
 
 <h4>Editor to WOPI host</h4>
diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index 956465f24..8839f259b 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -1055,7 +1055,7 @@ function initNormalToolbar() {
 									map['wopi'].HideUserList !== undefined &&
 									$.inArray('true', map['wopi'].HideUserList) < 0 &&
 									$.inArray('desktop', map['wopi'].HideUserList) < 0;
-				if (this.get('userlist').hidden == true && showInDesktop) {
+				if (this.get('userlist') && this.get('userlist').hidden == true && showInDesktop) {
 					this.show('userlist');
 					this.show('userlistbreak');
 					map.on('deselectuser', deselectUser);
diff --git a/loleaflet/src/map/handler/Map.WOPI.js b/loleaflet/src/map/handler/Map.WOPI.js
index d99d17520..bff0a062f 100644
--- a/loleaflet/src/map/handler/Map.WOPI.js
+++ b/loleaflet/src/map/handler/Map.WOPI.js
@@ -240,6 +240,21 @@ L.Map.WOPI = L.Handler.extend({
 				w2ui['editbar'].remove(msg.Values.id);
 			}
 		}
+		if (msg.MessageId === 'Remove_Statusbar_Element') {
+			if (!msg.Values) {
+				console.error('Property "Values" not set');
+				return;
+			}
+			if (!msg.Values.id) {
+				console.error('Property "Values.id" not set');
+				return;
+			}
+			if (!w2ui['actionbar'].get(msg.Values.id)) {
+				console.error('Statusbar element with id "' + msg.Values.id + '" not found.');
+				return;
+			}
+			w2ui['actionbar'].remove(msg.Values.id);
+		}
 		else if (msg.MessageId === 'Show_Menubar') {
 			this._map.showMenubar();
 		}


More information about the Libreoffice-commits mailing list