Show crafting plan button only when craftable
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user