Content deleted Content added
category code improvements |
initialise status objects; various bug fixes |
||
Line 64:
local obj = setmetatable({}, Row)
obj.cfg = data.cfg
obj.currentTitle = data.currentTitle▼
obj.isSmall = data.isSmall
obj.categories = {}
Line 153 ⟶ 154:
obj.id = data.id
local statusCfg = obj.cfg.statuses[obj.id]
obj.statusCfg = statusCfg
-- Set the icon
local iconSize
if obj.isSmall then
iconSize = statusCfg.smallIconSize or
else
iconSize = statusCfg.iconSize or
end
obj:setIcon(statusCfg.icon, statusCfg.caption, iconSize)
return obj▼
end
function Status:exportHtml(articleHistoryObj)
self:setText(substituteParams(
parseConfigVal(self.statusCfg.text, articleHistoryObj),
self.currentTitle.subjectPageTitle.prefixedText,
self.currentTitle.text
))
return Row.exportHtml(self)
▲ return obj
end
function Status:exportCategories(articleHistoryObj)
self:addCategories(self.
return Row.exportCategories(self)
end
Line 235 ⟶ 239:
setmetatable(obj, Action)
obj.cfg = data.cfg▼
▲ obj.currentTitle = data.currentTitle
obj.paramNum = data.paramNum
Line 492 ⟶ 494:
return false
end
--
local statusObj = Status.new{
id = statusId,
currentTitle = self.currentTitle,
isSmall = self.isSmall,
▲ }
self.statusObj = statusObj
return statusObj
end
Line 521 ⟶ 532:
local statusObj = self:getStatusObj()
if statusObj then
root:node(statusObj:exportHtml(self))
end
Line 527 ⟶ 538:
local notices = self:getNoticeObjects()
for _, noticeObj in ipairs(notices) do
root:node(noticeObj:exportHtml(self))
end
Line 602 ⟶ 613:
for i, t in ipairs{actions, collapsibleNotices} do
for j, obj in ipairs(t) do
collapsibleTable:node(obj:exportHtml(self))
end
end
Line 655 ⟶ 666:
function p._exportClasses()
return {
Status = Status,
Notice = Notice,
Action = Action,
CollapsibleNotice = CollapsibleNotice,
ArticleHistory = ArticleHistory
}
|