[Libreoffice-commits] dev-tools.git: help3/xhpeditor

Olivier Hallot (via logerrit) logerrit at kemper.freedesktop.org
Wed Jan 22 17:03:48 UTC 2020


 help3/xhpeditor/index.php   |    2 ++
 help3/xhpeditor/menu.php    |    2 +-
 help3/xhpeditor/xhp2html.js |   12 +++++++++++-
 3 files changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 75b3959ac87dff07be6be2e26e67986573aaad0c
Author:     Olivier Hallot <olivier.hallot at libreoffice.org>
AuthorDate: Tue Jan 21 16:12:14 2020 -0300
Commit:     Olivier Hallot <olivier.hallot at libreoffice.org>
CommitDate: Wed Jan 22 18:03:28 2020 +0100

    xhpeditor Add fullscreen, fix autocomplete for Brave
    
    Change-Id: I8247696e99da7d6398c4ec80f9cbfa3257d30da4
    Reviewed-on: https://gerrit.libreoffice.org/c/dev-tools/+/87159
    Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>
    Tested-by: Olivier Hallot <olivier.hallot at libreoffice.org>

diff --git a/help3/xhpeditor/index.php b/help3/xhpeditor/index.php
index 9f4266e..8f57ce6 100644
--- a/help3/xhpeditor/index.php
+++ b/help3/xhpeditor/index.php
@@ -19,6 +19,7 @@ $xhp = $_POST["xhpdoc"];
     <link type="text/css" rel="stylesheet" href="lib/codemirror.css">
     <link type="text/css" rel="stylesheet" href="addon/hint/show-hint.css">
     <link type="text/css" rel="stylesheet" href="addon/dialog/dialog.css">
+    <link type="text/css" rel="stylesheet" href="addon/display/fullscreen.css">
     <link type="text/css" rel="stylesheet" href="xhpeditor.css">
     <link type="text/css" rel="stylesheet" href="helpcontent2/help3xsl/normalize.css">
     <link type="text/css" rel="stylesheet" href="helpcontent2/help3xsl/prism.css">
@@ -39,6 +40,7 @@ $xhp = $_POST["xhpdoc"];
     <script type="application/javascript" src="addon/search/jump-to-line.js"></script>
     <script type="application/javascript" src="addon/search/matchesonscrollbar.js"></script>
     <script type="application/javascript" src="addon/search/jump-to-line.js"></script>
+    <script type="application/javascript" src="addon/display/fullscreen.js"></script>
     <script type="application/javascript" src="addon/scroll/annotatescrollbar.js"></script>
     
     <script type="application/javascript" src="helpcontent2/help3xsl/prism.js"></script>
diff --git a/help3/xhpeditor/menu.php b/help3/xhpeditor/menu.php
index ed6d4ac..d31f7b2 100644
--- a/help3/xhpeditor/menu.php
+++ b/help3/xhpeditor/menu.php
@@ -1,4 +1,4 @@
-<div class="navbar">
+<div id ="navmenu" class="navbar">
     <div class="dropdown">
     <button class="dropbtn">File</button>
     <div class="dropdown-content">
diff --git a/help3/xhpeditor/xhp2html.js b/help3/xhpeditor/xhp2html.js
index ef10256..adb7c2c 100644
--- a/help3/xhpeditor/xhp2html.js
+++ b/help3/xhpeditor/xhp2html.js
@@ -18,13 +18,23 @@ var editor = CodeMirror.fromTextArea(document.getElementById("xhpeditor"), {
     lineWrapping: true,
     autoCloseTags: true,
     extraKeys: {
+        "F11": function(cm) {
+          cm.setOption("fullScreen", !cm.getOption("fullScreen"));
+          document.getElementById("editorpageheader").style.display=(cm.getOption("fullScreen")) ? "none" : "block";
+        },
+        "Esc": function(cm) {
+          if (cm.getOption("fullScreen")) {
+              cm.setOption("fullScreen", false);
+              document.getElementById("editorpageheader").style.display="block";
+          }
+        },
         "'<'": completeAfter,
         "'/'": completeIfAfterLt,
         "' '": completeIfInTag,
         "'='": completeIfInTag,
         "Ctrl-Space": "autocomplete"
     },
-    hintOptions: {schemaInfo: xhptags}
+    hintOptions: {schemaInfo: this.xhptags}
 });
 
 function readSingleFile(e) {


More information about the Libreoffice-commits mailing list