2,875
edits
m (Sort on numeric level value) |
m (Fix trimming of sort value) |
||
Line 799: | Line 799: | ||
table.insert(rowPart, '\r\n|-') | table.insert(rowPart, '\r\n|-') | ||
table.insert(rowPart, '\r\n|style="text-align: left;"|'..source) | table.insert(rowPart, '\r\n|style="text-align: left;"|'..source) | ||
-- | -- Retrieve numeric level value for sorting, or remove anything between [[]] | ||
local levelValue = level:match("Level (%d+)") | local levelValue = level:match("Level (%d+)") | ||
if not levelValue then levelValue = value:match("%[%[.-%]%]%s*(%w+)$") end | |||
table.insert(rowPart, '\r\n|style="text-align: left;" data-sort-value="'..levelValue..'"|'..expIcon.. level) | table.insert(rowPart, '\r\n|style="text-align: left;" data-sort-value="'..levelValue..'"|'..expIcon.. level) | ||
table.insert(rowPart, '\r\n|style="text-align: right;" data-sort-value="'..qty..'"|'..Shared.formatnum(minqty)) | table.insert(rowPart, '\r\n|style="text-align: right;" data-sort-value="'..qty..'"|'..Shared.formatnum(minqty)) |
edits