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

Pranam Lashkari (via logerrit) logerrit at kemper.freedesktop.org
Fri Jan 3 13:18:40 UTC 2020


 loleaflet/html/loleaflet-help.html |   51 +++++++++++++++++++------------------
 loleaflet/src/control/Toolbar.js   |   11 -------
 2 files changed, 28 insertions(+), 34 deletions(-)

New commits:
commit 57257c868e4564b0e45745fb697173e8984d988d
Author:     Pranam Lashkari <lpranam at collabora.com>
AuthorDate: Tue Dec 24 13:35:18 2019 +0530
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Jan 3 14:18:20 2020 +0100

    resolved: HELP > Online Help clicking internal links closes the Help
    
    Change-Id: If64f397680ed5977e025e398a8efd044566f278b
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/85773
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/loleaflet/html/loleaflet-help.html b/loleaflet/html/loleaflet-help.html
index 4084a90bb..05f812100 100644
--- a/loleaflet/html/loleaflet-help.html
+++ b/loleaflet/html/loleaflet-help.html
@@ -11,6 +11,9 @@
     .toc-h3 { margin-left:0.1965in; }
     .screenshot { text-align:center; margin: 0.1in; }
     .blue { color:#63bbee; }
+    button { font-family: "Helvetica Neue", sans-serif; background: none!important; border: none; padding: 0!important; color: -webkit-link; cursor: pointer; text-decoration: underline; font-size: 1em; line-height: 1.5em; }
+    button:active { color: -webkit-activelink; }
+    button:focus { outline: -webkit-focus-ring-color auto 1px; }
 </style>
 <div id="keyboard-shortcuts">
     <h1>Keyboard Shortcuts</h1>
@@ -207,41 +210,41 @@
 </div>
 <div id="online-help">
     <h1><span class="productname">%productName</span> Help</h1>
-    <p class="toc-h3"><a href="#1327">Collaborative editing</a></p>
-    <p class="toc-h3"><a href="#1333"><span class="productname">%productName</span> user interface</a></p>
-    <p class="toc-h3"><a href="#1335">Opening, closing, saving, printing and downloading documents</a></p>
-    <p class="toc-h3"><a href="#1337">Editing documents</a></p>
-    <p class="toc-h3"><a href="#1338">Advanced features</a></p>
+    <p class="toc-h3"><button onClick='document.getElementById(1327).scrollIntoView();'>Collaborative editing</button></p>
+    <p class="toc-h3"><button onClick='document.getElementById(1333).scrollIntoView();'><span class="productname">%productName</span> user interface</button></p>
+    <p class="toc-h3"><button onClick='document.getElementById(1335).scrollIntoView();'>Opening, closing, saving, printing and downloading documents</button></p>
+    <p class="toc-h3"><button onClick='document.getElementById(1337).scrollIntoView();'>Editing documents</button></p>
+    <p class="toc-h3"><button onClick='document.getElementById(1338).scrollIntoView();'>Advanced features</button></p>
     <div class="spreadsheet" style="display: none;">
-        <p class="toc-h2"><a href="#1359"><span class="productname">%productName</span> spreadsheets</a></p>
-        <p class="toc-h3"><a href="#1361">Editing spreadsheets</a></p>
-        <p class="toc-h3"><a href="#1363">Formulas</a></p>
-        <p class="toc-h3"><a href="#1367">Formatting spreadsheets</a></p>
-        <p class="toc-h3"><a href="#1371">Advanced features</a></p>
+        <p class="toc-h2"><button onClick='document.getElementById(1359).scrollIntoView();'><span class="productname">%productName</span> spreadsheets</button></p>
+        <p class="toc-h3"><button onClick='document.getElementById(1361).scrollIntoView();'>Editing spreadsheets</button></p>
+        <p class="toc-h3"><button onClick='document.getElementById(1363).scrollIntoView();'>Formulas</button></p>
+        <p class="toc-h3"><button honClick='document.getElementById(1367).scrollIntoView();'>Formatting spreadsheets</button></p>
+        <p class="toc-h3"><button onClick='document.getElementById(1371).scrollIntoView();'>Advanced features</button></p>
     </div>
     <div class="text" style="display: none;">
-        <p class="toc-h2"><a href="#1373"><span class="productname">%productName</span> text documents</a></p>
-        <p class="toc-h3"><a href="#1375">Editing text documents</a></p>
-        <p class="toc-h3"><a href="#1377">Context menus</a></p>
-        <p class="toc-h3"><a href="#1383">Advanced text document editor features</a></p>
+        <p class="toc-h2"><button onClick='document.getElementById(1373).scrollIntoView();'><span class="productname">%productName</span> text documents</button></p>
+        <p class="toc-h3"><button onClick='document.getElementById(1375).scrollIntoView();'>Editing text documents</button></p>
+        <p class="toc-h3"><button onClick='document.getElementById(1377).scrollIntoView();'>Context menus</button></p>
+        <p class="toc-h3"><button onClick='document.getElementById(1383).scrollIntoView();'>Advanced text document editor features</button></p>
     </div>
     <div class="presentation" style="display: none;">
-        <p class="toc-h2"><a href="#1391"><span class="productname">%productName</span> presentations</a></p>
-        <p class="toc-h3"><a href="#1393">Editing presentations</a></p>
-        <p class="toc-h3"><a href="#1395">Slide show</a></p>
-        <p class="toc-h3"><a href="#1397">Slide pane</a></p>
-        <p class="toc-h3"><a href="#1401">Advanced features</a></p>
+        <p class="toc-h2"><button onClick='document.getElementById(1391).scrollIntoView();'><span class="productname">%productName</span> presentations</button></p>
+        <p class="toc-h3"><button onClick='document.getElementById(1393).scrollIntoView();'>Editing presentations</button></p>
+        <p class="toc-h3"><button onClick='document.getElementById(1395).scrollIntoView();'>Slide show</button></p>
+        <p class="toc-h3"><button onClick='document.getElementById(1397).scrollIntoView();'>Slide pane</button></p>
+        <p class="toc-h3"><button onClick='document.getElementById(1401).scrollIntoView();'>Advanced features</button></p>
     </div>
-    <p class="toc-h2"><a href="#1403">Frequently Asked Questions</a></p>
-    <p class="toc-h3"><a href="#1405">General</a></p>
+    <p class="toc-h2"><button onClick='document.getElementById(1403).scrollIntoView();'>Frequently Asked Questions</button></p>
+    <p class="toc-h3"><button onClick='document.getElementById(1405).scrollIntoView();'>General</button></p>
     <div class="text" style="display: none;">
-        <p class="toc-h3"><a href="#1407">Text documents</a></p>
+        <p class="toc-h3"><button onClick='document.getElementById(1407).scrollIntoView();'>Text documents</button></p>
     </div>
     <div class="spreadsheet" style="display: none;">
-        <p class="toc-h3"><a href="#1409">Spreadsheets</a></p>
+        <p class="toc-h3"><button onClick='document.getElementById(1409).scrollIntoView();'>Spreadsheets</button></p>
     </div>
     <div class="presentation" style="display: none;">
-        <p class="toc-h3"><a href="#1411">Presentations</a></p>
+        <p class="toc-h3"><button onClick='document.getElementById(1411).scrollIntoView();'>Presentations</button></p>
     </div>
     <p><span class="productname">%productName</span> allows you to create and edit office documents text documents, spreadsheets and presentations directly in your browser, in a simple and straight-forward way. You can work alone on a document, or collaboratively as part of a team.</p>
     <a id="1327"/>
diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index 07d802835..cd912777e 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -227,9 +227,9 @@ L.Map.include({
 				showCloseButton: true,
 				escapeButtonCloses: true,
 				overlayClosesOnClick: true,
+				closeAllOnPopState: false,
 				buttons: {},
 				afterOpen: function() {
-					var that = this;
 					var $vexContent = $(this.contentEl);
 					this.contentEl.style.width = w + 'px'
 					map.enable(false);
@@ -335,10 +335,6 @@ L.Map.include({
 					$vexContent.focus();
 					// workaround for https://github.com/HubSpot/vex/issues/43
 					$('.vex-overlay').css({ 'pointer-events': 'none'});
-					$vexContent.one('click', function(e) {
-						that.close();
-						e.stopPropagation();
-					});
 				},
 				beforeClose: function () {
 					map.focus();
@@ -393,7 +389,6 @@ L.Map.include({
 			overlayClosesOnClick: true,
 			buttons: {},
 			afterOpen: function() {
-				var that = this;
 
 				var touchGesture = map['touchGesture'];
 				if (touchGesture && touchGesture._hammer) {
@@ -413,10 +408,6 @@ L.Map.include({
 				$(window).bind('keyup.vex', handler);
 				// workaround for https://github.com/HubSpot/vex/issues/43
 				$('.vex-overlay').css({ 'pointer-events': 'none'});
-				$vexContent.one('click', function(e) {
-					that.close();
-					e.stopPropagation();
-				});
 			},
 			beforeClose: function () {
 				$(window).unbind('keyup.vex', handler);


More information about the Libreoffice-commits mailing list