mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-12-01 07:37:18 +01:00
add share filter
This commit is contained in:
12
js/script.js
12
js/script.js
@@ -385,6 +385,18 @@ View.prototype = {
|
||||
$('#app-navigation .any-color').addClass('icon-checkmark');
|
||||
});
|
||||
|
||||
$('#shared-with-you').click(function () {
|
||||
$('.notes-grid').isotope({ filter: function() {
|
||||
return $(this).children().hasClass('shared');
|
||||
} });
|
||||
});
|
||||
|
||||
$('#shared-by-you').click(function () {
|
||||
$('.notes-grid').isotope({ filter: function() {
|
||||
return $(this).children().hasClass('shareowner');
|
||||
} });
|
||||
});
|
||||
|
||||
// create a new note
|
||||
var self = this;
|
||||
$('#new-note').click(function () {
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
<script id="navigation-tpl" type="text/x-handlebars-template">
|
||||
<li id="new-note"><a href="#" class="icon-add svg"><?php p($l->t('New note')); ?></a></li>
|
||||
<li id="all-notes"><a href="#" class="icon-home svg"><?php p($l->t('All notes')); ?></a></li>
|
||||
<li id="shared-with-you"><a href="#" class="icon-share svg"><?php p($l->t('Shared with you')); ?></a></li>
|
||||
<li id="shared-by-you"><a href="#" class="icon-share svg"><?php p($l->t('Shared by you')); ?></a></li>
|
||||
|
||||
<li class="collapsible open">
|
||||
<button class="collapse"></button>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="note-grid-item">
|
||||
<div class="quicknote noselect {{#if active}}note-active{{/if}} {{#if isshared}}shared{{/if}}" style="background-color: {{color}}" data-id="{{ id }}" data-timestamp="{{ timestamp }}" >
|
||||
<div class="quicknote noselect {{#if active}}note-active{{/if}} {{#if isshared}}shared{{/if}} {{#if sharedwith}}shareowner{{/if}}" style="background-color: {{color}}" data-id="{{ id }}" data-timestamp="{{ timestamp }}" >
|
||||
{{#if isshared}}
|
||||
<div class='icon-share shared-title' title="shared with you by {{ userid }}"></div><div id='title' class='note-title'>{{{ title }}}</div>
|
||||
<div id='content' class='note-content'>{{{ content }}}</div>
|
||||
|
||||
Reference in New Issue
Block a user