add share filter

This commit is contained in:
Vinzenz
2016-05-31 17:46:40 +02:00
parent c84dbf4d97
commit 65f56144c0
3 changed files with 15 additions and 1 deletions

View File

@@ -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 () {

View File

@@ -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>

View File

@@ -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>