mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 06:37:10 -04:00
Fixed frontend tests.
This commit is contained in:
parent
c5a94f1dc7
commit
75f97287c5
3 changed files with 20 additions and 10 deletions
3
.github/workflows/frontend-admin-tests.yml
vendored
3
.github/workflows/frontend-admin-tests.yml
vendored
|
@ -68,7 +68,7 @@ jobs:
|
|||
# rules.
|
||||
-
|
||||
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||
run: bin/installDeps.sh
|
||||
run: pnpm i
|
||||
#-
|
||||
# name: Install etherpad plugins
|
||||
# run: rm -Rf node_modules/ep_align/static/tests/*
|
||||
|
@ -92,7 +92,6 @@ jobs:
|
|||
- name: Build admin frontend
|
||||
working-directory: admin
|
||||
run: |
|
||||
pnpm install
|
||||
pnpm run build
|
||||
# name: Run the frontend admin tests
|
||||
# shell: bash
|
||||
|
|
15
src/static/js/vendors/html10n.ts
vendored
15
src/static/js/vendors/html10n.ts
vendored
|
@ -539,7 +539,9 @@ export class Html10n {
|
|||
if(!lang) continue;
|
||||
if(!(lang in langs)) {// uh, we don't have this lang availbable..
|
||||
// then check for related langs
|
||||
if(~lang.indexOf('-')) lang = lang.split('-')[0];
|
||||
if(~lang.indexOf('-') != -1) {
|
||||
lang = lang.split('-')[0];
|
||||
}
|
||||
let l: string|undefined = ''
|
||||
for(l of langs) {
|
||||
if(l && lang != l && l.indexOf(lang) === 0) {
|
||||
|
@ -551,16 +553,25 @@ export class Html10n {
|
|||
if(lang != l) continue;
|
||||
}
|
||||
|
||||
|
||||
// ... and apply all strings of the current lang in the list
|
||||
// to our build object
|
||||
//lang = "de"
|
||||
if (this.loader!.langs.has(lang)) {
|
||||
for (let string in this.loader!.langs.get(lang)) {
|
||||
build.set(string,this.loader!.langs.get(lang)[string])
|
||||
}
|
||||
this.language = lang
|
||||
} else {
|
||||
const loaderLang = lang.split('-')[0]
|
||||
for (let string in this.loader!.langs.get(loaderLang)) {
|
||||
build.set(string,this.loader!.langs.get(loaderLang)[string])
|
||||
}
|
||||
this.language = loaderLang
|
||||
}
|
||||
|
||||
// the last applied lang will be exposed as the
|
||||
// lang the page was translated to
|
||||
this.language = lang
|
||||
}
|
||||
cb(null, build)
|
||||
})
|
||||
|
|
8
src/static/js/vendors/nice-select.js
vendored
8
src/static/js/vendors/nice-select.js
vendored
|
@ -110,10 +110,10 @@
|
|||
$dropdown.find('.list').css('min-width', $dropdown.outerWidth() + 'px');
|
||||
}
|
||||
|
||||
$listHeight = $dropdown.find('.list').outerHeight();
|
||||
$top = $dropdown.parent().offset().top;
|
||||
$bottom = $('body').height() - $top;
|
||||
$maxListHeight = $bottom - $dropdown.outerHeight() - 20;
|
||||
let $listHeight = $dropdown.find('.list').outerHeight();
|
||||
let $top = $dropdown.parent().offset().top;
|
||||
let $bottom = $('body').height() - $top;
|
||||
let $maxListHeight = $bottom - $dropdown.outerHeight() - 20;
|
||||
if ($maxListHeight < 200) {
|
||||
$dropdown.addClass('reverse');
|
||||
$maxListHeight = 250;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue