Show crafting plan button only when craftable

This commit is contained in:
Andrew Miner
2016-04-26 21:53:39 -07:00
parent 1d1772e961
commit 35bb12de6a
@@ -102,6 +102,7 @@ module.exports = class ItemPageController extends PageController
enterFeedback: @_enterFeedback
@$aboutImage = @$('.about img')
@$craftingPlanButton = @$('.button.craftingPlan')
@$name = @$('.about .title')
@$officialLink = @$('.about a.officialLink')
@$sourceModLink = @$('.about a.sourceMod')
@@ -135,6 +136,11 @@ module.exports = class ItemPageController extends PageController
else
@hide @$aboutLinks
if @model.item.isCraftable
@show @$craftingPlanButton
else
@hide @$craftingPlanButton
@show()
else
@hide()