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
19
src/static/js/vendors/html10n.ts
vendored
19
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"
|
||||
for (let string in this.loader!.langs.get(lang)) {
|
||||
build.set(string,this.loader!.langs.get(lang)[string])
|
||||
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