forked from urban/sharesheet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial menu view rendering and spreadsheet api work
- Loading branch information
Showing
15 changed files
with
208 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ build | |
node_modules | ||
.DS_Store | ||
server/db | ||
client/*/template.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
{ | ||
"name": "boot", | ||
"description": "Main app boot component", | ||
"dependencies": {}, | ||
"dependencies": { | ||
"visionmedia/superagent": "*" | ||
}, | ||
"scripts": ["index.js"], | ||
"styles": ["style.css"], | ||
"local": ["spreadsheet"] | ||
"local": [ | ||
"spreadsheet", | ||
"menu-view" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "menu-item-view", | ||
"description": "Menu item view", | ||
"version": "0.0.1", | ||
"dependencies": { | ||
"component/domify": "*", | ||
"component/reactive": "*" | ||
}, | ||
"scripts": [ | ||
"index.js", | ||
"template.js" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
/** | ||
* Module dependencies. | ||
*/ | ||
|
||
var domify = require('domify'); | ||
var reactive = require('reactive'); | ||
var html = require('./template'); | ||
|
||
/** | ||
* Export Menu | ||
*/ | ||
|
||
module.exports = MenuItem; | ||
|
||
function MenuItem(model) { | ||
|
||
var template = domify(html); | ||
this.el = reactive(template, model, this).el; | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<li>{name}</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "menu-view", | ||
"description": "Menu view", | ||
"version": "0.0.1", | ||
"dependencies": { | ||
"component/domify": "*" | ||
}, | ||
"scripts": [ | ||
"index.js", | ||
"template.js" | ||
], | ||
"local": [ "menu-item-view" ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
/** | ||
* Module dependencies. | ||
*/ | ||
|
||
var domify = require('domify'); | ||
var html = require('./template'); | ||
var MenuItemView = require('menu-item-view'); | ||
|
||
/** | ||
* Export Menu | ||
*/ | ||
|
||
module.exports = Menu; | ||
|
||
function Menu(collection) { | ||
|
||
this.collection = collection; | ||
this.el = domify(html); | ||
|
||
}; | ||
|
||
|
||
Menu.prototype.render = function () { | ||
var self = this; | ||
|
||
this.collection.forEach(function (model) { | ||
var item = new MenuItemView(model); | ||
self.el.appendChild(item.el); | ||
}); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<ul class="menu"></ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters