* Fix js error.

This commit is contained in:
wangyidong
2023-11-08 13:59:16 +08:00
parent 1be16ad265
commit 334936ff5a
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -1224,6 +1224,7 @@ EOT;
$jsConfig->requiredFields = $requiredFields;
$jsConfig->router = $app->server->SCRIPT_NAME;
$jsConfig->save = $lang->save ?? '';
$jsConfig->expand = $lang->expand ?? '';
$jsConfig->runMode = $runMode;
$jsConfig->timeout = $config->timeout ?? '';
$jsConfig->pingInterval = $config->pingInterval ?? '';
+1 -1
View File
@@ -1101,7 +1101,7 @@
maxHeightStyle = $image.height() > 0 ? 'max-height:' + maxHeight + 'px' : '';
if(!document.getElementsByClassName('xxc-embed').length && $image.width() > 0 && $image.width() > maxWidth) $image.attr('width', maxWidth);
$image.wrap('<a href="' + $image.attr('src') + '" style="display:inline-block;position:relative;overflow:hidden;' + maxHeightStyle + '" target="_blank"></a>');
if($image.height() > 0 && $image.height() > maxHeight) $image.closest('a').append("<a href='###' class='showMoreImage' onclick='showMoreImage(this)'>" + lang.expand + " <i class='icon-angle-down'></i></a>");
if($image.height() > 0 && $image.height() > maxHeight) $image.closest('a').append("<a href='###' class='showMoreImage' onclick='showMoreImage(this)'>" + window.config.expand + " <i class='icon-angle-down'></i></a>");
}, 50);
}