minor searchbox changes
This commit is contained in:
@@ -623,7 +623,7 @@ local methods = {
|
||||
ChatFrameEditBox:Insert(this.data.record.link)
|
||||
elseif not modified and button == 'RightButton' then -- TODO not when alt (how?)
|
||||
tab = 1
|
||||
search_tab.set_filter(strlower(info.item(this.data.record.item_id).name) .. '/exact')
|
||||
search_tab.filter = strlower(info.item(this.data.record.item_id).name) .. '/exact'
|
||||
search_tab.execute(nil, false)
|
||||
else
|
||||
local selection = this.rt:GetSelection()
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ do
|
||||
update_item(this.item_record)
|
||||
elseif arg1 == 'RightButton' then
|
||||
tab = 1
|
||||
search_tab.set_filter(strlower(info.item(this.item_record.item_id).name) .. '/exact')
|
||||
search_tab.filter = strlower(info.item(this.item_record.item_id).name) .. '/exact'
|
||||
search_tab.execute(nil, false)
|
||||
end
|
||||
end,
|
||||
|
||||
@@ -33,12 +33,12 @@ function CLOSE()
|
||||
end
|
||||
|
||||
function CLICK_LINK(item_info)
|
||||
set_filter(strlower(item_info.name) .. '/exact')
|
||||
filter = strlower(item_info.name) .. '/exact'
|
||||
execute(nil, false)
|
||||
end
|
||||
|
||||
function USE_ITEM(item_info)
|
||||
set_filter(strlower(item_info.name) .. '/exact')
|
||||
filter = strlower(item_info.name) .. '/exact'
|
||||
execute(nil, false)
|
||||
end
|
||||
|
||||
@@ -64,6 +64,7 @@ function set_subtab(tab)
|
||||
end
|
||||
|
||||
function M.set_filter(filter_string)
|
||||
search_box:SetFocus()
|
||||
search_box:SetText(filter_string)
|
||||
end
|
||||
|
||||
@@ -75,7 +76,7 @@ function add_filter(filter_string)
|
||||
old_filter_string = old_filter_string .. ';'
|
||||
end
|
||||
|
||||
search_box:SetText(old_filter_string .. filter_string)
|
||||
filter = old_filter_string .. filter_string
|
||||
end
|
||||
|
||||
function blizzard_page_index(str)
|
||||
|
||||
@@ -191,8 +191,7 @@ function import_filter_string()
|
||||
end
|
||||
|
||||
function export_filter_string()
|
||||
search_box:SetFocus()
|
||||
search_box:SetText(get_filter_builder_query())
|
||||
filter = filter_builder_query
|
||||
end
|
||||
|
||||
function formatted_post_filter(components)
|
||||
|
||||
@@ -126,7 +126,7 @@ do
|
||||
btn:RegisterForClicks('LeftButtonUp', 'RightButtonUp')
|
||||
btn:SetScript('OnClick', function()
|
||||
if arg1 == 'RightButton' then
|
||||
set_filter(current_search.filter_string)
|
||||
filter = current_search.filter_string
|
||||
end
|
||||
execute()
|
||||
end)
|
||||
|
||||
@@ -47,13 +47,11 @@ handlers = {
|
||||
OnClick = function(st, data, _, button)
|
||||
if not data then return end
|
||||
if button == 'LeftButton' and IsShiftKeyDown() then
|
||||
search_box:SetFocus()
|
||||
search_box:SetText(data.search.filter_string)
|
||||
filter = data.search.filter_string
|
||||
elseif button == 'RightButton' and IsShiftKeyDown() then
|
||||
search_box:SetFocus()
|
||||
add_filter(data.search.filter_string)
|
||||
elseif button == 'LeftButton' then
|
||||
search_box:SetText(data.search.filter_string)
|
||||
filter = data.search.filter_string
|
||||
execute()
|
||||
elseif button == 'RightButton' then
|
||||
local u = update_search_listings
|
||||
|
||||
Reference in New Issue
Block a user