diff --git a/apps/client/src/services/bulk_action.ts b/apps/client/src/services/bulk_action.ts index d894ee17e..742df632f 100644 --- a/apps/client/src/services/bulk_action.ts +++ b/apps/client/src/services/bulk_action.ts @@ -18,7 +18,7 @@ import type FNote from "../entities/fnote.js"; import toast from "./toast.js"; import { BulkAction } from "@triliumnext/commons"; -const ACTION_GROUPS = [ +export const ACTION_GROUPS = [ { title: t("bulk_actions.labels"), actions: [AddLabelBulkAction, UpdateLabelValueBulkAction, RenameLabelBulkAction, DeleteLabelBulkAction] diff --git a/apps/client/src/widgets/react/Dropdown.tsx b/apps/client/src/widgets/react/Dropdown.tsx index 025192d74..3445bd832 100644 --- a/apps/client/src/widgets/react/Dropdown.tsx +++ b/apps/client/src/widgets/react/Dropdown.tsx @@ -13,11 +13,12 @@ export interface DropdownProps { dropdownContainerStyle?: CSSProperties; dropdownContainerClassName?: string; hideToggleArrow?: boolean; + noSelectButtonStyle?: boolean; disabled?: boolean; text?: ComponentChildren; } -export default function Dropdown({ className, buttonClassName, isStatic, children, title, text, dropdownContainerStyle, dropdownContainerClassName, hideToggleArrow, disabled }: DropdownProps) { +export default function Dropdown({ className, buttonClassName, isStatic, children, title, text, dropdownContainerStyle, dropdownContainerClassName, hideToggleArrow, disabled, noSelectButtonStyle }: DropdownProps) { const dropdownRef = useRef(null); const triggerRef = useRef(null); @@ -57,7 +58,7 @@ export default function Dropdown({ className, buttonClassName, isStatic, childre return (
- -
- - - - - - -`; - -const OPTION_CLASSES = [SearchString, SearchScript, Ancestor, FastSearch, IncludeArchivedNotes, OrderBy, Limit, Debug]; - -export default class SearchDefinitionWidget extends NoteContextAwareWidget { - - private $component!: JQuery; - private $actionList!: JQuery; - private $searchOptions!: JQuery; - private $searchButton!: JQuery; - private $searchAndExecuteButton!: JQuery; - private $saveToNoteButton!: JQuery; - private $actionOptions!: JQuery; - - get name() { - return "searchDefinition"; - } - - doRender() { - this.$widget = $(TPL); - this.contentSized(); - this.$component = this.$widget.find(".search-definition-widget"); - this.$actionList = this.$widget.find(".action-list"); - - for (const actionGroup of bulkActionService.ACTION_GROUPS) { - this.$actionList.append($('