big filter refactoring, filter tab changes

This commit is contained in:
Manuel Simon Hirsig
2016-08-02 02:26:32 +02:00
parent 40c144ef51
commit 75b2e8b520
2 changed files with 14 additions and 1 deletions
+5
View File
@@ -875,3 +875,8 @@ function private.add_post_filter()
end
end
function private.remove_post_filter()
tremove(m.post_components)
m.filter_display:SetText(Aux.filter.indented_post_query_string(m.post_components))
end
+9 -1
View File
@@ -526,7 +526,14 @@ Aux.search_tab.FRAMES(function(m, public, private)
btn:SetWidth(170)
btn:SetHeight(25)
btn:SetPoint('CENTER', m.filter_dropdown, 'CENTER', 0, 0)
btn:SetScript('OnClick', m.add_post_filter)
btn:RegisterForClicks('LeftButtonUp', 'RightButtonUp')
btn:SetScript('OnClick', function()
if arg1 == 'LeftButton' then
m.add_post_filter()
elseif arg1 == 'RightButton' then
m.remove_post_filter()
end
end)
private.filter_button = btn
end
do
@@ -541,6 +548,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
-- Aux.completion.complete(this, function() return filter and ({filter.validator()})[3] or {} end)
end)
input:SetScript('OnEnterPressed', m.add_post_filter)
input:Hide()
private.filter_input = input
end
do