")
+ .append($("").text(actionGroup.title + ": "))
+ .append($actionGroupList);
+
+ for (const action of actionGroup.actions) {
+ $actionGroupList.append(
+ $(' |
@@ -193,24 +167,11 @@ const OPTION_CLASSES = [
Debug
];
-const ACTION_CLASSES = {};
-
-for (const clazz of [
- MoveNoteSearchAction,
- DeleteNoteSearchAction,
- DeleteNoteRevisionsSearchAction,
- DeleteLabelSearchAction,
- DeleteRelationSearchAction,
- RenameLabelSearchAction,
- RenameRelationSearchAction,
- SetLabelValueSearchAction,
- SetRelationTargetSearchAction,
- ExecuteScriptSearchAction
-]) {
- ACTION_CLASSES[clazz.actionName] = clazz;
-}
-
export default class SearchDefinitionWidget extends NoteContextAwareWidget {
+ get name() {
+ return "searchDefinition";
+ }
+
isEnabled() {
return this.note && this.note.type === 'search';
}
@@ -228,6 +189,19 @@ export default class SearchDefinitionWidget extends NoteContextAwareWidget {
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($('