mirror of
https://github.com/Kornstalx/5etools-mirror-2.github.io.git
synced 2025-10-28 20:45:35 -05:00
v1.201.0
This commit is contained in:
@@ -44,7 +44,7 @@ class Omnisearch {
|
||||
}
|
||||
|
||||
this._clickFirst = true;
|
||||
this._handleClickSubmit(evt);
|
||||
this._pHandleClickSubmit(evt).then(null);
|
||||
break;
|
||||
case "ArrowUp":
|
||||
evt.preventDefault();
|
||||
@@ -64,23 +64,23 @@ class Omnisearch {
|
||||
this._clickFirst = false;
|
||||
if (evt.which >= 37 && evt.which <= 40) return;
|
||||
clearTimeout(typeTimer);
|
||||
typeTimer = setTimeout(() => this._handleClickSubmit(), this._TYPE_TIMEOUT_MS);
|
||||
typeTimer = setTimeout(() => this._pHandleClickSubmit(), this._TYPE_TIMEOUT_MS);
|
||||
});
|
||||
this._iptSearch.onKeydown(() => clearTimeout(typeTimer));
|
||||
this._iptSearch.onClick(evt => {
|
||||
evt.stopPropagation();
|
||||
Renderer.hover.cleanTempWindows();
|
||||
if (this._iptSearch.val() && this._iptSearch.val().trim().length) this._handleClickSubmit();
|
||||
if (this._iptSearch.val() && this._iptSearch.val().trim().length) this._pHandleClickSubmit().then(null);
|
||||
});
|
||||
|
||||
this._init_scrollHandler();
|
||||
this._init_bindBodyListeners();
|
||||
}
|
||||
|
||||
static _handleClickSubmit (evt) {
|
||||
static async _pHandleClickSubmit (evt) {
|
||||
if (evt) evt.stopPropagation();
|
||||
await this._pDoSearch();
|
||||
Renderer.hover.cleanTempWindows();
|
||||
return this._pDoSearch();
|
||||
}
|
||||
|
||||
static _init_elements () {
|
||||
@@ -110,7 +110,7 @@ class Omnisearch {
|
||||
clazz: "btn btn-default omni__submit",
|
||||
tabindex: -1,
|
||||
html: `<span class="glyphicon glyphicon-search"></span>`,
|
||||
click: evt => this._handleClickSubmit(evt),
|
||||
click: evt => this._pHandleClickSubmit(evt),
|
||||
});
|
||||
|
||||
this._wrpSearchInput = e_({
|
||||
@@ -317,7 +317,19 @@ class Omnisearch {
|
||||
}
|
||||
|
||||
static _renderLink_getHoverString (category, url, src, {isFauxPage = false} = {}) {
|
||||
return `onmouseover="Renderer.hover.pHandleLinkMouseOver(event, this)" onmouseleave="Renderer.hover.handleLinkMouseLeave(event, this)" onmousemove="Renderer.hover.handleLinkMouseMove(event, this)" ondragstart="Renderer.hover.handleLinkDragStart(event, this)" data-vet-page="${UrlUtil.categoryToHoverPage(category).qq()}" data-vet-source="${src.qq()}" data-vet-hash="${url.qq()}" ${isFauxPage ? `data-vet-is-faux-page="true"` : ""} ${Renderer.hover.getPreventTouchString()}`;
|
||||
return [
|
||||
`onmouseover="Renderer.hover.pHandleLinkMouseOver(event, this)"`,
|
||||
`onmouseleave="Renderer.hover.handleLinkMouseLeave(event, this)"`,
|
||||
`onmousemove="Renderer.hover.handleLinkMouseMove(event, this)"`,
|
||||
`ondragstart="Renderer.hover.handleLinkDragStart(event, this)"`,
|
||||
`data-vet-page="${UrlUtil.categoryToHoverPage(category).qq()}"`,
|
||||
`data-vet-source="${src.qq()}"`,
|
||||
`data-vet-hash="${url.qq()}"`,
|
||||
isFauxPage ? `data-vet-is-faux-page="true"` : "",
|
||||
Renderer.hover.getPreventTouchString(),
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(" ");
|
||||
}
|
||||
|
||||
static $getResultLink (r) {
|
||||
|
||||
Reference in New Issue
Block a user