First real version of item detail page

* Split the InventoryTable view/controller out from the existing
  inventory view/controller. This is a simpler component which only
  includes the table itself, and not the scrollbox, panel or header
  used on the crafting page.
* Create the FullRecipe view/controller to represent the expanded
  version of a recipe shown on the item page (as compared to the
  terser version on the crafting page).
* Rename the existing Recipe view/controller to MinimalRecipe to
  avoid confusing the two.
* Refactor the CSS for the Stack view/controller so that it can be
  shared between the Inventory and InventoryTable views.
* Incorporate all these new controllers into the item page and hook
  up the necessary model logic to drive them.
This commit is contained in:
Andrew Miner
2015-02-09 21:15:09 -08:00
parent 996c8823a3
commit 46427a70f6
23 changed files with 528 additions and 54 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
.panel
.prev
.view__recipe
.view__minimal_recipe
.next
.problem
+20
View File
@@ -0,0 +1,20 @@
//-
//- Crafting Guide - full_recipe.jade
//-
//- Copyright (c) 2015 by Redwood Labs
//- All rights reserved.
//-
.view__full_recipe
.input
h3: p Ingredients
.view__inventory_table
.pattern
table.view__crafting_grid
.tool: p
.output
h3: p Produces
.view__inventory_table
+16
View File
@@ -0,0 +1,16 @@
//-
//- Crafting Guide - inventory_table.jade
//-
//- Copyright (c) 2014-2015 by Redwood Labs
//- All rights reserved.
//-
.view__inventory_table
table
tr.edit
td.quantity: input(name="quantity")
td.icon: img(src="/images/unknown.png")
td.name(width="*"): input(name="name")
td.action: button(name="add") add
.toolbar
button(name="clear") clear
+5 -1
View File
@@ -14,7 +14,11 @@
.byline: p from <a></a>
.description: p
.recipe
.recipe.section
h2 Recipe
.panel
.view__full_recipe
.usedInMaking: .view__item_group
.similar: .view__item_group
.plan
+1 -1
View File
@@ -5,7 +5,7 @@
//- All rights reserved.
//-
.view__recipe
.view__minimal_recipe
.input
table.view__crafting_grid
.tool: p
+1 -1
View File
@@ -8,6 +8,6 @@
tr.view__stack
td.quantity: p
td.icon: img(src='')
td.name: p
td.name(width='*'): p
td.action
button.remove &nbsp;