Scaffolding in place for build options
This commit is contained in:
parent
f2bfecd83f
commit
e4cee436cc
7 changed files with 99 additions and 13 deletions
|
|
@ -1451,7 +1451,7 @@ HTMLOut.prototype.getMachineXML = function(sToken, sIndent, aParms, sXMLFile, sS
|
|||
var m = new MarkOut(s, sIndent, obj.req, null, obj.fDebug);
|
||||
s = m.convertMD(" ").trim();
|
||||
|
||||
obj.processMachines(m.getMachines(), function doneProcessXMLMachines() {
|
||||
obj.processMachines(m.getMachines(), m.getBuildOptions(), function doneProcessXMLMachines() {
|
||||
obj.getMarkdownFile(obj.sFile, sToken, sIndent, aParms, s, true);
|
||||
});
|
||||
return;
|
||||
|
|
@ -1749,7 +1749,7 @@ HTMLOut.prototype.getMarkdownFile = function(sFile, sToken, sIndent, aParms, sPr
|
|||
* any duplicates from that array, and then call processMachines() at some later point, after
|
||||
* all tokens have been replaced.
|
||||
*/
|
||||
obj.processMachines(m.getMachines(), function doneProcessMachines() {
|
||||
obj.processMachines(m.getMachines(), m.getBuildOptions(), function doneProcessMachines() {
|
||||
if (sToken) {
|
||||
obj.aTokens[sToken] = sPrevious? (sPrevious + sIndent + s) : s;
|
||||
obj.replaceTokens();
|
||||
|
|
@ -1809,7 +1809,7 @@ HTMLOut.prototype.getRandomString = function(sIndent)
|
|||
};
|
||||
|
||||
/**
|
||||
* processMachines(aMachines, done)
|
||||
* processMachines(aMachines, buildOptions, done)
|
||||
*
|
||||
* At a minimum, each machine object should contain the following properties:
|
||||
*
|
||||
|
|
@ -1819,9 +1819,10 @@ HTMLOut.prototype.getRandomString = function(sIndent)
|
|||
*
|
||||
* @this {HTMLOut}
|
||||
* @param {Array} aMachines is an array of objects containing information about each machine on the current page
|
||||
* @param {Object} buildOptions
|
||||
* @param {function()} done
|
||||
*/
|
||||
HTMLOut.prototype.processMachines = function(aMachines, done)
|
||||
HTMLOut.prototype.processMachines = function(aMachines, buildOptions, done)
|
||||
{
|
||||
for (var iMachine = 0; iMachine < aMachines.length; iMachine++) {
|
||||
|
||||
|
|
@ -1905,6 +1906,12 @@ HTMLOut.prototype.processMachines = function(aMachines, done)
|
|||
}
|
||||
}
|
||||
this.addFilesToHTML(asFiles, sScriptEmbed);
|
||||
if (buildOptions.id) {
|
||||
asFiles = [];
|
||||
asFiles.push("/modules/pcbuild/lib/build.js");
|
||||
sScriptEmbed = '<script type="text/javascript">buildPC("' + buildOptions.id + '")</script>';
|
||||
this.addFilesToHTML(asFiles, sScriptEmbed);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1912,7 +1919,7 @@ HTMLOut.prototype.processMachines = function(aMachines, done)
|
|||
};
|
||||
|
||||
/**
|
||||
* addFilesToHTML(asFiles)
|
||||
* addFilesToHTML(asFiles, sScriptEmbed)
|
||||
*
|
||||
* @this {HTMLOut}
|
||||
* @param {Array.<string>} asFiles is a list of CSS and/or JS files to include in the HTML
|
||||
|
|
|
|||
Loading…
Reference in a new issue