19,809
edits
(preparing to write code for BSL function template wizard) |
(writing code to insert call to BSL function template up through arg 1 (as a test); removing unused generateTable()) |
||
| Line 538: | Line 538: | ||
var align = (f.inputAlign.checked) ? 'align="center"' : ''; | var align = (f.inputAlign.checked) ? 'align="center"' : ''; | ||
var code = '\n'; | var code = '\n'; | ||
code += '{| ' + align + ' '; | code += '{| ' + align + ' '; | ||
| Line 577: | Line 576: | ||
/* Set width of popup (height has to be set in Live.css); labels on left are 115px, | /* Set width of popup (height has to be set in Live.css); labels on left are 115px, | ||
and each column requires 150px as long as Name field is "size 20"; the 8 arguments | and each column requires 150px as long as Name field is "size 20"; the 8 arguments | ||
are broken into two rows, so that means the first row has five columns | are broken into two rows, so that means the first row has five columns: Name and | ||
arguments 1-4 */ | arguments 1-4 */ | ||
XEBPopup.prototype.width = 115 + (150 * 5); | XEBPopup.prototype.width = 115 + (150 * 5); | ||
| Line 679: | Line 678: | ||
function insertBSLFuncCode() | function insertBSLFuncCode() | ||
{ | { | ||
var f = document.XEBPopupBSLFuncForm; | var f = document.XEBPopupBSLFuncForm; | ||
var call = '{{BSLfunc\n'; | |||
var | call += '|type=' + f.inputFuncType + '\n'; | ||
call += '|default=' + f.inputDefault + '\n'; | |||
call += '|name=' + f.inputFuncName + '\n'; | |||
if (!f.inputMac) call += '|mac=no\n'; | |||
if ( | if (!f.inputWin) call += '|win=no\n'; | ||
if (f.inputArg1Name) | |||
{ | |||
if (f.inputArg1Opt) call += "|arg1optional=yes\n'; | |||
call += '|arg1default=' + f.inputArg1Default + '\n'; | |||
call += '|arg1type=' + f.inputArg1Type + '\n'; | |||
call += '|arg1name=' + f.inputArg1Name + '\n'; | |||
if ( | if (f.inputArg1Alt) | ||
{ | |||
call += '|arg1alttype=' + f.inputArg1AltType + '\n'; | |||
call += '|arg1altname=' + f.inputArg1AltName + '\n'; | |||
} | } | ||
} | } | ||
call += '}}'; | |||
hideXEBPopup(); | hideXEBPopup(); | ||
insertTags('', '', | insertTags('', '', call); | ||
extendSummary(f.inputFuncName); | extendSummary('added ' + f.inputFuncName); | ||
return false; | return false; | ||
| Line 840: | Line 829: | ||
txtarea.focus(); | txtarea.focus(); | ||
} | } | ||
function XEBPopupRef(e) { | function XEBPopupRef(e) { | ||