Restore shares navigation

This commit is contained in:
Matias De lellis
2020-06-16 12:43:23 -03:00
parent f2b289f1f4
commit a4eeaf9128
3 changed files with 46 additions and 24 deletions

View File

@@ -563,30 +563,8 @@ View.prototype = {
$('#app-navigation ul').html(html);
// show all notes
$('#all-notes').click(function () {
$('.notes-grid').isotope({ filter: '*'});
/* Create a new note */
var oldColorTool = $('#app-navigation .circle-toolbar.icon-checkmark');
$.each(oldColorTool, function(i, oct) {
$(oct).removeClass('icon-checkmark');
});
$('#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 () {
var fakenote = {
@@ -611,6 +589,38 @@ View.prototype = {
});
});
/* Show all notes */
$('#all-notes').click(function () {
$('.notes-grid').isotope({ filter: '*'});
var oldColorTool = $('#app-navigation .circle-toolbar.icon-checkmark');
$.each(oldColorTool, function(i, oct) {
$(oct).removeClass('icon-checkmark');
});
$('#app-navigation .any-color').addClass('icon-checkmark');
});
/* Shares Navigation */
$('#shared-folder').click(function () {
$(this).toggleClass("open");
});
$('#shared-with-you').click(function (event) {
event.stopPropagation();
$('.notes-grid').isotope({ filter: function() {
return $(this).children().hasClass('shared');
} });
});
$('#shared-by-you').click(function (event) {
event.stopPropagation();
$('.notes-grid').isotope({ filter: function() {
return $(this).children().hasClass('shareowner');
} });
});
/* Colors Navigation */
$('#colors-folder').click(function () {

View File

@@ -8,6 +8,18 @@
{{allNotesTxt}}
</a>
</li>
<li id="shared-folder" class="collapsible open">
<button class="collapse"></button>
<a href="#" class="icon-share svg">{{t "quicknotes" "Shares" }}</a>
<ul>
<li id="shared-by-you">
<a href="#" class="icon-share svg">{{t "quicknotes" "Shared with others" }}</a>
</li>
<li id="shared-with-you">
<a href="#" class="icon-share svg">{{t "quicknotes" "Shared with you" }}</a>
</li>
</ul>
</li>
<li id="colors-folder" class="collapsible open">
<button class="collapse"></button>
<a href="#" class="icon-search svg">{{colorsTxt}}</a>

View File

@@ -2,7 +2,7 @@
<div id="notes-grid-div" class="notes-grid">
{{#each notes}}
<div class="note-grid-item">
<div class="quicknote noselect" style="background-color: {{color}}" data-id="{{ id }}" data-timestamp="{{ timestamp }}" >
<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='note-header'>
<div class='note-attachts'>
{{#each attachts}}