[Libreoffice-commits] help.git: source/help-to-html.sh source/online_transform.xsl

Olivier Hallot olivier.hallot at libreoffice.org
Mon Jun 5 21:06:00 UTC 2017


 source/help-to-html.sh      |    3 +++
 source/online_transform.xsl |   18 ++++++++----------
 2 files changed, 11 insertions(+), 10 deletions(-)

New commits:
commit 1ee48ef08e75e6e89b2f2166661d7fe97f60ba12
Author: Olivier Hallot <olivier.hallot at libreoffice.org>
Date:   Mon Jun 5 18:02:01 2017 -0300

    Improvement on help pages in browsers
    
    Remove some debug info
    Google search box in nice colors
    Provision to place icons images in the right location
    
    Change-Id: Ie3f33d52a48f3d8a60cbc4aaf89859a661538a8d
    Reviewed-on: https://gerrit.libreoffice.org/38422
    Reviewed-by: Olivier Hallot <olivier.hallot at edx.srv.br>
    Tested-by: Olivier Hallot <olivier.hallot at edx.srv.br>

diff --git a/source/help-to-html.sh b/source/help-to-html.sh
index e7be6cbea..4dbfeeed6 100755
--- a/source/help-to-html.sh
+++ b/source/help-to-html.sh
@@ -22,3 +22,6 @@ outfile=$outdir$DIR/$name'html'
 xsltproc -o $outfile $filter $filep
 done
 ln -s text/shared/main0108.html $outdir'index.html'
+mkdir $outdir'media/icon-theme'
+# cp -rap ../../../../../icon-themes/galaxy/* $outdir/media/icon-theme/
+
diff --git a/source/online_transform.xsl b/source/online_transform.xsl
index 3e02576fa..007e9591c 100644
--- a/source/online_transform.xsl
+++ b/source/online_transform.xsl
@@ -155,15 +155,15 @@
                    <div id="TopRight">
                        <script type="text/javascript">
                        <![CDATA[
-                           (function() {
+                             (function() {
                              var cx = '010161382024564278136:jcdsgegjym8';
                              var gcse = document.createElement('script');
                              gcse.type = 'text/javascript';
                              gcse.async = true;
                              gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
-                             var  s = document.getElementsByTagName('script')[0];
+                             var s = document.getElementsByTagName('script')[0];
                              s.parentNode.insertBefore(gcse, s);
-                           })();
+                             })();
                        ]]>
                        </script>
                        <xsl:text disable-output-escaping="yes"><gcse:search></gcse:search></xsl:text>
@@ -713,17 +713,12 @@ document.getElementById("bm_system").innerHTML ="System is: "+system;
 	</xsl:variable>
 	<xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="'shared'"/></xsl:call-template></xsl:variable>
 	<xsl:variable name="alt">
-		<!--<xsl:variable name="href"><xsl:value-of select="concat($urlpre,'shared/',$alttext,$urlpost,$dbpostfix)"/></xsl:variable>-->
-		<!--<xsl:variable name="href"><xsl:value-of select="concat($urlpre,'shared/',$alttext)"/></xsl:variable>-->
 		<xsl:variable name="href"><xsl:value-of select="$alttext"/></xsl:variable>
 		<xsl:variable name="anchor"><xsl:value-of select="concat('alt_',$type)"/></xsl:variable>
 		<xsl:variable name="doc" select="document($href)"/>
 		<xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
 	</xsl:variable>
-<!--	<p>href: <xsl:value-of select="$href"/></p>
-	<p>anchor: <xsl:value-of select="$anchor"/></p>
-	<p>document: <xsl:value-of select="$doc"/></p>-->
-	<p class="debug">image source: <xsl:value-of select="$imgsrc"/></p>
+<!-- 	<p class="debug">image source: <xsl:value-of select="$imgsrc"/></p> -->
 	<div class="{$type}">
 		<table border="0" class="{$type}" cellspacing="0" cellpadding="5">
 			<tr>
@@ -864,6 +859,9 @@ document.getElementById("bm_system").innerHTML ="System is: "+system;
      <xsl:when test="starts-with(@src,'media/')">
           <xsl:value-of select="concat($img_url_internal, at src)"/>
      </xsl:when>
+     <xsl:when test="not(starts-with(@src,'media/'))">
+         <xsl:value-of select="concat($img_url_internal,'media/icon-theme/', at src)"/>
+     </xsl:when>
     <xsl:when test="not($ExtensionId='') and starts-with(@src,$ExtensionId)">
         <xsl:value-of select="concat($ExtensionPath,'/', at src)"/>
       </xsl:when>
@@ -879,7 +877,7 @@ document.getElementById("bm_system").innerHTML ="System is: "+system;
       </xsl:otherwise>
     </xsl:choose>
   </xsl:variable>
-  <p class="debug">Image: <xsl:value-of select="$src"/></p>
+<!--  <p class="debug">Image: <xsl:value-of select="$src"/></p>-->
 	<!--<xsl:variable name="src"><xsl:value-of select="concat($img_url_prefix, at src)"/></xsl:variable>-->
   <xsl:variable name="alt"><xsl:value-of select="./alt"/></xsl:variable>
   <xsl:variable name="width">


More information about the Libreoffice-commits mailing list