bugfix
This commit is contained in:
@@ -728,7 +728,7 @@ function private.initialize_filter_dropdown()
|
||||
local function on_click()
|
||||
UIDropDownMenu_SetSelectedValue(m.filter_dropdown, this.value)
|
||||
m.filter_button:SetText(this.value)
|
||||
if Aux.safe(Aux.filter.filters[this.value]).input_type/'' == '' then
|
||||
if Aux.safe(Aux.filter.filters[this.value]).input_type/'' == '' and this.value ~= 'and' and this.value ~= 'or' then
|
||||
m.filter_input:Hide()
|
||||
else
|
||||
local _, _, suggestions = Aux.filter.parse_query_string(UIDropDownMenu_GetSelectedValue(m.filter_dropdown)..'/')
|
||||
@@ -861,6 +861,13 @@ function private.add_post_filter()
|
||||
local name = UIDropDownMenu_GetSelectedValue(m.filter_dropdown)
|
||||
if name then
|
||||
local filter = name
|
||||
if not Aux.filter.filters[name] and filter == 'and' or filter == 'or' then
|
||||
if not tonumber(m.filter_input:GetText()) and m.filter_input:GetText() ~= '*' then
|
||||
Aux.log('Invalid operator suffix')
|
||||
return
|
||||
end
|
||||
filter = filter..m.filter_input:GetText()
|
||||
end
|
||||
if Aux.filter.filters[name] and Aux.filter.filters[name].input_type ~= '' then
|
||||
filter = filter..'/'..m.filter_input:GetText()
|
||||
end
|
||||
|
||||
+4
-2
@@ -559,15 +559,17 @@ function public.indented_post_query_string(components)
|
||||
suffix = component[3]
|
||||
end
|
||||
str = str..'|cffffff00'..component[2]..suffix..'|r'
|
||||
tinsert(stack, component[3])
|
||||
tinsert(stack, component[3] or '*')
|
||||
elseif component[1] == 'filter' then
|
||||
str = str..'|cffffff00'..component[2]..'|r'
|
||||
if component[3] then
|
||||
str = str..': '..'|cffff9218'..component[3]..'|r'
|
||||
end
|
||||
local top = tremove(stack)
|
||||
if top and top > 1 then
|
||||
if tonumber(top) and top > 1 then
|
||||
tinsert(stack, top - 1)
|
||||
elseif top == '*' then
|
||||
tinsert(stack, top)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user