filter input fix
This commit is contained in:
@@ -151,8 +151,11 @@ function public.formatted_post_filter(components)
|
||||
component_text = component_text..(tonumber(component[3]) or '')
|
||||
tinsert(stack, component[3])
|
||||
elseif component[1] == 'filter' then
|
||||
if component[3] then
|
||||
component_text = component[3] and component_text..': '..aux.auction_listing.colors.ORANGE..component[3]..FONT_COLOR_CODE_CLOSE or component_text
|
||||
for _, parameter in {component[3]} do
|
||||
if aux.filter.filters[component[2]].input_type == 'money' then
|
||||
parameter = aux.money.to_string(aux.money.from_string(parameter), nil, true, nil, nil, true)
|
||||
end
|
||||
component_text = component_text..': '..aux.auction_listing.colors.ORANGE..parameter..FONT_COLOR_CODE_CLOSE or component_text
|
||||
end
|
||||
while getn(stack) > 0 and stack[getn(stack)] do
|
||||
local top = tremove(stack)
|
||||
@@ -192,8 +195,8 @@ function private.data_link_click()
|
||||
end
|
||||
|
||||
function private.remove_component(index)
|
||||
if m.filter_builder_state.selected == index then
|
||||
m.filter_builder_state.selected = max(index - 1, min(1, getn(m.post_filter)))
|
||||
if m.filter_builder_state.selected >= index then
|
||||
m.filter_builder_state.selected = max(m.filter_builder_state.selected - 1, min(1, getn(m.post_filter)))
|
||||
end
|
||||
m.filter_builder_state[m.post_filter[index]] = nil
|
||||
tremove(m.post_filter, index)
|
||||
|
||||
+10
-4
@@ -522,8 +522,11 @@ function public.query_string(components)
|
||||
prettified.append(component[2]..(component[2] ~= 'not' and tonumber(component[3]) or ''))
|
||||
elseif component[1] == 'filter' then
|
||||
prettified.append(component[2])
|
||||
if component[3] then
|
||||
prettified.append(component[3])
|
||||
for _, parameter in {component[3]} do
|
||||
if aux.filter.filters[component[2]].input_type == 'money' then
|
||||
parameter = aux.money.to_string(aux.money.from_string(parameter), nil, true, nil, nil, true)
|
||||
end
|
||||
prettified.append(parameter)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -559,8 +562,11 @@ function private.prettified_query_string(components)
|
||||
if component[2] ~= 'tooltip' then
|
||||
prettified.append(aux.auction_listing.colors.YELLOW..component[2]..FONT_COLOR_CODE_CLOSE)
|
||||
end
|
||||
if component[3] then
|
||||
prettified.append(aux.auction_listing.colors.ORANGE..component[3]..FONT_COLOR_CODE_CLOSE)
|
||||
for _, parameter in {component[3]} do
|
||||
if m.filters[component[2]].input_type == 'money' then
|
||||
parameter = aux.money.to_string(aux.money.from_string(parameter), nil, true, nil, nil, true)
|
||||
end
|
||||
prettified.append(aux.auction_listing.colors.ORANGE..parameter..FONT_COLOR_CODE_CLOSE)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user