[Libreoffice-commits] help.git: Branch 'libreoffice-6-2' - help3xsl/help.js help3xsl/online_transform.xsl source/text

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Nov 20 22:08:55 UTC 2018


 help3xsl/help.js                        |   10 ++++++++--
 help3xsl/online_transform.xsl           |   14 +++++++++++++-
 source/text/shared/help/browserhelp.xhp |    2 ++
 3 files changed, 23 insertions(+), 3 deletions(-)

New commits:
commit 10c207f682a65bb3ff434689822024e828308341
Author:     Ilmari Lauhakangas <ilmari.lauhakangas at libreoffice.org>
AuthorDate: Tue Nov 20 20:44:57 2018 +0200
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Tue Nov 20 23:08:35 2018 +0100

    tdf#119415 Add placeholder text for index filter
    
    Change-Id: If7a0a863eb6b8bb95a5b6236f4f3d490739810a1
    Reviewed-on: https://gerrit.libreoffice.org/63672
    Tested-by: Jenkins
    Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas at libreoffice.org>
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    (cherry picked from commit 126ef50e9756e79bf5b500edeaa9275260a1b7d3)
    Reviewed-on: https://gerrit.libreoffice.org/63682

diff --git a/help3xsl/help.js b/help3xsl/help.js
index 7837f7f67..2237ed5b1 100644
--- a/help3xsl/help.js
+++ b/help3xsl/help.js
@@ -11,8 +11,14 @@
 var url = document.URL;
 var moduleRegex = new RegExp('text\\/(\\w+)\\/');
 var regexArray = moduleRegex.exec(url);
-// get the module name from the URL and remove the first character
-var currentModule = regexArray[1].toUpperCase().substring(1);
+var currentModule = null;
+// get the module name from the URL and remove the first character,
+// but first deal with snowflake Base
+if(url.indexOf('explorer/database/') !== -1) {
+    currentModule = 'BASE';
+} else {
+    currentModule = regexArray[1].toUpperCase().substring(1);
+}
 var results = null;
 var fullLinkified = '';
 var modules = ['CALC', 'WRITER', 'IMPRESS', 'DRAW', 'BASE', 'MATH', 'CHART', 'BASIC', 'SHARED'];
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index ee6a5fbf2..95892bdd4 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -108,6 +108,8 @@
 <xsl:variable name="tmp_doc_ui" select="document($tmp_href_ui)"/>
 <xsl:variable name ="ui_contents"><xsl:apply-templates select="$tmp_doc_ui//variable[@id='contents']"/></xsl:variable>
 <xsl:variable name ="ui_index"><xsl:apply-templates select="$tmp_doc_ui//variable[@id='index']"/></xsl:variable>
+<xsl:variable name ="ui_pholderall"><xsl:apply-templates select="$tmp_doc_ui//variable[@id='pholderall']"/></xsl:variable>
+<xsl:variable name ="ui_pholderchosen"><xsl:apply-templates select="$tmp_doc_ui//variable[@id='pholderchosen']"/></xsl:variable>
 <xsl:variable name ="ui_module"><xsl:apply-templates select="$tmp_doc_ui//variable[@id='module']"/></xsl:variable>
 <xsl:variable name ="ui_language"><xsl:apply-templates select="$tmp_doc_ui//variable[@id='language']"/></xsl:variable>
 <xsl:variable name ="ui_donate"><xsl:apply-templates select="$tmp_doc_ui//variable[@id='donate']"/></xsl:variable>
@@ -195,7 +197,17 @@
         <div id="Index">
         <div class="index-label"><xsl:value-of select="$ui_index"/>  &#x1f50e;&#xfe0e; </div>
             <div id="Bookmarks">
-                <input id="search-bar" type="text" class="search" />
+                <xsl:variable name="pholder">
+                    <xsl:choose>
+                        <xsl:when test="not(contains($htmlpage, '/text/shared/explorer/database/')) and contains($htmlpage, '/text/shared/')">
+                            <xsl:value-of select="$ui_pholderall"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:value-of select="$ui_pholderchosen"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:variable>
+                <input id="search-bar" type="text" class="search" placeholder="{$pholder}"/>
                 <nav class="index"></nav>
             </div>
         </div>
diff --git a/source/text/shared/help/browserhelp.xhp b/source/text/shared/help/browserhelp.xhp
index 0f29667c1..a0e33d635 100644
--- a/source/text/shared/help/browserhelp.xhp
+++ b/source/text/shared/help/browserhelp.xhp
@@ -20,6 +20,8 @@
     <paragraph role="paragraph" id="par_id531525734031068" xml-lang="en-US"><variable id="language">Language</variable></paragraph>
     <paragraph role="paragraph" id="par_id991525734084608" xml-lang="en-US"><variable id="contents">Contents</variable></paragraph>
     <paragraph role="paragraph" id="par_id601525734140935" xml-lang="en-US"><variable id="index">Index</variable></paragraph>
+    <paragraph role="paragraph" id="par_id953832383493636" xml-lang="en-US"><variable id="pholderall">Search in all modules</variable></paragraph>
+    <paragraph role="paragraph" id="par_id335427459543352" xml-lang="en-US"><variable id="pholderchosen">Search in chosen module</variable></paragraph>
     <paragraph role="paragraph" id="par_id191525734190260" xml-lang="en-US"><variable id="donate">If this page has been helpful, you can support us!</variable></paragraph>
     <paragraph role="paragraph" id="par_id881525734289794" xml-lang="en-US"><variable id="LibreOfficeHelp">%PRODUCTNAME %PRODUCTVERSION Help</variable></paragraph>
     <paragraph role="paragraph" id="par_id421525736799965" xml-lang="en-US"><variable id="copyclip">Click on text to copy to clipboard</variable></paragraph>


More information about the Libreoffice-commits mailing list