summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2018-11-20 20:44:57 +0200
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2018-11-20 23:08:35 +0100
commit10c207f682a65bb3ff434689822024e828308341 (patch)
tree43c06abed876ad627d5bceaf4dc7392e2b3d5c06
parent8aef24ea353e04d75360d0b94ccbca6c6c8e9635 (diff)
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@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> (cherry picked from commit 126ef50e9756e79bf5b500edeaa9275260a1b7d3) Reviewed-on: https://gerrit.libreoffice.org/63682
-rw-r--r--help3xsl/help.js10
-rw-r--r--help3xsl/online_transform.xsl14
-rw-r--r--source/text/shared/help/browserhelp.xhp2
3 files changed, 23 insertions, 3 deletions
diff --git a/help3xsl/help.js b/help3xsl/help.js
index 7837f7f670..2237ed5b18 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 ee6a5fbf27..95892bdd4c 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"/> &#32;&#x1f50e;&#xfe0e;&#32;</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 0f29667c1c..a0e33d635e 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>