cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1518243 - /cxf/web/template/template.vm
Date Wed, 28 Aug 2013 15:05:32 GMT
Author: dkulp
Date: Wed Aug 28 15:05:32 2013
New Revision: 1518243

URL: http://svn.apache.org/r1518243
Log:
Adjust template to use https for scripts/css if https is being used

Modified:
    cxf/web/template/template.vm

Modified: cxf/web/template/template.vm
URL: http://svn.apache.org/viewvc/cxf/web/template/template.vm?rev=1518243&r1=1518242&r2=1518243&view=diff
==============================================================================
--- cxf/web/template/template.vm (original)
+++ cxf/web/template/template.vm Wed Aug 28 15:05:32 2013
@@ -26,20 +26,48 @@
 <meta name="keywords" content="business integration, EAI, SOA, Service Oriented Architecture,
web services, SOAP, JBI, JMS, WSDL, XML, EDI, Electronic Data Interchange, standards support,
integration standards, application integration, middleware, software, solutions, services,
CXF, open source">
 <meta name="description" content="Apache CXF, Services Framework - $page.title">
 
+
+<script type="text/javascript">
+var http = window.location.protocol;
+
+if ("https" != http) {
+    http = "http";
+}
+var head= document.getElementsByTagName('head')[0];
+
+function addLink(url)
+{
+   link= document.createElement('link');
+   link.type= 'text/css';
+   link.rel= 'stylesheet';
+   link.href= http + '://cxf.apache.org' + url; 
+   head.appendChild(link);
+}
+function addScript(scpt)
+{
+   var script= document.createElement('script');
+   script.type= 'text/javascript';
+   script.src= http + '://cxf.apache.org' + scpt;
+   head.appendChild(script);
+}
+
+addLink('/resources/site.css');
+addScript('/resources/space.js');
+
 #if($page.hasCode)
-  <link href='http://cxf.apache.org/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet'
type='text/css' />
-  <link href='http://cxf.apache.org/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet'
type='text/css' />
-  <script src='http://cxf.apache.org/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  addLink('/resources/highlighter/styles/shCoreCXF.css');
+  addLink('/resources/highlighter/styles/shThemeCXF.css');
+  addScript('/resources/highlighter/scripts/shCore.js')
 #foreach ($hscript in $page.CodeScripts)
-  <script src='http://cxf.apache.org/resources/highlighter/scripts/$hscript' type='text/javascript'></script>
+  addScript('/resources/highlighter/scripts/$hscript')
 #end
-  
-  <script type="text/javascript">
-  SyntaxHighlighter.defaults['toolbar'] = false;
-  SyntaxHighlighter.all();
-  </script>
+  addScript('/resources/highlighter/highlighterInit.js')
  #end
 
+</script>
+
+
+
     <title>
 Apache CXF -- $page.title
     </title>



Mime
View raw message