Added support for "clickOnce" script controls

This commit is contained in:
Jeff Parsons 2017-02-07 17:57:02 -08:00 committed by Jeff Parsons
commit d190bc0c9c
7 changed files with 136 additions and 29 deletions

View file

@ -1301,7 +1301,13 @@ MarkOut.prototype.convertMDMachineLinks = function(sBlock)
if (!aParms) continue;
sReplacement = "";
sMachineID = findParm(aParms, 'machine');
var sControl = findParm(aParms, 'type') || 'button';
var sSingle = "false,";
var sControl = findParm(aParms, 'type');
if (sControl == "clickOnce") {
sControl = "";
sSingle = "true,";
}
sControl = sControl || "button";
var sControlType = sControl == 'button'? ' type="button"' : '';
if (this.aMachineDefs[sMachineID]) {
var sCommand = findParm(aParms, 'command');
@ -1312,7 +1318,7 @@ MarkOut.prototype.convertMDMachineLinks = function(sBlock)
} else if (sValue) {
sValue = sValue.replace(/"/g, """);
}
sReplacement = '<' + sControl + sControlType + ' onclick="commandMachine(';
sReplacement = '<' + sControl + sControlType + ' onclick="commandMachine(this,' + sSingle;
sReplacement += "'" + sMachineID + "',";
sReplacement += "'" + findParm(aParms, 'component') + "',";
sReplacement += "'" + sCommand + "',";