mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-11-30 23:37:16 +01:00
Restore shares navigation
This commit is contained in:
56
js/script.js
56
js/script.js
@@ -563,30 +563,8 @@ View.prototype = {
|
|||||||
|
|
||||||
$('#app-navigation ul').html(html);
|
$('#app-navigation ul').html(html);
|
||||||
|
|
||||||
// show all notes
|
/* Create a new note */
|
||||||
$('#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');
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#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;
|
var self = this;
|
||||||
$('#new-note').click(function () {
|
$('#new-note').click(function () {
|
||||||
var fakenote = {
|
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 Navigation */
|
||||||
|
|
||||||
$('#colors-folder').click(function () {
|
$('#colors-folder').click(function () {
|
||||||
|
|||||||
@@ -8,6 +8,18 @@
|
|||||||
{{allNotesTxt}}
|
{{allNotesTxt}}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</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">
|
<li id="colors-folder" class="collapsible open">
|
||||||
<button class="collapse"></button>
|
<button class="collapse"></button>
|
||||||
<a href="#" class="icon-search svg">{{colorsTxt}}</a>
|
<a href="#" class="icon-search svg">{{colorsTxt}}</a>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div id="notes-grid-div" class="notes-grid">
|
<div id="notes-grid-div" class="notes-grid">
|
||||||
{{#each notes}}
|
{{#each notes}}
|
||||||
<div class="note-grid-item">
|
<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-header'>
|
||||||
<div class='note-attachts'>
|
<div class='note-attachts'>
|
||||||
{{#each attachts}}
|
{{#each attachts}}
|
||||||
|
|||||||
Reference in New Issue
Block a user