diff options
author | korelstar <korelstar@users.noreply.github.com> | 2017-11-13 15:12:45 +0300 |
---|---|---|
committer | Hendrik Leppelsack <hendrik@leppelsack.de> | 2017-11-13 15:12:45 +0300 |
commit | 2eea48b05d03e459a996677f9d3ac07fb00e499d (patch) | |
tree | 6b32d5c4827452835ef4c21afb02874fbbf8f0e6 /templates | |
parent | 7182d319077374b05e42a639473fff47b8272775 (diff) |
Fix error handling for save / manual save (#137)
Diffstat (limited to 'templates')
-rw-r--r-- | templates/main.php | 1 | ||||
-rw-r--r-- | templates/note.php | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/templates/main.php b/templates/main.php index 51786d33..6d68368c 100644 --- a/templates/main.php +++ b/templates/main.php @@ -51,6 +51,7 @@ style('notes', [ ng-class="{ active: note.id == route.noteId }"> <a href="#/notes/{{ note.id }}"> {{ note.title | noteTitle }} + <span ng-if="note.unsaved">*</span> </a> <span class="utils"> <button class="svg action icon-delete" diff --git a/templates/note.php b/templates/note.php index f8a822da..eec333f8 100644 --- a/templates/note.php +++ b/templates/note.php @@ -1,6 +1,9 @@ - <textarea editor notes-timeout-change="save()" name="editor"></textarea> + <textarea editor notes-timeout-change="onEdit()" name="editor"></textarea> <div class="note-meta"> <span class="note-word-count" ng-if="note.content.length > 0">{{note.content | wordCount}}</span> + <span class="note-unsaved" ng-if="note.unsaved" title="<?php p($l->t('The note has unsaved changes.')); ?>"><?php p($l->t('*')); ?></span> + <span class="note-error" ng-if="note.error" ng-click="manualSave()" title="<?php p($l->t('Click here to try again')); ?>"><?php p($l->t('Save failed!')); ?></span> + <span class="saving" ng-if="isManualSaving()" title="<?php p($l->t('The note is currently saved')); ?>"></span> <span class="note-meta-right"> <button class="icon-fullscreen has-tooltip btn-fullscreen" notes-tooltip ng-click="toggleDistractionFree()"></button> </span> |