diff options
Diffstat (limited to 'help3xsl')
-rw-r--r-- | help3xsl/default.css | 2 | ||||
-rw-r--r-- | help3xsl/help.js | 3 | ||||
-rw-r--r-- | help3xsl/online_transform.xsl | 18 |
3 files changed, 18 insertions, 5 deletions
diff --git a/help3xsl/default.css b/help3xsl/default.css index 69d86fb2ce..bb3a2bc7da 100644 --- a/help3xsl/default.css +++ b/help3xsl/default.css @@ -314,7 +314,7 @@ h6 { color: red; text-align: left; } - +.sqlcode, .pycode, .bascode { border: solid 5px transparent; diff --git a/help3xsl/help.js b/help3xsl/help.js index 65493ab0c3..3e9c0fe110 100644 --- a/help3xsl/help.js +++ b/help3xsl/help.js @@ -148,10 +148,11 @@ function debounce(fn, wait, indexList) { }; } -// copy pycode and bascode to clipboard on mouse click +// copy pycode, sqlcode and bascode to clipboard on mouse click // Show border when copy is done divcopyable(document.getElementsByClassName("bascode")); divcopyable(document.getElementsByClassName("pycode")); +divcopyable(document.getElementsByClassName("sqlcode")); function divcopyable(itemcopyable){ for (var i = 0, len = itemcopyable.length; i < len; i++) { diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl index a9de0d4f5a..ab703aaca8 100644 --- a/help3xsl/online_transform.xsl +++ b/help3xsl/online_transform.xsl @@ -490,7 +490,7 @@ </xsl:call-template> </xsl:when> - <xsl:when test="@role='bascode' or @role='pycode'"> + <xsl:when test="@role='bascode' or @role='pycode' or @role='sqlcode'"> <xsl:call-template name="brand"> <xsl:with-param name="string" select="."/> </xsl:call-template> @@ -533,7 +533,7 @@ </xsl:call-template> </xsl:when> - <xsl:when test="@role='bascode' or @role='pycode'"> + <xsl:when test="@role='bascode' or @role='pycode' or @role='sqlcode'"> <xsl:call-template name="brand"> <xsl:with-param name="string" select="."/> </xsl:call-template> @@ -989,7 +989,6 @@ <pre dir="auto"><code class="language-visual-basic line-numbers"><xsl:apply-templates mode="embedded" /></code></pre> </div> </xsl:template> - <xsl:template match="pycode"> <div class="pycode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet"> <xsl:attribute name="data-tooltip"><xsl:value-of select="$ui_copyclip"/></xsl:attribute> @@ -1003,6 +1002,19 @@ </div> </xsl:template> +<xsl:template match="sqlcode"> + <div class="sqlcode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet"> + <xsl:attribute name="data-tooltip"><xsl:value-of select="$ui_copyclip"/></xsl:attribute> + <pre dir="auto"><code class="language-sql"><xsl:apply-templates /></code></pre> + </div> +</xsl:template> +<xsl:template match="sqlcode" mode="embedded"> + <div class="sqlcode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet"> + <xsl:attribute name="data-tooltip"><xsl:value-of select="$ui_copyclip"/></xsl:attribute> + <pre dir="auto"><code class="language-sql"><xsl:apply-templates mode="embedded" /></code></pre> + </div> +</xsl:template> + <!-- Insert Logo code snippet --> <xsl:template name="insertlogocode"> <pre dir="auto"><xsl:apply-templates /></pre> |