mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-08-03 02:06:05 -04:00
Merge pull request #1175 from kiwix/fully_visible_suggestions
Autocompleter box size matches the content width
This commit is contained in:
commit
6b74395455
@ -23,6 +23,9 @@
|
|||||||
|
|
||||||
.autoComplete_wrapper > ul {
|
.autoComplete_wrapper > ul {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
min-width: 100%;
|
||||||
|
width: fit-content;
|
||||||
|
max-width: 600px;
|
||||||
max-height: 226px;
|
max-height: 226px;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
top: 100%;
|
top: 100%;
|
||||||
@ -60,6 +63,11 @@
|
|||||||
transition: all 0.2s ease;
|
transition: all 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.autoComplete_wrapper > ul > li > a {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
.autoComplete_wrapper > ul > li::selection {
|
.autoComplete_wrapper > ul > li::selection {
|
||||||
color: rgba(#ffffff, 0);
|
color: rgba(#ffffff, 0);
|
||||||
background-color: rgba(#ffffff, 0);
|
background-color: rgba(#ffffff, 0);
|
||||||
|
@ -92,7 +92,10 @@ function makeJSLink(jsCodeString, linkText, linkAttr="") {
|
|||||||
// in the JS code we have to URI-encode a second time.
|
// in the JS code we have to URI-encode a second time.
|
||||||
// (see https://stackoverflow.com/questions/33721510)
|
// (see https://stackoverflow.com/questions/33721510)
|
||||||
const uriEncodedJSCode = encodeURIComponent(jsCodeString);
|
const uriEncodedJSCode = encodeURIComponent(jsCodeString);
|
||||||
return `<a ${linkAttr} href="javascript:${uriEncodedJSCode}">${linkText}</a>`;
|
const linkPlainText = htmlDecode(linkText, "text/html");
|
||||||
|
linkAttr += ` href="javascript:${uriEncodedJSCode}"`;
|
||||||
|
linkAttr += ` title="${linkPlainText}"`;
|
||||||
|
return `<a ${linkAttr}>${linkText}</a>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function suggestionsApiURL()
|
function suggestionsApiURL()
|
||||||
|
@ -57,7 +57,7 @@ const ResourceCollection resources200Compressible{
|
|||||||
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/autoComplete/autoComplete.min.js" },
|
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/autoComplete/autoComplete.min.js" },
|
||||||
{ STATIC_CONTENT, "/ROOT%23%3F/skin/autoComplete/autoComplete.min.js?cacheid=1191aaaf" },
|
{ STATIC_CONTENT, "/ROOT%23%3F/skin/autoComplete/autoComplete.min.js?cacheid=1191aaaf" },
|
||||||
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/autoComplete/css/autoComplete.css" },
|
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/autoComplete/css/autoComplete.css" },
|
||||||
{ STATIC_CONTENT, "/ROOT%23%3F/skin/autoComplete/css/autoComplete.css?cacheid=ef30cd42" },
|
{ STATIC_CONTENT, "/ROOT%23%3F/skin/autoComplete/css/autoComplete.css?cacheid=f2d376c4" },
|
||||||
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/i18n.js" },
|
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/i18n.js" },
|
||||||
{ STATIC_CONTENT, "/ROOT%23%3F/skin/i18n.js?cacheid=071abc9a" },
|
{ STATIC_CONTENT, "/ROOT%23%3F/skin/i18n.js?cacheid=071abc9a" },
|
||||||
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/index.css" },
|
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/index.css" },
|
||||||
@ -75,7 +75,7 @@ const ResourceCollection resources200Compressible{
|
|||||||
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/taskbar.css" },
|
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/taskbar.css" },
|
||||||
{ STATIC_CONTENT, "/ROOT%23%3F/skin/taskbar.css?cacheid=80d56607" },
|
{ STATIC_CONTENT, "/ROOT%23%3F/skin/taskbar.css?cacheid=80d56607" },
|
||||||
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/viewer.js" },
|
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/viewer.js" },
|
||||||
{ STATIC_CONTENT, "/ROOT%23%3F/skin/viewer.js?cacheid=aca897b0" },
|
{ STATIC_CONTENT, "/ROOT%23%3F/skin/viewer.js?cacheid=8ca16f13" },
|
||||||
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/fonts/Poppins.ttf" },
|
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/fonts/Poppins.ttf" },
|
||||||
{ STATIC_CONTENT, "/ROOT%23%3F/skin/fonts/Poppins.ttf?cacheid=af705837" },
|
{ STATIC_CONTENT, "/ROOT%23%3F/skin/fonts/Poppins.ttf?cacheid=af705837" },
|
||||||
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/fonts/Roboto.ttf" },
|
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/fonts/Roboto.ttf" },
|
||||||
@ -323,11 +323,11 @@ R"EXPECTEDRESULT( <img src="${root}/skin/download-white.svg?cac
|
|||||||
/* url */ "/ROOT%23%3F/viewer",
|
/* url */ "/ROOT%23%3F/viewer",
|
||||||
R"EXPECTEDRESULT( <link type="text/css" href="./skin/kiwix.css?cacheid=2158fad9" rel="Stylesheet" />
|
R"EXPECTEDRESULT( <link type="text/css" href="./skin/kiwix.css?cacheid=2158fad9" rel="Stylesheet" />
|
||||||
<link type="text/css" href="./skin/taskbar.css?cacheid=80d56607" rel="Stylesheet" />
|
<link type="text/css" href="./skin/taskbar.css?cacheid=80d56607" rel="Stylesheet" />
|
||||||
<link type="text/css" href="./skin/autoComplete/css/autoComplete.css?cacheid=ef30cd42" rel="Stylesheet" />
|
<link type="text/css" href="./skin/autoComplete/css/autoComplete.css?cacheid=f2d376c4" rel="Stylesheet" />
|
||||||
<script type="text/javascript" src="./skin/polyfills.js?cacheid=a0e0343d"></script>
|
<script type="text/javascript" src="./skin/polyfills.js?cacheid=a0e0343d"></script>
|
||||||
<script type="module" src="./skin/i18n.js?cacheid=071abc9a" defer></script>
|
<script type="module" src="./skin/i18n.js?cacheid=071abc9a" defer></script>
|
||||||
<script type="text/javascript" src="./skin/languages.js?cacheid=ee7d95b5" defer></script>
|
<script type="text/javascript" src="./skin/languages.js?cacheid=ee7d95b5" defer></script>
|
||||||
<script type="text/javascript" src="./skin/viewer.js?cacheid=aca897b0" defer></script>
|
<script type="text/javascript" src="./skin/viewer.js?cacheid=8ca16f13" defer></script>
|
||||||
<script type="text/javascript" src="./skin/autoComplete/autoComplete.min.js?cacheid=1191aaaf"></script>
|
<script type="text/javascript" src="./skin/autoComplete/autoComplete.min.js?cacheid=1191aaaf"></script>
|
||||||
const blankPageUrl = root + "/skin/blank.html?cacheid=6b1fa032";
|
const blankPageUrl = root + "/skin/blank.html?cacheid=6b1fa032";
|
||||||
<label for="kiwix_button_show_toggle"><img src="./skin/caret.png?cacheid=22b942b4" alt=""></label>
|
<label for="kiwix_button_show_toggle"><img src="./skin/caret.png?cacheid=22b942b4" alt=""></label>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user