移除前端commonHeader.ftl中多余的依赖
parent
f52169ec27
commit
9ceb052eb4
|
@ -0,0 +1 @@
|
||||||
|
.hljs{display:block;overflow-x:auto;padding:.5em;background:#f0f0f0}.hljs,.hljs-subst{color:#444}.hljs-comment{color:#888}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#bc6060}.hljs-literal{color:#78a960}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta-string{color:#4d99bf}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}
|
File diff suppressed because one or more lines are too long
|
@ -5,10 +5,12 @@
|
||||||
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
|
||||||
<title>代码预览</title>
|
<title>代码预览</title>
|
||||||
<#include "*/commonHeader.ftl">
|
<#include "*/commonHeader.ftl">
|
||||||
|
<script src="js/jquery-3.6.1.min.js" type="text/javascript"></script>
|
||||||
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"/>
|
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"/>
|
||||||
<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
|
<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.6.0/styles/default.min.css">
|
<link rel="stylesheet" href="highlight/default.min.css">
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.6.0/highlight.min.js"></script>
|
<script src="highlight/highlight.min.js" type="text/javascript"></script>
|
||||||
|
<script src="js/base64.min.js" type="text/javascript"></script>
|
||||||
<script>hljs.highlightAll()</script>
|
<script>hljs.highlightAll()</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
<#setting classic_compatible=true>
|
<#setting classic_compatible=true>
|
||||||
<link rel="icon" href="./favicon.ico" type="image/x-icon">
|
<link rel="icon" href="./favicon.ico" type="image/x-icon">
|
||||||
<script src="js/jquery-3.6.1.min.js" type="text/javascript"></script>
|
|
||||||
<script src="js/jquery.form.min.js" type="text/javascript"></script>
|
|
||||||
<script src="js/bootbox.min.js" type="text/javascript"></script>
|
|
||||||
<script src="js/watermark.js" type="text/javascript"></script>
|
<script src="js/watermark.js" type="text/javascript"></script>
|
||||||
<script src="js/base64.min.js" type="text/javascript"></script>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
/**
|
/**
|
||||||
|
@ -31,51 +27,6 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 中文环境
|
|
||||||
var locale_zh_CN = {
|
|
||||||
OK: '确定',
|
|
||||||
CONFIRM: '确认',
|
|
||||||
CANCEL: '取消'
|
|
||||||
};
|
|
||||||
bootbox.addLocale('locale_zh_CN', locale_zh_CN);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 需要文件密码
|
|
||||||
*/
|
|
||||||
function needFilePassword() {
|
|
||||||
if ('${needFilePassword}' == 'true') {
|
|
||||||
let promptTitle = "你正在预览加密文件,请输入文件密码。";
|
|
||||||
if ('${filePasswordError}' == 'true') {
|
|
||||||
promptTitle = "密码错误,请重新输入密码。";
|
|
||||||
}
|
|
||||||
|
|
||||||
bootbox.prompt({
|
|
||||||
title: promptTitle,
|
|
||||||
inputType: 'password',
|
|
||||||
centerVertical: true,
|
|
||||||
locale: 'locale_zh_CN',
|
|
||||||
callback: function (filePassword) {
|
|
||||||
if (filePassword != null) {
|
|
||||||
const locationHref = window.location.href;
|
|
||||||
const isInclude = locationHref.includes("filePassword=");
|
|
||||||
let redirectUrl = null;
|
|
||||||
if (isInclude) {
|
|
||||||
const url = new URL(locationHref);
|
|
||||||
url.searchParams.set("filePassword", filePassword);
|
|
||||||
redirectUrl = url.href;
|
|
||||||
} else {
|
|
||||||
redirectUrl = locationHref + '&filePassword=' + filePassword;
|
|
||||||
}
|
|
||||||
|
|
||||||
window.location.replace(redirectUrl);
|
|
||||||
} else {
|
|
||||||
location.reload();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
@ -4,8 +4,10 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
|
||||||
<link href="css/zTreeStyle.css" rel="stylesheet" type="text/css">
|
|
||||||
<#include "*/commonHeader.ftl">
|
<#include "*/commonHeader.ftl">
|
||||||
|
<script src="js/jquery-3.6.1.min.js" type="text/javascript"></script>
|
||||||
|
<link href="css/zTreeStyle.css" rel="stylesheet" type="text/css">
|
||||||
|
<script src="js/base64.min.js" type="text/javascript"></script>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body {
|
body {
|
||||||
background-color: #404040;
|
background-color: #404040;
|
||||||
|
@ -103,4 +105,4 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>多媒体文件预览</title>
|
<title>多媒体文件预览</title>
|
||||||
<script src="js/flv.min.js" type="text/javascript"></script>
|
|
||||||
<#include "*/commonHeader.ftl">
|
<#include "*/commonHeader.ftl">
|
||||||
|
<script src="js/flv.min.js" type="text/javascript"></script>
|
||||||
</head>
|
</head>
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
|
|
|
@ -4,10 +4,12 @@
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
|
||||||
<title>markdown文本预览</title>
|
<title>markdown文本预览</title>
|
||||||
|
<#include "*/commonHeader.ftl">
|
||||||
|
<script src="js/jquery-3.6.1.min.js" type="text/javascript"></script>
|
||||||
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"/>
|
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"/>
|
||||||
<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
|
<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
|
||||||
<script src="js/marked.min.js" type="text/javascript"></script>
|
<script src="js/marked.min.js" type="text/javascript"></script>
|
||||||
<#include "*/commonHeader.ftl">
|
<script src="js/base64.min.js" type="text/javascript"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<input hidden id="textData" value="${textData}"/>
|
<input hidden id="textData" value="${textData}"/>
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<title>多媒体文件预览</title>
|
<title>多媒体文件预览</title>
|
||||||
|
<#include "*/commonHeader.ftl">
|
||||||
<link rel="stylesheet" href="plyr/plyr.css"/>
|
<link rel="stylesheet" href="plyr/plyr.css"/>
|
||||||
<script type="text/javascript" src="plyr/plyr.js"></script>
|
<script type="text/javascript" src="plyr/plyr.js"></script>
|
||||||
<#include "*/commonHeader.ftl">
|
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
background-color: #404040;
|
background-color: #404040;
|
||||||
|
@ -30,4 +30,4 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
|
||||||
<title>OFD预览</title>
|
<title>OFD预览</title>
|
||||||
<#include "*/commonHeader.ftl">
|
<#include "*/commonHeader.ftl">
|
||||||
|
<script src="js/base64.min.js" type="text/javascript"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>PDF图片预览</title>
|
<title>PDF图片预览</title>
|
||||||
<script src="js/lazyload.js"></script>
|
|
||||||
<#include "*/commonHeader.ftl">
|
<#include "*/commonHeader.ftl">
|
||||||
|
<script src="js/lazyload.js"></script>
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
background-color: #404040;
|
background-color: #404040;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
|
||||||
<title>PDF预览</title>
|
<title>PDF预览</title>
|
||||||
<#include "*/commonHeader.ftl">
|
<#include "*/commonHeader.ftl">
|
||||||
|
<script src="js/base64.min.js" type="text/javascript"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>图片预览</title>
|
<title>图片预览</title>
|
||||||
|
<#include "*/commonHeader.ftl">
|
||||||
<link rel="stylesheet" href="css/viewer.min.css">
|
<link rel="stylesheet" href="css/viewer.min.css">
|
||||||
<script src="js/viewer.min.js"></script>
|
<script src="js/viewer.min.js"></script>
|
||||||
<#include "*/commonHeader.ftl">
|
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
background-color: #404040;
|
background-color: #404040;
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
|
<#include "*/commonHeader.ftl">
|
||||||
<link href="pptx/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
<link href="pptx/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||||
<link href="pptx/idocv/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">
|
||||||
<#include "*/commonHeader.ftl">
|
|
||||||
<#-- 手机端预览兼容 -->
|
<#-- 手机端预览兼容 -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var windowWidth = document.documentElement.clientWidth;
|
var windowWidth = document.documentElement.clientWidth;
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
|
||||||
<#include "*/commonHeader.ftl">
|
<#include "*/commonHeader.ftl">
|
||||||
<script src="js/svg-pan-zoom.js"></script>
|
<script src="js/svg-pan-zoom.js"></script>
|
||||||
|
<script src="js/base64.min.js"></script>
|
||||||
<#if currentUrl?contains("http://") || currentUrl?contains("https://") || currentUrl?contains("ftp://")>
|
<#if currentUrl?contains("http://") || currentUrl?contains("https://") || currentUrl?contains("ftp://")>
|
||||||
<#assign finalUrl="${currentUrl}">
|
<#assign finalUrl="${currentUrl}">
|
||||||
<#else>
|
<#else>
|
||||||
|
@ -16,17 +17,17 @@
|
||||||
<div id="container">
|
<div id="container">
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
var url = '${finalUrl}';
|
var url = '${finalUrl}';
|
||||||
var baseUrl = '${baseUrl}'.endsWith('/') ? '${baseUrl}' : '${baseUrl}' + '/';
|
var baseUrl = '${baseUrl}'.endsWith('/') ? '${baseUrl}' : '${baseUrl}' + '/';
|
||||||
if (!url.startsWith(baseUrl)) {
|
if (!url.startsWith(baseUrl)) {
|
||||||
url = baseUrl + 'getCorsFile?urlPath=' + encodeURIComponent(Base64.encode(url));
|
url = baseUrl + 'getCorsFile?urlPath=' + encodeURIComponent(Base64.encode(url));
|
||||||
}
|
}
|
||||||
|
|
||||||
function createNewEmbed(src){
|
function createNewEmbed(src){
|
||||||
var lastEventListener = null;
|
var lastEventListener = null;
|
||||||
var gaodu1 =$(document).height();
|
var gaodu1 =$(document).height();
|
||||||
var gaodu=gaodu1-5;
|
var gaodu=gaodu1-5;
|
||||||
var embed = document.createElement('embed');
|
var embed = document.createElement('embed');
|
||||||
embed.setAttribute('style', 'width: 99%; height: '+gaodu+'px; border:1px solid black;');
|
embed.setAttribute('style', 'width: 99%; height: '+gaodu+'px; border:1px solid black;');
|
||||||
embed.setAttribute('type', 'image/svg+xml');
|
embed.setAttribute('type', 'image/svg+xml');
|
||||||
|
@ -48,4 +49,4 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -3,9 +3,10 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<title>Tiff 图片预览</title>
|
<title>Tiff 图片预览</title>
|
||||||
|
<#include "*/commonHeader.ftl">
|
||||||
<link rel="stylesheet" href="css/viewer.min.css">
|
<link rel="stylesheet" href="css/viewer.min.css">
|
||||||
<script src="js/UTIF.js"></script>
|
<script src="js/UTIF.js"></script>
|
||||||
<#include "*/commonHeader.ftl">
|
<script src="js/base64.min.js" type="text/javascript"></script>
|
||||||
<#if currentUrl?contains("http://") || currentUrl?contains("https://") || currentUrl?contains("file://")|| currentUrl?contains("ftp://")>
|
<#if currentUrl?contains("http://") || currentUrl?contains("https://") || currentUrl?contains("file://")|| currentUrl?contains("ftp://")>
|
||||||
<#assign finalUrl="${currentUrl}">
|
<#assign finalUrl="${currentUrl}">
|
||||||
<#else>
|
<#else>
|
||||||
|
|
|
@ -4,37 +4,39 @@
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
|
||||||
<title>${file.name}普通文本预览</title>
|
<title>${file.name}普通文本预览</title>
|
||||||
|
<#include "*/commonHeader.ftl">
|
||||||
|
<script src="js/jquery-3.6.1.min.js" type="text/javascript"></script>
|
||||||
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"/>
|
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"/>
|
||||||
<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
|
<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
|
||||||
<#include "*/commonHeader.ftl">
|
<script src="js/base64.min.js" type="text/javascript"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<input hidden id="textData" value="${textData}"/>
|
<input hidden id="textData" value="${textData}"/>
|
||||||
<#if "${file.suffix?html}" == "txt" || "${file.suffix?html}" == "log" || "${file.suffix?html}" == "TXT" || "${file.suffix?html}" == "LOG">
|
<#if "${file.suffix?html}" == "txt" || "${file.suffix?html}" == "log" || "${file.suffix?html}" == "TXT" || "${file.suffix?html}" == "LOG">
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
DIV.black {
|
DIV.black {
|
||||||
line-height:25px;
|
line-height:25px;
|
||||||
PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 100%;
|
PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 100%;
|
||||||
MARGIN: 1px; COLOR: #fff;
|
MARGIN: 1px; COLOR: #fff;
|
||||||
BACKGROUND-COLOR: #000; TEXT-ALIGN: left ;
|
BACKGROUND-COLOR: #000; TEXT-ALIGN: left ;
|
||||||
}
|
}
|
||||||
DIV.black A {
|
DIV.black A {
|
||||||
BORDER-RIGHT: #909090 1px solid; PADDING-RIGHT: 5px;
|
BORDER-RIGHT: #909090 1px solid; PADDING-RIGHT: 5px;
|
||||||
BACKGROUND-POSITION: 50% bottom; BORDER-TOP: #909090 1px solid;
|
BACKGROUND-POSITION: 50% bottom; BORDER-TOP: #909090 1px solid;
|
||||||
PADDING-LEFT: 5px; BACKGROUND-IMAGE: url(); PADDING-BOTTOM: 2px;
|
PADDING-LEFT: 5px; BACKGROUND-IMAGE: url(); PADDING-BOTTOM: 2px;
|
||||||
BORDER-LEFT: #909090 1px solid; COLOR: #fff; MARGIN-RIGHT: 3px;
|
BORDER-LEFT: #909090 1px solid; COLOR: #fff; MARGIN-RIGHT: 3px;
|
||||||
PADDING-TOP: 2px; BORDER-BOTTOM: #909090 1px solid; TEXT-DECORATION: none
|
PADDING-TOP: 2px; BORDER-BOTTOM: #909090 1px solid; TEXT-DECORATION: none
|
||||||
}
|
}
|
||||||
DIV.black A:hover {
|
DIV.black A:hover {
|
||||||
BORDER-RIGHT: #f0f0f0 1px solid; BORDER-TOP: #f0f0f0 1px solid;
|
BORDER-RIGHT: #f0f0f0 1px solid; BORDER-TOP: #f0f0f0 1px solid;
|
||||||
BACKGROUND-IMAGE: BORDER-LEFT: #f0f0f0 1px solid;
|
BACKGROUND-IMAGE: BORDER-LEFT: #f0f0f0 1px solid;
|
||||||
COLOR: #ffffff; BORDER-BOTTOM: #f0f0f0 1px solid; BACKGROUND-COLOR: #404040
|
COLOR: #ffffff; BORDER-BOTTOM: #f0f0f0 1px solid; BACKGROUND-COLOR: #404040
|
||||||
}
|
}
|
||||||
DIV.black A:active {
|
DIV.black A:active {
|
||||||
BORDER-RIGHT: #f0f0f0 1px solid; BORDER-TOP: #f0f0f0 1px solid;
|
BORDER-RIGHT: #f0f0f0 1px solid; BORDER-TOP: #f0f0f0 1px solid;
|
||||||
BACKGROUND-IMAGE: BORDER-LEFT: #f0f0f0 1px solid;
|
BACKGROUND-IMAGE: BORDER-LEFT: #f0f0f0 1px solid;
|
||||||
COLOR: #ffffff; BORDER-BOTTOM: #f0f0f0 1px solid; BACKGROUND-COLOR: #404040
|
COLOR: #ffffff; BORDER-BOTTOM: #f0f0f0 1px solid; BACKGROUND-COLOR: #404040
|
||||||
}
|
}
|
||||||
.divContent
|
.divContent
|
||||||
{
|
{
|
||||||
color:#fff;
|
color:#fff;
|
||||||
|
@ -51,7 +53,7 @@ line-height:30px;
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
|
@ -64,7 +66,7 @@ line-height:30px;
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div id="divPagenation" class="black" >
|
<div id="divPagenation" class="black" >
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="divContent" class="panel-body">
|
<div id="divContent" class="panel-body">
|
||||||
</div>
|
</div>
|
||||||
|
@ -72,7 +74,7 @@ line-height:30px;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var base64data = $("#textData").val()
|
var base64data = $("#textData").val()
|
||||||
var s = Base64.decode(base64data);
|
var s = Base64.decode(base64data);
|
||||||
|
@ -87,7 +89,7 @@ line-height:30px;
|
||||||
//将img标签替换为❈
|
//将img标签替换为❈
|
||||||
imgContent = s.replace(imgReg,"❈");
|
imgContent = s.replace(imgReg,"❈");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 封装DHTMLpagenation
|
// 封装DHTMLpagenation
|
||||||
function DHTMLpagenation(content)
|
function DHTMLpagenation(content)
|
||||||
{
|
{
|
||||||
|
@ -146,7 +148,7 @@ line-height:30px;
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//创建每页显示内容的消息的DIV
|
//创建每页显示内容的消息的DIV
|
||||||
divDisplayContent=document.createElement("DIV");
|
divDisplayContent=document.createElement("DIV");
|
||||||
divDisplayContent.id="divContent";
|
divDisplayContent.id="divContent";
|
||||||
document.body.appendChild(divDisplayContent);
|
document.body.appendChild(divDisplayContent);
|
||||||
|
@ -164,11 +166,11 @@ line-height:30px;
|
||||||
|
|
||||||
//初始化分页;
|
//初始化分页;
|
||||||
//包括把加入CSS,检查是否需要分页
|
//包括把加入CSS,检查是否需要分页
|
||||||
DHTMLpagenation.initialize=function()
|
DHTMLpagenation.initialize=function()
|
||||||
{
|
{
|
||||||
|
|
||||||
divDisplayContent.className= contentStyle != null ? contentStyle : "divContent";
|
divDisplayContent.className= contentStyle != null ? contentStyle : "divContent";
|
||||||
|
|
||||||
if(contentLength<=perpageLength)
|
if(contentLength<=perpageLength)
|
||||||
{
|
{
|
||||||
strDisplayContent=content;
|
strDisplayContent=content;
|
||||||
|
@ -179,14 +181,14 @@ line-height:30px;
|
||||||
pageSizeCount=Math.ceil((contentLength/perpageLength));
|
pageSizeCount=Math.ceil((contentLength/perpageLength));
|
||||||
|
|
||||||
DHTMLpagenation.goto(currentPage);
|
DHTMLpagenation.goto(currentPage);
|
||||||
|
|
||||||
DHTMLpagenation.displayContent();
|
DHTMLpagenation.displayContent();
|
||||||
};
|
};
|
||||||
|
|
||||||
//显示分页栏
|
//显示分页栏
|
||||||
DHTMLpagenation.displayPage=function()
|
DHTMLpagenation.displayPage=function()
|
||||||
{
|
{
|
||||||
|
|
||||||
strDisplayPagenation="";
|
strDisplayPagenation="";
|
||||||
|
|
||||||
if(currentPage && currentPage !=1)
|
if(currentPage && currentPage !=1)
|
||||||
|
@ -197,7 +199,7 @@ line-height:30px;
|
||||||
{
|
{
|
||||||
strDisplayPagenation+="上一页 ";
|
strDisplayPagenation+="上一页 ";
|
||||||
}
|
}
|
||||||
|
|
||||||
for(var i=1;i<=pageSizeCount;i++)
|
for(var i=1;i<=pageSizeCount;i++)
|
||||||
{
|
{
|
||||||
if(i!=currentPage)
|
if(i!=currentPage)
|
||||||
|
@ -218,27 +220,27 @@ line-height:30px;
|
||||||
{
|
{
|
||||||
strDisplayPagenation+="下一页 ";
|
strDisplayPagenation+="下一页 ";
|
||||||
}
|
}
|
||||||
|
|
||||||
strDisplayPagenation+="共 " + pageSizeCount + " 页。<br>每页" + perpageLength + " 字符,调整字符数:<input type='text' value='"+perpageLength+"' id='ctlPerpageLength' /><input type='button' value='确定' onclick='DHTMLpagenation.change()' />";
|
strDisplayPagenation+="共 " + pageSizeCount + " 页。<br>每页" + perpageLength + " 字符,调整字符数:<input type='text' value='"+perpageLength+"' id='ctlPerpageLength' /><input type='button' value='确定' onclick='DHTMLpagenation.change()' />";
|
||||||
|
|
||||||
divDisplayPagenation.innerHTML=strDisplayPagenation;
|
divDisplayPagenation.innerHTML=strDisplayPagenation;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//上一页
|
//上一页
|
||||||
DHTMLpagenation.previous=function()
|
DHTMLpagenation.previous=function()
|
||||||
{
|
{
|
||||||
DHTMLpagenation.goto(currentPage-1);
|
DHTMLpagenation.goto(currentPage-1);
|
||||||
};
|
};
|
||||||
|
|
||||||
//下一页
|
//下一页
|
||||||
DHTMLpagenation.next=function()
|
DHTMLpagenation.next=function()
|
||||||
{
|
{
|
||||||
|
|
||||||
DHTMLpagenation.goto(currentPage+1);
|
DHTMLpagenation.goto(currentPage+1);
|
||||||
};
|
};
|
||||||
|
|
||||||
//跳转至某一页
|
//跳转至某一页
|
||||||
DHTMLpagenation.goto=function(iCurrentPage)
|
DHTMLpagenation.goto=function(iCurrentPage)
|
||||||
{
|
{
|
||||||
|
@ -246,35 +248,35 @@ line-height:30px;
|
||||||
if(regularExp.test(iCurrentPage))
|
if(regularExp.test(iCurrentPage))
|
||||||
{
|
{
|
||||||
currentPage=iCurrentPage;
|
currentPage=iCurrentPage;
|
||||||
|
|
||||||
var tempContent = "";
|
var tempContent = "";
|
||||||
|
|
||||||
//获取当前的内容 里面包含 ❈
|
//获取当前的内容 里面包含 ❈
|
||||||
var currentContent = imgContent.substr((currentPage-1)*perpageLength,perpageLength);
|
var currentContent = imgContent.substr((currentPage-1)*perpageLength,perpageLength);
|
||||||
|
|
||||||
tempContent = currentContent;
|
tempContent = currentContent;
|
||||||
|
|
||||||
//当前页是否有 ❈ 获取最后一个 ❈ 的位置
|
//当前页是否有 ❈ 获取最后一个 ❈ 的位置
|
||||||
var indexOf = currentContent.indexOf("❈");
|
var indexOf = currentContent.indexOf("❈");
|
||||||
|
|
||||||
if(indexOf >= 0)
|
if(indexOf >= 0)
|
||||||
{
|
{
|
||||||
//获取从开始位置到当前页位置的内容
|
//获取从开始位置到当前页位置的内容
|
||||||
var beginToEndContent = imgContent.substr(0,currentPage*perpageLength);
|
var beginToEndContent = imgContent.substr(0,currentPage*perpageLength);
|
||||||
|
|
||||||
//获取开始到当前页位置的内容 中的 * 的最后的下标
|
//获取开始到当前页位置的内容 中的 * 的最后的下标
|
||||||
var reCount = beginToEndContent.split("❈").length - 1;
|
var reCount = beginToEndContent.split("❈").length - 1;
|
||||||
|
|
||||||
var contentArray = currentContent.split("❈");
|
var contentArray = currentContent.split("❈");
|
||||||
|
|
||||||
tempContent = replaceStr(contentArray,reCount,matchContent);
|
tempContent = replaceStr(contentArray,reCount,matchContent);
|
||||||
|
|
||||||
}
|
}
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
// tempContent=imgContent.substr((currentPage-1)*perpageLength,perpageLength);
|
// tempContent=imgContent.substr((currentPage-1)*perpageLength,perpageLength);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
strDisplayContent=tempContent;
|
strDisplayContent=tempContent;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -289,11 +291,11 @@ line-height:30px;
|
||||||
{
|
{
|
||||||
divDisplayContent.innerHTML=strDisplayContent;
|
divDisplayContent.innerHTML=strDisplayContent;
|
||||||
};
|
};
|
||||||
|
|
||||||
//改变每页的字节数
|
//改变每页的字节数
|
||||||
DHTMLpagenation.change=function()
|
DHTMLpagenation.change=function()
|
||||||
{
|
{
|
||||||
|
|
||||||
var iPerpageLength = document.getElementById("ctlPerpageLength").value;
|
var iPerpageLength = document.getElementById("ctlPerpageLength").value;
|
||||||
if(regularExp.test(iPerpageLength))
|
if(regularExp.test(iPerpageLength))
|
||||||
{
|
{
|
||||||
|
@ -301,7 +303,7 @@ line-height:30px;
|
||||||
// DHTMLpagenation.perpageLength=iPerpageLength;
|
// DHTMLpagenation.perpageLength=iPerpageLength;
|
||||||
// DHTMLpagenation.currentPage=1;
|
// DHTMLpagenation.currentPage=1;
|
||||||
// DHTMLpagenation.initialize();
|
// DHTMLpagenation.initialize();
|
||||||
|
|
||||||
DHTMLpagenation(s,iPerpageLength);
|
DHTMLpagenation(s,iPerpageLength);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -309,41 +311,41 @@ line-height:30px;
|
||||||
alert("请输入数字");
|
alert("请输入数字");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* currentArray:当前页以 * 分割后的数组
|
/* currentArray:当前页以 * 分割后的数组
|
||||||
replaceCount:从开始内容到当前页的内容 * 的个数
|
replaceCount:从开始内容到当前页的内容 * 的个数
|
||||||
matchArray : img标签的匹配的内容
|
matchArray : img标签的匹配的内容
|
||||||
*/
|
*/
|
||||||
function replaceStr(currentArray,replaceCount,matchArray)
|
function replaceStr(currentArray,replaceCount,matchArray)
|
||||||
{
|
{
|
||||||
|
|
||||||
var result = "";
|
var result = "";
|
||||||
for(var i=currentArray.length -1,j = replaceCount-1 ;i>=1; i--)
|
for(var i=currentArray.length -1,j = replaceCount-1 ;i>=1; i--)
|
||||||
{
|
{
|
||||||
|
|
||||||
var temp = (matchArray[j] + currentArray[i]);
|
var temp = (matchArray[j] + currentArray[i]);
|
||||||
|
|
||||||
result = temp + result;
|
result = temp + result;
|
||||||
|
|
||||||
j--;
|
j--;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = currentArray[0] + result ;
|
result = currentArray[0] + result ;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DHTMLpagenation(s,20000);
|
DHTMLpagenation(s,20000);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始化
|
* 初始化
|
||||||
*/
|
*/
|
||||||
window.onload = function () {
|
window.onload = function () {
|
||||||
initWaterMark();
|
initWaterMark();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<#else/>
|
<#else/>
|
||||||
|
|
|
@ -5,10 +5,12 @@
|
||||||
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
|
||||||
<title>xml文本预览</title>
|
<title>xml文本预览</title>
|
||||||
<#include "*/commonHeader.ftl">
|
<#include "*/commonHeader.ftl">
|
||||||
|
<script src="js/jquery-3.6.1.min.js" type="text/javascript"></script>
|
||||||
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"/>
|
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"/>
|
||||||
<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
|
<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
|
||||||
<link rel="stylesheet" href="css/xmlTreeViewer.css"/>
|
<link rel="stylesheet" href="css/xmlTreeViewer.css"/>
|
||||||
<script src="js/xmlTreeViewer.js" type="text/javascript"></script>
|
<script src="js/xmlTreeViewer.js" type="text/javascript"></script>
|
||||||
|
<script src="js/base64.min.js" type="text/javascript"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue