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 '')
|
component_text = component_text..(tonumber(component[3]) or '')
|
||||||
tinsert(stack, component[3])
|
tinsert(stack, component[3])
|
||||||
elseif component[1] == 'filter' then
|
elseif component[1] == 'filter' then
|
||||||
if component[3] then
|
for _, parameter in {component[3]} do
|
||||||
component_text = component[3] and component_text..': '..aux.auction_listing.colors.ORANGE..component[3]..FONT_COLOR_CODE_CLOSE or component_text
|
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
|
end
|
||||||
while getn(stack) > 0 and stack[getn(stack)] do
|
while getn(stack) > 0 and stack[getn(stack)] do
|
||||||
local top = tremove(stack)
|
local top = tremove(stack)
|
||||||
@@ -192,8 +195,8 @@ function private.data_link_click()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function private.remove_component(index)
|
function private.remove_component(index)
|
||||||
if m.filter_builder_state.selected == index then
|
if m.filter_builder_state.selected >= index then
|
||||||
m.filter_builder_state.selected = max(index - 1, min(1, getn(m.post_filter)))
|
m.filter_builder_state.selected = max(m.filter_builder_state.selected - 1, min(1, getn(m.post_filter)))
|
||||||
end
|
end
|
||||||
m.filter_builder_state[m.post_filter[index]] = nil
|
m.filter_builder_state[m.post_filter[index]] = nil
|
||||||
tremove(m.post_filter, index)
|
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 ''))
|
prettified.append(component[2]..(component[2] ~= 'not' and tonumber(component[3]) or ''))
|
||||||
elseif component[1] == 'filter' then
|
elseif component[1] == 'filter' then
|
||||||
prettified.append(component[2])
|
prettified.append(component[2])
|
||||||
if component[3] then
|
for _, parameter in {component[3]} do
|
||||||
prettified.append(component[3])
|
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
|
end
|
||||||
end
|
end
|
||||||
@@ -559,8 +562,11 @@ function private.prettified_query_string(components)
|
|||||||
if component[2] ~= 'tooltip' then
|
if component[2] ~= 'tooltip' then
|
||||||
prettified.append(aux.auction_listing.colors.YELLOW..component[2]..FONT_COLOR_CODE_CLOSE)
|
prettified.append(aux.auction_listing.colors.YELLOW..component[2]..FONT_COLOR_CODE_CLOSE)
|
||||||
end
|
end
|
||||||
if component[3] then
|
for _, parameter in {component[3]} do
|
||||||
prettified.append(aux.auction_listing.colors.ORANGE..component[3]..FONT_COLOR_CODE_CLOSE)
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user