mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Fixes for prefs buttons
This commit is contained in:
parent
3df94ecf82
commit
3e46607fc6
1 changed files with 9 additions and 3 deletions
|
|
@ -59,8 +59,12 @@ local function prefsResolutionButtons(fmt, value)
|
|||
string.gsub(fmt, ".", function(k)
|
||||
local v = fmt_to_data[k]
|
||||
if v ~= nil then
|
||||
print[[<label class="btn btn-default]]
|
||||
if selected == k then print[[ btn-primary active]] end
|
||||
print[[<label class="btn btn-sm]]
|
||||
if selected == k then
|
||||
print[[ btn-primary active]]
|
||||
else
|
||||
print[[ btn-default]]
|
||||
end
|
||||
print[[ btn-sm"><input value="]] print(tostring(v[3])) print[[" title="]] print(v[1]) print[[" name="options_]] print(ctrl_id) print[[" autocomplete="off" type="radio"]]
|
||||
if selected == k then print(' checked="checked"') end print[[/>]] print(v[2]) print[[</label>]]
|
||||
end
|
||||
|
|
@ -90,7 +94,9 @@ local function prefsResolutionButtons(fmt, value)
|
|||
|
||||
function resol_selector_change_callback(event) {
|
||||
var selected = $(this);
|
||||
selected.attr('checked', 'checked').closest("label").addClass('btn-primary').siblings().removeClass('btn-primary').find("input").removeAttr('checked');
|
||||
selected.attr('checked', 'checked')
|
||||
.closest("label").removeClass('btn-default').addClass('btn-primary')
|
||||
.siblings().removeClass('btn-primary').addClass('btn-default').find("input").removeAttr('checked');
|
||||
|
||||
resol_selector_reset_input_range(selected);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue