diff --git a/js/script.js b/js/script.js index 2b1f9ed..f6ecf21 100644 --- a/js/script.js +++ b/js/script.js @@ -204,14 +204,14 @@ View.prototype = { this._editableId(note.id); this._editableTitle(note.title); this._editableContent(note.content); - this._editablePinned(note.ispinned); + this._editablePinned(note.isPinned); this._editableColor(note.color); - this._editableShares(note.shared_with); + this._editableShares(note.sharedWith); this._editableTags(note.tags); - this._editableAttachts(note.attachts, !note.is_shared); + this._editableAttachts(note.attachments, !note.sharedBy.length); // Create medium div editor. - this._isEditable(!note.is_shared); + this._isEditable(!note.sharedBy.length); // Show modal editor this._showEditor(id); @@ -222,11 +222,11 @@ View.prototype = { id: this._editableId(), title: this._editableTitle(), content: this._editableContent(), - attachts: this._editableAttachts(), + attachments: this._editableAttachts(), color: this._editableColor(), - pinned: this._editablePinned(), + isPinned: this._editablePinned(), tags: this._editableTags(), - shared_with: this._editableShares() + sharedWith: this._editableShares() }; var self = this; this._notes.update(fakeNote).done(function (note) { @@ -851,7 +851,7 @@ View.prototype = { }; }); } else { - var html = Handlebars.templates['shares']({shared_with: shared_with}); + var html = Handlebars.templates['shares']({sharedWith: shared_with}); $("#modal-note-div .note-shares").replaceWith(html); } }, @@ -878,7 +878,7 @@ View.prototype = { }; }); } else { - var html = Handlebars.templates['attachts']({ attachts: attachts, can_delete: can_delete}); + var html = Handlebars.templates['attachts']({ attachments: attachts, can_delete: can_delete}); $("#modal-note-div .note-attachts").replaceWith(html); lozad('.attach-preview').observe(); diff --git a/js/templates/attachts.handlebars b/js/templates/attachts.handlebars index 63d04d3..9763cde 100644 --- a/js/templates/attachts.handlebars +++ b/js/templates/attachts.handlebars @@ -1,5 +1,5 @@
- {{#each attachts}} + {{#each attachments}}
diff --git a/js/templates/note-item.handlebars b/js/templates/note-item.handlebars index 5c36109..3773662 100644 --- a/js/templates/note-item.handlebars +++ b/js/templates/note-item.handlebars @@ -1,8 +1,8 @@
-
+
- {{#each attachts}} + {{#each attachments}}
@@ -11,7 +11,7 @@
- {{#if ispinned}} + {{#if isPinned}}
{{else}}
@@ -25,7 +25,7 @@ {{{ content }}}
- {{#each shared_with}} + {{#each sharedWith}} {{/each}}
diff --git a/js/templates/notes.handlebars b/js/templates/notes.handlebars index 683987b..db84aa2 100644 --- a/js/templates/notes.handlebars +++ b/js/templates/notes.handlebars @@ -2,10 +2,10 @@
{{#each notes}}
-
+
- {{#each attachts}} + {{#each attachments}}
@@ -14,11 +14,11 @@
- {{#if is_shared}} -
-
+ {{#if sharedBy}} +
+
{{else}} - {{#if ispinned}} + {{#if isPinned}}
{{else}}
@@ -33,7 +33,7 @@ {{{ content }}}
- {{#each shared_with}} + {{#each sharedWith}} {{/each}}
diff --git a/js/templates/shares.handlebars b/js/templates/shares.handlebars index 77c5a7d..542c009 100644 --- a/js/templates/shares.handlebars +++ b/js/templates/shares.handlebars @@ -1,5 +1,5 @@
- {{#each shared_with}} + {{#each sharedWith}} {{/each}}
\ No newline at end of file