mirror of
https://github.com/fazo96/homework.git
synced 2025-01-24 14:24:20 +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 = ""
|
template.find('#newNote').value = ""
|
||||||
|
|
||||||
# Note Editor
|
# Note Editor
|
||||||
Template.editor.note = -> Router.current.data()
|
Template.editor.note = -> Router.current.data() # Only when we're in /note/:_id
|
||||||
saveCurrentNote = (t,e) ->
|
saveCurrentNote = (t,e) ->
|
||||||
if e and e.keyCode isnt 13 then return;
|
if e and e.keyCode isnt 13 then return;
|
||||||
notes.update Router.current().data()._id,
|
notes.update Router.current().data()._id,
|
||||||
|
@ -29,9 +29,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="notelist">
|
<template name="notelist">
|
||||||
<ul class="list-group">
|
<div class="list-group">
|
||||||
{{#each notes}}
|
{{#each notes}}
|
||||||
<li class="note list-group-item">
|
<a href="{{pathFor 'note'}}" class="note list-group-item">
|
||||||
<span class="note-content">
|
<span class="note-content">
|
||||||
<button type="button" class="edit-note close">
|
<button type="button" class="edit-note close">
|
||||||
<i class="fa fa-pencil-square-o"></i>
|
<i class="fa fa-pencil-square-o"></i>
|
||||||
@ -39,9 +39,9 @@
|
|||||||
<b>{{title}}</b> <span class="note-desc">{{content}}</span>
|
<b>{{title}}</b> <span class="note-desc">{{content}}</span>
|
||||||
</span>
|
</span>
|
||||||
<button type="button" class="close-note close">×</button>
|
<button type="button" class="close-note close">×</button>
|
||||||
</li>
|
</a>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</div>
|
||||||
{{#if empty}}
|
{{#if empty}}
|
||||||
<p align="center">You don't have any notes, try adding a new one</p>
|
<p align="center">You don't have any notes, try adding a new one</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@ -100,7 +100,7 @@
|
|||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div align="center" class="panel-body">
|
<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>
|
<button type="button" class="btn btn-info save-editor">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user