Continue to look for recipes in disabled books
Update models so that when a recipe book is disabled, it no longer is used for finding names to display in the UI, but it is still used for finding recipes to make.
This commit is contained in:
@@ -23,8 +23,6 @@ module.exports = class RecipeBook extends BaseModel
|
||||
# Public Methods ###############################################################################
|
||||
|
||||
gatherNames: (result)->
|
||||
return unless @enabled
|
||||
|
||||
for recipe in @recipes
|
||||
continue if result[recipe.name]
|
||||
result[recipe.name] = value:recipe.name, label:"#{recipe.name} (from #{@modName} #{@modVersion})"
|
||||
@@ -32,8 +30,6 @@ module.exports = class RecipeBook extends BaseModel
|
||||
return result
|
||||
|
||||
gatherRecipes: (name, result)->
|
||||
return unless @enabled
|
||||
|
||||
for recipe in @recipes
|
||||
if recipe.name is name
|
||||
result.push recipe
|
||||
|
||||
@@ -24,6 +24,7 @@ module.exports = class RecipeCatalog extends BaseModel
|
||||
gatherNames: ->
|
||||
nameData = {}
|
||||
for book in @books
|
||||
continue unless book.enabled
|
||||
book.gatherNames nameData
|
||||
|
||||
result = []
|
||||
|
||||
@@ -17,4 +17,3 @@
|
||||
td
|
||||
input.recipe_book_url(placeholder="enter a URL to load another recipe book...")
|
||||
button.recipe_book_load_button Load
|
||||
.load_error: p
|
||||
|
||||
Reference in New Issue
Block a user