Migrates to Bootstrap 5

Adds bootstrap-5.0.0-beta3-dist

Adds bootstrap-5.0.0

Updates bootstrap-5.0.0-beta3-dist to bootstrap-5.0.0-dist

initial migration to bs v5

porting to bs5

improvements on dropdown menu filter

fixed host map dropdown

removed excessive padding

fix button toggle

re-add blog news

removed text decoration for links

fix button layout (#5348)

remove underscore from href (#5347)
This commit is contained in:
Simone Mainardi 2021-05-05 11:43:33 +02:00 committed by Matteo Biscosi
parent 83ff018198
commit 1dce9e5842
252 changed files with 60805 additions and 30259 deletions

View file

@ -286,7 +286,7 @@ function prefsInputFieldPrefs(label, comment, prekey, key, default_value, _input
print [[
<td align=right>
<table class="table table-borderless form-group" style="margin-bottom: 0; min-width:22em;">
<table class="table table-borderless form-group mb-3" style="margin-bottom: 0; min-width:22em;">
<tr>
<td width="100%;"></td>
<td style="vertical-align:top;">]]
@ -320,7 +320,7 @@ function prefsInputFieldPrefs(label, comment, prekey, key, default_value, _input
</tr>
<tr>
<td colspan="3" style="padding:0;">
<div class="help-block with-errors text-right" style="height:1em;"></div>
<div class="help-block with-errors text-end" style="height:1em;"></div>
</td>
</tr>
</table>
@ -360,7 +360,7 @@ function prefsDropdownFieldPrefs(label, comment, key, values, default_value, sho
print [[
<td align=right>
<table class="form-group" style="margin-bottom: 0; min-width:22em;">
<table class="form-group mb-3" style="margin-bottom: 0; min-width:22em;">
<tr>
<td width="100%;"></td>]]
@ -377,7 +377,7 @@ function prefsDropdownFieldPrefs(label, comment, key, values, default_value, sho
print[[
<td style="vertical-align:top; padding-left: 2em;">
<select id="id_input_]] print(key) print [[" class="form-control" ]] print(table.tconcat(attributes, "=", " ", nil, '"')) print[[ name="]] print(key) print [[" style="]] print(table.tconcat(style, ":", "; ", ";")) print[[" value="]] print((value or '')..'"') print[[>]]
<select id="id_input_]] print(key) print [[" class="form-select" ]] print(table.tconcat(attributes, "=", " ", nil, '"')) print[[ name="]] print(key) print [[" style="]] print(table.tconcat(style, ":", "; ", ";")) print[[" value="]] print((value or '')..'"') print[[>]]
if extra.keys == nil then
for _, optname in pairs(values) do
print("<option " .. ternary(optname == default_value, "selected", "") .. ">"..optname.."</option>")
@ -395,7 +395,7 @@ function prefsDropdownFieldPrefs(label, comment, key, values, default_value, sho
</tr>
<tr>
<td colspan="3" style="padding:0;">
<div class="help-block with-errors text-right" style="height:1em;"></div>
<div class="help-block with-errors text-end" style="height:1em;"></div>
</td>
</tr>
</table>
@ -515,9 +515,9 @@ local function toggleTableButtonPrefs(label, comment, on_label, on_value, on_col
if(label ~= "") then print('<tr id="row_'..submit_field..'"'..objRow..'><td width=50%><strong>'..label..'</strong><p><small>'..comment..'</small></td><td align=right>\n') end
print([[
<div class="custom-control custom-switch ">
<input ]].. (value == off_value and '' or 'checked') ..[[ type="checkbox" class="custom-control-input" id="check-]].. submit_field ..[[">
<label class="custom-control-label custom-control-label-lg " for="check-]].. submit_field ..[["></label>
<div class="form-check form-switch">
<input ]].. (value == off_value and '' or 'checked') ..[[ type="checkbox" class="form-check-input" id="check-]].. submit_field ..[[">
<label class="form-check-label" for="check-]].. submit_field ..[["></label>
<input hidden id="input-]].. submit_field ..[[" name="]].. submit_field ..[[" value="]].. value ..[[">
]])
print([[</div>]])
@ -658,7 +658,7 @@ function multipleTableButtonPrefs(label, comment, array_labels, array_values, de
end
if(value ~= nil) then
if(label ~= "") then print('<tr id="row_'..submit_field..'"'..objRow..'><td width=50%><strong>'..label..'</strong><p><small>'..comment..'</small></td><td align=right>\n') end
print('<div class="btn-group" data-toggle="buttons-radio" data-toggle-name="'..submit_field..'">')
print('<div class="btn-group" data-bs-toggle="buttons-radio" data-bs-toggle-name="'..submit_field..'">')
for nameCount = 1, #array_labels do
local type_button = "btn-secondary"
@ -671,7 +671,7 @@ function multipleTableButtonPrefs(label, comment, array_labels, array_values, de
end
type_button = "btn-"..color.." active"
end
print('<button id="id_'..submit_field..'_'..array_values[nameCount]..'" value="'..array_values[nameCount]..'" type="button" class="btn btn-sm '..type_button..' ' .. disabled .. '"'.. disabled_attr ..' data-toggle="button">'..array_labels[nameCount]..'</button>\n')
print('<button id="id_'..submit_field..'_'..array_values[nameCount]..'" value="'..array_values[nameCount]..'" type="button" class="btn btn-sm '..type_button..' ' .. disabled .. '"'.. disabled_attr ..' data-bs-toggle="button">'..array_labels[nameCount]..'</button>\n')
end
print('</div>\n')
print('<input type="hidden" id="id-toggle-'..submit_field..'" name="'..submit_field..'" value="'..value..'" />\n')