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

Pedro Pinto Silva (via logerrit) logerrit at kemper.freedesktop.org
Thu Nov 14 08:48:09 UTC 2019


 loleaflet/css/impress-mobile.css              |    4 ++++
 loleaflet/src/map/handler/Map.StateChanges.js |   14 +++++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

New commits:
commit 80f7985e039093fc908450baae5d48ab96bc2d15
Author:     Pedro Pinto Silva <pedro.silva at collabora.com>
AuthorDate: Wed Nov 13 15:05:30 2019 +0100
Commit:     Pedro Pinto da Silva <pedro.silva at collabora.com>
CommitDate: Thu Nov 14 09:47:51 2019 +0100

    Mobile: Impress: add visual cue when editing slide master
    
    Change-Id: I3a8882fbb76fb5c1d364381650d1424f140ccbd2
    Reviewed-on: https://gerrit.libreoffice.org/82606
    Reviewed-by: Pedro Pinto da Silva <pedro.silva at collabora.com>
    Tested-by: Pedro Pinto da Silva <pedro.silva at collabora.com>

diff --git a/loleaflet/css/impress-mobile.css b/loleaflet/css/impress-mobile.css
index e69de29bb..a1ce1ef8e 100644
--- a/loleaflet/css/impress-mobile.css
+++ b/loleaflet/css/impress-mobile.css
@@ -0,0 +1,4 @@
+.slide-master-mode > .leaflet-container{
+	background-color: #c2d5ed;
+	box-shadow: inset 0px 0px 5px 0px #4a96d3;
+}
diff --git a/loleaflet/src/map/handler/Map.StateChanges.js b/loleaflet/src/map/handler/Map.StateChanges.js
index cdee49161..060a48cfe 100644
--- a/loleaflet/src/map/handler/Map.StateChanges.js
+++ b/loleaflet/src/map/handler/Map.StateChanges.js
@@ -3,7 +3,8 @@
  * L.Map.StateChanges stores the state changes commands coming from core
  * LOK_CALLBACK_STATE_CHANGED callback
  */
-
+ /* global $ */
+ /*eslint no-extend-native:0*/
 L.Map.mergeOptions({
 	stateChangeHandler: true
 });
@@ -26,6 +27,7 @@ L.Map.StateChangeHandler = L.Handler.extend({
 	},
 
 	_onStateChanged: function(e) {
+		var slideMasterPageItem = this._map['stateChangeHandler'].getItemValue('.uno:SlideMasterPage');
 		var index = e.state.indexOf('{');
 		var state = index !== -1 ? JSON.parse(e.state.substring(index)) : e.state;
 		this._items[e.commandName] = state;
@@ -33,6 +35,16 @@ L.Map.StateChangeHandler = L.Handler.extend({
 			var redlineId = 'change-' + state;
 			this._map._docLayer._annotations.selectById(redlineId);
 		}
+		$('#document-container').removeClass('slide-master-mode');
+		$('#document-container').addClass('slide-normal-mode');
+		if (slideMasterPageItem) {
+			$('#document-container').removeClass('slide-normal-mode');
+			$('#document-container').addClass('slide-master-mode');
+		}
+		if (!slideMasterPageItem  || slideMasterPageItem  == 'false' || slideMasterPageItem  == 'undefined') {
+			$('#document-container').removeClass('slide-master-mode');
+			$('#document-container').addClass('slide-normal-mode');
+		}
 	},
 
 	getItems: function() {


More information about the Libreoffice-commits mailing list