1
0
mirror of https://github.com/fazo96/homework.git synced 2025-01-09 12:10:08 +01:00

better note list

This commit is contained in:
fazo96 2014-05-30 12:18:04 +02:00
parent c5090f25e3
commit ee38f824ea
2 changed files with 6 additions and 6 deletions

View File

@ -73,7 +73,7 @@ Template.notelist.events
template.find('#newNote').value = ""
# Note Editor
Template.editor.note = -> Router.current.data()
Template.editor.note = -> Router.current.data() # Only when we're in /note/:_id
saveCurrentNote = (t,e) ->
if e and e.keyCode isnt 13 then return;
notes.update Router.current().data()._id,

View File

@ -29,9 +29,9 @@
</template>
<template name="notelist">
<ul class="list-group">
<div class="list-group">
{{#each notes}}
<li class="note list-group-item">
<a href="{{pathFor 'note'}}" class="note list-group-item">
<span class="note-content">
<button type="button" class="edit-note close">
<i class="fa fa-pencil-square-o"></i>
@ -39,9 +39,9 @@
<b>{{title}}</b> <span class="note-desc">{{content}}</span>
</span>
<button type="button" class="close-note close">&times;</button>
</li>
</a>
{{/each}}
</ul>
</div>
{{#if empty}}
<p align="center">You don't have any notes, try adding a new one</p>
{{/if}}
@ -100,7 +100,7 @@
</h3>
</div>
<div align="center" class="panel-body">
<textarea class="area form-control" rows="3" placeholder="...">{{content}}</textarea>
<textarea id="area" class="area form-control" rows="3" placeholder="...">{{content}}</textarea>
<button type="button" class="btn btn-info save-editor">Save</button>
</div>
</div>