Commit 1c81cd72 by Peace

Merge branch 'bug/#44034_image_not_zoom_in_modal' into debug/console_logs

parents f05d15a2 5600af8f
...@@ -819,6 +819,14 @@ input[name="tab_item"] { ...@@ -819,6 +819,14 @@ input[name="tab_item"] {
.modal-body #modal_image { .modal-body #modal_image {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: contain;
}
.picture-modal {
max-width: 85vw;
max-height: 85vh;
width: 100%;
height: 100%;
} }
.menu_modal .modal-body ul { .menu_modal .modal-body ul {
......
...@@ -147,19 +147,31 @@ Common.getProfileImgUrl = function (path) { ...@@ -147,19 +147,31 @@ Common.getProfileImgUrl = function (path) {
return "./img/noImage.png"; return "./img/noImage.png";
} else if (path.includes("/mnt")) { } else if (path.includes("/mnt")) {
const userInfo = path.split("/").reverse(); const userInfo = path.split("/").reverse();
if (deviceInfo.isiOS()) {
const receivedString = NativeBridgeDataSource.getCachedImage(userInfo[1]);
if (receivedString == "" || receivedString == undefined) {
return Common.generateProfileImgURLFromServer(userInfo[0], userInfo[1]);
}
return "data:image/"+userInfo[0].split('.').pop()+";base64," + receivedString;
}
return Common.generateProfileImgURLFromServer(userInfo[0], userInfo[1]);
} else {
return path;
}
};
Common.generateProfileImgURLFromServer = function (fileName, loginID) {
return ( return (
serverInfo.cmsURL + serverInfo.cmsURL +
"/chatapi/user?profileFileName=" + "/chatapi/user?profileFileName=" +
userInfo[0] + fileName +
"&profileGetLoginId=" + "&profileGetLoginId=" +
userInfo[1] + loginID +
"&sid=" + "&sid=" +
currentUserInfo.sid + currentUserInfo.sid +
"&cmd=12" "&cmd=12"
); );
} else {
return path;
}
}; };
Common.startCollaboration = function (collaborationType) { Common.startCollaboration = function (collaborationType) {
......
...@@ -190,6 +190,7 @@ const NATIVE_KEY_IOS = { ...@@ -190,6 +190,7 @@ const NATIVE_KEY_IOS = {
getUserListByLoginId: "getUserListByLoginId", getUserListByLoginId: "getUserListByLoginId",
getMessageListFromMessageId: "getMessageListFromMessageId", getMessageListFromMessageId: "getMessageListFromMessageId",
updatePreMessage: "updatePreMessage", updatePreMessage: "updatePreMessage",
getCachedImage: "getCachedImage",
}; };
const BIZ_TASK_YELL_URL = "https://biztaskyell.abookcloud.com"; const BIZ_TASK_YELL_URL = "https://biztaskyell.abookcloud.com";
...@@ -416,3 +416,9 @@ NativeBridgeDataSource.getHostRequestFlg = function () { ...@@ -416,3 +416,9 @@ NativeBridgeDataSource.getHostRequestFlg = function () {
return android.getHostRequestFlg(); return android.getHostRequestFlg();
} }
}; };
NativeBridgeDataSource.getCachedImage = function (loginID) {
if (deviceInfo.isiOS()) {
return callNativeApp(NATIVE_KEY_IOS.getCachedImage, { loginID: loginID });
}
};
...@@ -211,7 +211,7 @@ ArchiveUI.appendImageTypePlayer = function (filePath) { ...@@ -211,7 +211,7 @@ ArchiveUI.appendImageTypePlayer = function (filePath) {
ArchiveUI.appendVideoTypePlayer = function (filePath) { ArchiveUI.appendVideoTypePlayer = function (filePath) {
if (deviceInfo.isiOS()) { if (deviceInfo.isiOS()) {
$("#archive_player").prepend( $("#archive_player").prepend(
'<video class="archive_player" controls autoplay muted playsinline controlsList="nodownload"><source src="' + '<video class="archive_player" controls autoplay playsinline controlsList="nodownload"><source src="' +
filePath + filePath +
'" type="video/mp4"><source src="' + '" type="video/mp4"><source src="' +
filePath + filePath +
...@@ -223,7 +223,7 @@ ArchiveUI.appendVideoTypePlayer = function (filePath) { ...@@ -223,7 +223,7 @@ ArchiveUI.appendVideoTypePlayer = function (filePath) {
$("#archive_player").prepend( $("#archive_player").prepend(
'<video class="archive_player" src=' + '<video class="archive_player" src=' +
filePath + filePath +
' controls autoplay muted playsinline controlsList="nodownload"></video>' ' controls autoplay playsinline controlsList="nodownload"></video>'
); );
} }
}; };
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="modal-body"> <div class="modal-body" style="height: 85vh!important; max-height: 85vh;">
<div class="picture-modal"> <div class="picture-modal">
<img src="" id="modal_image"> <img src="" id="modal_image">
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment