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