Module:NavboxMobile: Difference between revisions

No edit summary
No edit summary
Line 311: Line 311:
     -- Add a row for the group (if it exists)
     -- Add a row for the group (if it exists)
     if args['group' .. listnum] then
     if args['group' .. listnum] then
         local groupCell = row:tag('th')
        local groupRow = addTableRow(tbl)
         local groupCell = groupRow:tag('th')
         groupCell
         groupCell
             :attr('scope', 'row')
             :attr('scope', 'row')
Line 324: Line 325:
     end
     end


     local row = addTableRow(tbl)
    -- Add a row for the list
     local listCell = row:tag('td')
     local listRow = addTableRow(tbl) -- Use a different variable name
     local listCell = listRow:tag('td')
     listCell
     listCell
         :attr('colspan', 2)
         :attr('colspan', 2)
Line 342: Line 344:
             :css('width', '100%')
             :css('width', '100%')
             :css('border-spacing', '0')
             :css('border-spacing', '0')
            :css('padding', args.nestedPadding or '0.5em') -- Add consistent padding


         for i = 1, 10 do -- Assume up to 10 nested groups/lists
         for i = 1, 10 do -- Assume up to 10 nested groups/lists