• 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
Re-add japanese name and nicknames as detail
Line 57: Line 57:  
_simple_class = "eliteshipskai-simple",
 
_simple_class = "eliteshipskai-simple",
 
_detailed_class = "eliteshipskai-detailed",
 
_detailed_class = "eliteshipskai-detailed",
_display_none_style = " display: none;",
+
_detailed_space = '<span class="eliteshipskai-detailed" style="display:none;"> </span>',
 +
_detailed_break = '<span class="eliteshipskai-detailed" style="display:none;"><br /></span>',
 +
_display_none_style = {display = "none"},
 +
_display_none_style_text = " display: none;",
 
_detailed_columns = 1,
 
_detailed_columns = 1,
 
_detail_toggle = '<p id="eliteshipskai-detailed-toggle" class="eliteshipskai-detailed-toggle" style="display: none;">[[#eliteshipskai-detailed-toggle|Show details]][[#eliteshipskai-detailed-hidden|Hide details]]</p>',
 
_detail_toggle = '<p id="eliteshipskai-detailed-toggle" class="eliteshipskai-detailed-toggle" style="display: none;">[[#eliteshipskai-detailed-toggle|Show details]][[#eliteshipskai-detailed-hidden|Hide details]]</p>',
--_nickname_template = "<br />Nicknamed ''${nickname}''",
+
_nickname_template = [[<span class="eliteshipskai-detailed" style="display:none;">Nicknamed ''${nickname}''</span>]],
 
_item_class = Ship,
 
_item_class = Ship,
 
})
 
})
Line 67: Line 70:  
local link, text, section = ship:link()
 
local link, text, section = ship:link()
 
local value = {Formatting:inline_block(Formatting:format_link(link, text, section))}
 
local value = {Formatting:inline_block(Formatting:format_link(link, text, section))}
--local japanese_name = ship:japanese_name()
+
local japanese_name = ship:japanese_name()
--if japanese_name and (text or link) ~= japanese_name then
+
if japanese_name and (text or link) ~= japanese_name then
-- table.insert(value, Formatting:inline_block(Formatting:format_stat(japanese_name)))
+
table.insert(self._detailed_space)
--end
+
table.insert(value, Formatting:inline_block(Formatting:format_stat(japanese_name), self._detailed_class, self._display_none_style))
--local nickname = ship:nick()
+
end
--if nickname then
+
local nickname = ship:nick()
-- table.insert(value, format{self._nickname_template, nickname = Formatting:inline_block(Formatting:format_stat(nickname))})
+
if nickname then
--end
+
table.insert(self._detailed_break)
return {values = {value = table.concat(value, " ")}, bg_color = self._transparent, text_align = self._center_align}
+
table.insert(value, format{self._nickname_template, nickname = Formatting:inline_block(Formatting:format_stat(nickname))})
 +
end
 +
return {values = {value = table.concat(value)}, bg_color = self._transparent, text_align = self._center_align}
 
end
 
end
   Line 266: Line 271:  
class = self._simple_class,
 
class = self._simple_class,
 
colspan = #self._columns - self._detailed_columns, rowspan = 1,  
 
colspan = #self._columns - self._detailed_columns, rowspan = 1,  
extra_style = self._display_none_style,
+
extra_style = self._display_none_style_text,
 
text_align = self._args[self._custom_row_prefix .. custom_row_key .. self._text_align_suffix] or self._start_align,  
 
text_align = self._args[self._custom_row_prefix .. custom_row_key .. self._text_align_suffix] or self._start_align,  
 
bg_color = self._args[self._custom_row_prefix .. custom_row_key .. self._bg_color_suffix] or self._transparent,
 
bg_color = self._args[self._custom_row_prefix .. custom_row_key .. self._bg_color_suffix] or self._transparent,
Anonymous user

Navigation menu