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:
Andrew Miner
2014-12-29 12:38:07 -08:00
parent 004320d052
commit 2dd4b7014f
3 changed files with 1 additions and 5 deletions
-4
View File
@@ -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
+1
View File
@@ -24,6 +24,7 @@ module.exports = class RecipeCatalog extends BaseModel
gatherNames: ->
nameData = {}
for book in @books
continue unless book.enabled
book.gatherNames nameData
result = []
-1
View File
@@ -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