Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: oconnore/email-plusplus
base: bfab463da9
...
head fork: oconnore/email-plusplus
compare: f7c3eb6f15
Checking mergeability… Don't worry, you can still create the pull request.
  • 7 commits
  • 12 files changed
  • 0 commit comments
  • 1 contributor
View
23 npm-debug.log
@@ -0,0 +1,23 @@
+info it worked if it ends with ok
+verbose cli [ 'node', '/usr/local/bin/npm', 'install' ]
+info using npm@1.0.106
+info using node@v0.6.8
+verbose /usr/local/bin/node node symlink
+verbose config file /Users/boazsender/.npmrc
+verbose config file /usr/local/etc/npmrc
+verbose config file /usr/local/lib/node_modules/npm/npmrc
+ERR! Couldn't read dependencies.
+ERR! Error: ENOENT, no such file or directory '/Users/boazsender/git/email-plusplus/package.json'
+ERR! Report this *entire* log at:
+ERR! <http://github.com/isaacs/npm/issues>
+ERR! or email it to:
+ERR! <npm-@googlegroups.com>
+ERR!
+ERR! System Darwin 11.0.1
+ERR! command "node" "/usr/local/bin/npm" "install"
+ERR! cwd /Users/boazsender/git/email-plusplus
+ERR! node -v v0.6.8
+ERR! npm -v 1.0.106
+ERR! path /Users/boazsender/git/email-plusplus/package.json
+ERR! code ENOENT
+verbose exit [ 1, true ]
View
22 www/app/main.js
@@ -16,7 +16,8 @@ function(epp, jQuery, Backbone, Email) {
// Defining the application router, you can attach sub routers here.
var Router = Backbone.Router.extend({
routes: {
- "": "index"
+ "": "index",
+ "compose": "compose"
},
index: function() {
@@ -30,7 +31,9 @@ function(epp, jQuery, Backbone, Email) {
'#sidebar': new Email.Views.Sidebar()
}
});
-
+
+ var nav = main.view('#mainnav', new Email.Views.Nav(), true);
+
emails.each(function(email) {
main.views['#sidebar'].view("ul", new Email.Views.SidebarItem({ model: email}), true);
@@ -40,15 +43,24 @@ function(epp, jQuery, Backbone, Email) {
var reader = main.view('#reader', new Email.Views.Reader({ model: model }));
reader.render();
});
-
+
+ app.bind('showwriter', function( model){
+ var writer = main.view('#reader', new Email.Views.Writer({ model: model }));
+ writer.render();
+ });
+
main.render(function( el ){
$('#main').html( el );
})
});
- console.log(emails.models.length);
-
+ },
+ compose: function() {
+ epp.app.router.index();
+ var writer = new Email.Views.Writer();
+ writer.render();
}
+
});
// Treat the jQuery ready function as the entry point to the application.
View
13 www/app/modules/email.js
@@ -22,6 +22,15 @@ function(epp, Backbone) {
url: '/assets/data/email.json'
});
+ Email.Views.Nav = Backbone.View.extend({
+ template: 'email/nav',
+ events: {
+ "click .compose": function(){
+ app.trigger('showwriter', this.model);
+ }
+ }
+ });
+
Email.Views.SidebarItem = Backbone.View.extend({
tagName: 'li',
className: 'btn',
@@ -60,6 +69,10 @@ function(epp, Backbone) {
}
});
+ Email.Views.Writer = Backbone.View.extend({
+ template: 'email/writer'
+ });
+
// Required, return the module for AMD compliance
return Email;
View
9 www/app/templates/email/nav.html
@@ -0,0 +1,9 @@
+<span class="btn-group">
+ <a class="btn btn-success compose"><i class="icon-envelope icon-white"></i> Compose</a>
+ <a class="btn inbox">Inbox</a>
+ <a class="btn unread">Unread</a>
+ <a class="btn sent">Sent</a>
+</span>
+
+<input type="search" placeholder="search">
+<button class="btn btn-info compose"><i class="icon-search"></i></button>
View
16 www/app/templates/email/reader.html
@@ -1,13 +1,13 @@
-<sectiom>
-<div class="btn-group">
- <a class="btn reply">reply</a>
- <a class="btn replyall">reply all</a>
- <a class="btn fwd">fwd</a>
-</div>
- <h3>From: <%= email.get('from') %></h3>
+<section>
+ <div class="btn-group">
+ <a class="btn reply">reply</a>
+ <a class="btn replyall">reply all</a>
+ <a class="btn fwd">fwd</a>
+ </div>
+ <h3>From: <%= email.get('from').name %></h3>
<h4>CC: <%= email.get('cc') %></h4>
<p>Subject: <%= email.get('subject') %></p>
<p>
<%= email.get('body') %>
</p>
-</sectiom>
+</section>
View
3  www/app/templates/email/sidebaritem.html
@@ -1 +1,2 @@
-<%= email.get('from').name %>
+<b><%= email.get('from').name %></b>
+"<%= email.get('body').substr(0, 5) %> ..."
View
30 www/app/templates/email/writer.html
@@ -0,0 +1,30 @@
+<section>
+ <div class="btn-group">
+ <a class="btn btn-success send"><i class="icon-envelope icon-white"></i> send</a>
+ <a class="btn save">save</a>
+ <a class="btn btn-danger discard"><i class="icon-envelope icon-trash icon-white"></i> discard</a>
+ </div>
+ <input type="email" placeholder="to">
+ <input type="email" placeholder="cc">
+ <input type="email" placeholder="bcc">
+ <div class="btn-group">
+ <a class="btn" href="#"><i class="icon-bold"></i></a>
+ <a class="btn" href="#"><i class="icon-italic"></i></a>
+ <a class="btn discard">u</a>
+ <a class="btn" href="#"><i class="icon-text-height"></i></a>
+ <a class="btn" href="#"><i class="icon-font"></i></a>
+
+
+ <a class="btn" href="#"><i class="icon-align-left"></i></a>
+ <a class="btn" href="#"><i class="icon-align-center"></i></a>
+ <a class="btn" href="#"><i class="icon-align-right"></i></a>
+ <a class="btn" href="#"><i class="icon-align-justify"></i></a>
+ <a class="btn" href="#"><i class="icon-indent-left"></i></a>
+ <a class="btn" href="#"><i class="icon-indent-right"></i></a>
+ <a class="btn" href="#"><i class="icon-picture"></i></a>
+ <a class="btn" href="#"><i class="icon-list"></i></a>
+ </div>
+
+ <section contenteditable class="writer">
+ </section>
+</section>
View
1  www/app/templates/layouts/main.html
@@ -1,2 +1,3 @@
+<nav id="mainnav"></nav>
<section id="sidebar"></section>
<section id="reader"></section>
View
36 www/assets/css/epp.css
@@ -1,26 +1,31 @@
+nav {
+ position: fixed;
+ width: 100%;
+ padding: 5px;
+ background-color: #eee;
+}
#sidebar {
position: fixed;
left: 0;
- top: 0;
- width: 180px;
+ top: 50px;
+ width: 20%;
height: 500px;
padding: 0px;
}
-
+#sidebar li {
+ text-align: left;
+}
#reader {
- margin: 10px 0;
position: absolute;
- left: 200px;
- top: 0;
+ left: 22%;
+ width: 50%;
+ top: 50px;
}
ul, li {
list-style-type: none;
margin: 0;
padding: 0;
-
-
-
}
ul {
@@ -43,3 +48,16 @@ li {
li:active {
box-shadow: inset 0 0 1px #333;
}
+
+.writer {
+ width: 100%;
+ height: 200px;
+ border: 1px solid #c2c2c2;
+}
+.btn-group {
+ margin: 10px 0;
+}
+
+input, textarea, select, .uneditable-input {
+ margin-bottom: 0;
+}
View
12 www/assets/data/email.json
@@ -4,6 +4,7 @@
"name": "Eric O'conner",
"email": "eric@awesome.com"
},
+ "date": 1332112640409,
"cc": [
"boaz@bocoup,com",
"tim@bocoup.com"
@@ -13,9 +14,19 @@
},
{
"from": {
+ "name": "Eric O'conner",
+ "email": "eric@awesome.com"
+ },
+ "date": 1332112640409,
+ "subject": "Another email from Eric",
+ "body": "You should really read this dude!"
+ },
+ {
+ "from": {
"name": "Boaz Sender",
"email": "boaz@bocoup.com"
},
+ "date": 1332112640409,
"cc": [
"eirc@bocoup,com",
"tim@bocoup.com"
@@ -28,6 +39,7 @@
"name": "Tim Branyen",
"email": "tim@awesome.com"
},
+ "date": 1332112640409,
"cc": [
"eric@bocoup,com",
"tim@bocoup.com"
View
BIN  www/assets/img/glyphicons-halflings-white.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  www/assets/img/glyphicons-halflings.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

No commit comments for this range

Something went wrong with that request. Please try again.