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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Jan 29 20:05:43 UTC 2019


 loleaflet/css/loleaflet.css      |  189 ++++++++++++++++++++++-----------------
 loleaflet/html/loleaflet.html.m4 |    8 -
 loleaflet/src/map/Map.js         |    5 +
 3 files changed, 117 insertions(+), 85 deletions(-)

New commits:
commit b858bf4ce752062919d3aa7b6ad85a4730fffa3f
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Jan 29 20:51:16 2019 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Jan 29 21:03:51 2019 +0100

    Unify whitespaces in loleaflet.css
    
    Change-Id: I6d916acac8f6b7d4c71eab4fd63b5e13d61be4a1

diff --git a/loleaflet/css/loleaflet.css b/loleaflet/css/loleaflet.css
index 2983bd724..eac516f8a 100644
--- a/loleaflet/css/loleaflet.css
+++ b/loleaflet/css/loleaflet.css
@@ -13,11 +13,11 @@
 }
 
 #document-container.readonly {
-    top: 36px;
+	top: 36px;
 }
 
 #toolbar-wrapper.readonly {
-    display: none;
+	display: none;
 }
 
 #sidebar-dock-wrapper.tablet {
@@ -40,128 +40,125 @@
 }
 
 .loleaflet-scrollbar-show {
-    opacity: 1 !important;
-    filter: "alpha(opacity=100)" !important;
-    -ms-filter: "alpha(opacity=100)" !important;
+	opacity: 1 !important;
+	filter: "alpha(opacity=100)" !important;
+	-ms-filter: "alpha(opacity=100)" !important;
 }
 
 body {
-    margin: 0;
-    overflow: hidden;
-    overscroll-behavior-y: none; /* disable the pull to reload gesture */
-    background: #ffffff;
-    touch-action: none;
+	margin: 0;
+	overflow: hidden;
+	overscroll-behavior-y: none; /* disable the pull to reload gesture */
+	background: #ffffff;
+	touch-action: none;
 }
 
 #presentation-controls-wrapper {
-    background: #dfdfdf;
-    position: absolute;
-    top: 77px;
-    left: 0px;
-    bottom: 66px;
-    max-width: 218px;
-    border-top: 1px solid #b6b6b6;
-    display: block;
+	background: #dfdfdf;
+	position: absolute;
+	top: 77px;
+	left: 0px;
+	bottom: 66px;
+	max-width: 218px;
+	border-top: 1px solid #b6b6b6;
+	display: block;
 }
 
 #presentation-controls-wrapper.drawing {
-    bottom: 40px; /* Hide the presentation toolbar (insert slide etc.) for doctype = drawing */
+	bottom: 40px; /* Hide the presentation toolbar (insert slide etc.) for doctype = drawing */
 }
 
 #presentation-controls-wrapper.readonly {
-    top: 36px;
+	top: 36px;
 }
 
 #toolbar-wrapper {
-    position: relative;
-    table-layout: fixed;
-    border-collapse: collapse;
+	position: relative;
+	table-layout: fixed;
+	border-collapse: collapse;
 	width: 100%;
 	border-top: 1px solid #bbbbbb;
 }
 
 #toolbar-logo {
-    width: 0;
+	width: 0;
 }
 
 #toolbar-hamburger {
-    width: 0;
+	width: 0;
 }
 
 #mobile-edit-button {
-    position: absolute;
-    width: 56px;
-    height: 56px;
-    right: 16px;
-    bottom: 16px;
-    background-color: #0b87e7;
-    border-radius: 50%;
-    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
-    z-index: 2000;
+	position: absolute;
+	width: 56px;
+	height: 56px;
+	right: 16px;
+	bottom: 16px;
+	background-color: #0b87e7;
+	border-radius: 50%;
+	box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
+	z-index: 2000;
 }
 
 #mobile-edit-button-image {
-    position: relative;
-    left: 16px;
-    top: 16px;
-    width: 24px;
-    height: 24px;
-    background: url('images/baseline-edit-24px.svg') no-repeat center !important;
+	position: relative;
+	left: 16px;
+	top: 16px;
+	width: 24px;
+	height: 24px;
+	background: url('images/baseline-edit-24px.svg') no-repeat center !important;
 }
 
 @media (max-width: 767px),(max-device-height: 767px) {
-    /* Show slidesorter beyond 768px only */
-    #presentation-controls-wrapper {
+	/* Show slidesorter beyond 768px only */
+	#presentation-controls-wrapper {
 	display: none;
-    }
-<<<<<<< HEAD
-=======
+	}
 
-    /* Show sidebar beyond 768px only */
-    #sidebar-dock-wrapper {
+	/* Show sidebar beyond 768px only */
+	#sidebar-dock-wrapper {
 	display: none;
 	top: 41px;
-    }
+	}
 
-    #document-container.tablet {
-        top: 41px;
-    }
+	#document-container.tablet {
+		top: 41px;
+	}
 
-    #document-container.readonly {
-        top: 41px;
-    }
+	#document-container.readonly {
+		top: 41px;
+	}
 
-    #sidebar-dock-wrapper.tablet {
-        top: 41px;
-    }
+	#sidebar-dock-wrapper.tablet {
+		top: 41px;
+	}
 
-    #document-container.sidebar-document {
+	#document-container.sidebar-document {
 	left: 0px !important;
-    }
+	}
 
->>>>>>> c620fd91a... Reduce readonly toolbar height
-    #document-container.parts-preview-document {
+	#document-container.parts-preview-document {
 	left: 0px !important;
-    }
-    #document-container.spreadsheet-document {
+	}
+	#document-container.spreadsheet-document {
 	top: 103px !important;
-    }
-    #document-container.spreadsheet-document.readonly {
+	}
+	#document-container.spreadsheet-document.readonly {
 	top: 61px !important;
-    }
-    #document-container {
+	}
+	#document-container {
 	top: 41px;
-    }
-    #spreadsheet-row-column-frame {
+	}
+	#spreadsheet-row-column-frame {
 	top: 83px !important;
-    }
-    #spreadsheet-row-column-frame.readonly {
+	}
+	#spreadsheet-row-column-frame.readonly {
 	top: 41px !important;
-    }
-    #toolbar-hamburger {
+	}
+	#toolbar-hamburger {
 	width: 41px;
-    }
-    #closebuttonwrapper {
+	}
+	#closebuttonwrapper {
 	display: none;
 	}
 	/* Show menubar even if folded */
@@ -171,9 +168,9 @@ body {
 }
 
 .loleaflet-font {
-    font-family: "Segoe UI", Tahoma, Arial, Helvetica, sans-serif !important;
-    font-size: 12px !important;
-    font-weight: normal !important;
+	font-family: "Segoe UI", Tahoma, Arial, Helvetica, sans-serif !important;
+	font-size: 12px !important;
+	font-weight: normal !important;
 }
 
 .loleaflet-character {
@@ -269,8 +266,8 @@ body {
 }
 
 .loleaflet-dont-break {
-        /* These are technically the same, but use both */
-        overflow-wrap: break-word;
+		/* These are technically the same, but use both */
+		overflow-wrap: break-word;
 	word-wrap: break-word;
 
 	/* Don't eat new lines  */
@@ -334,32 +331,32 @@ body {
 
 .loleaflet-annotation-menu, .loleaflet-annotation-menu-redline, .loleaflet-redline-accept-button, .loleaflet-redline-reject-button {
 	margin: 0;
-        padding: 0;
-        width: 24px;
-        height: 24px;
+		padding: 0;
+		width: 24px;
+		height: 24px;
 	vertical-align: top;
 	border: 1px solid transparent;
 	display: inline-block;
 }
 
 .loleaflet-redline-accept-button {
-        background: url('images/lc_accepttrackedchanges.svg') no-repeat center !important;
+		background: url('images/lc_accepttrackedchanges.svg') no-repeat center !important;
 }
 
 .loleaflet-redline-reject-button {
-        background: url('images/lc_rejecttrackedchange.svg') no-repeat center !important;
+		background: url('images/lc_rejecttrackedchange.svg') no-repeat center !important;
 }
 
 .loleaflet-context-copy {
-        background: url('images/lc_copy.svg') no-repeat center !important;
+		background: url('images/lc_copy.svg') no-repeat center !important;
 }
 
 .loleaflet-context-cut {
-        background: url('images/lc_cut.svg') no-repeat center !important;
+		background: url('images/lc_cut.svg') no-repeat center !important;
 }
 
 .loleaflet-context-paste {
-        background: url('images/lc_paste.svg') no-repeat center !important;
+		background: url('images/lc_paste.svg') no-repeat center !important;
 }
 
 .loleaflet-annotation-menu, .loleaflet-annotation-menu-redline {
@@ -387,7 +384,7 @@ body {
 }
 
 .loleaflet-annotation-caption {
-        font-weight: bold;
+		font-weight: bold;
 }
 
 .loleaflet-bar {
@@ -470,14 +467,14 @@ body {
 }
 
 .lokdialog_canvas {
-        cursor: default;
-        display: block; /* required to remove all borders around canvas element */
-        caret-color: transparent; /* firefox shows a caret otherwise on top-left of the canvas */
-        user-select: none;
-        -moz-user-select: none;
-        -khtml-user-select: none;
-        -webkit-user-select: none;
-        -o-user-select: none;
+		cursor: default;
+		display: block; /* required to remove all borders around canvas element */
+		caret-color: transparent; /* firefox shows a caret otherwise on top-left of the canvas */
+		user-select: none;
+		-moz-user-select: none;
+		-khtml-user-select: none;
+		-webkit-user-select: none;
+		-o-user-select: none;
 }
 
 /* Infobar */
commit d054da1e6bef02ac8cbbc7e430ba23e1637fc28c
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Jan 29 16:43:23 2019 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Jan 29 20:56:45 2019 +0100

    Reduce readonly toolbar height
    
    Change-Id: I431a2f3e87374a1cb6cb75557cb0d1eecccf17d0

diff --git a/loleaflet/css/loleaflet.css b/loleaflet/css/loleaflet.css
index fefaab466..2983bd724 100644
--- a/loleaflet/css/loleaflet.css
+++ b/loleaflet/css/loleaflet.css
@@ -9,17 +9,21 @@
 }
 
 #document-container.tablet {
-	top: 41px;
+	top: 36px;
 }
 
 #document-container.readonly {
-    top: 41px;
+    top: 36px;
 }
 
 #toolbar-wrapper.readonly {
     display: none;
 }
 
+#sidebar-dock-wrapper.tablet {
+	top: 36px;
+}
+
 #map {
 	position: absolute;
 	top: 0px;
@@ -65,7 +69,7 @@ body {
 }
 
 #presentation-controls-wrapper.readonly {
-    top: 41px;
+    top: 36px;
 }
 
 #toolbar-wrapper {
@@ -110,6 +114,32 @@ body {
     #presentation-controls-wrapper {
 	display: none;
     }
+<<<<<<< HEAD
+=======
+
+    /* Show sidebar beyond 768px only */
+    #sidebar-dock-wrapper {
+	display: none;
+	top: 41px;
+    }
+
+    #document-container.tablet {
+        top: 41px;
+    }
+
+    #document-container.readonly {
+        top: 41px;
+    }
+
+    #sidebar-dock-wrapper.tablet {
+        top: 41px;
+    }
+
+    #document-container.sidebar-document {
+	left: 0px !important;
+    }
+
+>>>>>>> c620fd91a... Reduce readonly toolbar height
     #document-container.parts-preview-document {
 	left: 0px !important;
     }
commit 93796fa86ccaf0e27acc1877908f501e8a805345
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Jan 29 17:46:05 2019 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Jan 29 20:55:46 2019 +0100

    Start with readonly UI, then extend
    
    Change-Id: I96352890e9a76107aa1c1df9cf4f5979688a1969

diff --git a/loleaflet/html/loleaflet.html.m4 b/loleaflet/html/loleaflet.html.m4
index c8cf895c6..96bd3704e 100644
--- a/loleaflet/html/loleaflet.html.m4
+++ b/loleaflet/html/loleaflet.html.m4
@@ -87,7 +87,7 @@ ifelse(MOBILEAPP,[true],
        </div>
        <!-- Mobile menu toggle button (hamburger/x icon) -->
        <input id="main-menu-state" type="checkbox" style="display: none"/>
-       <ul id="main-menu" class="sm sm-simple lo-menu"></ul>
+       <ul id="main-menu" class="sm sm-simple lo-menu readonly"></ul>
        <div id="document-titlebar">
          <div class="document-title">
            <input id="document-name-input" type="text" disabled="true" style="display: none"/>
@@ -121,15 +121,15 @@ ifelse(MOBILEAPP,[true],
       <div class="closebuttonimage" id="closebutton"></div>
     </div>
 
-    <div id="spreadsheet-row-column-frame"></div>
+    <div id="spreadsheet-row-column-frame" class="readonly"></div>
 
-    <div id="document-container">
+    <div id="document-container" class="readonly">
       <div id="map"></div>
     </div>
 
     <div id="spreadsheet-toolbar" style="display: none"></div>
 
-    <div id="presentation-controls-wrapper">
+    <div id="presentation-controls-wrapper" class="readonly">
       <div id="slide-sorter"></div>
       <div id="presentation-toolbar" style="display: none"></div>
     </div>
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index ca76a11da..06e26f6ca 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -56,6 +56,11 @@ L.Map = L.Evented.extend({
 		// hack for https://github.com/Leaflet/Leaflet/issues/1980
 		this._onResize = L.bind(this._onResize, this);
 
+		// Start with readonly toolbars on desktop
+		if (!L.Browser.mobile) {
+			L.DomUtil.addClass(L.DomUtil.get('toolbar-wrapper'), 'readonly');
+		}
+
 		this._initEvents();
 
 		if (options.maxBounds) {


More information about the Libreoffice-commits mailing list