+
@@ -141,7 +141,7 @@ export default class AttributeListWidget extends TabAwareWidget {
this.triggerEvent(`attributeListCollapsedStateChanged`, {collapse});
});
- this.$ownedExpanderText = this.$ownedExpander.find('.attr-expander-text');
+ this.$ownedExpanderText = this.$ownedExpander.find('.area-expander-text');
this.$inheritedAttributesWrapper = this.$widget.find('.inherited-attributes-wrapper');
@@ -155,7 +155,7 @@ export default class AttributeListWidget extends TabAwareWidget {
}
});
- this.$inheritedExpanderText = this.$inheritedExpander.find('.attr-expander-text');
+ this.$inheritedExpanderText = this.$inheritedExpander.find('.area-expander-text');
this.$inheritedEmptyExpander = this.$widget.find('.attr-inherited-empty-expander');
diff --git a/src/public/app/widgets/similar_notes.js b/src/public/app/widgets/similar_notes.js
index 019c21aa1..23aa672a2 100644
--- a/src/public/app/widgets/similar_notes.js
+++ b/src/public/app/widgets/similar_notes.js
@@ -24,46 +24,12 @@ const TPL = `
white-space: nowrap;
overflow: hidden;
}
-
- .similar-notes-expander {
- display: flex;
- flex-direction: row;
- color: var(--muted-text-color);
- font-size: 90%;
- m
- }
-
- .similar-notes-expander hr {
- height: 1px;
- border-color: var(--main-border-color);
- position: relative;
- top: 4px;
- margin-top: 5px;
- }
-
- .similar-notes-expander-text {
- padding-left: 20px;
- padding-right: 20px;
- white-space: nowrap;
- }
-
- .similar-notes-expander:hover {
- cursor: pointer;
- }
-
- .similar-notes-expander:hover hr {
- border-color: var(--main-text-color);
- }
-
- .similar-notes-expander:hover .similar-notes-expander-text {
- color: var(--main-text-color);
- }
-
+
-
@@ -83,9 +49,9 @@ export default class SimilarNotesWidget extends TabAwareWidget {
this.overflowing();
this.$similarNotesWrapper = this.$widget.find(".similar-notes-wrapper");
- this.$similarNotesExpanderText = this.$widget.find(".similar-notes-expander-text");
+ this.$expanderText = this.$widget.find(".area-expander-text");
- this.$expander = this.$widget.find('.similar-notes-expander');
+ this.$expander = this.$widget.find('.area-expander');
this.$expander.on('click', async () => {
const collapse = this.$similarNotesWrapper.is(":visible");
@@ -132,7 +98,7 @@ export default class SimilarNotesWidget extends TabAwareWidget {
this.$similarNotesWrapper.show();
}
- this.$similarNotesExpanderText.text(`${similarNotes.length} similar note${similarNotes.length === 1 ? '': "s"}`);
+ this.$expanderText.text(`${similarNotes.length} similar note${similarNotes.length === 1 ? '': "s"}`);
const noteIds = similarNotes.flatMap(note => note.notePath);
diff --git a/src/public/app/widgets/type_widgets/search.js b/src/public/app/widgets/type_widgets/search.js
index 7a2698c28..5ce4d1d94 100644
--- a/src/public/app/widgets/type_widgets/search.js
+++ b/src/public/app/widgets/type_widgets/search.js
@@ -1,15 +1,90 @@
import TypeWidget from "./type_widget.js";
+import noteAutocompleteService from "../../services/note_autocomplete.js";
const TPL = `
-
-
-
Search string:
-
+
+
+
+
+
+
+
Search settings
+
+
-
+
`;
export default class SearchTypeWidget extends TypeWidget {
@@ -19,7 +94,22 @@ export default class SearchTypeWidget extends TypeWidget {
this.$widget = $(TPL);
this.$searchString = this.$widget.find(".search-string");
this.$component = this.$widget.find('.note-detail-search');
- this.$help = this.$widget.find(".note-detail-search-help");
+
+ this.$settingsArea = this.$widget.find('.search-settings');
+
+ this.$limitSearchToSubtree = this.$widget.find('.limit-search-to-subtree');
+ noteAutocompleteService.initNoteAutocomplete(this.$limitSearchToSubtree);
+
+ this.$settingExpander = this.$widget.find('.area-expander');
+ this.$settingExpander.on('click', async () => {
+ const collapse = this.$settingsArea.is(":visible");
+
+ if (collapse) {
+ this.$settingsArea.slideUp(200);
+ } else {
+ this.$settingsArea.slideDown(200);
+ }
+ });
}
async doRefresh(note) {
diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css
index 73592d2f4..46433e9a6 100644
--- a/src/public/stylesheets/style.css
+++ b/src/public/stylesheets/style.css
@@ -856,3 +856,36 @@ ul.fancytree-container li {
.ck.ck-balloon-panel {
z-index: 10001;
}
+
+.area-expander {
+ display: flex;
+ flex-direction: row;
+ color: var(--muted-text-color);
+ font-size: 90%;
+}
+
+.area-expander hr {
+ height: 1px;
+ border-color: var(--main-border-color);
+ position: relative;
+ top: 4px;
+ margin-top: 5px;
+}
+
+.area-expander-text {
+ padding-left: 20px;
+ padding-right: 20px;
+ white-space: nowrap;
+}
+
+.area-expander:hover {
+ cursor: pointer;
+}
+
+.area-expander:hover hr {
+ border-color: var(--main-text-color);
+}
+
+.area-expander:hover .area-expander-text {
+ color: var(--main-text-color);
+}