Sourcecode in SkinMgr/renderFunctions.js:
1: function renderMacroList(param) {
2: if (!param.proto) {
3: if (!req.data.key)
4: return;
5: param.key = req.data.key;
6: var parts = req.data.key.split(".");
7: param.proto = parts[0];
8: }
9: var handler = "";
10: if (param.proto == "HopObject")
11: handler = "this.";
12: else if (param.proto != "Global")
13: handler = param.proto.toLowerCase() + ".";
14: else if (!param.includeGlobal)
15: return;
16: if (!param.itemprefix)
17: param.itemprefix = "";
18: if (!param.itemsuffix)
19: param.itemsuffix = "<br />";
20: var macrolist = app.data.macros[param.proto]
21: for (var i in macrolist) {
22: var macro = macrolist[i];
23: res.push();
24: res.encode("<% ");
25: res.write(handler);
26: res.write(macro.name);
27: res.encode(" %>");
28: var str = res.pop();
29: res.write(param.itemprefix);
30: if (macro.storyid > 0)
31: Html.link({href: HELP.macros._url + macro.storyid}, str);
32: else
33: res.write(str);
34: res.write(param.itemsuffix);
35: }
36: return;
37: }
|