Show crafting plan button only when craftable
This commit is contained in:
@@ -102,6 +102,7 @@ module.exports = class ItemPageController extends PageController
|
|||||||
enterFeedback: @_enterFeedback
|
enterFeedback: @_enterFeedback
|
||||||
|
|
||||||
@$aboutImage = @$('.about img')
|
@$aboutImage = @$('.about img')
|
||||||
|
@$craftingPlanButton = @$('.button.craftingPlan')
|
||||||
@$name = @$('.about .title')
|
@$name = @$('.about .title')
|
||||||
@$officialLink = @$('.about a.officialLink')
|
@$officialLink = @$('.about a.officialLink')
|
||||||
@$sourceModLink = @$('.about a.sourceMod')
|
@$sourceModLink = @$('.about a.sourceMod')
|
||||||
@@ -135,6 +136,11 @@ module.exports = class ItemPageController extends PageController
|
|||||||
else
|
else
|
||||||
@hide @$aboutLinks
|
@hide @$aboutLinks
|
||||||
|
|
||||||
|
if @model.item.isCraftable
|
||||||
|
@show @$craftingPlanButton
|
||||||
|
else
|
||||||
|
@hide @$craftingPlanButton
|
||||||
|
|
||||||
@show()
|
@show()
|
||||||
else
|
else
|
||||||
@hide()
|
@hide()
|
||||||
|
|||||||
Reference in New Issue
Block a user