|
|
 |
 |
 |
renderScript Macro
This macro renders a Frontier script to HTML, with an emphasis on showing changes labelled with " by DAB" and displaying only that part of the script which is needed to locate the changes.
Parameters
- adr - the name of a script anywhere in your Frontier roots(address)
- flShowAll (optional, default false) - if true lists the whole script, rather than changed areas
Example
{ManilaExtras.renderScript("ManilaExtras.renderScript")}
Displays
| on renderScript (adr=nil, flShowAll=false, flShowFrontierVersion=true) «this is a macro that gets a script listing |
| |
«01/04/24, 12:06:36 by DAB |
| |
«based upon user.html.macros.renderscript |
| |
«02/04/13, 19:25:14 by DAB |
| |
«add flShowAll parameter to list a complete script. |
| |
if not ({scriptType, outlineType} contains typeof (adr^)) «01/07/10, 09:22:10 by DAB |
| |
local (oldTarg = target.set (adr)) |
| |
on visit (inComment, flUpLevlIsPatched) |
| |
local (flPatchSeen = flUpLevlIsPatched) |
| |
local (hassubs = op.countSubs (1) > 0) |
| |
local (flComment = inComment or script.isComment()) |
| |
add("\r<table class = 'renderScript' width = '100%' vspace='0'>\r\t<tr>") |
| |
if level > 0 «add a dummy cell to do the indentation |
| |
local (linetext = op.getlinetext ()) |
| |
local (flisBundle = (string.lower(linetext) beginswith "bundle")) |
| |
linetext = string.replaceAll (linetext, "<", "<") |
| |
linetext = string.replaceAll (linetext, "!=", "!=") |
| |
linetext = string.replaceAll (linetext, "\"", """) «03/03/02, 16:56:19 by DAB |
| |
linetext = string.replaceAll (linetext, "\\", "\") «03/05/25, 16:44:59 by DAB |
| |
linetext = string.replaceAll (linetext, "@", "@") «06/05/06, 15:13:53 by DAB |
| |
local (flLineIsPatched = (linetext contains " by DAB" )) |
| |
«if flLineIsPatched or flUpLevlIsPatched |
| |
if (flLineIsPatched or flUpLevlIsPatched) and not flShowAll «02/04/13, 19:29:18 by DAB |
| |
add(" class = patchedText") |
| |
«add(linetext + "</code></td>\r\t</tr>\r</table>") |
| |
«add(linetext + "</span></td>\r\t</tr>\r</table>") |
| |
add(linetext + "</td>\r\t</tr>\r</table>") |
| |
if level > 1 and not flPatchSeen |
| |
add("\r<div class = 'renderscript'>") |
| |
add(visit (false, flShowAll)) «02/04/13, 19:25:55 by DAB |
| |
«add(visit (false, false)) |
| |
try {target.set(oldTarg)} |
| |
return manilaSuite.unTaint(htmltext) |
| |
wp.newTextObject(renderscript(@manilaSuite.rpcHandlers.message.listPictures), @temp.renderScript) |
Relative to Frontier version 9.7b10
|