some work on manage tab

This commit is contained in:
Simon Hirsig
2015-10-28 16:33:43 +01:00
parent 49a1b6b089
commit da435a0e37
3 changed files with 16 additions and 14 deletions
+5 -5
View File
@@ -5,16 +5,16 @@ local bid_records, auction_records, create_bid_record, create_auction_record, up
local position local position
local bid_listing_config = { 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) local data_index = row_index + FauxScrollFrame_GetOffset(sheet.scroll_frame)
AuxBuyEntry_OnClick(sheet.data[data_index]) AuxBuyEntry_OnClick(sheet.data[data_index])
end, 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) sheet.rows[row_index].highlight:SetAlpha(.5)
end, 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) sheet.rows[row_index].highlight:SetAlpha(0)
end, end,
columns = { columns = {
@@ -349,7 +349,7 @@ function update_bid_records(k)
position = nil position = nil
end, end,
on_page_loaded = function(page, total_pages) 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 position = 'bids#'..page
end, end,
on_read_auction = function(i) on_read_auction = function(i)
@@ -379,7 +379,7 @@ function update_auction_records(k)
position = nil position = nil
end, end,
on_page_loaded = function(page, total_pages) 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 position = 'auctions#'..page
end, end,
on_read_auction = function(i) on_read_auction = function(i)
+3 -3
View File
@@ -16,7 +16,7 @@
<Size> <Size>
<AbsDimension x="655" y="326"/> <AbsDimension x="655" y="326"/>
</Size> </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> <Scripts>
<OnLoad> <OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4) this:SetBackdropBorderColor(0.4, 0.4, 0.4)
@@ -106,9 +106,9 @@
</Frame> </Frame>
<Frame name="AuxManageAuctions" inherits="AuxFrameBoxTemplate"> <Frame name="AuxManageAuctions" inherits="AuxFrameBoxTemplate">
<Size> <Size>
<AbsDimension x="655" y="326"/> <AbsDimension x="400" y="326"/>
</Size> </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> <Scripts>
<OnLoad> <OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4) this:SetBackdropBorderColor(0.4, 0.4, 0.4)
+8 -6
View File
@@ -47,9 +47,7 @@ end
function wait_for_results(k) function wait_for_results(k)
local ok local ok
if state.job.type == 'bidder' then if state.job.type == 'bidder' then
Aux.control.on_next_event('AUCTION_BIDDER_LIST_UPDATE', function() ok = true
ok = true
end)
elseif state.job.type == 'owner' then elseif state.job.type == 'owner' then
Aux.control.on_next_event('AUCTION_OWNED_LIST_UPDATE', function() Aux.control.on_next_event('AUCTION_OWNED_LIST_UPDATE', function()
ok = true ok = true
@@ -146,9 +144,13 @@ function submit_query(k)
--wait_for_owner_data(function() --wait_for_owner_data(function()
local _, total_count = GetNumAuctionItems(state.job.type) local _, total_count = GetNumAuctionItems(state.job.type)
state.total_pages = math.ceil(total_count / PAGE_SIZE) state.total_pages = math.ceil(total_count / PAGE_SIZE)
wait_for_callback{state.job.on_page_loaded, state.page, state.total_pages, function() if total_pages >= state.page + 1 then
k() wait_for_callback{state.job.on_page_loaded, state.page, state.total_pages, function()
end} return k()
end}
else
return k()
end
-- end) -- end)
end) end)
if state.job.type == 'bidder' then if state.job.type == 'bidder' then