some range input fixes
This commit is contained in:
+1
-1
@@ -81,7 +81,7 @@ end
|
|||||||
|
|
||||||
function private.scan()
|
function private.scan()
|
||||||
m.state.query_index = m.state.query_index and m.state.query_index + 1 or 1
|
m.state.query_index = m.state.query_index and m.state.query_index + 1 or 1
|
||||||
if m.query() then
|
if m.query() and (aux.index(m.query.blizzard_query, 'first_page') or 0) <= (aux.index(m.query.blizzard_query, 'last_page') or aux.huge) then
|
||||||
if m.query.blizzard_query then
|
if m.query.blizzard_query then
|
||||||
m.state.page = m.query.blizzard_query.first_page or 0
|
m.state.page = m.query.blizzard_query.first_page or 0
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -85,9 +85,6 @@ function private.create_frames()
|
|||||||
if this:GetText() ~= valid_input then
|
if this:GetText() ~= valid_input then
|
||||||
this:SetText(valid_input)
|
this:SetText(valid_input)
|
||||||
end
|
end
|
||||||
if (tonumber(m.last_page_input:GetText()) or aux.huge) < (tonumber(this:GetText()) or 1) then
|
|
||||||
m.last_page_input:SetText(tonumber(this:GetText()))
|
|
||||||
end
|
|
||||||
if m.blizzard_page_index(this:GetText()) and not m.real_time_button:GetChecked() then
|
if m.blizzard_page_index(this:GetText()) and not m.real_time_button:GetChecked() then
|
||||||
this:SetBackdropColor(unpack(aux.gui.color.state.enabled))
|
this:SetBackdropColor(unpack(aux.gui.color.state.enabled))
|
||||||
else
|
else
|
||||||
@@ -119,9 +116,6 @@ function private.create_frames()
|
|||||||
if this:GetText() ~= valid_input then
|
if this:GetText() ~= valid_input then
|
||||||
this:SetText(valid_input)
|
this:SetText(valid_input)
|
||||||
end
|
end
|
||||||
if (tonumber(m.first_page_input:GetText()) or 1) > (tonumber(this:GetText()) or aux.huge) then
|
|
||||||
this:SetText(tonumber(this:GetText()))
|
|
||||||
end
|
|
||||||
if m.blizzard_page_index(this:GetText()) and not m.real_time_button:GetChecked() then
|
if m.blizzard_page_index(this:GetText()) and not m.real_time_button:GetChecked() then
|
||||||
this:SetBackdropColor(unpack(aux.gui.color.state.enabled))
|
this:SetBackdropColor(unpack(aux.gui.color.state.enabled))
|
||||||
else
|
else
|
||||||
|
|||||||
+1
-1
@@ -238,7 +238,7 @@ function private.blizzard_filter_parser()
|
|||||||
end
|
end
|
||||||
if not filters.min_level then
|
if not filters.min_level then
|
||||||
filter = {'min_level', str}
|
filter = {'min_level', str}
|
||||||
elseif not filters.max_level and tonumber(str) >= tonumber(filters.min_level) then
|
elseif not filters.max_level then
|
||||||
filter = {'max_level', str}
|
filter = {'max_level', str}
|
||||||
else
|
else
|
||||||
return nil, 'Erroneous level range modifier'
|
return nil, 'Erroneous level range modifier'
|
||||||
|
|||||||
Reference in New Issue
Block a user