Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
52 changed files
with
1,254 additions
and
307 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
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,10 @@ | ||
class App.Activity extends Spine.Controller | ||
# elements: | ||
# '.items': items | ||
# | ||
# events: | ||
# 'click .item': 'itemClick' | ||
|
||
constructor: -> | ||
super | ||
# ... |
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 @@ | ||
$ = Spine.$ | ||
|
||
class App.Messages extends Spine.Controller | ||
className: 'messages' | ||
|
||
constructor: -> | ||
super | ||
@render() | ||
|
||
render: -> | ||
@append new App.Messages.Aside | ||
@append $('<div />').addClass('vdivide') | ||
@append new App.Messages.Article |
50 changes: 50 additions & 0 deletions
50
app/assets/javascripts/app/controllers/messages/article.js.coffee
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,50 @@ | ||
records = [ | ||
{ | ||
subject: 'New Email idea', | ||
body: 'This is the new email idea', | ||
avatar_url: 'https://secure.gravatar.com/avatar/11d44fdc7a81963600d079813ede2b69' | ||
}, | ||
|
||
{ | ||
subject: 'New Email idea', | ||
body: 'This is the new email idea', | ||
avatar_url: 'https://secure.gravatar.com/avatar/11d44fdc7a81963600d079813ede2b69', | ||
me: true | ||
} | ||
] | ||
|
||
compose = { | ||
avatar_url: 'https://secure.gravatar.com/avatar/11d44fdc7a81963600d079813ede2b69' | ||
} | ||
|
||
class Item extends Spine.Controller | ||
className: 'item' | ||
|
||
render: -> | ||
@el.toggleClass('me', @record.me or false) | ||
@html @view('messages/article/item')(@record) | ||
|
||
class Compose extends Spine.Controller | ||
className: 'item me compose' | ||
|
||
constructor: -> | ||
super | ||
@render() | ||
|
||
render: -> | ||
@html @view('messages/article/compose')(compose) | ||
|
||
class App.Messages.Article extends Spine.Controller | ||
elements: | ||
'.items': 'items' | ||
|
||
constructor: -> | ||
super | ||
|
||
@replace @view('messages/article')() | ||
|
||
@add(records) | ||
|
||
add: (records) -> | ||
for record in records | ||
@items.append(new Item(record: record).render()) |
26 changes: 26 additions & 0 deletions
26
app/assets/javascripts/app/controllers/messages/aside.js.coffee
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,26 @@ | ||
records = [ | ||
{ | ||
subject: 'New Email idea', | ||
body: 'This is the new email idea', | ||
avatar_url: 'https://secure.gravatar.com/avatar/11d44fdc7a81963600d079813ede2b69' | ||
} | ||
] | ||
|
||
class Item extends Spine.Controller | ||
className: 'item active' | ||
|
||
render: -> | ||
@html @view('messages/aside/item')(@record) | ||
|
||
class App.Messages.Aside extends Spine.Controller | ||
elements: | ||
'.items': 'items' | ||
|
||
constructor: -> | ||
super | ||
@replace @view('messages/aside')() | ||
@add(records) | ||
|
||
add: (records) -> | ||
for record in records | ||
@items.append(new Item(record: record).render()) |
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,7 @@ | ||
class App.Nav extends Spine.Controller | ||
constructor: -> | ||
super | ||
@render() | ||
|
||
render: -> | ||
@replace @view('nav')() |
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,10 @@ | ||
class App.Starred extends Spine.Controller | ||
# elements: | ||
# '.items': items | ||
# | ||
# events: | ||
# 'click .item': 'itemClick' | ||
|
||
constructor: -> | ||
super | ||
# ... |
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,3 @@ | ||
class App.Conversation extends Spine.Model | ||
@configure 'Conversation', 'from' | ||
@extend Spine.Model.Ajax |
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,3 @@ | ||
class App.Message extends Spine.Model | ||
@configure 'Message', 'subject', 'body' | ||
@extend Spine.Model.Ajax |
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,8 @@ | ||
<article> | ||
<header> | ||
<span data-type="archive">Archive</span> | ||
<span data-type="activity">Activity</span> | ||
</header> | ||
|
||
<div class="items"></div> | ||
</article> |
5 changes: 5 additions & 0 deletions
5
app/assets/javascripts/app/views/messages/article/compose.jst.eco
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,5 @@ | ||
<img src="<%= @avatar_url %>"> | ||
|
||
<div class="body"> | ||
<textarea autofocus></textarea> | ||
</div> |
3 changes: 3 additions & 0 deletions
3
app/assets/javascripts/app/views/messages/article/item.jst.eco
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,3 @@ | ||
<img src="<%= @avatar_url %>" /> | ||
<div class="body"><%= @body %></div> | ||
<nav><a class="favourite"></a></nav> |
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,12 @@ | ||
<aside> | ||
<header> | ||
<h2>Hermes</h2> | ||
<img src="/assets/new.png"> | ||
</header> | ||
|
||
<div class="search"> | ||
<input type="search" results="0" placeholder="Search..." incremental="true"> | ||
</div> | ||
|
||
<div class="items"></div> | ||
</aside> |
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,6 @@ | ||
<img src="<%= @avatar_url %>"> | ||
|
||
<div> | ||
<span class="subject"><%= @subject %></span> | ||
<span class="body"><%= @body %></span> | ||
</div> |
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,17 @@ | ||
<nav class="nav"> | ||
<div class="avatar"> | ||
<img src="https://secure.gravatar.com/avatar/baf018e2cc4616e4776d323215c7136c"> | ||
</div> | ||
|
||
<div class="item"> | ||
<img src="/assets/messages.png"> | ||
</div> | ||
|
||
<div class="item"> | ||
<img src="/assets/starred.png"> | ||
</div> | ||
|
||
<div class="item"> | ||
<img src="/assets/broadcast.png"> | ||
</div> | ||
</nav> |
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,5 @@ | ||
@import 'mixins' | ||
|
||
#app .messages | ||
box-flex(1) | ||
hbox() |
Oops, something went wrong.