some work on manage tab
This commit is contained in:
+5
-5
@@ -5,16 +5,16 @@ local bid_records, auction_records, create_bid_record, create_auction_record, up
|
||||
local position
|
||||
|
||||
local bid_listing_config = {
|
||||
on_cell_click = function (sheet, row_index, column_index)
|
||||
on_cell_click = function(sheet, row_index, column_index)
|
||||
local data_index = row_index + FauxScrollFrame_GetOffset(sheet.scroll_frame)
|
||||
AuxBuyEntry_OnClick(sheet.data[data_index])
|
||||
end,
|
||||
|
||||
on_cell_enter = function (sheet, row_index, column_index)
|
||||
on_cell_enter = function(sheet, row_index, column_index)
|
||||
sheet.rows[row_index].highlight:SetAlpha(.5)
|
||||
end,
|
||||
|
||||
on_cell_leave = function (sheet, row_index, column_index)
|
||||
on_cell_leave = function(sheet, row_index, column_index)
|
||||
sheet.rows[row_index].highlight:SetAlpha(0)
|
||||
end,
|
||||
columns = {
|
||||
@@ -349,7 +349,7 @@ function update_bid_records(k)
|
||||
position = nil
|
||||
end,
|
||||
on_page_loaded = function(page, total_pages)
|
||||
Aux.log('Scanning bid page '..(page+1)..' out of '..total_pages..' ...')
|
||||
Aux.log('Scanning bid page '..(page+1)..' out of '..total_pages..' ...')
|
||||
position = 'bids#'..page
|
||||
end,
|
||||
on_read_auction = function(i)
|
||||
@@ -379,7 +379,7 @@ function update_auction_records(k)
|
||||
position = nil
|
||||
end,
|
||||
on_page_loaded = function(page, total_pages)
|
||||
Aux.log('Scanning auction page '..(page+1)..' out of '..total_pages..' ...')
|
||||
Aux.log('Scanning auction page '..(page+1)..' out of '..total_pages..' ...')
|
||||
position = 'auctions#'..page
|
||||
end,
|
||||
on_read_auction = function(i)
|
||||
|
||||
+3
-3
@@ -16,7 +16,7 @@
|
||||
<Size>
|
||||
<AbsDimension x="655" y="326"/>
|
||||
</Size>
|
||||
<Anchors><Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="AuxBuyFilters"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="5" y="-35"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this:SetBackdropBorderColor(0.4, 0.4, 0.4)
|
||||
@@ -106,9 +106,9 @@
|
||||
</Frame>
|
||||
<Frame name="AuxManageAuctions" inherits="AuxFrameBoxTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="655" y="326"/>
|
||||
<AbsDimension x="400" y="326"/>
|
||||
</Size>
|
||||
<Anchors><Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="AuxBuyFilters"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="AuxManageBids"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this:SetBackdropBorderColor(0.4, 0.4, 0.4)
|
||||
|
||||
@@ -47,9 +47,7 @@ end
|
||||
function wait_for_results(k)
|
||||
local ok
|
||||
if state.job.type == 'bidder' then
|
||||
Aux.control.on_next_event('AUCTION_BIDDER_LIST_UPDATE', function()
|
||||
ok = true
|
||||
end)
|
||||
ok = true
|
||||
elseif state.job.type == 'owner' then
|
||||
Aux.control.on_next_event('AUCTION_OWNED_LIST_UPDATE', function()
|
||||
ok = true
|
||||
@@ -146,9 +144,13 @@ function submit_query(k)
|
||||
--wait_for_owner_data(function()
|
||||
local _, total_count = GetNumAuctionItems(state.job.type)
|
||||
state.total_pages = math.ceil(total_count / PAGE_SIZE)
|
||||
wait_for_callback{state.job.on_page_loaded, state.page, state.total_pages, function()
|
||||
k()
|
||||
end}
|
||||
if total_pages >= state.page + 1 then
|
||||
wait_for_callback{state.job.on_page_loaded, state.page, state.total_pages, function()
|
||||
return k()
|
||||
end}
|
||||
else
|
||||
return k()
|
||||
end
|
||||
-- end)
|
||||
end)
|
||||
if state.job.type == 'bidder' then
|
||||
|
||||
Reference in New Issue
Block a user