diff options
-rw-r--r-- | AllLangPackage_html_lang.mk | 1 | ||||
-rw-r--r-- | CustomTarget_html.mk | 30 | ||||
-rw-r--r-- | help3xsl/default.css | 10 | ||||
-rw-r--r-- | help3xsl/help.js | 4 | ||||
-rw-r--r-- | help3xsl/online_transform.xsl | 6 |
5 files changed, 19 insertions, 32 deletions
diff --git a/AllLangPackage_html_lang.mk b/AllLangPackage_html_lang.mk index a0ae5f5a7b..4e95196970 100644 --- a/AllLangPackage_html_lang.mk +++ b/AllLangPackage_html_lang.mk @@ -16,7 +16,6 @@ $(eval $(call gb_AllLangPackage_add_files,helpcontent2_html_lang,$(LIBO_SHARE_HE $(lang)/bookmarks.js \ $(lang)/contents.js \ $(lang)/langnames.js \ - $(lang)/noscript.html \ ) \ )) diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk index d105f119ad..e07374d0db 100644 --- a/CustomTarget_html.mk +++ b/CustomTarget_html.mk @@ -37,7 +37,6 @@ $(eval $(call gb_CustomTarget_register_targets,helpcontent2/help3xsl,\ $(foreach module,$(html_TEXT_MODULES),filelists/html-help/$(module)/$(lang).filelist) \ $(lang)/langnames.js \ $(if $(HELP_OMINDEX_PAGE),$(lang)/xap_tpl) \ - $(lang)/noscript.html \ ) \ )) @@ -90,35 +89,6 @@ $(gb_CustomTarget_workdir)/helpcontent2/help3xsl/%/xap_tpl : \ endif -# Create noscript.html, when browser has no javascript enabled - -define html_gen_noscript_dep -$(gb_CustomTarget_workdir)/helpcontent2/help3xsl/$(1)/noscript.html : \ - $(if $(filter en-US,$(1)),$(SRCDIR),$(gb_HelpTranslatePartTarget_workdir)/$(1))/helpcontent2/source/text/shared/help/browserhelp.xhp - -endef - -$(eval $(foreach lang,$(gb_HELP_LANGS),$(call html_gen_noscript_dep,$(lang)))) - -$(gb_CustomTarget_workdir)/helpcontent2/help3xsl/%/noscript.html : \ - $(SRCDIR)/helpcontent2/help3xsl/noscript.xsl \ - $(SRCDIR)/helpcontent2/help3xsl/brand.xsl \ - $(SRCDIR)/helpcontent2/CustomTarget_html.mk \ - | $(call gb_ExternalExecutable_get_dependencies,xsltproc) - $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),NJS,1) - $(call gb_Trace_StartRange,$*/$(@F),XSL) - $(call gb_Helper_abbreviate_dirs,\ - $(call gb_ExternalExecutable_get_command,xsltproc) \ - --stringparam lang $* \ - --stringparam productname "$(gb_PRODUCTNAME_HTML)" \ - --stringparam productversion "$(PRODUCTVERSION)" \ - -o $@ \ - $(SRCDIR)/helpcontent2/help3xsl/noscript.xsl \ - $(if $(filter en-US,$*),$(SRCDIR),$(gb_HelpTranslatePartTarget_workdir)/$*)/helpcontent2/source/text/shared/help/browserhelp.xhp \ - ) - $(call gb_Trace_EndRange,$*/$(@F),XSL) - - # set of installed languages - has to be language independent $(gb_CustomTarget_workdir)/helpcontent2/help3xsl/languages.js : \ $(SRCDIR)/helpcontent2/CustomTarget_html.mk diff --git a/help3xsl/default.css b/help3xsl/default.css index dda3942ac4..cf7a4a566b 100644 --- a/help3xsl/default.css +++ b/help3xsl/default.css @@ -34,6 +34,16 @@ do not break anything related to layout by scaling. --background-color: #f7f8f7; --module-color: #18A303; } +/* Enable disable Javascript*/ +#WarnJS { + margin: 20px; + display:block; +} +#WarnJS h1{ + color: red; + font-weight: bold; + text-align: center; +} body, p, diff --git a/help3xsl/help.js b/help3xsl/help.js index 8e0dc54206..5f8485d5b3 100644 --- a/help3xsl/help.js +++ b/help3xsl/help.js @@ -7,6 +7,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +// Javascript is available? If not, display warning block +let h = document.getElementById("WarnJS"); +h.style.display = "none"; + // Pagination and bookmark search var url = window.location.pathname; var moduleRegex = new RegExp('text\\/(\\w+)\\/'); diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl index 22c84a4f0b..72fcd5822e 100644 --- a/help3xsl/online_transform.xsl +++ b/help3xsl/online_transform.xsl @@ -150,7 +150,6 @@ <html lang="{$lang}" dir="{$direction}"> <head> <base href="{$install}"/> - <noscript><meta http-equiv="refresh" content="0; URL={$install}{$lang}/noscript.html"/></noscript> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <xsl:if test="$online"> <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval' piwik.documentfoundation.org"/> @@ -230,6 +229,11 @@ </div> </div> <div id="DisplayArea" itemprop="softwareHelp" itemscope="true" itemtype="http://schema.org/SoftwareApplication"> + <div id="WarnJS"> + <h1 dir="auto"> + <xsl:call-template name="brand"><xsl:with-param name="string"><xsl:value-of select="$tmp_doc_ui//variable[@id='noscriptmsg']"/></xsl:with-param></xsl:call-template> + </h1> + </div> <xsl:if test="$online"> <xsl:if test="$xapian='yes'"> <div class="xapian-omega-search"> |