2021-01-24 22:30:53 +01:00
|
|
|
import AbstractSearchOption from "./abstract_search_option.js";
|
|
|
|
|
|
|
|
const TPL = `
|
|
|
|
<tr data-search-option-conf="fastSearch">
|
|
|
|
<td colSpan="2">
|
|
|
|
<span class="bx bx-run"></span>
|
|
|
|
|
|
|
|
Fast search
|
|
|
|
</td>
|
2021-01-26 14:10:34 +01:00
|
|
|
<td class="button-column">
|
2021-02-13 23:38:31 +01:00
|
|
|
<div class="dropdown help-dropdown">
|
|
|
|
<span class="bx bx-help-circle icon-action" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></span>
|
|
|
|
<div class="dropdown-menu dropdown-menu-right p-4">
|
|
|
|
Fast search option disables full text search of note contents which might speed up searching in large databases.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-01-26 10:42:55 +01:00
|
|
|
<span class="bx bx-x icon-action search-option-del"></span>
|
2021-01-24 22:30:53 +01:00
|
|
|
</td>
|
|
|
|
</tr>`;
|
|
|
|
|
|
|
|
export default class FastSearch extends AbstractSearchOption {
|
|
|
|
static get optionName() { return "fastSearch" };
|
|
|
|
static get attributeType() { return "label" };
|
|
|
|
|
|
|
|
static async create(noteId) {
|
|
|
|
await AbstractSearchOption.setAttribute(noteId,'label', 'fastSearch');
|
|
|
|
}
|
|
|
|
|
|
|
|
doRender() {
|
|
|
|
return $(TPL);
|
|
|
|
}
|
|
|
|
}
|