Changes

no edit summary
Line 4: Line 4:     
local BaseTable = BaseData{
 
local BaseTable = BaseData{
_table_start = [[{| class="wikitable typography-xl-optout" style="width: -moz-fit-content; width: -webkit-fit-content; width: fit-content;"]],
+
_table_start = [[{| class="wikitable"]],
 
_row_starter = "|-",
 
_row_starter = "|-",
 
_row_starter_with_attributes = [[|- class="${classes}"]],
 
_row_starter_with_attributes = [[|- class="${classes}"]],
Line 243: Line 243:  
row_values[column].classes = "highlighted " .. (row_values[column].classes or "")
 
row_values[column].classes = "highlighted " .. (row_values[column].classes or "")
 
end
 
end
table.insert(self._rows, format(self._column_cell_templates[column] or self._cell, row_values[column]))
+
if self._column_cell_templates[column] then
 +
table.insert(self._rows, format(self._column_cell_templates[column], row_values[column]))
 +
else
 +
local attrs = {}
 +
if row_values[column]['classes'] then
 +
table.insert(attrs, string.format('class="%s"', row_values[column]['classes']))
 +
end
 +
if row_values[column]['colspan'] then
 +
table.insert(attrs, string.format('colspan="%s"', row_values[column]['colspan']))
 +
end
 +
if row_values[column]['rowspan'] then
 +
table.insert(attrs, string.format('rowspan="%s"', row_values[column]['rowspan']))
 +
end
 +
local styles = {}
 +
if row_values[column]['text_align'] then
 +
table.insert(styles, string.format('text-align:%s', row_values[column]['text_align']))
 +
end
 +
if row_values[column]['bg_color'] then
 +
table.insert(styles, string.format('background-color:%s', row_values[column]['bg_color']))
 +
end
 +
table.insert(self._rows, format(string.format('| %s style="%s" | ${values.value}', table.concat(attrs, ' '), table.concat(styles, ';')), row_values[column]))
 +
end
 
end
 
end
 
end
 
end
cssedit, gkautomate
7,064

edits