Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
sahat committed Dec 29, 2013
1 parent 353ec52 commit edde46e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
6 changes: 4 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,10 @@ app.get('/orders/new', function(req, res) {
var stores = ['Store 1', 'Store 2', 'Store 3', 'Store 4'];

var items = {
create: [],
sell: []
create: ['Cucumber', 'Tomato', 'Lettuce', 'Sugar', 'Salt', 'Spices',
'Ginger', 'Apples', 'Potatoes'],
sell: ['Hot Latte', 'Iced Latte', 'Americano', 'Cappuccino', 'Cinnamon',
'Hot Chocolate', 'Panini', 'Fruit Salad']
};


Expand Down
5 changes: 0 additions & 5 deletions public/stylesheets/style.css
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@


.table input[type="text"] {
margin-bottom: 0;
}
22 changes: 14 additions & 8 deletions views/placeOrder.jade
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,32 @@ block content
i.fa.fa-usd
| Sell

h4 Coffeed Store
h4
i.fa.fa-coffee
| Coffeed Store
for store in stores
.radio
label
input(type='radio', name='storeRadios', value='#{store}')
= store

br

h4
i.fa.fa-edit
| Order Items
table.table.table-striped.table-bordered
thead
tr
th #
th Name
th Quantity
tbody
each item, i in items
for item in items[orderType]
tr
td.span1= i+1
td= item.name
td.span1
input.quantity(type='text', value=0, data-name='#{item.name}')
td= item
td.col-xs-1
input.form-control.input-sm.quantity(type='text', value=0, data-name='#{item.name}')

button.btn.btn-large.btn-success(data-order-type='#{orderType}')
i.icon-shopping-cart.icon-white
i.fa.fa-shopping-cart
| Place Order

0 comments on commit edde46e

Please sign in to comment.