Module:ScriptItem: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 869: Line 869:
p.sortTable(types)
p.sortTable(types)
for i,type in ipairs(types) do
for i,type in ipairs(types) do
types[i] = p.loadTemplate(frame, 'Side', {[getTypeSide(type)]='1'})..type
types[i] = p.loadTemplate(frame, 'Side', {[getTypeSide(type)]='1'}).." "..type
end
end
table.insert(out, table.concat(types, "<br>"))
table.insert(out2, table.concat(types, "<br>"))
local parts = p.split(p.getDisplayedName(frame), ".")
local parts = p.split(p.getDisplayedName(frame), ".")
Line 879: Line 879:
rows[i] = { "<span style=\"font-family: 'Source Code Pro', monospace;\">"..p.properCase(parts[i]).."</span>", "namespace" }
rows[i] = { "<span style=\"font-family: 'Source Code Pro', monospace;\">"..p.properCase(parts[i]).."</span>", "namespace" }
end
end
rows[#parts] = { "<span style=\"font-family: 'Source Code Pro', monospace;\">"..p.properCase(parts[#parts]).."</span>", p.properCase(args.type) }
rows[#parts] = { "<span style=\"font-family: 'Source Code Pro', monospace;\">"..parts[#parts].."</span>", p.properCase(args.type) }
elseif args.type == 'property' or args.type == 'method' then
elseif args.type == 'property' or args.type == 'method' then
rows[1] = { "<span style=\"font-family: 'Source Code Pro', monospace;\">"..p.properCase(parts[1]).."</span>", "Object (JS Object, Lua Userdata, Squirrel Userdata)" }
rows[1] = { "<span style=\"font-family: 'Source Code Pro', monospace;\">"..p.properCase(parts[1]).."</span>", "Object (JS Object, Lua Userdata, Squirrel Userdata)" }
rows[2] = { "<span style=\"font-family: 'Source Code Pro', monospace;\">"..p.properCase(parts[2]).."</span>", p.properCase(args.type) }
rows[2] = { "<span style=\"font-family: 'Source Code Pro', monospace;\">"..parts[2].."</span>", p.properCase(args.type) }
end
end
if #rows > 0 then
if #rows > 0 then
table.insert(out, p.table(false, rows, { 80, 400 }, false))
table.insert(out2, "<div style='margin-top: 20px'>"..p.table(false, rows, { 80, 400 }, false).."</div>")
end
end
end
end
6,834

edits