Fix smart tag menu dropdown
This commit is contained in:
@@ -150,14 +150,11 @@ angular.module('app')
|
||||
base += " Title";
|
||||
}
|
||||
|
||||
if(!this.tag || !this.tag.isSmartTag()) {
|
||||
// These rules don't apply for smart tags
|
||||
if(this.showArchived) {
|
||||
base += " | + Archived"
|
||||
}
|
||||
if(this.hidePinned) {
|
||||
base += " | – Pinned"
|
||||
}
|
||||
if(this.showArchived) {
|
||||
base += " | + Archived"
|
||||
}
|
||||
if(this.hidePinned) {
|
||||
base += " | – Pinned"
|
||||
}
|
||||
|
||||
return base;
|
||||
@@ -308,7 +305,7 @@ angular.module('app')
|
||||
this.noteFilter = {text : ''};
|
||||
|
||||
this.filterNotes = function(note) {
|
||||
let canShowArchived = false, canShowPinned = true;
|
||||
let canShowArchived = this.showArchived, canShowPinned = !this.hidePinned;
|
||||
let isTrash = this.tag.content.isTrashTag;
|
||||
|
||||
if(!isTrash && note.content.trashed) {
|
||||
@@ -318,10 +315,7 @@ angular.module('app')
|
||||
|
||||
var isSmartTag = this.tag.isSmartTag();
|
||||
if(isSmartTag) {
|
||||
canShowArchived = this.tag.content.isArchiveTag || isTrash;
|
||||
} else {
|
||||
canShowArchived = this.showArchived;
|
||||
canShowPinned = !this.hidePinned;
|
||||
canShowArchived = canShowArchived || this.tag.content.isArchiveTag || isTrash;
|
||||
}
|
||||
|
||||
if((note.archived && !canShowArchived) || (note.pinned && !canShowPinned)) {
|
||||
@@ -408,6 +402,10 @@ angular.module('app')
|
||||
return note.tags && note.tags.length > 0;
|
||||
}
|
||||
|
||||
if(this.tag.isSmartTag()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Inside a tag, only show tags string if note contains tags other than this.tag
|
||||
return note.tags && note.tags.length > 1;
|
||||
}
|
||||
|
||||
@@ -32,12 +32,13 @@
|
||||
%menu-row{"label" => "'Date Modified'", "circle" => "ctrl.sortBy == 'client_updated_at' && 'success'", "action" => "ctrl.selectedMenuItem(); ctrl.selectedSortByUpdated()", "desc" => "'Sort notes with the most recently updated first'"}
|
||||
%menu-row{"label" => "'Title'", "circle" => "ctrl.sortBy == 'title' && 'success'", "action" => "ctrl.selectedMenuItem(); ctrl.selectedSortByTitle()", "desc" => "'Sort notes alphabetically by their title'"}
|
||||
|
||||
.sk-menu-panel-section{"ng-if" => "!ctrl.tag.isSmartTag()"}
|
||||
.sk-menu-panel-section
|
||||
.sk-menu-panel-header
|
||||
.sk-menu-panel-header-title Display
|
||||
|
||||
%menu-row{"label" => "'Archived Notes'", "circle" => "ctrl.showArchived ? 'success' : 'danger'", "faded" => "!ctrl.showArchived", "action" => "ctrl.selectedMenuItem(); ctrl.toggleKey('showArchived')", "desc" => "'Archived notes are usually hidden. You can explicitly show them with this option.'"}
|
||||
%menu-row{"label" => "'Pinned Notes'", "circle" => "ctrl.hidePinned ? 'danger' : 'success'", "faded" => "ctrl.hidePinned", "action" => "ctrl.selectedMenuItem(); ctrl.toggleKey('hidePinned')", "desc" => "'Pinned notes always appear on top. You can hide them temporarily with this option so you can focus on other notes in the list.'"}
|
||||
|
||||
%menu-row{"label" => "'Note Preview'", "circle" => "ctrl.hideNotePreview ? 'danger' : 'success'", "faded" => "ctrl.hideNotePreview", "action" => "ctrl.selectedMenuItem(); ctrl.toggleKey('hideNotePreview')", "desc" => "'Hide the note preview for a more condensed list of notes'"}
|
||||
%menu-row{"label" => "'Date'", "circle" => "ctrl.hideDate ? 'danger' : 'success'","faded" => "ctrl.hideDate", "action" => "ctrl.selectedMenuItem(); ctrl.toggleKey('hideDate')", "desc" => "'Hide the date displayed in each row'"}
|
||||
%menu-row{"label" => "'Tags'", "circle" => "ctrl.hideTags ? 'danger' : 'success'","faded" => "ctrl.hideTags", "action" => "ctrl.selectedMenuItem(); ctrl.toggleKey('hideTags')", "desc" => "'Hide the list of tags associated with each note'"}
|
||||
|
||||
6501
package-lock.json
generated
6501
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -43,9 +43,9 @@
|
||||
"karma-phantomjs-launcher": "^1.0.2",
|
||||
"mocha": "^5.2.0",
|
||||
"serve-static": "^1.13.2",
|
||||
"sn-models": "~/Desktop/sn/dev/sn-models",
|
||||
"sn-models": "0.1.12",
|
||||
"sn-stylekit": "2.0.13",
|
||||
"standard-file-js": "0.3.31",
|
||||
"standard-file-js": "0.3.32",
|
||||
"grunt-shell": "^2.1.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user