Fixes for pubrules.
authorCameron McCormack <cam@mcc.id.au>
Sat, 18 Aug 2012 18:29:01 +1000
changeset 51 f7d16d078dd0
parent 50 19fdd6572411
child 52 cc6446c2e16e
Fixes for pubrules.
publish/processing.js
--- a/publish/processing.js	Sat Aug 18 18:12:58 2012 +1000
+++ b/publish/processing.js	Sat Aug 18 18:29:01 2012 +1000
@@ -63,12 +63,17 @@
     href = 'style/' + href + '.css';
   } else {
     href = '//www.w3.org/StyleSheets/TR/' + href;
+    if (conf.maturity != 'ED') {
+      href = 'http:' + href;
+    }
   }
   doc.head.appendChild(utils.parse('<link rel="stylesheet" href="{{href}}" type="text/css" media="screen"/>',
                                    { href: href }));
 
-  // Add <script> to fix up protocol-relative style sheet links when viewed over file:.
-  doc.head.appendChild(utils.parse('<script src="style/link-fixup.js"></script>'));
+  if (conf.maturity == 'ED') {
+    // Add <script> to fix up protocol-relative style sheet links when viewed over file:.
+    doc.head.appendChild(utils.parse('<script src="style/link-fixup.js"></script>'));
+  }
 };
 
 
@@ -491,7 +496,11 @@
   utils.replace(n, e);
 }
 
-function doMaturity(conf, page, n) {
+function doLongMaturity(conf, page, n) {
+  utils.replace(n, n.ownerDocument.createTextNode(conf.longMaturity));
+}
+
+function doLongerMaturity(conf, page, n) {
   utils.replace(n, n.ownerDocument.createTextNode(conf.longerMaturity));
 }
 
@@ -648,7 +657,8 @@
     example: doExample,
     includefile: doIncludeFile,
     elementsummary: doElementSummary,
-    maturity: doMaturity,
+    maturity: doLongMaturity,
+    longermaturity: doLongerMaturity,
     date: doDate,
     thisversion: doThisVersion,
     latestversion: doLatestVersion,