Show crafting plan button only when craftable
This commit is contained in:
@@ -101,11 +101,12 @@ module.exports = class ItemPageController extends PageController
|
|||||||
endEditing: => @_endEditingDescription()
|
endEditing: => @_endEditingDescription()
|
||||||
enterFeedback: @_enterFeedback
|
enterFeedback: @_enterFeedback
|
||||||
|
|
||||||
@$aboutImage = @$('.about img')
|
@$aboutImage = @$('.about img')
|
||||||
@$name = @$('.about .title')
|
@$craftingPlanButton = @$('.button.craftingPlan')
|
||||||
@$officialLink = @$('.about a.officialLink')
|
@$name = @$('.about .title')
|
||||||
@$sourceModLink = @$('.about a.sourceMod')
|
@$officialLink = @$('.about a.officialLink')
|
||||||
@$aboutLinks = @$('.about .right')
|
@$sourceModLink = @$('.about a.sourceMod')
|
||||||
|
@$aboutLinks = @$('.about .right')
|
||||||
|
|
||||||
@$multiblockSection = @$('section.multiblock')
|
@$multiblockSection = @$('section.multiblock')
|
||||||
@$recipeContainer = @$('section.recipes .panel')
|
@$recipeContainer = @$('section.recipes .panel')
|
||||||
@@ -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