mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-12-01 07:37:18 +01:00
Adapt the fronted to the new parameters.
This commit is contained in:
18
js/script.js
18
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();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class='note-attachts'>
|
||||
{{#each attachts}}
|
||||
{{#each attachments}}
|
||||
<div class='note-attach-grid'>
|
||||
<a target="_blank" href="{{redirect_url}}">
|
||||
<div class="attach-preview note-attach" attach-file-id="{{file_id}}" data-background-image="{{preview_url}}"/>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<div class="note-grid-item">
|
||||
<div class="quicknote noselect {{#if is_shared}}shared{{/if}} {{#if shared_with.length}}shareowner{{/if}}" style="background-color: {{color}}" data-id="{{ id }}" data-timestamp="{{ timestamp }}" >
|
||||
<div class="quicknote noselect {{#if sharedBy.length}}shared{{/if}} {{#if sharedWith.length}}shareowner{{/if}}" style="background-color: {{color}}" data-id="{{ id }}" data-timestamp="{{ timestamp }}" >
|
||||
<div class='note-header'>
|
||||
<div class='note-attachts'>
|
||||
{{#each attachts}}
|
||||
{{#each attachments}}
|
||||
<div class='note-attach-grid'>
|
||||
<div class="attach-preview note-attach" attach-file-id="{{file_id}}" data-background-image="{{preview_url}}"/>
|
||||
</div>
|
||||
@@ -11,7 +11,7 @@
|
||||
</div>
|
||||
<div class='note-body'>
|
||||
<div>
|
||||
{{#if ispinned}}
|
||||
{{#if isPinned}}
|
||||
<div class="icon-header-note icon-pinned fixed-header-icon" title="{{t "quicknotes" "Unpin note"}}"></div>
|
||||
{{else}}
|
||||
<div class="icon-header-note icon-pin hide-header-icon" title="{{t "quicknotes" "Pin note"}}"></div>
|
||||
@@ -25,7 +25,7 @@
|
||||
{{{ content }}}
|
||||
</div>
|
||||
<div class='note-shares'>
|
||||
{{#each shared_with}}
|
||||
{{#each sharedWith}}
|
||||
<div class="icon-user slim-share" share-id="{{ shared_user }}" title="Shared with {{ shared_user }}">{{{ shared_user }}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<div id="notes-grid-div" class="notes-grid">
|
||||
{{#each notes}}
|
||||
<div class="note-grid-item">
|
||||
<div class="quicknote noselect {{#if is_shared}}shared{{/if}} {{#if shared_with.length}}shareowner{{/if}}" style="background-color: {{color}}" data-id="{{ id }}" data-timestamp="{{ timestamp }}" >
|
||||
<div class="quicknote noselect {{#if sharedBy.length}}shared{{/if}} {{#if sharedWith.length}}shareowner{{/if}}" style="background-color: {{color}}" data-id="{{ id }}" data-timestamp="{{ timestamp }}" >
|
||||
<div class='note-header'>
|
||||
<div class='note-attachts'>
|
||||
{{#each attachts}}
|
||||
{{#each attachments}}
|
||||
<div class='note-attach-grid'>
|
||||
<div class="attach-preview note-attach" attach-file-id="{{file_id}}" data-background-image="{{preview_url}}"/>
|
||||
</div>
|
||||
@@ -14,11 +14,11 @@
|
||||
</div>
|
||||
<div class='note-body'>
|
||||
<div>
|
||||
{{#if is_shared}}
|
||||
<div class="icon-header-note icon-share" title="{{tSB userid }}"></div>
|
||||
<div class="icon-header-note icon-delete hide-header-icon icon-delete-note" title="{{t "quicknotes" "Delete note"}}"></div>
|
||||
{{#if sharedBy}}
|
||||
<div class="icon-header-note icon-share" title="{{tSB sharedBy.user_id }}"></div>
|
||||
<div class="icon-header-note icon-delete hide-header-icon icon-delete-note" title="{{t "quicknotes" "Delete shared note"}}"></div>
|
||||
{{else}}
|
||||
{{#if ispinned}}
|
||||
{{#if isPinned}}
|
||||
<div class="icon-header-note icon-pinned fixed-header-icon" title="{{t "quicknotes" "Unpin note"}}"></div>
|
||||
{{else}}
|
||||
<div class="icon-header-note icon-pin hide-header-icon" title="{{t "quicknotes" "Pin note"}}"></div>
|
||||
@@ -33,7 +33,7 @@
|
||||
{{{ content }}}
|
||||
</div>
|
||||
<div class='note-shares'>
|
||||
{{#each shared_with}}
|
||||
{{#each sharedWith}}
|
||||
<div class="icon-user slim-share" share-id="{{ shared_user }}" title="{{tSW shared_user}}">{{{ shared_user }}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class='note-shares'>
|
||||
{{#each shared_with}}
|
||||
{{#each sharedWith}}
|
||||
<div class="icon-user slim-share" share-id="{{ shared_user }}" title="{{tSW shared_user}}">{{{ shared_user }}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
Reference in New Issue
Block a user