doc: Merge the Inherited/Deprecated/Readonly tag style.
They are on the right like Inherited, but use the "chip" style of ReadOnly.
This commit is contained in:
parent
dd7492fa7c
commit
2c1c37fb12
|
@ -591,12 +591,14 @@ local named_args = {
|
|||
|
||||
-- Sections which are hidden by default, but visible when clicked.
|
||||
local summarize = {
|
||||
emits = {index = 1, title = "signal" , count = true },
|
||||
propemits = {index = 2, title = "signal" , count = true },
|
||||
usebeautiful = {index = 3, title = "theme variable" , count = true },
|
||||
propbeautiful = {index = 4, title = "theme variable" , count = true },
|
||||
request = {index = 5, title = "permission" , count = true },
|
||||
classsignal = {index = 6, title = "Class level only", count = false},
|
||||
is_deprecated = {index = 1, title = "deprecated" , count = false},
|
||||
emits = {index = 2, title = "signal" , count = true },
|
||||
propemits = {index = 3, title = "signal" , count = true },
|
||||
usebeautiful = {index = 4, title = "theme variable" , count = true },
|
||||
propbeautiful = {index = 5, title = "theme variable" , count = true },
|
||||
request = {index = 6, title = "permission" , count = true },
|
||||
classsignal = {index = 7, title = "Class level only", count = false},
|
||||
readonly = {index = 8, title = "read only" , count = false},
|
||||
}
|
||||
|
||||
local delimiter_for_tag = {
|
||||
|
@ -645,9 +647,6 @@ local function generate_summary(item)
|
|||
has_show_more = v.showcount or has_show_more
|
||||
end
|
||||
end
|
||||
if item.tags.readonly then
|
||||
ret[#ret+1] = {title = "read only"}
|
||||
end
|
||||
|
||||
item.extra_summary = #ret > 0 and ret or nil
|
||||
item.has_show_more = has_show_more
|
||||
|
@ -939,6 +938,10 @@ local is_deprecated = {
|
|||
}
|
||||
|
||||
custom_display_name_handler = function(item, default_handler)
|
||||
if is_deprecated[item.type] then
|
||||
item.tags.is_deprecated = {true}
|
||||
end
|
||||
|
||||
init_custom_types(item)
|
||||
|
||||
local ret = default_handler(item)
|
||||
|
@ -984,10 +987,6 @@ custom_display_name_handler = function(item, default_handler)
|
|||
ret = render_methods(item)
|
||||
end
|
||||
|
||||
if is_deprecated[item.type] then
|
||||
return ret .. "<i class=\"deprecated_label\"> [deprecated]</i>"
|
||||
end
|
||||
|
||||
-- Get rid of the "module:" in front of method names. It is either wrong or
|
||||
-- just redundant.
|
||||
ret = ret:gsub("([^:]*)(:[^:])","%2")
|
||||
|
|
|
@ -346,14 +346,18 @@ span.inheritance {
|
|||
text-align: right;
|
||||
}
|
||||
|
||||
span.chips--readonly {
|
||||
span.chips {
|
||||
border: 1px solid #9db9f3;
|
||||
border-radius: 25px;
|
||||
padding: 1px 3px;
|
||||
font-size: 70%;
|
||||
padding-left: 5pt;
|
||||
padding-right: 5pt;
|
||||
padding-top: 1pt;
|
||||
padding-bottom: 1pt;
|
||||
font-size: 85%;
|
||||
color: #9db9f3;
|
||||
background-color: #FFF;
|
||||
margin-left: 10px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table.function_list .function_args /*.function_modname*/ {
|
||||
|
|
|
@ -292,17 +292,20 @@
|
|||
# end
|
||||
</td>
|
||||
# end
|
||||
<td colspan="$(inherited and 1 or 2)" class="summary">
|
||||
<td class="summary">
|
||||
$(M(item.summary,item))
|
||||
# if item.tags.readonly then
|
||||
<span class="chips--readonly">read only</span>
|
||||
# end
|
||||
</td>
|
||||
# if inherited then
|
||||
<td class="baseclass" nowrap>
|
||||
Inherited from $(item.baseclass)
|
||||
</td>
|
||||
# if item.tags.is_deprecated then
|
||||
<span class="chips">Deprecated</span>
|
||||
# end
|
||||
# if item.tags.readonly then
|
||||
<span class="chips">Read only</span>
|
||||
# end
|
||||
# if inherited then
|
||||
<span class="chips">Inherited from $(item.baseclass)</span>
|
||||
# end
|
||||
</td>
|
||||
</tr>
|
||||
# end end -- for items
|
||||
# last_kind = kind
|
||||
|
|
Loading…
Reference in New Issue