mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2025-10-24 09:49:08 +08:00
修复:PPT图片预览模式前端显示异常
This commit is contained in:
1109
server/src/main/resources/static/pptx/bootstrap/css/bootstrap-responsive.css
vendored
Normal file
1109
server/src/main/resources/static/pptx/bootstrap/css/bootstrap-responsive.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9
server/src/main/resources/static/pptx/bootstrap/css/bootstrap-responsive.min.css
vendored
Normal file
9
server/src/main/resources/static/pptx/bootstrap/css/bootstrap-responsive.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
6167
server/src/main/resources/static/pptx/bootstrap/css/bootstrap.css
vendored
Normal file
6167
server/src/main/resources/static/pptx/bootstrap/css/bootstrap.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 8.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
2280
server/src/main/resources/static/pptx/bootstrap/js/bootstrap.js
vendored
Normal file
2280
server/src/main/resources/static/pptx/bootstrap/js/bootstrap.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
server/src/main/resources/static/pptx/bootstrap/js/bootstrap.min.js
vendored
Normal file
6
server/src/main/resources/static/pptx/bootstrap/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -15,21 +15,7 @@ $(document).ready(function() {
|
||||
|
||||
// async method:
|
||||
$.get('onlinePreview?' , params, function(data, status) {
|
||||
|
||||
var data = JSON.parse(data);
|
||||
//$.get('http://nw.runmin.net/url.json?start=1&size=0' + size, params, function(data, status) {
|
||||
/* sync method, used by sync view (speaker & audience)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: contextPath + '/view/' + uuid + '.json',
|
||||
async: false,
|
||||
dataType: "json",
|
||||
data: params,
|
||||
}).done(function( data ) {
|
||||
*/
|
||||
//console.log(data);
|
||||
var viewCheck = authMap.view;
|
||||
var downCheck = authMap.down;
|
||||
var data = JSON.parse(data);
|
||||
var code = data.code;
|
||||
if (1 == code) {
|
||||
uuid = data.uuid;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<#if RequestParameters['name']??>
|
||||
{
|
||||
"code": 1,
|
||||
"name": "pptx",
|
||||
"name": "PPT预览",
|
||||
"totalSize": 0,
|
||||
"curPage": 1,
|
||||
"totalPage": 1,
|
||||
@@ -29,28 +29,25 @@
|
||||
"desc": "Success"
|
||||
}
|
||||
|
||||
<#else/>
|
||||
<#else>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<#if "${file.suffix?html}" == "ppt" || "${file.suffix?html}" == "pptx">
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
|
||||
<title>ppt预览</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
|
||||
<!-- BOOTSTRAP STYLE start -->
|
||||
<!-- Le styles -->
|
||||
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<link href="/pptx/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/pptx/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<link href="/pptx/idocv_common.min.css" rel="stylesheet">
|
||||
<link href="/pptx/idocv/idocv_common.min.css" rel="stylesheet">
|
||||
|
||||
<link href="/pptx/jquery.contextMenu.css" rel="stylesheet">
|
||||
<link href="/pptx/jquery.contextMenu.css" rel="stylesheet">
|
||||
|
||||
<!-- BOOTSTRAP STYLE end -->
|
||||
|
||||
@@ -82,7 +79,7 @@
|
||||
|
||||
<div class="loading-mask" style="display: block;">
|
||||
<div class="loading-zone">
|
||||
<div class="text"><img src="/img/loader_indicator_lite.gif">加载中...</div>
|
||||
<div class="text"><img src="/pptx/img/loader_indicator_lite.gif">加载中...</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -143,8 +140,8 @@
|
||||
================================================== -->
|
||||
|
||||
<script src="/pptx/jquery-3.5.1.min.js"></script>
|
||||
<script src="/pptx/jquery.contextMenu.js?v=11.2.5_20210128"></script>
|
||||
<script src="/pptx/idocv_common.min.js"></script>
|
||||
<script src="/pptx/jquery.contextMenu.js?v=11.2.5_20210128"></script>
|
||||
<script src="/pptx/idocv/idocv_common.min.js"></script>
|
||||
|
||||
<script>
|
||||
var contextPath = '';
|
||||
@@ -173,86 +170,6 @@
|
||||
<script src="/pptx/ppt.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
<#else/>
|
||||
|
||||
<meta charset="utf-8" />
|
||||
<title>图片预览</title>
|
||||
<link rel="stylesheet" href="css/viewer.min.css">
|
||||
<script src="js/lazyload.js"></script>
|
||||
<script src="js/viewer.min.js"></script>
|
||||
<#include "*/commonHeader.ftl">
|
||||
<style>
|
||||
body {
|
||||
background-color: #404040;
|
||||
}
|
||||
#image { width: 800px; margin: 0 auto; font-size: 0;}
|
||||
#image li { display: inline-block;width: 50px;height: 50px; margin-left: 1%; padding-top: 1%;}
|
||||
/*#dowebok li img { width: 200%;}*/
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<ul id="image">
|
||||
<#list imgurls as img>
|
||||
<div class="img-area">
|
||||
<li><img id="${img}" url="${img}" src="${img}" width="1px" height="1px"></li>
|
||||
</div>
|
||||
</#list>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
var viewer = new Viewer(document.getElementById('image'), {
|
||||
url: 'src',
|
||||
navbar: false,
|
||||
button: false,
|
||||
backdrop: false,
|
||||
loop : true
|
||||
});
|
||||
document.getElementById("${currentUrl}").click();
|
||||
// 修改下一页按钮的样式和位置
|
||||
$(function () {
|
||||
var outHandler = function(){
|
||||
$(this).css('background-color','rgba(0, 0, 0, 0)');
|
||||
};
|
||||
var overHandler = function(){
|
||||
$(this).css('background-color','rgba(0, 0, 0, .5)');
|
||||
};
|
||||
var next = $("li[data-action=next]");
|
||||
var prev = $("li[data-action=prev]");
|
||||
var viewerToolBar = $(".viewer-footer");
|
||||
// 覆盖按钮父类原始样式
|
||||
viewerToolBar.css("overflow", "visible");
|
||||
// 获取文档高度、宽度
|
||||
var clientHeight = window.innerHeight;
|
||||
var clientWidth = window.innerWidth;
|
||||
// 调整样式
|
||||
var styleCss = {},nextCss={},prevCss={};
|
||||
styleCss.position = "absolute";
|
||||
styleCss.top = -clientHeight;
|
||||
styleCss.width = clientWidth*0.1;
|
||||
styleCss.height = clientHeight + 52;
|
||||
// 覆盖原始样式
|
||||
styleCss.backgroundColor='rgba(0, 0, 0, 0)';
|
||||
styleCss.borderRadius='inherit';
|
||||
nextCss.right = "0";
|
||||
prevCss.left = "0";
|
||||
next.css($.extend(nextCss, styleCss));
|
||||
prev.css($.extend(prevCss, styleCss));
|
||||
next.on('mouseout',outHandler);
|
||||
next.on('mouseover',overHandler);
|
||||
prev.on('mouseout',outHandler);
|
||||
prev.on('mouseover',overHandler);
|
||||
});
|
||||
/*初始化水印*/
|
||||
window.onload = function() {
|
||||
initWaterMark();
|
||||
}
|
||||
</script>
|
||||
|
||||
</#if>
|
||||
</body>
|
||||
</html>
|
||||
</#if>
|
||||
|
||||
Reference in New Issue
Block a user