Skip to content

Instantly share code, notes, and snippets.

@VirtuosiMedia
Created April 6, 2016 22:49
Show Gist options
  • Save VirtuosiMedia/682dafb8c2f8c91c0fc2aa94089d5bd5 to your computer and use it in GitHub Desktop.
Save VirtuosiMedia/682dafb8c2f8c91c0fc2aa94089d5bd5 to your computer and use it in GitHub Desktop.
/**
* Unlocks a purchase bid, canceling it and rerendering the table and the resource panel.
* @param {HTMLObject} target The unlock button.
*/
cancelBid: function(target){
var good = target.get('data-good');
var holding = jg.data.state.holding;
var template = jg.templates.commercial.tradeCenter();
jg.calculate.trade.cancelTradeOrder(holding, good);
jg.templates.load.interface()['update' + jg.data.state.panel + 'Panel']();
template.renderPurchaseTable();
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment