Skip to content

Instantly share code, notes, and snippets.

@VirtuosiMedia
Created April 6, 2016 20:16
Show Gist options
  • Save VirtuosiMedia/77d499d438f6ad7e3366f7b10f93612e to your computer and use it in GitHub Desktop.
Save VirtuosiMedia/77d499d438f6ad7e3366f7b10f93612e to your computer and use it in GitHub Desktop.
/**
* Renders the purchase tab panel in the trade center.
* @param - object goodsCategories - The alphabetized list categories for goods.
* @return - The rendered tab panel as an HTML object.
*/
renderPurchaseTab: function(goodsCategories){
var template = _.f();
var purchaseSelect = jg.ui.forms.select(goodsCategories, jg.data.state.commercial.trade.purchaseCategory, {
'id': 'purchaseCategory',
'data-change': 'templates.commercial.tradeCenter.setPurchaseCategory'
});
var header = _.e('div.card.small');
header.adopt(purchaseSelect);
header.inject(template);
_.e('div#tradeCenterPurchaseTable').inject(template);
_.action.delay(this.renderPurchaseTable, 100);
return template;
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment