示例#1
0
 def edit_recipe(self, *args):
     recipe_entry_store.reset(recipe_entry_store.state.recipe)
     store.push_page(AddRecipePage)
示例#2
0
 def add_recipe(self, *args):
     recipe_entry_store.reset()
     store.push_page(AddRecipePage)
示例#3
0
 def on_load(error, result):
     recipe_entry_store.state.recipe = result
     store.push_page(ViewRecipePage)
示例#4
0
 def __init__(self):
     self.state = store.state  # track store.state
     store.push_page(InitializingPage)
示例#5
0
 def open_ingredients(self, *args):
     store.push_page(AddIngredientPage)
示例#6
0
 def open_configuration(self):
     store.push_page(ConfigurationPage)
示例#7
0
 def add_items(self, *args):
     store.push_page(AddItemsPage)
示例#8
0
 def add_recipe(self, day_index, meal):
     plan_store.state.day_index = day_index
     plan_store.state.meal = meal
     store.push_page(ChooseRecipePage)
示例#9
0
 def on_loaded(error, plan):
     plan_store.state.plan = plan
     store.push_page(PlanPage)
示例#10
0
 def add_plan(self, *args):
     plan_store.new_plan()
     store.push_page(PlanPage)