More scripting fixes

This commit is contained in:
Jeff Parsons 2017-02-06 17:37:12 -08:00 committed by Jeff Parsons
commit 16a78693e8
5 changed files with 44 additions and 3 deletions

View file

@ -1309,6 +1309,8 @@ MarkOut.prototype.convertMDMachineLinks = function(sBlock)
if (this.aCommandDefs[sCommand]) {
sValue = this.aCommandDefs[sCommand];
sCommand = "script";
} else if (sValue) {
sValue = sValue.replace(/"/g, """);
}
sReplacement = '<' + sControl + sControlType + ' onclick="commandMachine(';
sReplacement += "'" + sMachineID + "',";

View file

@ -676,6 +676,9 @@ class Component {
}
sToken += ch;
}
if (sToken) {
aTokens.push(sToken);
}
if (aTokens.length) {
aaCommands.push(aTokens);
}