some minor search box changes
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
Aux = {
|
Aux = {
|
||||||
version = '2.15.3',
|
version = '2.15.4',
|
||||||
blizzard_ui_shown = false,
|
blizzard_ui_shown = false,
|
||||||
orig = {},
|
orig = {},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -212,9 +212,16 @@ function public.execute(mode, filter_string)
|
|||||||
private.search_box:SetText(filter_string)
|
private.search_box:SetText(filter_string)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if mode == 'search' and private.search_box:GetText() == private.current_search().filter_string then
|
||||||
|
mode = 'refresh'
|
||||||
|
end
|
||||||
|
|
||||||
local queries, filters
|
local queries, filters
|
||||||
if mode == 'refresh' then
|
if mode == 'refresh' or mode == 'resume' then
|
||||||
|
private.search_box:ClearFocus()
|
||||||
private.search_box:SetText(private.current_search().filter_string)
|
private.search_box:SetText(private.current_search().filter_string)
|
||||||
|
end
|
||||||
|
if mode == 'refresh' then
|
||||||
private.current_search().records = {}
|
private.current_search().records = {}
|
||||||
private.results_listing:SetDatabase(private.current_search().records)
|
private.results_listing:SetDatabase(private.current_search().records)
|
||||||
end
|
end
|
||||||
@@ -431,6 +438,7 @@ do
|
|||||||
|
|
||||||
function private.update_search()
|
function private.update_search()
|
||||||
Aux.scan.abort(search_scan_id)
|
Aux.scan.abort(search_scan_id)
|
||||||
|
private.search_box:ClearFocus()
|
||||||
private.search_box:SetText(searches[search_index].filter_string)
|
private.search_box:SetText(searches[search_index].filter_string)
|
||||||
private.results_listing:Reset()
|
private.results_listing:Reset()
|
||||||
private.results_listing:SetDatabase(searches[search_index].records)
|
private.results_listing:SetDatabase(searches[search_index].records)
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ function Aux.search_frame.create_frames(private, public)
|
|||||||
btn:SetHeight(25)
|
btn:SetHeight(25)
|
||||||
btn:SetText(GREEN_FONT_COLOR_CODE..'Resume'..FONT_COLOR_CODE_CLOSE)
|
btn:SetText(GREEN_FONT_COLOR_CODE..'Resume'..FONT_COLOR_CODE_CLOSE)
|
||||||
btn:SetScript('OnClick', function()
|
btn:SetScript('OnClick', function()
|
||||||
private.search_box:ClearFocus()
|
|
||||||
public.execute('resume')
|
public.execute('resume')
|
||||||
end)
|
end)
|
||||||
private.resume_button = btn
|
private.resume_button = btn
|
||||||
|
|||||||
Reference in New Issue
Block a user