• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
m
no edit summary
Line 22: Line 22:  
     | style="text-align: center; background-color: ${values.bg_color}; color: ${values.color};" |${values.node_type}
 
     | style="text-align: center; background-color: ${values.bg_color}; color: ${values.color};" |${values.node_type}
 
     | colspan="2" style="text-align: center; background-color: ${values.bg_color}; color: ${values.color};" |${values.text}]],
 
     | colspan="2" style="text-align: center; background-color: ${values.bg_color}; color: ${values.color};" |${values.text}]],
 +
    _collapser_template = [[<div class="mw-customtoggle-${toggle_id} wikia-menu-button">${button_display}</div>
 +
    <div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-${toggle_id}">]],
 +
    _collapser_end = [[</div>]],
 
     _columns = {
 
     _columns = {
 
         "node",
 
         "node",
Line 188: Line 191:  
     end
 
     end
 
     if mode == 6 then
 
     if mode == 6 then
        for k, v in pairs(tags) do mw.log(k, v) end
   
         self:insert_item(node, formation, fleet, as_rating, tags)
 
         self:insert_item(node, formation, fleet, as_rating, tags)
 
     end
 
     end
Line 251: Line 253:  
     local text = action .. " " .. amount .. " " .. resource .. " " .. units
 
     local text = action .. " " .. amount .. " " .. resource .. " " .. units
 
     return text, node_type, bg_color
 
     return text, node_type, bg_color
 +
end
 +
 +
function NodeInfo:start_rows()
 +
    self._rows = {}
 +
   
 +
    if self._args["toggle_id"] then
 +
        table.insert(self._rows, format{self._collapser_template,
 +
            toggle_id = self._args["toggle_id"],
 +
            button_display = self._args["button_display"] or "Show/Hide Formation Table",
 +
        })
 +
    end
 +
   
 +
    table.insert(self._rows, self._table_start)
 
end
 
end
   Line 304: Line 319:  
    end
 
    end
 
end
 
end
end
+
    end
 +
end
 +
 
 +
function NodeInfo:finish_rows()
 +
    table.insert(self._rows, self._row_starter)
 +
table.insert(self._rows, self._header_bottom or self._header)
 +
table.insert(self._rows, self._table_end)
 +
 +
if self._args["toggle_id"] then
 +
        table.insert(self._rows, self._collapser_end)
 +
    end
 
end
 
end
    
return NodeInfo
 
return NodeInfo
48

edits

Navigation menu