Chinese fix

This commit is contained in:
Squidly271 2022-03-22 13:12:15 -04:00
parent f99fa3c234
commit 0fc9cb0feb
6 changed files with 21 additions and 7 deletions

Binary file not shown.

View File

@ -2,8 +2,8 @@
<!DOCTYPE PLUGIN [
<!ENTITY name "community.applications">
<!ENTITY author "Andrew Zawadzki">
<!ENTITY version "2022.03.17a">
<!ENTITY md5 "5840fc5f85de12c5a4d42594c12215f3">
<!ENTITY version "2022.03.22">
<!ENTITY md5 "4a326ef4ce3593d92861701eddb370bd">
<!ENTITY launch "Apps">
<!ENTITY plugdir "/usr/local/emhttp/plugins/&name;">
<!ENTITY github "Squidly271/community.applications">
@ -13,6 +13,10 @@
<PLUGIN name="&name;" author="&author;" version="&version;" launch="&launch;" pluginURL="&pluginURL;" min="6.9.0" support="https://lime-technology.com/forums/topic/38582-plug-in-community-applications/" icon="users">
<CHANGES>
###2022.03.22
- Fixed: Compatibility with browsers having Chinese set as their language (not the OS set as Chinese)
- Added: Better banner warnings on why docker applications may not be available to install
###2022.03.17a
- Fixed: Display aberration on dockerHub installs when running Unraid 6.9.x

View File

@ -1702,17 +1702,22 @@ function updateDisplay(content) {
});
context.attach('#'+ID, opts);
});
$(".cardDesc").each(function() {
$(".cardDesc").each(function() {
var description = $(this).html();
while (isOverflown(this)) {
description = description.slice(0,-5);
console.log(description);
$(this).html(description + "... <span class='card_readmore'><?=tr("Read more")?></span>");
}
});
$(".ca_applicationName,.betaPopupText,.installedCardText,.upgradePopupText").each(function() {
while (isOverflown(this)) {
var existingSize = $(this).css("font-size");
var size = existingSize.replace("px","");
if ( size == newSize + 1 ) { // looks like browsers in Chinese have a minimum enforced font-size
return false;
}
var newSize = size - 1;
if (newSize == 0)
return false;
@ -1733,8 +1738,8 @@ function updateDisplay(content) {
}
function isOverflown(element){
return element.scrollHeight > element.clientHeight || element.scrollWidth > element.clientWidth;
function isOverflown(el){
return el.scrollHeight > el.clientHeight || el.scrollWidth > el.clientWidth;
}
function saveState() {
@ -1854,6 +1859,9 @@ function addDockerWarning(enableDisable) {
case 3:
var msg = "<?tr('Array not started - Only Plugins Available To Be Installed Or Managed')?>";
break;
default:
var msg = "Docker apps not available to install - Unknown reason why";
break;
}
if ( dockerWarningAdded === false) {
dockerWarningAdded = addBannerWarning(msg,true,false);

View File

@ -1,8 +1,8 @@
b136e7a969b1cf316bbfe602c4deb476 ./Apps.page
4dbdbbd1b682f3f28406d3739709159d ./Apps.page
4e55f7483b661af21a25b677179baffe ./CA_notices.page
42a1658a916a3a3eed2a9f2af80603c4 ./ca_settings.page
e718d7825dbdc96a17a915079222b098 ./default.cfg
105bb8a693748ba6bf8328dc78f8fc3a ./include/exec.php
a9e2a5a3b9e0dfa39cbec0021850469c ./include/exec.php
f32bb71914346adbbc8a3a6b59e9521d ./include/helpers.php
d9b0dc98ee598d44633341ac199a43e0 ./include/paths.php
532fffdf939594c143e679da02bd841e ./javascript/libraries.js

View File

@ -188,6 +188,8 @@ switch ($_POST['action']) {
case 'changeMaxPerPage':
changeMaxPerPage();
break;
case 'var_dump':
break;
###############################################
# Return an error if the action doesn't exist #
###############################################

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB