mirror of
https://github.com/fazo96/homework.git
synced 2025-01-10 12:14:22 +01:00
better note list
This commit is contained in:
parent
c5090f25e3
commit
ee38f824ea
@ -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,
|
||||
|
@ -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">×</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>
|
||||
|
Loading…
Reference in New Issue
Block a user